Skip to content

Commit

Permalink
Enforce max ratio (i.e., limit number of stages) even without dt_hyp
Browse files Browse the repository at this point in the history
  • Loading branch information
pgrete committed Nov 10, 2024
1 parent 9a7ede7 commit 867fb3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hydro/hydro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,7 @@ Real EstimateTimestep(MeshData<Real> *md) {
// or not constrain limit further (which is why RKL2 is there in first place)
} else if (hydro_pkg->Param<DiffInt>("diffint") == DiffInt::rkl2) {
const auto max_dt_ratio = hydro_pkg->Param<Real>("rkl2_max_dt_ratio");
if (calc_dt_hyp && max_dt_ratio > 0.0 && dt_hyp / dt_diff > max_dt_ratio) {
if (max_dt_ratio > 0.0 && dt_hyp / dt_diff > max_dt_ratio) {
min_dt = std::min(min_dt, max_dt_ratio * dt_diff);
}
} else {
Expand Down

0 comments on commit 867fb3a

Please sign in to comment.