aboutsummaryrefslogtreecommitdiff
path: root/Source/Diagnostics/ComputeDiagFunctors/DivEFunctor.cpp
diff options
context:
space:
mode:
authorGravatar Axel Huebl <axel.huebl@plasma.ninja> 2020-12-11 09:16:54 -0800
committerGravatar GitHub <noreply@github.com> 2020-12-11 09:16:54 -0800
commit3fde18912506bbfeeeaacc255f0c8a66ab2e2a05 (patch)
tree7d330e5ffc1fc8a540fd7d3a3bdee1072b7a1d2e /Source/Diagnostics/ComputeDiagFunctors/DivEFunctor.cpp
parenta7ba409b4cd0ce437d06f39fe6918745bf4407d5 (diff)
downloadWarpX-3fde18912506bbfeeeaacc255f0c8a66ab2e2a05.tar.gz
WarpX-3fde18912506bbfeeeaacc255f0c8a66ab2e2a05.tar.zst
WarpX-3fde18912506bbfeeeaacc255f0c8a66ab2e2a05.zip
PSATD Runtime Control (#1300)
* Docs: PSATD Runtime Option * Tests: PSATD Runtime Option Add new runtime option to PSATD regression test matrix. * PICMI: PSATD runtime option * Source: PSATD Runtime Option
Diffstat (limited to 'Source/Diagnostics/ComputeDiagFunctors/DivEFunctor.cpp')
-rw-r--r--Source/Diagnostics/ComputeDiagFunctors/DivEFunctor.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/Diagnostics/ComputeDiagFunctors/DivEFunctor.cpp b/Source/Diagnostics/ComputeDiagFunctors/DivEFunctor.cpp
index 26104bdf3..6abdb8938 100644
--- a/Source/Diagnostics/ComputeDiagFunctors/DivEFunctor.cpp
+++ b/Source/Diagnostics/ComputeDiagFunctors/DivEFunctor.cpp
@@ -20,13 +20,13 @@ DivEFunctor::operator()(amrex::MultiFab& mf_dst, const int dcomp, const int /*i_
// output Multifab, mf_dst, the guard-cell data is not needed especially considering
// the operations performend in the CoarsenAndInterpolate function.
constexpr int ng = 1;
-#if (defined WARPX_DIM_RZ) && (defined WARPX_USE_PSATD)
- // For RZ spectral, all quantities are cell centered.
- amrex::IntVect cell_type = amrex::IntVect::TheCellVector();
-#else
// For staggered and nodal calculations, divE is computed on the nodes.
// The temporary divE MultiFab is generated to comply with the location of divE.
amrex::IntVect cell_type = amrex::IntVect::TheNodeVector();
+#ifdef WARPX_DIM_RZ
+ // For RZ spectral, all quantities are cell centered.
+ if (WarpX::maxwell_solver_id == MaxwellSolverAlgo::PSATD)
+ cell_type = amrex::IntVect::TheCellVector();
#endif
const amrex::BoxArray& ba = amrex::convert(warpx.boxArray(m_lev), cell_type);
amrex::MultiFab divE(ba, warpx.DistributionMap(m_lev), 2*warpx.n_rz_azimuthal_modes-1, ng );