diff options
author | 2020-10-16 10:58:22 +0200 | |
---|---|---|
committer | 2020-10-16 10:58:22 +0200 | |
commit | 1f8f4f74adf7d460c593752a83e3574cc5cc0589 (patch) | |
tree | ac1f87b081453861c9e5bdae6198c87b9c8f33e4 /Source/Python | |
parent | c0ee57664cedc31a5c16c809482e3068828a7755 (diff) | |
download | WarpX-1f8f4f74adf7d460c593752a83e3574cc5cc0589.tar.gz WarpX-1f8f4f74adf7d460c593752a83e3574cc5cc0589.tar.zst WarpX-1f8f4f74adf7d460c593752a83e3574cc5cc0589.zip |
New reduced diag: number of macroparticles (#1414)
* New reduced diag: number of macroparticles
* Add parentheses in header line
* Apply suggestions from code review
Co-authored-by: Luca Fedeli <luca.fedeli.88@gmail.com>
* Add some consts
* Fuse some lines with std::ofstream
Co-authored-by: Luca Fedeli <luca.fedeli.88@gmail.com>
Diffstat (limited to 'Source/Python')
-rw-r--r-- | Source/Python/WarpXWrappers.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/Python/WarpXWrappers.cpp b/Source/Python/WarpXWrappers.cpp index 505230c1c..0944e1c06 100644 --- a/Source/Python/WarpXWrappers.cpp +++ b/Source/Python/WarpXWrappers.cpp @@ -89,7 +89,7 @@ extern "C" int warpx_nSpecies() { - auto & mypc = WarpX::GetInstance().GetPartContainer(); + const auto & mypc = WarpX::GetInstance().GetPartContainer(); return mypc.nSpecies(); } @@ -239,8 +239,8 @@ extern "C" } long warpx_getNumParticles(int speciesnumber) { - auto & mypc = WarpX::GetInstance().GetPartContainer(); - auto & myspc = mypc.GetParticleContainer(speciesnumber); + const auto & mypc = WarpX::GetInstance().GetPartContainer(); + const auto & myspc = mypc.GetParticleContainer(speciesnumber); return myspc.TotalNumberOfParticles(); } @@ -352,7 +352,7 @@ extern "C" amrex::ParticleReal** warpx_getParticleStructs(int speciesnumber, int lev, int* num_tiles, int** particles_per_tile) { - auto & mypc = WarpX::GetInstance().GetPartContainer(); + const auto & mypc = WarpX::GetInstance().GetPartContainer(); auto & myspc = mypc.GetParticleContainer(speciesnumber); int i = 0; @@ -374,7 +374,7 @@ extern "C" amrex::ParticleReal** warpx_getParticleArrays(int speciesnumber, int comp, int lev, int* num_tiles, int** particles_per_tile) { - auto & mypc = WarpX::GetInstance().GetPartContainer(); + const auto & mypc = WarpX::GetInstance().GetPartContainer(); auto & myspc = mypc.GetParticleContainer(speciesnumber); int i = 0; |