From 1f8f4f74adf7d460c593752a83e3574cc5cc0589 Mon Sep 17 00:00:00 2001 From: NeilZaim <49716072+NeilZaim@users.noreply.github.com> Date: Fri, 16 Oct 2020 10:58:22 +0200 Subject: 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 * Add some consts * Fuse some lines with std::ofstream Co-authored-by: Luca Fedeli --- Source/Python/WarpXWrappers.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Source/Python') 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; -- cgit v1.2.3