WARPXM v1.10.0
Loading...
Searching...
No Matches
linear_acoustics.h
Go to the documentation of this file.
1#ifndef WXM_APPS_LINEAR_ACOUSTICS_H
2#define WXM_APPS_LINEAR_ACOUSTICS_H
3
4// Wm includes
6
7namespace wxm
8{
9namespace apps
10{
11
12// 1d linear advection
14{
15public:
17
19
20 void setup(const WxCryptSet& wxc) override;
21
22 const std::vector<int>& getInputVariableIndexes(int flag) const override
23 {
24 return _variables;
25 }
26 const std::vector<int>& getOutputVariableIndexes(int flag) const override
27 {
28 return _variables;
29 }
30
31 // redefinition of fluxes from parent
33 const real* q_r,
34 const real* aux_l,
35 const real* aux_r,
36 const solverVariables_t* pFV,
37 real* numericalFlux) const override;
39 const real* aux,
40 const solverVariables_t* pSV,
41 std::vector<std::vector<real>>& internalFlux) const override;
42
43protected:
44 real _cs; // sound speed
45 real _rho0; // density of fluid
46 real _u0; // average fluid speed
47
48 real _K0; // bulk modulus of compressibility -> calculated from
49 // _rho0 and _cs
50
51 std::vector<int> _variables;
52
53private:
54 linear_acoustics_t& operator=(const linear_acoustics_t& var) = delete;
55 linear_acoustics_t(const linear_acoustics_t& var) = delete;
56};
57} // namespace apps
58} // namespace wxm
59
60#endif // WXM_APPS_LINEAR_ACOUSTICS_H
Base Class for physics applications.
Definition: wmapplication.h:93
WxCryptSet extends WxCrypt by providing, in addition to name-value pairs, an set of named WxCryptSets...
Definition: wxcryptset.h:35
Definition: linear_acoustics.h:14
const std::vector< int > & getInputVariableIndexes(int flag) const override
Definition: linear_acoustics.h:22
real numerical_flux(const real *q_l, const real *q_r, const real *aux_l, const real *aux_r, const solverVariables_t *pFV, real *numericalFlux) const override
std::vector< int > _variables
Definition: linear_acoustics.h:51
real _u0
Definition: linear_acoustics.h:46
real _cs
Definition: linear_acoustics.h:44
void setup(const WxCryptSet &wxc) override
real _K0
Definition: linear_acoustics.h:48
real _rho0
Definition: linear_acoustics.h:45
const std::vector< int > & getOutputVariableIndexes(int flag) const override
Definition: linear_acoustics.h:26
real internal_flux(const real *q, const real *aux, const solverVariables_t *pSV, std::vector< std::vector< real > > &internalFlux) const override
list apps
Definition: shock_tube.py:33
Base namespace for everything not included in the global namespace.
Definition: field_source.h:8
Definition: wmapplication.h:38
#define real
Definition: wmoclunstructuredreconstruction.h:11