Skip to content

Commit

Permalink
add flag to turn off substepping on fine grids
Browse files Browse the repository at this point in the history
  • Loading branch information
hklion committed Nov 29, 2023
1 parent 29a013c commit eefc3e8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Source/ROMSX.H
Original file line number Diff line number Diff line change
Expand Up @@ -902,6 +902,9 @@ private:
static int fixed_ndtfast_ratio;
int nfast;

// Whether to substep fine levels in time
int do_substep;

// how often each level regrids the higher levels of refinement
// (after a level advances that many time steps)
int regrid_int = 2;
Expand Down
3 changes: 2 additions & 1 deletion Source/ROMSX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ ROMSX::ROMSX ()
istep.resize(nlevs_max, 0);
nsubsteps.resize(nlevs_max, 1);
for (int lev = 1; lev <= max_level; ++lev) {
nsubsteps[lev] = MaxRefRatio(lev-1);
nsubsteps[lev] = do_substep ? MaxRefRatio(lev-1) : 1;
}

t_new.resize(nlevs_max, 0.0);
Expand Down Expand Up @@ -480,6 +480,7 @@ ROMSX::ReadParameters ()
fixed_ndtfast_ratio = static_cast<int>(fixed_dt / fixed_fast_dt);
}

pp.query("do_substep", do_substep);

AMREX_ASSERT(cfl > 0. || fixed_dt > 0.);

Expand Down

0 comments on commit eefc3e8

Please sign in to comment.