1 #ifndef ERF_FIXED_DT_CFL_LIMIT_H_
2 #define ERF_FIXED_DT_CFL_LIMIT_H_
4 #include <AMReX_Algorithm.H>
5 #include <AMReX_BoxArray.H>
6 #include <AMReX_REAL.H>
18 return amrex::min(cfl, 0.8);
37 if (fixed_dt <= 0.0 || cfl_rate <= 0.0 || cfl <= 0.0) {
return 1.0; }
39 const double courant = fixed_dt * cfl_rate;
41 if (courant <= limit * (1.0 + 1.e-10)) {
return 1.0; }
42 return limit / courant;
57 if (a == b) {
return true; }
59 return a.numPts() == b.numPts() && (a.empty() || a.contains(b,
true));
double FixedDtCFLScale(double fixed_dt, double cfl_rate, double cfl)
Definition: ERF_FixedDtCFLLimit.H:35
double FixedDtCFLLimitValue(double cfl)
Definition: ERF_FixedDtCFLLimit.H:16
bool FixedDtSameCells(const amrex::BoxArray &a, const amrex::BoxArray &b)
Definition: ERF_FixedDtCFLLimit.H:55