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 mhd
11{
12namespace limiters
13{
14
30{
31public:
36
41
46 void setup(const WxCryptSet& wxc) override;
47
53 const std::vector<int>& getInputVariableIndexes(int flag) const override
54 {
55 return _input_variables;
56 }
57
63 const std::vector<int>& getAuxiliaryVariableIndexes(int flag) const override
64 {
65 return _aux_variables;
66 }
67
73 const std::vector<int>& getOutputVariableIndexes(int flag) const override
74 {
75 return _output_variables;
76 }
77
78 // redefinition of fluxes from parent
79
91 const real* q_r,
92 const real* aux_l,
93 const real* aux_r,
94 const solverVariables_t* pFV,
95 real* numericalFlux) const override;
96
106 const real* aux,
107 const solverVariables_t* pSV,
108 std::vector<std::vector<real>>& internalFlux) const override;
109
110 // specific calls
123 const real* q_r,
124 const real* aux_l,
125 const real* aux_r,
126 const solverVariables_t* pFV,
127 real* numericalFlux) const;
128
141 const real* q_r,
142 const real* aux_l,
143 const real* aux_r,
144 const solverVariables_t* pFV,
145 real* numericalFlux) const;
146
147protected:
150
153
156
159
162
165
168
171
174
179
182
185
187
188 int _ir;
189 int _ith;
190 int _iz;
191
193 std::string _gradient_method;
194
195 std::vector<int> _input_variables;
196 std::vector<int> _aux_variables;
197 std::vector<int> _output_variables;
198
199 // flux tensor is used to calculate left and right fluxes for numerical flux
200 // mutable because this will continuously be changed upon call, but functions are
201 // labled const.
202 // this is just a helper vector so this behavior should be justified.
203 mutable std::vector<std::vector<real>> _flux_tensor;
204};
205
206} // namespace limiters
207} // namespace mhd
208} // namespace apps
209} // 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
An artificial dissipation limiter for MHD that uses divergence of velocity as a shock sensor.
Definition: artificial_dissipation.h:30
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 _coeff_heat
Coefficient on artificial diffusivity for heat flux.
Definition: artificial_dissipation.h:170
real _mass
Mass of species.
Definition: artificial_dissipation.h:152
real _min_density
Density floor.
Definition: artificial_dissipation.h:158
real _min_pressure
Pressure floor.
Definition: artificial_dissipation.h:161
int _iz
Definition: artificial_dissipation.h:190
int _ith
Definition: artificial_dissipation.h:189
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 _diff_cap
Maximum diffusivity.
Definition: artificial_dissipation.h:173
std::vector< int > _output_variables
Definition: artificial_dissipation.h:197
real _charge
Ion charge of species.
Definition: artificial_dissipation.h:155
std::vector< std::vector< real > > _flux_tensor
Definition: artificial_dissipation.h:203
real _dx_cut
Minimum value for dx_eff.
Definition: artificial_dissipation.h:184
std::vector< int > _input_variables
Definition: artificial_dissipation.h:195
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 _coeff_dens
Coefficient on artificial diffusivity for density.
Definition: artificial_dissipation.h:164
real _coeff_mom
Coefficient on artificial diffusivity for moment.
Definition: artificial_dissipation.h:167
real _cfl_diff
Factor in dt calculation for diffusion.
Definition: artificial_dissipation.h:181
std::string _gradient_method
gradient calculation method ("ip" or "ldg")
Definition: artificial_dissipation.h:193
bool _is_cyl
Definition: artificial_dissipation.h:186
const std::vector< int > & getOutputVariableIndexes(int flag) const override
Get output variable indices.
Definition: artificial_dissipation.h:73
bool _use_v_anom
If True will convect momentum and energy consistent with an anomalous velocity associated with artifi...
Definition: artificial_dissipation.h:178
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.
int _ir
Definition: artificial_dissipation.h:188
const std::vector< int > & getInputVariableIndexes(int flag) const override
Get input variable indices.
Definition: artificial_dissipation.h:53
std::vector< int > _aux_variables
Definition: artificial_dissipation.h:196
const std::vector< int > & getAuxiliaryVariableIndexes(int flag) const override
Get auxiliary variable indices.
Definition: artificial_dissipation.h:63
void setup(const WxCryptSet &wxc) override
Setup.
real _gas_gamma
Adiabatic Index.
Definition: artificial_dissipation.h:149
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
Definition: wmapplication.h:38
#define real
Definition: wmoclunstructuredreconstruction.h:11