diff options
Diffstat (limited to 'Source/Parallelization/WarpXRegrid.cpp')
-rw-r--r-- | Source/Parallelization/WarpXRegrid.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/Parallelization/WarpXRegrid.cpp b/Source/Parallelization/WarpXRegrid.cpp index 59ca25ed3..06e8b99ea 100644 --- a/Source/Parallelization/WarpXRegrid.cpp +++ b/Source/Parallelization/WarpXRegrid.cpp @@ -209,6 +209,14 @@ WarpX::RemakeLevel (int lev, Real /*time*/, const BoxArray& ba, const Distributi rho_fp[lev] = std::move(pmf); } + if (phi_fp[lev] != nullptr) { + const int nc = phi_fp[lev]->nComp(); + const IntVect& ng = phi_fp[lev]->nGrowVect(); + auto pmf = std::make_unique<MultiFab>(phi_fp[lev]->boxArray(), + dm, nc, ng); + phi_fp[lev] = std::move(pmf); + } + #ifdef WARPX_USE_PSATD if (maxwell_solver_id == MaxwellSolverAlgo::PSATD) { if (spectral_solver_fp[lev] != nullptr) { |