Skip to content

Commit

Permalink
Particle Container: SoA Components
Browse files Browse the repository at this point in the history
Expose properties for compile-time and runtime SoA components
directly in the `ParticleContainer` class, too.
  • Loading branch information
ax3l committed Nov 23, 2023
1 parent c85c7ba commit f73ae5b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Particle/ParticleContainer.H
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,15 @@ void make_ParticleContainer_and_Iterators (py::module &m, std::string allocstr)
.def_property_readonly_static("NArrayReal", [](const py::object&){return ParticleContainerType::NArrayReal; })
.def_property_readonly_static("NArrayInt", [](const py::object&){return ParticleContainerType::NArrayInt; })

.def_property_readonly("NumRealComps", &ParticleContainerType::NumRealComps,
"The number of compile-time and runtime Real components in SoA")
.def_property_readonly("NumIntComps", &ParticleContainerType::NumIntComps,
"The number of compile-time and runtime int components in SoA")
.def_property_readonly("NumRuntimeRealComps", &ParticleContainerType::NumRuntimeRealComps,
"The number of runtime Real components in SoA")
.def_property_readonly("NumRuntimeIntComps", &ParticleContainerType::NumRuntimeIntComps,
"The number of runtime Int components in SoA")

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

// ParticleContainer ( const ParticleContainer &) = delete;
Expand Down

0 comments on commit f73ae5b

Please sign in to comment.