From b8962c76d8a646ef06e8d9f54e129aad6f5cd7c7 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Fri, 28 Oct 2022 10:59:38 -0700 Subject: ABLASTR: Always Sync Option (#3467) * ABLASTR: Always Sync Option Add an option to ABLASTR/WarpX to always sync nodal cells that are owned by multiple blocks. This can be used for debugging. * Fix typo Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Use New Option in One CI Test * Fix Logic: Force only to be `true`, not `false` Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> Co-authored-by: Edoardo Zoni --- Source/Parallelization/WarpXComm.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'Source/Parallelization/WarpXComm.cpp') diff --git a/Source/Parallelization/WarpXComm.cpp b/Source/Parallelization/WarpXComm.cpp index cee53031c..396b0f24b 100644 --- a/Source/Parallelization/WarpXComm.cpp +++ b/Source/Parallelization/WarpXComm.cpp @@ -473,7 +473,7 @@ void WarpX::UpdateCurrentNodalToStag (amrex::MultiFab& dst, amrex::MultiFab cons } void -WarpX::FillBoundaryB (IntVect ng, const bool nodal_sync) +WarpX::FillBoundaryB (IntVect ng, std::optional nodal_sync) { for (int lev = 0; lev <= finest_level; ++lev) { @@ -482,7 +482,7 @@ WarpX::FillBoundaryB (IntVect ng, const bool nodal_sync) } void -WarpX::FillBoundaryE (IntVect ng, const bool nodal_sync) +WarpX::FillBoundaryE (IntVect ng, std::optional nodal_sync) { for (int lev = 0; lev <= finest_level; ++lev) { @@ -491,7 +491,7 @@ WarpX::FillBoundaryE (IntVect ng, const bool nodal_sync) } void -WarpX::FillBoundaryF (IntVect ng, const bool nodal_sync) +WarpX::FillBoundaryF (IntVect ng, std::optional nodal_sync) { for (int lev = 0; lev <= finest_level; ++lev) { @@ -500,7 +500,7 @@ WarpX::FillBoundaryF (IntVect ng, const bool nodal_sync) } void -WarpX::FillBoundaryG (IntVect ng, const bool nodal_sync) +WarpX::FillBoundaryG (IntVect ng, std::optional nodal_sync) { for (int lev = 0; lev <= finest_level; ++lev) { @@ -528,14 +528,14 @@ WarpX::FillBoundaryE_avg (IntVect ng) void -WarpX::FillBoundaryE (int lev, IntVect ng, const bool nodal_sync) +WarpX::FillBoundaryE (int lev, IntVect ng, std::optional nodal_sync) { FillBoundaryE(lev, PatchType::fine, ng, nodal_sync); if (lev > 0) FillBoundaryE(lev, PatchType::coarse, ng, nodal_sync); } void -WarpX::FillBoundaryE (const int lev, const PatchType patch_type, const amrex::IntVect ng, const bool nodal_sync) +WarpX::FillBoundaryE (const int lev, const PatchType patch_type, const amrex::IntVect ng, std::optional nodal_sync) { std::array mf; amrex::Periodicity period; @@ -585,14 +585,14 @@ WarpX::FillBoundaryE (const int lev, const PatchType patch_type, const amrex::In } void -WarpX::FillBoundaryB (int lev, IntVect ng, const bool nodal_sync) +WarpX::FillBoundaryB (int lev, IntVect ng, std::optional nodal_sync) { FillBoundaryB(lev, PatchType::fine, ng, nodal_sync); if (lev > 0) FillBoundaryB(lev, PatchType::coarse, ng, nodal_sync); } void -WarpX::FillBoundaryB (const int lev, const PatchType patch_type, const amrex::IntVect ng, const bool nodal_sync) +WarpX::FillBoundaryB (const int lev, const PatchType patch_type, const amrex::IntVect ng, std::optional nodal_sync) { std::array mf; amrex::Periodicity period; @@ -747,14 +747,14 @@ WarpX::FillBoundaryB_avg (int lev, PatchType patch_type, IntVect ng) } void -WarpX::FillBoundaryF (int lev, IntVect ng, const bool nodal_sync) +WarpX::FillBoundaryF (int lev, IntVect ng, std::optional nodal_sync) { FillBoundaryF(lev, PatchType::fine, ng, nodal_sync); if (lev > 0) FillBoundaryF(lev, PatchType::coarse, ng, nodal_sync); } void -WarpX::FillBoundaryF (int lev, PatchType patch_type, IntVect ng, const bool nodal_sync) +WarpX::FillBoundaryF (int lev, PatchType patch_type, IntVect ng, std::optional nodal_sync) { if (patch_type == PatchType::fine) { @@ -788,7 +788,7 @@ WarpX::FillBoundaryF (int lev, PatchType patch_type, IntVect ng, const bool noda } } -void WarpX::FillBoundaryG (int lev, IntVect ng, const bool nodal_sync) +void WarpX::FillBoundaryG (int lev, IntVect ng, std::optional nodal_sync) { FillBoundaryG(lev, PatchType::fine, ng, nodal_sync); @@ -798,7 +798,7 @@ void WarpX::FillBoundaryG (int lev, IntVect ng, const bool nodal_sync) } } -void WarpX::FillBoundaryG (int lev, PatchType patch_type, IntVect ng, const bool nodal_sync) +void WarpX::FillBoundaryG (int lev, PatchType patch_type, IntVect ng, std::optional nodal_sync) { if (patch_type == PatchType::fine) { -- cgit v1.2.3