diff options
author | 2019-11-26 18:37:21 -0500 | |
---|---|---|
committer | 2019-11-26 18:37:21 -0500 | |
commit | 3ad7f72470374320a8681543f1a1efab457dd717 (patch) | |
tree | e9ca2ada7fcd0df2b8700e4c25b271165991b2a6 /Source/Particles/WarpXParticleContainer.cpp | |
parent | 1f64e254435723a952ff3296075ca9a52694dce5 (diff) | |
download | WarpX-3ad7f72470374320a8681543f1a1efab457dd717.tar.gz WarpX-3ad7f72470374320a8681543f1a1efab457dd717.tar.zst WarpX-3ad7f72470374320a8681543f1a1efab457dd717.zip |
Removed the blank lines between the nLevels declarations and the for loops. Moved the prefix operator change back to its original postfix unary position. Changed the int const changes back to their original const int declarations.
Diffstat (limited to 'Source/Particles/WarpXParticleContainer.cpp')
-rw-r--r-- | Source/Particles/WarpXParticleContainer.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Source/Particles/WarpXParticleContainer.cpp b/Source/Particles/WarpXParticleContainer.cpp index a7e5b82da..009f90f24 100644 --- a/Source/Particles/WarpXParticleContainer.cpp +++ b/Source/Particles/WarpXParticleContainer.cpp @@ -513,7 +513,7 @@ WarpXParticleContainer::DepositCharge (Vector<std::unique_ptr<MultiFab> >& rho, bool do_rz_volume_scaling) { // Loop over the refinement levels - const int finest_level = rho.size() - 1; + int const finest_level = rho.size() - 1; for (int lev = 0; lev <= finest_level; ++lev) { // Reset the `rho` array if `reset` is True @@ -566,7 +566,7 @@ WarpXParticleContainer::DepositCharge (Vector<std::unique_ptr<MultiFab> >& rho, MultiFab coarsened_fine_data(coarsened_fine_BA, fine_dm, rho[lev+1]->nComp(), 0); coarsened_fine_data.setVal(0.0); - const int refinement_ratio = 2; + int const refinement_ratio = 2; interpolateDensityFineToCoarse( *rho[lev+1], coarsened_fine_data, refinement_ratio ); rho[lev]->ParallelAdd( coarsened_fine_data, m_gdb->Geom(lev).periodicity() ); @@ -632,7 +632,6 @@ Real WarpXParticleContainer::sumParticleCharge(bool local) { amrex::Real total_charge = 0.0; const int nLevels = finestLevel(); - for (int lev = 0; lev < nLevels; ++lev) { @@ -664,7 +663,6 @@ std::array<Real, 3> WarpXParticleContainer::meanParticleVelocity(bool local) { amrex::Real inv_clight_sq = 1.0/PhysConst::c/PhysConst::c; const int nLevels = finestLevel(); - for (int lev = 0; lev <= nLevels; ++lev) { #ifdef _OPENMP @@ -710,7 +708,6 @@ Real WarpXParticleContainer::maxParticleVelocity(bool local) { amrex::ParticleReal max_v = 0.0; const int nLevels = finestLevel(); - for (int lev = 0; lev <= nLevels; ++lev) { @@ -767,7 +764,6 @@ void WarpXParticleContainer::PushX (Real dt) { const int nLevels = finestLevel(); - for (int lev = 0; lev <= nLevels; ++lev) { PushX(lev, dt); } |