aboutsummaryrefslogtreecommitdiff
path: root/Source/WarpXRegrid.cpp
diff options
context:
space:
mode:
authorGravatar Andrew Myers <atmyers2@gmail.com> 2018-12-12 10:36:42 -0800
committerGravatar Andrew Myers <atmyers2@gmail.com> 2018-12-12 10:36:42 -0800
commit86ff3fa5cfb5695f55cd514d8df0e99b81187cce (patch)
tree22c9f627f37ad905bee89782cb71b4a14e468d53 /Source/WarpXRegrid.cpp
parent22dd9a7bdbfcf07fb3ad5d442011e4423cddbd6c (diff)
downloadWarpX-86ff3fa5cfb5695f55cd514d8df0e99b81187cce.tar.gz
WarpX-86ff3fa5cfb5695f55cd514d8df0e99b81187cce.tar.zst
WarpX-86ff3fa5cfb5695f55cd514d8df0e99b81187cce.zip
manually reverting back to last known working version of WarpX
Diffstat (limited to 'Source/WarpXRegrid.cpp')
-rw-r--r--Source/WarpXRegrid.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/Source/WarpXRegrid.cpp b/Source/WarpXRegrid.cpp
index d21e2ad9c..8d7873041 100644
--- a/Source/WarpXRegrid.cpp
+++ b/Source/WarpXRegrid.cpp
@@ -40,6 +40,7 @@ WarpX::RemakeLevel (int lev, Real time, const BoxArray& ba, const DistributionMa
// Fine patch
+ const auto& period = Geom(lev).periodicity();
for (int idim=0; idim < 3; ++idim)
{
{
@@ -60,8 +61,8 @@ WarpX::RemakeLevel (int lev, Real time, const BoxArray& ba, const DistributionMa
const IntVect& ng = current_fp[lev][idim]->nGrowVect();
auto pmf = std::unique_ptr<MultiFab>(new MultiFab(current_fp[lev][idim]->boxArray(),
dm, 1, ng));
- // pmf->Redistribute(*current_fp[lev][idim], 0, 0, 1, ng);
current_fp[lev][idim] = std::move(pmf);
+ current_fp_owner_masks[lev][idim] = std::move(current_fp[lev][idim]->OwnerMask(period));
}
if (current_store[lev][idim])
{
@@ -86,8 +87,8 @@ WarpX::RemakeLevel (int lev, Real time, const BoxArray& ba, const DistributionMa
const IntVect& ng = rho_fp[lev]->nGrowVect();
auto pmf = std::unique_ptr<MultiFab>(new MultiFab(rho_fp[lev]->boxArray(),
dm, nc, ng));
- // pmf->Redistribute(*rho_fp[lev], 0, 0, nc, ng);
rho_fp[lev] = std::move(pmf);
+ rho_fp_owner_masks[lev] = std::move(rho_fp[lev]->OwnerMask(period));
}
// Aux patch
@@ -120,6 +121,7 @@ WarpX::RemakeLevel (int lev, Real time, const BoxArray& ba, const DistributionMa
// Coarse patch
if (lev > 0) {
+ const auto& cperiod = Geom(lev-1).periodicity();
for (int idim=0; idim < 3; ++idim)
{
{
@@ -138,10 +140,11 @@ WarpX::RemakeLevel (int lev, Real time, const BoxArray& ba, const DistributionMa
}
{
const IntVect& ng = current_cp[lev][idim]->nGrowVect();
- auto pmf = std::unique_ptr<MultiFab>(new MultiFab(current_cp[lev][idim]->boxArray(),
- dm, 1, ng));
- // pmf->Redistribute(*current_cp[lev][idim], 0, 0, 1, ng);
+ auto pmf = std::unique_ptr<MultiFab>( new MultiFab(current_cp[lev][idim]->boxArray(),
+ dm, 1, ng));
current_cp[lev][idim] = std::move(pmf);
+ current_cp_owner_masks[lev][idim] = std::move(
+ current_cp[lev][idim]->OwnerMask(cperiod));
}
}
@@ -158,8 +161,8 @@ WarpX::RemakeLevel (int lev, Real time, const BoxArray& ba, const DistributionMa
const IntVect& ng = rho_cp[lev]->nGrowVect();
auto pmf = std::unique_ptr<MultiFab>(new MultiFab(rho_cp[lev]->boxArray(),
dm, nc, ng));
- // pmf->Redistribute(*rho_cp[lev], 0, 0, nc, ng);
rho_cp[lev] = std::move(pmf);
+ rho_cp_owner_masks[lev] = std::move(rho_cp[lev]->OwnerMask(cperiod));
}
}