WARPXM v1.10.0
Loading...
Searching...
No Matches
artificial_dissipation.h
Go to the documentation of this file.
1#pragma once
2
3// wxm includes
6
7// STL includes
8#include <memory>
9
10namespace wxm
11{
12namespace apps
13{
14namespace five_moment
15{
16namespace limiters
17{
18
27{
28public:
33
38
43 void setup(const WxCryptSet& wxc) override;
44
50 const std::vector<int>& getInputVariableIndexes(int flag) const override
51 {
52 return _input_variables;
53 }
54
60 const std::vector<int>& getAuxiliaryVariableIndexes(int flag) const override
61 {
62 return _aux_variables;
63 }
64
70 const std::vector<int>& getOutputVariableIndexes(int flag) const override
71 {
72 return _output_variables;
73 }
74
75 // redefinition of fluxes from parent
76
88 const real* q_r,
89 const real* aux_l,
90 const real* aux_r,
91 const solverVariables_t* pFV,
92 real* numericalFlux) const override;
93
103 const real* aux,
104 const solverVariables_t* pSV,
105 std::vector<std::vector<real>>& internalFlux) const override;
106
107 // specific calls
108
121 const real* q_r,
122 const real* aux_l,
123 const real* aux_r,
124 const solverVariables_t* pFV,
125 real* numericalFlux) const;
126
139 const real* q_r,
140 const real* aux_l,
141 const real* aux_r,
142 const solverVariables_t* pFV,
143 real* numericalFlux) const;
144
145protected:
147 std::unique_ptr<AppSetupHelper> _setup_helper;
148
153
154 // coefficients on artificial momentum and heat diffusivities
159
161
164
165 int _ir;
166 int _ith;
167 int _iz;
168
170
171 // gradient calculation method ("ip" or "ldg")
172 std::string _gradient_method;
173 std::vector<real> _params;
174
175 std::vector<int> _input_variables;
176 std::vector<int> _aux_variables;
177 std::vector<int> _output_variables;
178
179 // flux tensor is used to calculate left and right fluxes for numerical flux
180 // mutable because this will continuously be changed upon call, but functions are
181 // labled const.
182 // this is just a helper vector so this behavior should be justified.
183 mutable std::vector<std::vector<real>> _flux_tensor;
184};
185
186} // namespace limiters
187} // namespace five_moment
188} // namespace apps
189} // 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:27
real _coeff_mom
Definition: artificial_dissipation.h:156
int _ir
Definition: artificial_dissipation.h:165
real _min_pressure
Minimum normalized pressure used in calculations.
Definition: artificial_dissipation.h:150
real _mass
Definition: artificial_dissipation.h:152
bool _use_v_anom
Definition: artificial_dissipation.h:163
real _diff_cap
Definition: artificial_dissipation.h:158
const std::vector< int > & getAuxiliaryVariableIndexes(int flag) const override
Get auxiliary variable indices.
Definition: artificial_dissipation.h:60
const std::vector< int > & getOutputVariableIndexes(int flag) const override
Get output variable indices.
Definition: artificial_dissipation.h:70
int _ith
Definition: artificial_dissipation.h:166
real _gas_gamma
Adiabatic index.
Definition: artificial_dissipation.h:151
real _min_density
Minimum normalized mass density used in calculations.
Definition: artificial_dissipation.h:149
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:183
real _coeff_heat
Definition: artificial_dissipation.h:157
int _iz
Definition: artificial_dissipation.h:167
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.
std::string _gradient_method
Definition: artificial_dissipation.h:172
std::vector< int > _input_variables
Definition: artificial_dissipation.h:175
real _dx_cut
Definition: artificial_dissipation.h:169
std::vector< real > _params
Definition: artificial_dissipation.h:173
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:155
bool _is_cyl
Definition: artificial_dissipation.h:162
std::vector< int > _output_variables
Definition: artificial_dissipation.h:177
const std::vector< int > & getInputVariableIndexes(int flag) const override
Get input variable indices.
Definition: artificial_dissipation.h:50
real _cfl_diff
Definition: artificial_dissipation.h:160
std::vector< int > _aux_variables
Definition: artificial_dissipation.h:176
std::unique_ptr< AppSetupHelper > _setup_helper
Helper object that automates common setup routines.
Definition: artificial_dissipation.h:147
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