aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Marco Garten <mgarten@lbl.gov> 2022-06-20 00:49:54 -0700
committerGravatar GitHub <noreply@github.com> 2022-06-20 00:49:54 -0700
commitb6985d24c36f5644c69b0773deb8ff14eb4a4097 (patch)
treebace504cb669ab25221e4fa4d1da0cb596ed8ba3
parent5aed5f0be4381b2e6001654a5aa3a1526771d6a9 (diff)
downloadWarpX-b6985d24c36f5644c69b0773deb8ff14eb4a4097.tar.gz
WarpX-b6985d24c36f5644c69b0773deb8ff14eb4a4097.tar.zst
WarpX-b6985d24c36f5644c69b0773deb8ff14eb4a4097.zip
Remove temporary copy of MultiFab (#3190)
Use template specification of amrex::FillBoundary directly with comm_float_type in case of single-precision communication. Leave out FillBoundaryAndSync for now because it requires AMReX changes.
-rw-r--r--Source/ablastr/utils/Communication.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/Source/ablastr/utils/Communication.cpp b/Source/ablastr/utils/Communication.cpp
index 1641a47c9..b78abb33c 100644
--- a/Source/ablastr/utils/Communication.cpp
+++ b/Source/ablastr/utils/Communication.cpp
@@ -65,16 +65,7 @@ void FillBoundary (amrex::MultiFab &mf, bool do_single_precision_comms, const am
if (do_single_precision_comms)
{
- amrex::FabArray<amrex::BaseFab<comm_float_type> > mf_tmp(mf.boxArray(),
- mf.DistributionMap(),
- mf.nComp(),
- mf.nGrowVect());
-
- mixedCopy(mf_tmp, mf, 0, 0, mf.nComp(), mf.nGrowVect());
-
- mf_tmp.FillBoundary(period);
-
- mixedCopy(mf, mf_tmp, 0, 0, mf.nComp(), mf.nGrowVect());
+ mf.FillBoundary<comm_float_type>(period);
}
else
{