Skip to content

Commit e1e0e1b

Browse files
committed
SoA Name Helpers
1 parent 0585d17 commit e1e0e1b

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

src/Particle/ParticleContainer.H

+18
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,24 @@ void make_ParticleContainer_and_Iterators (py::module &m, std::string allocstr)
236236
"Get the names for the int SoA components"
237237
)
238238

239+
.def("has_real_comp",
240+
&ParticleContainerType::HasRealComp,
241+
"Check if a container has an ParticleReal component"
242+
)
243+
.def("has_int_comp",
244+
&ParticleContainerType::HasIntComp,
245+
"Check if a container has an Integer component"
246+
)
247+
248+
.def("get_real_comp_index",
249+
&ParticleContainerType::GetRealCompIndex,
250+
"Get the ParticleReal SoA index of a component"
251+
)
252+
.def("get_int_comp_index",
253+
&ParticleContainerType::GetIntCompIndex,
254+
"Get the Integer SoA index of a component"
255+
)
256+
239257
.def_property_readonly("finest_level", &ParticleContainerBase::finestLevel)
240258

241259
// ParticleContainer ( const ParticleContainer &) = delete;

src/Particle/StructOfArrays.H

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#include <AMReX_GpuAllocators.H>
1111
#include <AMReX_StructOfArrays.H>
1212

13-
#include <stdexcept>
1413
#include <sstream>
1514

1615

0 commit comments

Comments
 (0)