Skip to content

Commit

Permalink
properly checkpoint London J (#102)
Browse files Browse the repository at this point in the history
* properly checkpoint London J

* EOL whitespace

* EOL whitespace
  • Loading branch information
ajnonaka authored Sep 21, 2022
1 parent ea700e0 commit 726b923
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Source/Diagnostics/FlushFormats/FlushFormatCheckpoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ FlushFormatCheckpoint::WriteToFile (
amrex::MultiFabFileFullPrefix(lev, checkpointname, default_level_prefix, "Bz_avg_fp"));
}

if (warpx.getis_synchronized()) {
if (warpx.getis_synchronized() || WarpX::yee_coupled_solver_algo == CoupledYeeSolver::MaxwellLondon) {
// Need to save j if synchronized because after restart we need j to evolve E by dt/2.
VisMF::Write(warpx.getcurrent_fp(lev, 0),
amrex::MultiFabFileFullPrefix(lev, checkpointname, default_level_prefix, "jx_fp"));
Expand Down Expand Up @@ -174,7 +174,7 @@ FlushFormatCheckpoint::WriteToFile (
amrex::MultiFabFileFullPrefix(lev, checkpointname, default_level_prefix, "Bz_avg_cp"));
}

if (warpx.getis_synchronized()) {
if (warpx.getis_synchronized() || WarpX::yee_coupled_solver_algo == CoupledYeeSolver::MaxwellLondon) {
// Need to save j if synchronized because after restart we need j to evolve E by dt/2.
VisMF::Write(warpx.getcurrent_cp(lev, 0),
amrex::MultiFabFileFullPrefix(lev, checkpointname, default_level_prefix, "jx_cp"));
Expand Down
4 changes: 2 additions & 2 deletions Source/Diagnostics/WarpXIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ WarpX::InitFromCheckpoint ()
amrex::MultiFabFileFullPrefix(lev, restart_chkfile, level_prefix, "Bz_avg_fp"));
}

if (is_synchronized) {
if (is_synchronized || WarpX::yee_coupled_solver_algo == CoupledYeeSolver::MaxwellLondon) {
VisMF::Read(*current_fp[lev][0],
amrex::MultiFabFileFullPrefix(lev, restart_chkfile, level_prefix, "jx_fp"));
VisMF::Read(*current_fp[lev][1],
Expand Down Expand Up @@ -370,7 +370,7 @@ WarpX::InitFromCheckpoint ()
amrex::MultiFabFileFullPrefix(lev, restart_chkfile, level_prefix, "Bz_avg_cp"));
}

if (is_synchronized) {
if (is_synchronized || WarpX::yee_coupled_solver_algo == CoupledYeeSolver::MaxwellLondon) {
VisMF::Read(*current_cp[lev][0],
amrex::MultiFabFileFullPrefix(lev, restart_chkfile, level_prefix, "jx_cp"));
VisMF::Read(*current_cp[lev][1],
Expand Down

0 comments on commit 726b923

Please sign in to comment.