diff options
author | 2021-11-15 11:21:49 -0800 | |
---|---|---|
committer | 2021-11-15 11:21:49 -0800 | |
commit | ed9a8edc1e6c07b7f6942c0c9b86ab8d2fda6690 (patch) | |
tree | 5851d7eab4761389e924c5e714771d9f998d1961 /Source/Parallelization/WarpXRegrid.cpp | |
parent | 60c9ae566c538ec98ee316381a1b21e3cbb8c662 (diff) | |
download | WarpX-ed9a8edc1e6c07b7f6942c0c9b86ab8d2fda6690.tar.gz WarpX-ed9a8edc1e6c07b7f6942c0c9b86ab8d2fda6690.tar.zst WarpX-ed9a8edc1e6c07b7f6942c0c9b86ab8d2fda6690.zip |
Bugfix in load balancing routine (#2555)
* add remake of phi_fp during load balancing RemakeLevel
* added phi_cp remake to RemakeLevel function
* revert changes from previous commit
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) { |