Helper class that automates common setup tasks for 5-moment fluid physics applications.
More...
#include <app_setup_helper.h>
Helper class that automates common setup tasks for 5-moment fluid physics applications.
|
| AppSetupHelper ()=default |
| Constructor without cryptset.
|
|
| AppSetupHelper (const WxCryptSet &wxc) |
| Constructor with cryptset.
|
|
void | setWxc (const WxCryptSet &wxc) |
| Set crypset attribute with copy of app crypset.
|
|
std::string | exceptionIntro () const |
| Makes a nice informative string to begin exception messages.
|
|
void | assignMinDensityAndPressure (real &min_density, real &min_pressure, const std::string min_density_name="MinDensity", const std::string min_pressure_name="MinPressure") const |
| Pull in minimum density and pressure values from the cryptset, or assign default values.
|
|
void | assignGasGamma (real &gas_gamma, const std::string gas_gamma_name="gamma") const |
| Get the adiabatic index from the cryptset and assign it to _gas_gamma.
|
|
void | assignGasGammaWithDefault (real &gas_gamma, const real default_value, const std::string gas_gamma_name="gamma") const |
| Get the adiabatic index from the cryptset if exists, or assign default value.
|
|
◆ AppSetupHelper() [1/2]
wxm::apps::five_moment::AppSetupHelper::AppSetupHelper |
( |
| ) |
|
|
default |
Constructor without cryptset.
◆ AppSetupHelper() [2/2]
wxm::apps::five_moment::AppSetupHelper::AppSetupHelper |
( |
const WxCryptSet & |
wxc | ) |
|
|
inline |
Constructor with cryptset.
◆ assignGasGamma()
void wxm::apps::five_moment::AppSetupHelper::assignGasGamma |
( |
real & |
gas_gamma, |
|
|
const std::string |
gas_gamma_name = "gamma" |
|
) |
| const |
Get the adiabatic index from the cryptset and assign it to _gas_gamma.
- Warning
- Will throw an exception if gas_gamma_name not in the cryptset.
-
Will throw an exception if value of _gas_gamma <= 0.
- Parameters
-
gas_gamma | Reference to app _gas_gamma attribute. |
gas_gamma_name | String for value name in cryptset. |
◆ assignGasGammaWithDefault()
void wxm::apps::five_moment::AppSetupHelper::assignGasGammaWithDefault |
( |
real & |
gas_gamma, |
|
|
const real |
default_value, |
|
|
const std::string |
gas_gamma_name = "gamma" |
|
) |
| const |
Get the adiabatic index from the cryptset if exists, or assign default value.
Similar to setGasGamma, except must specify a default value for _gas_gamma if _gas_gamma_name is not found in the cryptset.
- Warning
- Will throw an exception if value of _gas_gamma <= 0.
- Parameters
-
gas_gamma | Reference to gas gamma variable to be set. |
default_value | Value to use for gas_gamma if gas_gamma_name not in cryptset. |
gas_gamma_name | String for value name in cryptset. |
◆ assignMinDensityAndPressure()
void wxm::apps::five_moment::AppSetupHelper::assignMinDensityAndPressure |
( |
real & |
min_density, |
|
|
real & |
min_pressure, |
|
|
const std::string |
min_density_name = "MinDensity" , |
|
|
const std::string |
min_pressure_name = "MinPressure" |
|
) |
| const |
Pull in minimum density and pressure values from the cryptset, or assign default values.
Many applications require a minimum density and pressure in order to avoid floating point errors when local density, pressure, or temperature dip to zero or below.
This method can be called explicitly in the setup of any child class to look for user defined minimum density and pressure values given cryptset value names. If the values are <=0, an exception will be raised. If no user defined values are found in the cryptset, default values of machine epsilon are assigned.
- Warning
- Will throw an exception if value of _min_density or _min_pressure <= 0.
- Parameters
-
min_density | Reference to min density variable to be set. |
min_pressure | Reference to min pressure variable to be set. |
min_density_name | String for value name in cryptset. |
min_pressure_name | String for value name in cryptset. |
◆ exceptionIntro()
std::string wxm::apps::five_moment::AppSetupHelper::exceptionIntro |
( |
| ) |
const |
Makes a nice informative string to begin exception messages.
◆ setWxc()
void wxm::apps::five_moment::AppSetupHelper::setWxc |
( |
const WxCryptSet & |
wxc | ) |
|
|
inline |
Set crypset attribute with copy of app crypset.
◆ _wxc
WxCryptSet wxm::apps::five_moment::AppSetupHelper::_wxc |
|
protected |
The documentation for this class was generated from the following file: