diff options
Diffstat (limited to 'Source/Parallelization/GuardCellManager.cpp')
-rw-r--r-- | Source/Parallelization/GuardCellManager.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/Parallelization/GuardCellManager.cpp b/Source/Parallelization/GuardCellManager.cpp index 2fa0c4c4a..d09e46951 100644 --- a/Source/Parallelization/GuardCellManager.cpp +++ b/Source/Parallelization/GuardCellManager.cpp @@ -49,6 +49,9 @@ guardCellManager::Init ( const int do_electrostatic, const int do_multi_J, const bool fft_do_time_averaging, + const bool do_pml, + const int do_pml_in_domain, + const int pml_ncell, const amrex::Vector<amrex::IntVect>& ref_ratios) { // When using subcycling, the particles on the fine level perform two pushes @@ -202,6 +205,16 @@ guardCellManager::Init ( IntVect ngFFT = IntVect(ngFFt_z); #endif +#ifdef WARPX_DIM_RZ + if (do_pml) { + if (!do_pml_in_domain) { + ngFFT[0] = std::max(ngFFT[0], pml_ncell); + } + } +#else + amrex::ignore_unused(do_pml, do_pml_in_domain, pml_ncell); +#endif + // All boxes should have the same number of guard cells, to avoid temporary parallel copies: // thus we take the maximum of the required number of guard cells over all available fields. for (int i_dim = 0; i_dim < AMREX_SPACEDIM; i_dim++) { |