WARPXM v1.10.0
Loading...
Searching...
No Matches
app_setup_helper.h
Go to the documentation of this file.
1#pragma once
2
3// wxm includes
4#include "lib/wxcryptset.h"
5// #include "apps/wmapplication.h"
6
7namespace wxm
8{
9namespace apps
10{
11namespace five_moment
12{
13
19{
20public:
24 AppSetupHelper() = default;
25
29 AppSetupHelper(const WxCryptSet& wxc) : _wxc(wxc)
30 {
31 }
32
33 // Setters
37 void setWxc(const WxCryptSet& wxc)
38 {
39 _wxc = wxc;
40 };
41
42 // Other methods
46 std::string exceptionIntro() const;
47
68 real& min_density,
69 real& min_pressure,
70 const std::string min_density_name = "MinDensity",
71 const std::string min_pressure_name = "MinPressure") const;
72
82 void assignGasGamma(real& gas_gamma,
83 const std::string gas_gamma_name = "gamma") const;
84
98 const real default_value,
99 const std::string gas_gamma_name = "gamma") const;
100
101protected:
103
104private:
105 AppSetupHelper& operator=(const AppSetupHelper& var) = delete;
106 AppSetupHelper(const AppSetupHelper& var) = delete;
107};
108} // namespace five_moment
109} // namespace apps
110} // namespace wxm
WxCryptSet extends WxCrypt by providing, in addition to name-value pairs, an set of named WxCryptSets...
Definition: wxcryptset.h:35
Helper class that automates common setup tasks for 5-moment fluid physics applications.
Definition: app_setup_helper.h:19
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.
WxCryptSet _wxc
Definition: app_setup_helper.h:102
void setWxc(const WxCryptSet &wxc)
Set crypset attribute with copy of app crypset.
Definition: app_setup_helper.h:37
AppSetupHelper()=default
Constructor without cryptset.
AppSetupHelper(const WxCryptSet &wxc)
Constructor with cryptset.
Definition: app_setup_helper.h:29
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.
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.
list apps
Definition: shock_tube.py:33
Base namespace for everything not included in the global namespace.
Definition: field_source.h:8
#define real
Definition: wmoclunstructuredreconstruction.h:11