aboutsummaryrefslogtreecommitdiff
path: root/Source/Python/WarpXWrappers.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Python/WarpXWrappers.cpp')
-rw-r--r--Source/Python/WarpXWrappers.cpp8
1 files changed, 8 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;