Skip to content

Commit

Permalink
Make temporary a const
Browse files Browse the repository at this point in the history
  • Loading branch information
dpgrote committed Oct 3, 2023
1 parent c053d38 commit f1b0799
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions Source/Diagnostics/ReducedDiags/ColliderRelevant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -465,8 +465,8 @@ void ColliderRelevant::ComputeDiags (int step)
// declare external fields
const int offset = 0;
const auto getExternalEB = GetExternalEBField(pti, offset);
amrex::Vector<amrex::ParticleReal> E_external_particle = myspc.m_E_external_particle;
amrex::Vector<amrex::ParticleReal> B_external_particle = myspc.m_B_external_particle;
const amrex::Vector<amrex::ParticleReal> E_external_particle = myspc.m_E_external_particle;
const amrex::Vector<amrex::ParticleReal> B_external_particle = myspc.m_B_external_particle;

// define variables in preparation for field gathering
amrex::Box box = pti.tilebox();
Expand Down
4 changes: 2 additions & 2 deletions Source/Diagnostics/ReducedDiags/ParticleExtrema.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,8 @@ void ParticleExtrema::ComputeDiags (int step)
// declare external fields
const int offset = 0;
const auto getExternalEB = GetExternalEBField(pti, offset);
amrex::Vector<amrex::ParticleReal> E_external_particle = myspc.m_E_external_particle;
amrex::Vector<amrex::ParticleReal> B_external_particle = myspc.m_B_external_particle;
const amrex::Vector<amrex::ParticleReal> E_external_particle = myspc.m_E_external_particle;
const amrex::Vector<amrex::ParticleReal> B_external_particle = myspc.m_B_external_particle;

// define variables in preparation for field gathering
amrex::Box box = pti.tilebox();
Expand Down
4 changes: 2 additions & 2 deletions Source/Particles/PhotonParticleContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ PhotonParticleContainer::PushPX (WarpXParIter& pti,

const auto getExternalEB = GetExternalEBField(pti, offset);

amrex::Vector<amrex::ParticleReal> E_external_particle = m_E_external_particle;
amrex::Vector<amrex::ParticleReal> B_external_particle = m_B_external_particle;
const amrex::Vector<amrex::ParticleReal> E_external_particle = m_E_external_particle;
const amrex::Vector<amrex::ParticleReal> B_external_particle = m_B_external_particle;

// Lower corner of tile box physical domain (take into account Galilean shift)
const std::array<amrex::Real, 3>& xyzmin = WarpX::LowerCorner(box, gather_lev, 0._rt);
Expand Down
8 changes: 4 additions & 4 deletions Source/Particles/PhysicalParticleContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2499,8 +2499,8 @@ PhysicalParticleContainer::PushP (int lev, Real dt,

const auto getExternalEB = GetExternalEBField(pti);

amrex::Vector<amrex::ParticleReal> E_external_particle = m_E_external_particle;
amrex::Vector<amrex::ParticleReal> B_external_particle = m_B_external_particle;
const amrex::Vector<amrex::ParticleReal> E_external_particle = m_E_external_particle;
const amrex::Vector<amrex::ParticleReal> B_external_particle = m_B_external_particle;

const std::array<amrex::Real,3>& xyzmin = WarpX::LowerCorner(box, lev, 0._rt);

Expand Down Expand Up @@ -2683,8 +2683,8 @@ PhysicalParticleContainer::PushPX (WarpXParIter& pti,

const auto getExternalEB = GetExternalEBField(pti, offset);

amrex::Vector<amrex::ParticleReal> E_external_particle = m_E_external_particle;
amrex::Vector<amrex::ParticleReal> B_external_particle = m_B_external_particle;
const amrex::Vector<amrex::ParticleReal> E_external_particle = m_E_external_particle;
const amrex::Vector<amrex::ParticleReal> B_external_particle = m_B_external_particle;

// Lower corner of tile box physical domain (take into account Galilean shift)
const std::array<amrex::Real, 3>& xyzmin = WarpX::LowerCorner(box, gather_lev, 0._rt);
Expand Down
4 changes: 2 additions & 2 deletions Source/Particles/RigidInjectedParticleContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,8 @@ RigidInjectedParticleContainer::PushP (int lev, Real dt,

const auto getExternalEB = GetExternalEBField(pti);

amrex::Vector<amrex::ParticleReal> E_external_particle = m_E_external_particle;
amrex::Vector<amrex::ParticleReal> B_external_particle = m_B_external_particle;
const amrex::Vector<amrex::ParticleReal> E_external_particle = m_E_external_particle;
const amrex::Vector<amrex::ParticleReal> B_external_particle = m_B_external_particle;

const std::array<amrex::Real,3>& xyzmin = WarpX::LowerCorner(box, lev, 0._rt);

Expand Down

0 comments on commit f1b0799

Please sign in to comment.