aboutsummaryrefslogtreecommitdiff
path: root/Source/FieldSolver/FiniteDifferenceSolver
diff options
context:
space:
mode:
authorGravatar Luca Fedeli <luca.fedeli@cea.fr> 2023-08-01 13:38:19 +0200
committerGravatar GitHub <noreply@github.com> 2023-08-01 13:38:19 +0200
commit0aa12461bd956e9e9a08e0ac3b8e2c2263aa7661 (patch)
tree3a96aabdc6ad518c2d1300800aaa8ee2cafebba3 /Source/FieldSolver/FiniteDifferenceSolver
parent63dc76ff15c1c8660f30e1ff1cfcb9c2f04db814 (diff)
downloadWarpX-0aa12461bd956e9e9a08e0ac3b8e2c2263aa7661.tar.gz
WarpX-0aa12461bd956e9e9a08e0ac3b8e2c2263aa7661.tar.zst
WarpX-0aa12461bd956e9e9a08e0ac3b8e2c2263aa7661.zip
Clang tidy CI test: add several readability checks to clang tidy CI test (#4124)
* add few readability checks to clang-tidy CI test * address all the issues found with clang-tidy * fix bug * fixed bug * fix residual issue * fix issue found with clang-tidy
Diffstat (limited to 'Source/FieldSolver/FiniteDifferenceSolver')
-rw-r--r--Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceSolver.cpp2
-rw-r--r--Source/FieldSolver/FiniteDifferenceSolver/HybridPICModel/HybridPICModel.cpp18
2 files changed, 9 insertions, 11 deletions
diff --git a/Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceSolver.cpp b/Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceSolver.cpp
index 851ff1a1a..1bb557d00 100644
--- a/Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceSolver.cpp
+++ b/Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceSolver.cpp
@@ -43,7 +43,7 @@ FiniteDifferenceSolver::FiniteDifferenceSolver (
// Calculate coefficients of finite-difference stencil
#ifdef WARPX_DIM_RZ
m_dr = cell_size[0];
- m_nmodes = WarpX::GetInstance().n_rz_azimuthal_modes;
+ m_nmodes = WarpX::n_rz_azimuthal_modes;
m_rmin = WarpX::GetInstance().Geom(0).ProbLo(0);
if (fdtd_algo == ElectromagneticSolverAlgo::Yee ||
fdtd_algo == ElectromagneticSolverAlgo::HybridPIC ) {
diff --git a/Source/FieldSolver/FiniteDifferenceSolver/HybridPICModel/HybridPICModel.cpp b/Source/FieldSolver/FiniteDifferenceSolver/HybridPICModel/HybridPICModel.cpp
index 347a0ad6c..7213e599b 100644
--- a/Source/FieldSolver/FiniteDifferenceSolver/HybridPICModel/HybridPICModel.cpp
+++ b/Source/FieldSolver/FiniteDifferenceSolver/HybridPICModel/HybridPICModel.cpp
@@ -59,8 +59,6 @@ void HybridPICModel::AllocateLevelMFs (int lev, const BoxArray& ba, const Distri
const IntVect& jz_nodal_flag,
const IntVect& rho_nodal_flag)
{
- auto & warpx = WarpX::GetInstance();
-
// The "electron_pressure_fp" multifab stores the electron pressure calculated
// from the specified equation of state.
// The "rho_fp_temp" multifab is used to store the ion charge density
@@ -69,24 +67,24 @@ void HybridPICModel::AllocateLevelMFs (int lev, const BoxArray& ba, const Distri
// interpolated or extrapolated to appropriate timesteps.
// The "current_fp_ampere" multifab stores the total current calculated as
// the curl of B.
- warpx.AllocInitMultiFab(electron_pressure_fp[lev], amrex::convert(ba, rho_nodal_flag),
+ WarpX::AllocInitMultiFab(electron_pressure_fp[lev], amrex::convert(ba, rho_nodal_flag),
dm, ncomps, ngRho, lev, "electron_pressure_fp", 0.0_rt);
- warpx.AllocInitMultiFab(rho_fp_temp[lev], amrex::convert(ba, rho_nodal_flag),
+ WarpX::AllocInitMultiFab(rho_fp_temp[lev], amrex::convert(ba, rho_nodal_flag),
dm, ncomps, ngRho, lev, "rho_fp_temp", 0.0_rt);
- warpx.AllocInitMultiFab(current_fp_temp[lev][0], amrex::convert(ba, jx_nodal_flag),
+ WarpX::AllocInitMultiFab(current_fp_temp[lev][0], amrex::convert(ba, jx_nodal_flag),
dm, ncomps, ngJ, lev, "current_fp_temp[x]", 0.0_rt);
- warpx.AllocInitMultiFab(current_fp_temp[lev][1], amrex::convert(ba, jy_nodal_flag),
+ WarpX::AllocInitMultiFab(current_fp_temp[lev][1], amrex::convert(ba, jy_nodal_flag),
dm, ncomps, ngJ, lev, "current_fp_temp[y]", 0.0_rt);
- warpx.AllocInitMultiFab(current_fp_temp[lev][2], amrex::convert(ba, jz_nodal_flag),
+ WarpX::AllocInitMultiFab(current_fp_temp[lev][2], amrex::convert(ba, jz_nodal_flag),
dm, ncomps, ngJ, lev, "current_fp_temp[z]", 0.0_rt);
- warpx.AllocInitMultiFab(current_fp_ampere[lev][0], amrex::convert(ba, jx_nodal_flag),
+ WarpX::AllocInitMultiFab(current_fp_ampere[lev][0], amrex::convert(ba, jx_nodal_flag),
dm, ncomps, ngJ, lev, "current_fp_ampere[x]", 0.0_rt);
- warpx.AllocInitMultiFab(current_fp_ampere[lev][1], amrex::convert(ba, jy_nodal_flag),
+ WarpX::AllocInitMultiFab(current_fp_ampere[lev][1], amrex::convert(ba, jy_nodal_flag),
dm, ncomps, ngJ, lev, "current_fp_ampere[y]", 0.0_rt);
- warpx.AllocInitMultiFab(current_fp_ampere[lev][2], amrex::convert(ba, jz_nodal_flag),
+ WarpX::AllocInitMultiFab(current_fp_ampere[lev][2], amrex::convert(ba, jz_nodal_flag),
dm, ncomps, ngJ, lev, "current_fp_ampere[z]", 0.0_rt);
}