diff options
author | 2022-06-07 10:02:56 -0700 | |
---|---|---|
committer | 2022-06-07 10:02:56 -0700 | |
commit | 1b812906b333b407b45f5bec015ba06e3faa5abd (patch) | |
tree | 20554f29ca032b71340850999e80737884ff9aa1 /Source/Parallelization/WarpXCommUtil.cpp | |
parent | 0156e3a31737de7fcf4e558b61152fbfdd55c223 (diff) | |
download | WarpX-1b812906b333b407b45f5bec015ba06e3faa5abd.tar.gz WarpX-1b812906b333b407b45f5bec015ba06e3faa5abd.tar.zst WarpX-1b812906b333b407b45f5bec015ba06e3faa5abd.zip |
Merge `FillBoundary` and `NodalSync` (`OneStep_nosub`, `OneStep_sub1`) (#3013)
* Add argument for synchronizing nodal points
* Add the option to overridesync in FillBoundaryE / FillBoundaryB
* Remove explicit synchronization
* Cleanup calls to nodal synchronization
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Improve const Correctness
* Cleaning
* Merge NodalSync and FillBoundary First
Restarting the implementation from scratch.
To-do: remove redundant FillBoundary calls.
* Merge Only for OneStep_nosub and OneStep_sub1
* Fix Checksums of Python_wrappers
* Define sync_nodal_points as WarpX Private Member Variable
* Keep Calls to NodalSync for B
* Keep Calls to NodalSync for F
* Reset Benchmark of reduced_diags_single_precision
* OneStep_sub1: Remove All Calls to NodalSync
* OneStep_nosub: Remove All Calls to NodalSync
* Reset Benchmark of divb_cleaning_3d
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Edoardo Zoni <ezoni@lbl.gov>
Diffstat (limited to 'Source/Parallelization/WarpXCommUtil.cpp')
-rw-r--r-- | Source/Parallelization/WarpXCommUtil.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/Source/Parallelization/WarpXCommUtil.cpp b/Source/Parallelization/WarpXCommUtil.cpp index d395e7628..104aa5aae 100644 --- a/Source/Parallelization/WarpXCommUtil.cpp +++ b/Source/Parallelization/WarpXCommUtil.cpp @@ -93,7 +93,8 @@ void FillBoundary (amrex::MultiFab& mf, const amrex::Periodicity& period) void FillBoundary (amrex::MultiFab& mf, amrex::IntVect ng, - const amrex::Periodicity& period) + const amrex::Periodicity& period, + const bool nodal_sync) { BL_PROFILE("WarpXCommUtil::FillBoundary"); @@ -106,13 +107,22 @@ void FillBoundary (amrex::MultiFab& mf, mixedCopy(mf_tmp, mf, 0, 0, mf.nComp(), mf.nGrowVect()); - mf_tmp.FillBoundary(ng, period); + if (nodal_sync) { + mf_tmp.FillBoundaryAndSync(0, mf.nComp(), ng, period); + } else { + mf_tmp.FillBoundary(ng, period); + } mixedCopy(mf, mf_tmp, 0, 0, mf.nComp(), mf.nGrowVect()); } else { - mf.FillBoundary(ng, period); + + if (nodal_sync) { + mf.FillBoundaryAndSync(0, mf.nComp(), ng, period); + } else { + mf.FillBoundary(ng, period); + } } } |