diff options
Diffstat (limited to 'Source/Python')
-rw-r--r-- | Source/Python/WarpXWrappers.cpp | 8 | ||||
-rw-r--r-- | Source/Python/WarpXWrappers.h | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/Source/Python/WarpXWrappers.cpp b/Source/Python/WarpXWrappers.cpp index 16005ed43..24ee25dcf 100644 --- a/Source/Python/WarpXWrappers.cpp +++ b/Source/Python/WarpXWrappers.cpp @@ -132,6 +132,14 @@ extern "C" return PIdx::nattribs; } + int warpx_nCompsSpecies(const char* char_species_name) + { + auto & mypc = WarpX::GetInstance().GetPartContainer(); + const std::string species_name(char_species_name); + auto & myspc = mypc.GetParticleContainerFromName(species_name); + return myspc.NumRealComps(); + } + int warpx_SpaceDim() { return AMREX_SPACEDIM; diff --git a/Source/Python/WarpXWrappers.h b/Source/Python/WarpXWrappers.h index a7d389750..9237cefe5 100644 --- a/Source/Python/WarpXWrappers.h +++ b/Source/Python/WarpXWrappers.h @@ -32,6 +32,8 @@ extern "C" { int warpx_nComps(); + int warpx_nCompsSpecies(const char* char_species_name); + int warpx_SpaceDim(); void amrex_init (int argc, char* argv[]); |