aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/WarpXParticleContainer.cpp
diff options
context:
space:
mode:
authorGravatar Axel Huebl <axel.huebl@plasma.ninja> 2022-02-10 14:10:00 -0800
committerGravatar GitHub <noreply@github.com> 2022-02-10 14:10:00 -0800
commit06a57c95ae826241919bee96931a4007dac1a38b (patch)
tree2f28b9e327efe5a79fc32b963ac68d202358ce6a /Source/Particles/WarpXParticleContainer.cpp
parenta5606451b5fa5638262d1a5273d8e4e21268fae6 (diff)
downloadWarpX-06a57c95ae826241919bee96931a4007dac1a38b.tar.gz
WarpX-06a57c95ae826241919bee96931a4007dac1a38b.tar.zst
WarpX-06a57c95ae826241919bee96931a4007dac1a38b.zip
ABLASTR: particle weights `const` (#2838)
* ABLASTR: particle weights `const` We can declare the particle weights `const` because we don't change values in them during deposition. * DepositCharge: `const`-ify usage
Diffstat (limited to 'Source/Particles/WarpXParticleContainer.cpp')
-rw-r--r--Source/Particles/WarpXParticleContainer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Particles/WarpXParticleContainer.cpp b/Source/Particles/WarpXParticleContainer.cpp
index 806eb92c9..f590d3cc0 100644
--- a/Source/Particles/WarpXParticleContainer.cpp
+++ b/Source/Particles/WarpXParticleContainer.cpp
@@ -586,7 +586,7 @@ WarpXParticleContainer::DepositCurrent (
* \param depos_lev : Level on which particles deposit (if buffers are used)
*/
void
-WarpXParticleContainer::DepositCharge (WarpXParIter& pti, RealVector& wp,
+WarpXParticleContainer::DepositCharge (WarpXParIter& pti, RealVector const& wp,
const int * const ion_lev,
amrex::MultiFab* rho, int icomp,
const long offset, const long np_to_depose,
@@ -681,7 +681,7 @@ WarpXParticleContainer::DepositCharge (amrex::Vector<std::unique_ptr<amrex::Mult
for (WarpXParIter pti(*this, lev); pti.isValid(); ++pti)
{
const long np = pti.numParticles();
- auto& wp = pti.GetAttribs(PIdx::w);
+ auto const & wp = pti.GetAttribs(PIdx::w);
int* AMREX_RESTRICT ion_lev = nullptr;
if (do_field_ionization)