diff options
author | 2020-10-26 13:09:50 -0700 | |
---|---|---|
committer | 2020-10-26 13:09:50 -0700 | |
commit | 1140e9f8c3c20c969363dddfc184696f27c2ac72 (patch) | |
tree | 264fb581c547fef4d7774bf622dc9bd1fedb168f /Source/Parallelization/WarpXComm.cpp | |
parent | e85b70c01aa81f28958e8d9080a220f06a08250a (diff) | |
download | WarpX-1140e9f8c3c20c969363dddfc184696f27c2ac72.tar.gz WarpX-1140e9f8c3c20c969363dddfc184696f27c2ac72.tar.zst WarpX-1140e9f8c3c20c969363dddfc184696f27c2ac72.zip |
Filter diagnostic rho (#1295)
* First cut of adding filtering of rho diagnostic - not yet working
* Fixed the handling of parallel transfers in RhoFunctor when filtering is turned on
* Fixed end of line space
* In RhoFunctor, only do kspace filter with RZ and PSATD
* PICMI analytic applied fields (#1306)
* PICMI Added applied fields
* PICMI fixed typo in Constants
* Change picmistandard version requirement to 0.0.9
* Increment required picmi version
Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
* Updated checksums with filter of diagnostic rho
* Fix comment in rho diagnostic
* Updated LaserIonAcc2d benchmark after filtering rho
* Update galilean_rz_psatd benchmark with filtering of rho
Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
Diffstat (limited to 'Source/Parallelization/WarpXComm.cpp')
-rw-r--r-- | Source/Parallelization/WarpXComm.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/Source/Parallelization/WarpXComm.cpp b/Source/Parallelization/WarpXComm.cpp index 667be0696..daee24054 100644 --- a/Source/Parallelization/WarpXComm.cpp +++ b/Source/Parallelization/WarpXComm.cpp @@ -873,17 +873,23 @@ void WarpX::ApplyFilterandSumBoundaryRho (int lev, PatchType patch_type, int icomp, int ncomp) { const int glev = (patch_type == PatchType::fine) ? lev : lev-1; - const auto& period = Geom(glev).periodicity(); auto& r = (patch_type == PatchType::fine) ? rho_fp[lev] : rho_cp[lev]; if (r == nullptr) return; + ApplyFilterandSumBoundaryRho(lev, glev, *r, icomp, ncomp); +} + +void +WarpX::ApplyFilterandSumBoundaryRho (int lev, int glev, amrex::MultiFab& rho, int icomp, int ncomp) +{ + const auto& period = Geom(glev).periodicity(); if (use_filter) { - IntVect ng = r->nGrowVect(); + IntVect ng = rho.nGrowVect(); ng += bilinear_filter.stencil_length_each_dir-1; - MultiFab rf(r->boxArray(), r->DistributionMap(), ncomp, ng); - bilinear_filter.ApplyStencil(rf, *r, icomp, 0, ncomp); - WarpXSumGuardCells(*r, rf, period, icomp, ncomp ); + MultiFab rf(rho.boxArray(), rho.DistributionMap(), ncomp, ng); + bilinear_filter.ApplyStencil(rf, rho, icomp, 0, ncomp); + WarpXSumGuardCells(rho, rf, period, icomp, ncomp ); } else { - WarpXSumGuardCells(*r, period, icomp, ncomp); + WarpXSumGuardCells(rho, period, icomp, ncomp); } } |