Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load balancing bug fix: remake MultiFabs for Vay deposition, current centering, time averaging #3508

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions Source/Parallelization/WarpXRegrid.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* Copyright 2019 Andrew Myers, Ann Almgren, Axel Huebl
* David Grote, Maxence Thevenet, Michael Rowan
* Remi Lehe, Weiqun Zhang, levinem
* Remi Lehe, Weiqun Zhang, levinem, Revathi Jambunathan
*
* This file is part of WarpX.
*
Expand Down Expand Up @@ -170,7 +170,16 @@ WarpX::RemakeLevel (int lev, Real /*time*/, const BoxArray& ba, const Distributi
RemakeMultiFab(Efield_fp[lev][idim], dm, true);
RemakeMultiFab(current_fp[lev][idim], dm, false);
RemakeMultiFab(current_store[lev][idim], dm, false);

if (current_deposition_algo == CurrentDepositionAlgo::Vay) {
RemakeMultiFab(current_fp_vay[lev][idim], dm, false);
}
if (do_current_centering) {
RemakeMultiFab(current_fp_nodal[lev][idim], dm, false);
}
if (fft_do_time_averaging) {
RemakeMultiFab(Efield_avg_fp[lev][idim], dm, true);
RemakeMultiFab(Bfield_avg_fp[lev][idim], dm, true);
}
#ifdef AMREX_USE_EB
if (WarpX::maxwell_solver_id == MaxwellSolverAlgo::Yee ||
WarpX::maxwell_solver_id == MaxwellSolverAlgo::ECT ||
Expand Down Expand Up @@ -264,6 +273,10 @@ WarpX::RemakeLevel (int lev, Real /*time*/, const BoxArray& ba, const Distributi
RemakeMultiFab(Bfield_cp[lev][idim], dm, true);
RemakeMultiFab(Efield_cp[lev][idim], dm, true);
RemakeMultiFab(current_cp[lev][idim], dm, false);
if (fft_do_time_averaging) {
RemakeMultiFab(Efield_avg_cp[lev][idim], dm, true);
RemakeMultiFab(Bfield_avg_cp[lev][idim], dm, true);
}
}
RemakeMultiFab(F_cp[lev], dm, true);
RemakeMultiFab(rho_cp[lev], dm, false);
Expand Down