Skip to content

Commit

Permalink
Bugfix in load balancing routine (ECP-WarpX#2555)
Browse files Browse the repository at this point in the history
* add remake of phi_fp during load balancing RemakeLevel

* added phi_cp remake to RemakeLevel function

* revert changes from previous commit
  • Loading branch information
roelof-groenewald authored Nov 15, 2021
1 parent 60c9ae5 commit ed9a8ed
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Source/Parallelization/WarpXRegrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit ed9a8ed

Please sign in to comment.