diff options
author | 2022-01-20 15:53:23 -0800 | |
---|---|---|
committer | 2022-01-20 15:53:23 -0800 | |
commit | c7c8a710cb1b99bc72343f4215011f3c0ec4f16e (patch) | |
tree | c3aad20d0b41185ad3d4fd31b8c7797b6a487844 /Source/Parallelization/GuardCellManager.cpp | |
parent | e9e79322bde6a2b6cd6efc44508146c62325004d (diff) | |
download | WarpX-c7c8a710cb1b99bc72343f4215011f3c0ec4f16e.tar.gz WarpX-c7c8a710cb1b99bc72343f4215011f3c0ec4f16e.tar.zst WarpX-c7c8a710cb1b99bc72343f4215011f3c0ec4f16e.zip |
Implement PML for the outer RZ boundary with PSATD (#2211)
* Initial version of RZ PSATD PML BCs
* Cleaned up some bugs
* Add support of do_pml_in_domain option
* Cleaned up stuff for building
* Fix PMLPsatdAlgorithm macro
* Removed unneeded variable from SpectralSolverRZ
* Change length 3 arrays to length 2 (for 2D)
* Cleanup around DampPML
* Added more checks of pml[lev]
* Added CI test for RZ PML
* Added code to update the corner guard cells
* Further updates
* Added CI test
* Fixed EOL space
* Updated CI benchmarks, removing round off fields
* Changes to CI missed on previous commit
* Various fixes for clean up
* More fixes for clean up
* Further cleanup
* Updated benchmark
* Fixed benchmarks file
* Minor cleanup
* Added round off benchmark values
* Fixed testname in analysis_pml_psatd_rz.py
* Update comment in analysis file
* Put pml_rz code in RZ and PSATD macro blocks
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add geometry.dims input to CI test input file, inputs_rz
* Cleanup to match recent changes
Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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++) { |