diff options
author | 2022-03-16 12:15:27 -0700 | |
---|---|---|
committer | 2022-03-16 12:15:27 -0700 | |
commit | 1522807862c32d6b60e829fb9409fccadcf21e46 (patch) | |
tree | e0b78cc5663bea80fc87063b0f3e5aad801e6e46 /Source/FieldSolver/FiniteDifferenceSolver | |
parent | 9adfbddeaaccf06a6f199b04307fd21e6c9de727 (diff) | |
download | WarpX-1522807862c32d6b60e829fb9409fccadcf21e46.tar.gz WarpX-1522807862c32d6b60e829fb9409fccadcf21e46.tar.zst WarpX-1522807862c32d6b60e829fb9409fccadcf21e46.zip |
RZ: Use WarpX::ncomps more consistently (#2951)
* RZ: Use WarpX::ncomps more consistently
We used `2*modes - 1` in many places, which is harder to follow then
the variable we have.
* Update Comments
* Replace leftover `ncomp` -> `m_ncomps`
Diffstat (limited to 'Source/FieldSolver/FiniteDifferenceSolver')
-rw-r--r-- | Source/FieldSolver/FiniteDifferenceSolver/EvolveF.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/FieldSolver/FiniteDifferenceSolver/EvolveF.cpp b/Source/FieldSolver/FiniteDifferenceSolver/EvolveF.cpp index 18401d74e..f5bd3781f 100644 --- a/Source/FieldSolver/FiniteDifferenceSolver/EvolveF.cpp +++ b/Source/FieldSolver/FiniteDifferenceSolver/EvolveF.cpp @@ -171,11 +171,11 @@ void FiniteDifferenceSolver::EvolveFCylindrical ( Real constexpr c2 = PhysConst::c * PhysConst::c; // Use the right shift in components: - // - the first 2*n_rz_azimuthal_modes-1 components correspond to rho old (i.e. rhocomp=0) - // - the next 2*n_rz_azimuthal_modes-1 components correspond to rho new (i.e. rhocomp=1) + // - the first WarpX::ncomps (2*n_rz_azimuthal_modes-1) components correspond to rho old (i.e. rhocomp=0) + // - the next WarpX::ncomps (2*n_rz_azimuthal_modes-1) components correspond to rho new (i.e. rhocomp=1) int rho_shift = 0; if (rhocomp == 1) { - rho_shift = 2*WarpX::n_rz_azimuthal_modes-1; + rho_shift = WarpX::ncomps; } // Loop over the cells and update the fields |