aboutsummaryrefslogtreecommitdiff
path: root/Source/Diagnostics/ReducedDiags/BeamRelevant.cpp
diff options
context:
space:
mode:
authorGravatar Yinjian Zhao <yinjianzhao@lbl.gov> 2020-02-05 11:45:15 -0800
committerGravatar Yinjian Zhao <yinjianzhao@lbl.gov> 2020-02-05 11:45:15 -0800
commit10c926a1c068eab50e813ae974155cd57afdc44f (patch)
treee9642fba53bfc5d883413e00c1d3b0b0a2f9b2df /Source/Diagnostics/ReducedDiags/BeamRelevant.cpp
parenteb21d5aa88a27ceb3dcdc6a0f59d09393fab907a (diff)
downloadWarpX-10c926a1c068eab50e813ae974155cd57afdc44f.tar.gz
WarpX-10c926a1c068eab50e813ae974155cd57afdc44f.tar.zst
WarpX-10c926a1c068eab50e813ae974155cd57afdc44f.zip
Add const more.
Diffstat (limited to 'Source/Diagnostics/ReducedDiags/BeamRelevant.cpp')
-rw-r--r--Source/Diagnostics/ReducedDiags/BeamRelevant.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Diagnostics/ReducedDiags/BeamRelevant.cpp b/Source/Diagnostics/ReducedDiags/BeamRelevant.cpp
index 89c557b28..0d930ed10 100644
--- a/Source/Diagnostics/ReducedDiags/BeamRelevant.cpp
+++ b/Source/Diagnostics/ReducedDiags/BeamRelevant.cpp
@@ -126,7 +126,7 @@ void BeamRelevant::ComputeDiags (int step)
auto const species_names = mypc.GetSpeciesNames();
// inverse of speed of light squared
- Real const inv_c2 = 1.0 / (PhysConst::c * PhysConst::c);
+ Real constexpr inv_c2 = 1.0 / (PhysConst::c * PhysConst::c);
// If 2D-XZ, p.pos(1) is z, rather than p.pos(2).
#if (AMREX_SPACEDIM == 3)
@@ -143,7 +143,7 @@ void BeamRelevant::ComputeDiags (int step)
if (species_names[i_s] != m_beam_name) { continue; }
// get WarpXParticleContainer class object
- auto & myspc = mypc.GetParticleContainer(i_s);
+ auto const & myspc = mypc.GetParticleContainer(i_s);
// get mass (Real)
Real const m = myspc.getMass();