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
6namespace wxm
7{
8namespace apps
9{
10namespace mhd
11{
12
18{
19public:
23 AppSetupHelper() = default;
24
28 AppSetupHelper(const WxCryptSet& wxc) : _wxc(wxc)
29 {
30 }
31
32 // Setters
36 void setWxc(const WxCryptSet& wxc)
37 {
38 _wxc = wxc;
39 };
40
41 // Other methods
45 std::string exceptionIntro() const;
46
67 real& min_density,
68 real& min_pressure,
69 const std::string min_density_name = "MinDensity",
70 const std::string min_pressure_name = "MinPressure") const;
71
81 void assignGasGamma(real& gas_gamma,
82 const std::string gas_gamma_name = "gamma") const;
83
97 const real default_value,
98 const std::string gas_gamma_name = "gamma") const;
99
100protected:
102
103private:
104 AppSetupHelper& operator=(const AppSetupHelper& var) = delete;
105 AppSetupHelper(const AppSetupHelper& var) = delete;
106};
107} // namespace mhd
108} // namespace apps
109} // 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 mhd physics applications.
Definition: app_setup_helper.h:18
AppSetupHelper(const WxCryptSet &wxc)
Constructor with cryptset.
Definition: app_setup_helper.h:28
std::string exceptionIntro() const
Makes a nice informative string to begin exception messages.
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.
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 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 setWxc(const WxCryptSet &wxc)
Set crypset attribute with copy of app crypset.
Definition: app_setup_helper.h:36
WxCryptSet _wxc
Definition: app_setup_helper.h:101
AppSetupHelper()=default
Constructor without cryptset.
list apps
Definition: shock_tube.py:33
warpy mhd
Definition: mhd_shock.py:32
Base namespace for everything not included in the global namespace.
Definition: field_source.h:8
#define real
Definition: wmoclunstructuredreconstruction.h:11