Skip to content

Commit

Permalink
add a FillPatch before writing checkpoint file. This appears to be ne…
Browse files Browse the repository at this point in the history
…cessary for correctness
  • Loading branch information
hklion committed Jul 18, 2024
1 parent 86169a1 commit ea493c2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion Source/IO/Checkpoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,18 @@ REMORA::GotoNextLine (std::istream& is)
}

void
REMORA::WriteCheckpointFile () const
REMORA::WriteCheckpointFile ()
{
// We fillpatch here because otherwise the restart is wrong. Not 100% clear if this
// should be necessary and could instead be replaced by a FillPatch in a more natural
// location
for (int lev = 0; lev <= finest_level; ++lev) {
FillPatch(lev, t_new[lev], *cons_new[lev], cons_new, BdyVars::t,0,true,false);
FillPatch(lev, t_new[lev], *xvel_new[lev], xvel_new, BdyVars::u,0,true,false);
FillPatch(lev, t_new[lev], *yvel_new[lev], yvel_new, BdyVars::v,0,true,false);
FillPatch(lev, t_new[lev], *zvel_new[lev], zvel_new, BdyVars::null,0,true,false);
}

// chk00010 write a checkpoint file with this root directory
// chk00010/Header this contains information you need to save (e.g., finest_level, t_new, etc.) and also
// the BoxArrays at each level
Expand Down
2 changes: 1 addition & 1 deletion Source/REMORA.H
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ private:
amrex::Vector<REMORAFillPatcher> FPr_vbar;

// write checkpoint file to disk
void WriteCheckpointFile () const;
void WriteCheckpointFile ();

// read checkpoint file from disk
void ReadCheckpointFile ();
Expand Down

0 comments on commit ea493c2

Please sign in to comment.