ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_VariableBetaSSwitch.H
Go to the documentation of this file.
1 #ifndef ERF_VARIABLE_BETA_S_SWITCH_H_
2 #define ERF_VARIABLE_BETA_S_SWITCH_H_
3 
4 #include <AMReX_Algorithm.H>
5 #include <AMReX_REAL.H>
6 
7 /**
8  * Whether the constant beta_s is below the large-Courant stability limit min(sigma^2, 1) of the
9  * implicit acoustic substepping somewhere on a level whose largest terrain slope over the w-faces
10  * is sigma2_max = max(h_xi^2 + h_eta^2). ERF::CheckVariableBetaS then turns on
11  * erf.use_variable_beta_s (unless the inputs set it).
12  *
13  * @param[in] beta_s constant beta_s (erf.beta_s)
14  * @param[in] sigma2_max largest h_xi^2 + h_eta^2 over the w-faces of the level
15  */
16 inline bool
17 VariableBetaSSwitchNeeded (amrex::Real beta_s, amrex::Real sigma2_max)
18 {
19  return beta_s < amrex::min(sigma2_max, amrex::Real(1.0));
20 }
21 
22 #endif
bool VariableBetaSSwitchNeeded(amrex::Real beta_s, amrex::Real sigma2_max)
Definition: ERF_VariableBetaSSwitch.H:17