From 21337960711f1a9ad1e8ce55f1a09b534ccaa4b8 Mon Sep 17 00:00:00 2001 From: AMLattanzi Date: Fri, 6 Dec 2024 12:23:18 -0800 Subject: [PATCH] Update based upon slack convo. --- Source/TimeIntegration/ERF_ComputeTimestep.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Source/TimeIntegration/ERF_ComputeTimestep.cpp b/Source/TimeIntegration/ERF_ComputeTimestep.cpp index 87b266cf5..96f37c1e4 100644 --- a/Source/TimeIntegration/ERF_ComputeTimestep.cpp +++ b/Source/TimeIntegration/ERF_ComputeTimestep.cpp @@ -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( 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( 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( std::max(fixed_dt[level]/dt_sub_max,4.) ); } // Force time step ratio to be an even value