aboutsummaryrefslogtreecommitdiff
path: root/Source/WarpX.cpp
diff options
context:
space:
mode:
authorGravatar Luca Fedeli <luca.fedeli@cea.fr> 2020-09-17 20:09:08 +0200
committerGravatar GitHub <noreply@github.com> 2020-09-17 11:09:08 -0700
commit266f2a28b80a5aada004a24c72b9de59af15533b (patch)
tree641b39f1927e5a27944d02551f9a772e83b7c346 /Source/WarpX.cpp
parent8d9193675b3292571478803fbe55f6831afe454b (diff)
downloadWarpX-266f2a28b80a5aada004a24c72b9de59af15533b.tar.gz
WarpX-266f2a28b80a5aada004a24c72b9de59af15533b.tar.zst
WarpX-266f2a28b80a5aada004a24c72b9de59af15533b.zip
Fix few compilation warnings (shift) (#1310)
* fix << declaration of galilean_shift shadows a member of WarpX >> * fix << unused mu_stag >> * fix << unused uxp, uyp, uzp >> * renamed galilean_shift (member variable of WarpX class) into m_galilean_shift * renamed v_galilean to m_v_galilean when appropriate * fixed bug introduced in latest commit * fix <<comparison of integer expressions of different signedness>> * Update Source/FieldSolver/FiniteDifferenceSolver/MacroscopicEvolveE.cpp Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
Diffstat (limited to '')
-rw-r--r--Source/WarpX.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp
index d328cafd3..ff8509369 100644
--- a/Source/WarpX.cpp
+++ b/Source/WarpX.cpp
@@ -666,13 +666,13 @@ WarpX::ReadParameters ()
}
pp.query("current_correction", current_correction);
- pp.query("v_galilean", v_galilean);
+ pp.query("v_galilean", m_v_galilean);
pp.query("do_time_averaging", fft_do_time_averaging);
// Scale the velocity by the speed of light
- for (int i=0; i<3; i++) v_galilean[i] *= PhysConst::c;
+ for (int i=0; i<3; i++) m_v_galilean[i] *= PhysConst::c;
- if (v_galilean[0] == 0. && v_galilean[1] == 0. && v_galilean[2] == 0.) {
+ if (m_v_galilean[0] == 0. && m_v_galilean[1] == 0. && m_v_galilean[2] == 0.) {
update_with_rho = false; // standard PSATD
}
else {
@@ -841,7 +841,7 @@ WarpX::AllocLevelData (int lev, const BoxArray& ba, const DistributionMapping& d
NCIGodfreyFilter::m_stencil_width,
maxwell_solver_id,
maxLevel(),
- WarpX::v_galilean,
+ WarpX::m_v_galilean,
safe_guard_cells);
if (mypc->nSpeciesDepositOnMainGrid() && n_current_deposition_buffer == 0) {
@@ -1012,7 +1012,7 @@ WarpX::AllocLevelMFs (int lev, const BoxArray& ba, const DistributionMapping& dm
}
bool const pml_flag_false=false;
spectral_solver_fp[lev].reset( new SpectralSolver( realspace_ba, dm,
- nox_fft, noy_fft, noz_fft, do_nodal, v_galilean, dx_vect, dt[lev],
+ nox_fft, noy_fft, noz_fft, do_nodal, m_v_galilean, dx_vect, dt[lev],
pml_flag_false, fft_periodic_single_box, update_with_rho, fft_do_time_averaging ) );
# endif
#endif
@@ -1130,7 +1130,7 @@ WarpX::AllocLevelMFs (int lev, const BoxArray& ba, const DistributionMapping& dm
# else
c_realspace_ba.grow(ngE); // add guard cells
spectral_solver_cp[lev].reset( new SpectralSolver( c_realspace_ba, dm,
- nox_fft, noy_fft, noz_fft, do_nodal, v_galilean, cdx_vect, dt[lev],
+ nox_fft, noy_fft, noz_fft, do_nodal, m_v_galilean, cdx_vect, dt[lev],
pml_flag_false, fft_periodic_single_box, update_with_rho, fft_do_time_averaging ) );
# endif
#endif
@@ -1242,11 +1242,11 @@ WarpX::UpperCorner(const Box& bx, int lev)
}
std::array<Real,3>
-WarpX::LowerCornerWithGalilean (const Box& bx, const amrex::Array<amrex::Real,3>& vv_galilean, int lev)
+WarpX::LowerCornerWithGalilean (const Box& bx, const amrex::Array<amrex::Real,3>& v_galilean, int lev)
{
amrex::Real cur_time = gett_new(lev);
amrex::Real time_shift = (cur_time - time_of_last_gal_shift);
- amrex::Array<amrex::Real,3> galilean_shift = { vv_galilean[0]*time_shift, vv_galilean[1]*time_shift, vv_galilean[2]*time_shift };
+ amrex::Array<amrex::Real,3> galilean_shift = { v_galilean[0]*time_shift, v_galilean[1]*time_shift, v_galilean[2]*time_shift };
return WarpX::LowerCorner(bx, galilean_shift, lev);
}