Skip to content

Commit

Permalink
Particle Container: SoA Components (#226)
Browse files Browse the repository at this point in the history
* Particle Container: SoA Components

Expose properties for compile-time and runtime SoA components
directly in the `ParticleContainer` class, too.

* Update Stub Files

---------

Co-authored-by: ax3l <ax3l@users.noreply.github.com>
  • Loading branch information
ax3l and ax3l authored Nov 24, 2023
1 parent c85c7ba commit 58dc1ed
Show file tree
Hide file tree
Showing 4 changed files with 729 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
240 changes: 240 additions & 0 deletions src/amrex/space1d/amrex_1d_pybind/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -5999,6 +5999,26 @@ class ParticleContainer_0_0_4_0_arena:
"""
@property
def NumIntComps(self) -> int:
"""
The number of compile-time and runtime int components in SoA
"""
@property
def NumRealComps(self) -> int:
"""
The number of compile-time and runtime Real components in SoA
"""
@property
def NumRuntimeIntComps(self) -> int:
"""
The number of runtime Int components in SoA
"""
@property
def NumRuntimeRealComps(self) -> int:
"""
The number of runtime Real components in SoA
"""
@property
def finest_level(self) -> int: ...

class ParticleContainer_0_0_4_0_default:
Expand Down Expand Up @@ -6126,6 +6146,26 @@ class ParticleContainer_0_0_4_0_default:
"""
@property
def NumIntComps(self) -> int:
"""
The number of compile-time and runtime int components in SoA
"""
@property
def NumRealComps(self) -> int:
"""
The number of compile-time and runtime Real components in SoA
"""
@property
def NumRuntimeIntComps(self) -> int:
"""
The number of runtime Int components in SoA
"""
@property
def NumRuntimeRealComps(self) -> int:
"""
The number of runtime Real components in SoA
"""
@property
def finest_level(self) -> int: ...

class ParticleContainer_0_0_4_0_pinned:
Expand Down Expand Up @@ -6253,6 +6293,26 @@ class ParticleContainer_0_0_4_0_pinned:
"""
@property
def NumIntComps(self) -> int:
"""
The number of compile-time and runtime int components in SoA
"""
@property
def NumRealComps(self) -> int:
"""
The number of compile-time and runtime Real components in SoA
"""
@property
def NumRuntimeIntComps(self) -> int:
"""
The number of runtime Int components in SoA
"""
@property
def NumRuntimeRealComps(self) -> int:
"""
The number of runtime Real components in SoA
"""
@property
def finest_level(self) -> int: ...

class ParticleContainer_0_0_5_0_arena:
Expand Down Expand Up @@ -6380,6 +6440,26 @@ class ParticleContainer_0_0_5_0_arena:
"""
@property
def NumIntComps(self) -> int:
"""
The number of compile-time and runtime int components in SoA
"""
@property
def NumRealComps(self) -> int:
"""
The number of compile-time and runtime Real components in SoA
"""
@property
def NumRuntimeIntComps(self) -> int:
"""
The number of runtime Int components in SoA
"""
@property
def NumRuntimeRealComps(self) -> int:
"""
The number of runtime Real components in SoA
"""
@property
def finest_level(self) -> int: ...

class ParticleContainer_0_0_5_0_default:
Expand Down Expand Up @@ -6507,6 +6587,26 @@ class ParticleContainer_0_0_5_0_default:
"""
@property
def NumIntComps(self) -> int:
"""
The number of compile-time and runtime int components in SoA
"""
@property
def NumRealComps(self) -> int:
"""
The number of compile-time and runtime Real components in SoA
"""
@property
def NumRuntimeIntComps(self) -> int:
"""
The number of runtime Int components in SoA
"""
@property
def NumRuntimeRealComps(self) -> int:
"""
The number of runtime Real components in SoA
"""
@property
def finest_level(self) -> int: ...

class ParticleContainer_0_0_5_0_pinned:
Expand Down Expand Up @@ -6634,6 +6734,26 @@ class ParticleContainer_0_0_5_0_pinned:
"""
@property
def NumIntComps(self) -> int:
"""
The number of compile-time and runtime int components in SoA
"""
@property
def NumRealComps(self) -> int:
"""
The number of compile-time and runtime Real components in SoA
"""
@property
def NumRuntimeIntComps(self) -> int:
"""
The number of runtime Int components in SoA
"""
@property
def NumRuntimeRealComps(self) -> int:
"""
The number of runtime Real components in SoA
"""
@property
def finest_level(self) -> int: ...

class ParticleContainer_1_1_2_1_arena:
Expand Down Expand Up @@ -6761,6 +6881,26 @@ class ParticleContainer_1_1_2_1_arena:
"""
@property
def NumIntComps(self) -> int:
"""
The number of compile-time and runtime int components in SoA
"""
@property
def NumRealComps(self) -> int:
"""
The number of compile-time and runtime Real components in SoA
"""
@property
def NumRuntimeIntComps(self) -> int:
"""
The number of runtime Int components in SoA
"""
@property
def NumRuntimeRealComps(self) -> int:
"""
The number of runtime Real components in SoA
"""
@property
def finest_level(self) -> int: ...

class ParticleContainer_1_1_2_1_default:
Expand Down Expand Up @@ -6888,6 +7028,26 @@ class ParticleContainer_1_1_2_1_default:
"""
@property
def NumIntComps(self) -> int:
"""
The number of compile-time and runtime int components in SoA
"""
@property
def NumRealComps(self) -> int:
"""
The number of compile-time and runtime Real components in SoA
"""
@property
def NumRuntimeIntComps(self) -> int:
"""
The number of runtime Int components in SoA
"""
@property
def NumRuntimeRealComps(self) -> int:
"""
The number of runtime Real components in SoA
"""
@property
def finest_level(self) -> int: ...

class ParticleContainer_1_1_2_1_pinned:
Expand Down Expand Up @@ -7015,6 +7175,26 @@ class ParticleContainer_1_1_2_1_pinned:
"""
@property
def NumIntComps(self) -> int:
"""
The number of compile-time and runtime int components in SoA
"""
@property
def NumRealComps(self) -> int:
"""
The number of compile-time and runtime Real components in SoA
"""
@property
def NumRuntimeIntComps(self) -> int:
"""
The number of runtime Int components in SoA
"""
@property
def NumRuntimeRealComps(self) -> int:
"""
The number of runtime Real components in SoA
"""
@property
def finest_level(self) -> int: ...

class ParticleContainer_pureSoA_8_2_arena:
Expand Down Expand Up @@ -7128,6 +7308,26 @@ class ParticleContainer_pureSoA_8_2_arena:
"""
@property
def NumIntComps(self) -> int:
"""
The number of compile-time and runtime int components in SoA
"""
@property
def NumRealComps(self) -> int:
"""
The number of compile-time and runtime Real components in SoA
"""
@property
def NumRuntimeIntComps(self) -> int:
"""
The number of runtime Int components in SoA
"""
@property
def NumRuntimeRealComps(self) -> int:
"""
The number of runtime Real components in SoA
"""
@property
def finest_level(self) -> int: ...

class ParticleContainer_pureSoA_8_2_default:
Expand Down Expand Up @@ -7241,6 +7441,26 @@ class ParticleContainer_pureSoA_8_2_default:
"""
@property
def NumIntComps(self) -> int:
"""
The number of compile-time and runtime int components in SoA
"""
@property
def NumRealComps(self) -> int:
"""
The number of compile-time and runtime Real components in SoA
"""
@property
def NumRuntimeIntComps(self) -> int:
"""
The number of runtime Int components in SoA
"""
@property
def NumRuntimeRealComps(self) -> int:
"""
The number of runtime Real components in SoA
"""
@property
def finest_level(self) -> int: ...

class ParticleContainer_pureSoA_8_2_pinned:
Expand Down Expand Up @@ -7354,6 +7574,26 @@ class ParticleContainer_pureSoA_8_2_pinned:
"""
@property
def NumIntComps(self) -> int:
"""
The number of compile-time and runtime int components in SoA
"""
@property
def NumRealComps(self) -> int:
"""
The number of compile-time and runtime Real components in SoA
"""
@property
def NumRuntimeIntComps(self) -> int:
"""
The number of runtime Int components in SoA
"""
@property
def NumRuntimeRealComps(self) -> int:
"""
The number of runtime Real components in SoA
"""
@property
def finest_level(self) -> int: ...

class ParticleInitType_0_0_4_0:
Expand Down
Loading

0 comments on commit 58dc1ed

Please sign in to comment.