aboutsummaryrefslogtreecommitdiff
path: root/Source/WarpXComm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WarpXComm.cpp')
-rw-r--r--Source/WarpXComm.cpp36
1 files changed, 16 insertions, 20 deletions
diff --git a/Source/WarpXComm.cpp b/Source/WarpXComm.cpp
index f225f1015..69a57d2ac 100644
--- a/Source/WarpXComm.cpp
+++ b/Source/WarpXComm.cpp
@@ -257,9 +257,8 @@ WarpX::FillBoundaryE (int lev, PatchType patch_type)
}
const auto& period = Geom(lev).periodicity();
- (*Efield_fp[lev][0]).FillBoundary(period);
- (*Efield_fp[lev][1]).FillBoundary(period);
- (*Efield_fp[lev][2]).FillBoundary(period);
+ Vector<MultiFab*> mf{Efield_fp[lev][0].get(),Efield_fp[lev][1].get(),Efield_fp[lev][2].get()};
+ amrex::FillBoundary(mf, period);
}
else if (patch_type == PatchType::coarse)
{
@@ -273,9 +272,8 @@ WarpX::FillBoundaryE (int lev, PatchType patch_type)
}
const auto& cperiod = Geom(lev-1).periodicity();
- (*Efield_cp[lev][0]).FillBoundary(cperiod);
- (*Efield_cp[lev][1]).FillBoundary(cperiod);
- (*Efield_cp[lev][2]).FillBoundary(cperiod);
+ Vector<MultiFab*> mf{Efield_cp[lev][0].get(),Efield_cp[lev][1].get(),Efield_cp[lev][2].get()};
+ amrex::FillBoundary(mf, cperiod);
}
}
@@ -300,9 +298,8 @@ WarpX::FillBoundaryB (int lev, PatchType patch_type)
pml[lev]->FillBoundaryB(patch_type);
}
const auto& period = Geom(lev).periodicity();
- (*Bfield_fp[lev][0]).FillBoundary(period);
- (*Bfield_fp[lev][1]).FillBoundary(period);
- (*Bfield_fp[lev][2]).FillBoundary(period);
+ Vector<MultiFab*> mf{Bfield_fp[lev][0].get(),Bfield_fp[lev][1].get(),Bfield_fp[lev][2].get()};
+ amrex::FillBoundary(mf, period);
}
else if (patch_type == PatchType::coarse)
{
@@ -315,9 +312,8 @@ WarpX::FillBoundaryB (int lev, PatchType patch_type)
pml[lev]->FillBoundaryB(patch_type);
}
const auto& cperiod = Geom(lev-1).periodicity();
- (*Bfield_cp[lev][0]).FillBoundary(cperiod);
- (*Bfield_cp[lev][1]).FillBoundary(cperiod);
- (*Bfield_cp[lev][2]).FillBoundary(cperiod);
+ Vector<MultiFab*> mf{Bfield_cp[lev][0].get(),Bfield_cp[lev][1].get(),Bfield_cp[lev][2].get()};
+ amrex::FillBoundary(mf, cperiod);
}
}
@@ -491,16 +487,16 @@ WarpX::SyncCurrent ()
for (int lev = 0; lev <= finest_level; ++lev)
{
const auto& period = Geom(lev).periodicity();
- current_fp[lev][0]->OverrideSync(period);
- current_fp[lev][1]->OverrideSync(period);
- current_fp[lev][2]->OverrideSync(period);
+ current_fp[lev][0]->OverrideSync(*current_fp_owner_masks[lev][0], period);
+ current_fp[lev][1]->OverrideSync(*current_fp_owner_masks[lev][1], period);
+ current_fp[lev][2]->OverrideSync(*current_fp_owner_masks[lev][2],period);
}
for (int lev = 1; lev <= finest_level; ++lev)
{
const auto& cperiod = Geom(lev-1).periodicity();
- current_cp[lev][0]->OverrideSync(cperiod);
- current_cp[lev][1]->OverrideSync(cperiod);
- current_cp[lev][2]->OverrideSync(cperiod);
+ current_cp[lev][0]->OverrideSync(*current_cp_owner_masks[lev][0], cperiod);
+ current_cp[lev][1]->OverrideSync(*current_cp_owner_masks[lev][1], cperiod);
+ current_cp[lev][2]->OverrideSync(*current_cp_owner_masks[lev][2], cperiod);
}
}
@@ -645,12 +641,12 @@ WarpX::SyncRho (amrex::Vector<std::unique_ptr<amrex::MultiFab> >& rhof,
for (int lev = 0; lev <= finest_level; ++lev)
{
const auto& period = Geom(lev).periodicity();
- rhof[lev]->OverrideSync(period);
+ rhof[lev]->OverrideSync(*rho_fp_owner_masks[lev], period);
}
for (int lev = 1; lev <= finest_level; ++lev)
{
const auto& cperiod = Geom(lev-1).periodicity();
- rhoc[lev]->OverrideSync(cperiod);
+ rhoc[lev]->OverrideSync(*rho_cp_owner_masks[lev], cperiod);
}
}