Skip to content

Commit

Permalink
Update based upon slack convo.
Browse files Browse the repository at this point in the history
  • Loading branch information
AMLattanzi committed Dec 6, 2024
1 parent dac149e commit 2133796
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Source/TimeIntegration/ERF_ComputeTimestep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,9 @@ ERF::estTimeStep (int level, long& dt_fast_ratio) const
if (fixed_dt[level] > 0. && fixed_fast_dt[level] > 0.) {
dt_fast_ratio = static_cast<long>( fixed_dt[level] / fixed_fast_dt[level] );
} else if (fixed_dt[level] > 0.) {
// Max CFL_c = 2.0 and 6 substeps
static constexpr Real max_ratio = 2.0 / 6.0;
auto dt_sub_max = max_ratio * (estdt_comp/cfl);
dt_fast_ratio = static_cast<long>( fixed_dt[level] / dt_sub_max );
// Max CFL_c = 1.0 for substeps, but we enforce a min of 4 substeps
auto dt_sub_max = (estdt_comp/cfl);
dt_fast_ratio = static_cast<long>( std::max(fixed_dt[level]/dt_sub_max,4.) );
}

// Force time step ratio to be an even value
Expand Down

0 comments on commit 2133796

Please sign in to comment.