WARPXM v1.10.0
Loading...
Searching...
No Matches
artificial_dissipation.h
Go to the documentation of this file.
1#pragma once
2
3// Wm includes
5
6namespace wxm
7{
8namespace apps
9{
10namespace five_moment
11{
12namespace limiters
13{
14
23{
24public:
29
34
39 void setup(const WxCryptSet& wxc) override;
40
46 const std::vector<int>& getInputVariableIndexes(int flag) const override
47 {
48 return _input_variables;
49 }
50
56 const std::vector<int>& getAuxiliaryVariableIndexes(int flag) const override
57 {
58 return _aux_variables;
59 }
60
66 const std::vector<int>& getOutputVariableIndexes(int flag) const override
67 {
68 return _output_variables;
69 }
70
71 // redefinition of fluxes from parent
72
84 const real* q_r,
85 const real* aux_l,
86 const real* aux_r,
87 const solverVariables_t* pFV,
88 real* numericalFlux) const override;
89
99 const real* aux,
100 const solverVariables_t* pSV,
101 std::vector<std::vector<real>>& internalFlux) const override;
102
103 // specific calls
104
117 const real* q_r,
118 const real* aux_l,
119 const real* aux_r,
120 const solverVariables_t* pFV,
121 real* numericalFlux) const;
122
135 const real* q_r,
136 const real* aux_l,
137 const real* aux_r,
138 const solverVariables_t* pFV,
139 real* numericalFlux) const;
140
141protected:
146
147 // coefficients on artificial momentum and heat diffusivities
152
154
157
158 int _ir;
159 int _ith;
160 int _iz;
161
163
164 // gradient calculation method ("ip" or "ldg")
165 std::string _gradient_method;
166 std::vector<real> _params;
167
168 std::vector<int> _input_variables;
169 std::vector<int> _aux_variables;
170 std::vector<int> _output_variables;
171
172 // flux tensor is used to calculate left and right fluxes for numerical flux
173 // mutable because this will continuously be changed upon call, but functions are
174 // labled const.
175 // this is just a helper vector so this behavior should be justified.
176 mutable std::vector<std::vector<real>> _flux_tensor;
177};
178
179} // namespace limiters
180} // namespace five_moment
181} // namespace apps
182} // namespace wxm
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
Class used implementing artificial dissipation limiter that uses divergence of velocity as a shock se...
Definition: artificial_dissipation.h:23
real _coeff_mom
Definition: artificial_dissipation.h:149
real _pressure_min
Definition: artificial_dissipation.h:144
int _ir
Definition: artificial_dissipation.h:158
real _mass
Definition: artificial_dissipation.h:143
bool _use_v_anom
Definition: artificial_dissipation.h:156
real _diff_cap
Definition: artificial_dissipation.h:151
const std::vector< int > & getAuxiliaryVariableIndexes(int flag) const override
Get auxiliary variable indices.
Definition: artificial_dissipation.h:56
const std::vector< int > & getOutputVariableIndexes(int flag) const override
Get output variable indices.
Definition: artificial_dissipation.h:66
int _ith
Definition: artificial_dissipation.h:159
real _gas_gamma
Definition: artificial_dissipation.h:142
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
Numerical flux redefinition from wmapplication parent.
real numerical_flux_ip(const real *q_l, const real *q_r, const real *aux_l, const real *aux_r, const solverVariables_t *pFV, real *numericalFlux) const
Specific Numerical flux definition for interior penalty method Called by the numerical flux function.
std::vector< std::vector< real > > _flux_tensor
Definition: artificial_dissipation.h:176
real _coeff_heat
Definition: artificial_dissipation.h:150
int _iz
Definition: artificial_dissipation.h:160
real internal_flux(const real *q, const real *aux, const solverVariables_t *pSV, std::vector< std::vector< real > > &internalFlux) const override
Internal flux redefinition from wmapplication parent.
real _density_min
Definition: artificial_dissipation.h:145
std::string _gradient_method
Definition: artificial_dissipation.h:165
std::vector< int > _input_variables
Definition: artificial_dissipation.h:168
real _dx_cut
Definition: artificial_dissipation.h:162
std::vector< real > _params
Definition: artificial_dissipation.h:166
void setup(const WxCryptSet &wxc) override
Setup.
real numerical_flux_ldg(const real *q_l, const real *q_r, const real *aux_l, const real *aux_r, const solverVariables_t *pFV, real *numericalFlux) const
Specific Numerical flux definition for local discontinuous galerkin method Called by the numerical fl...
real _coeff_dens
Definition: artificial_dissipation.h:148
bool _is_cyl
Definition: artificial_dissipation.h:155
std::vector< int > _output_variables
Definition: artificial_dissipation.h:170
const std::vector< int > & getInputVariableIndexes(int flag) const override
Get input variable indices.
Definition: artificial_dissipation.h:46
real _cfl_diff
Definition: artificial_dissipation.h:153
std::vector< int > _aux_variables
Definition: artificial_dissipation.h:169
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