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 6703bb665..63ba4b713 100644
--- a/Source/Python/WarpXWrappers.cpp
+++ b/Source/Python/WarpXWrappers.cpp
@@ -516,6 +516,14 @@ namespace
mypc.defineAllParticleTiles();
}
+ amrex::Real warpx_sumParticleCharge(const char* char_species_name, const bool local)
+ {
+ auto & mypc = WarpX::GetInstance().GetPartContainer();
+ const std::string species_name(char_species_name);
+ auto & myspc = mypc.GetParticleContainerFromName(species_name);
+ return myspc.sumParticleCharge(local);
+ }
+
int warpx_getParticleBoundaryBufferSize(const char* species_name, int boundary)
{
const std::string name(species_name);