From 3fde18912506bbfeeeaacc255f0c8a66ab2e2a05 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Fri, 11 Dec 2020 09:16:54 -0800 Subject: 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 --- Source/Particles/WarpXParticleContainer.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Source/Particles/WarpXParticleContainer.cpp') diff --git a/Source/Particles/WarpXParticleContainer.cpp b/Source/Particles/WarpXParticleContainer.cpp index df39bd250..4c5bd469f 100644 --- a/Source/Particles/WarpXParticleContainer.cpp +++ b/Source/Particles/WarpXParticleContainer.cpp @@ -630,9 +630,14 @@ WarpXParticleContainer::GetChargeDensity (int lev, bool local) const auto& ba = m_gdb->ParticleBoxArray(lev); const auto& dm = m_gdb->DistributionMap(lev); BoxArray nba = ba; -#if (!defined WARPX_DIM_RZ) || (!defined WARPX_USE_PSATD) - nba.surroundingNodes(); + + bool is_PSATD_RZ = false; +#ifdef WARPX_DIM_RZ + if (WarpX::maxwell_solver_id == MaxwellSolverAlgo::PSATD) + is_PSATD_RZ = true; #endif + if( !is_PSATD_RZ ) + nba.surroundingNodes(); // Number of guard cells for local deposition of rho WarpX& warpx = WarpX::GetInstance(); -- cgit v1.2.3