Skip to content

Commit

Permalink
SoA Name Helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
ax3l committed Jan 23, 2025
1 parent 0585d17 commit e1e0e1b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
18 changes: 18 additions & 0 deletions src/Particle/ParticleContainer.H
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,24 @@ void make_ParticleContainer_and_Iterators (py::module &m, std::string allocstr)
"Get the names for the int SoA components"
)

.def("has_real_comp",
&ParticleContainerType::HasRealComp,
"Check if a container has an ParticleReal component"
)
.def("has_int_comp",
&ParticleContainerType::HasIntComp,
"Check if a container has an Integer component"
)

.def("get_real_comp_index",
&ParticleContainerType::GetRealCompIndex,
"Get the ParticleReal SoA index of a component"
)
.def("get_int_comp_index",
&ParticleContainerType::GetIntCompIndex,
"Get the Integer SoA index of a component"
)

.def_property_readonly("finest_level", &ParticleContainerBase::finestLevel)

// ParticleContainer ( const ParticleContainer &) = delete;
Expand Down
1 change: 0 additions & 1 deletion src/Particle/StructOfArrays.H
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <AMReX_GpuAllocators.H>
#include <AMReX_StructOfArrays.H>

#include <stdexcept>
#include <sstream>


Expand Down

0 comments on commit e1e0e1b

Please sign in to comment.