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
6
7// std includes
8#include <memory>
9
10namespace wxm
11{
12namespace apps
13{
14namespace mhd_two_temperature
15{
16namespace limiters
17{
18
33{
34public:
39
44
49 void setup(const WxCryptSet& wxc) override;
50
56 const std::vector<int>& getInputVariableIndexes(int flag) const override
57 {
58 return q_indexes_;
59 }
60
66 const std::vector<int>& getAuxiliaryVariableIndexes(int flag) const override
67 {
68 return grad_q_indexes_;
69 }
70
76 const std::vector<int>& getOutputVariableIndexes(int flag) const override
77 {
78 return q_indexes_;
79 }
80
93 const real* q_r,
94 const real* aux_l,
95 const real* aux_r,
96 const solverVariables_t* pFV,
97 real* numericalFlux) const override;
98
108 const real* aux,
109 const solverVariables_t* pSV,
110 std::vector<std::vector<real>>& internalFlux) const override;
111
112 // specific calls
125 const real* q_r,
126 const real* aux_l,
127 const real* aux_r,
128 const solverVariables_t* pFV,
129 real* numericalFlux) const;
130
143 const real* q_r,
144 const real* aux_l,
145 const real* aux_r,
146 const solverVariables_t* pFV,
147 real* numericalFlux) const;
148
149protected:
151 std::unique_ptr<wxm::apps::mhd_two_temperature::AppSetupHelper> setup_helper_;
152
155
158
161
164
167
170
173
176
179
182
187
190
194
196
197 int ir_;
198 int ith_;
199 int iz_;
200
202 std::string gradient_method_;
203
204 std::vector<int> q_indexes_;
205 std::vector<int> grad_q_indexes_;
206
211 mutable std::vector<std::vector<real>> flux_tensor_;
212};
213
214} // namespace limiters
215} // namespace mhd_two_temperature
216} // namespace apps
217} // 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 Two-temperature MHD that uses divergence of velocity as a shock...
Definition: artificial_dissipation.h:33
int ith_
Definition: artificial_dissipation.h:198
real dx_cut_
Minimum value for dx_eff.
Definition: artificial_dissipation.h:193
real coeff_electron_heat_
Coefficient on artificial diffusivity for heat flux.
Definition: artificial_dissipation.h:178
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
redefinition of fluxes from 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.
int iz_
Definition: artificial_dissipation.h:199
real gas_gamma_
Adiabatic Index.
Definition: artificial_dissipation.h:154
std::vector< std::vector< real > > flux_tensor_
Flux tensor is used to calculate left and right fluxes for numerical flux mutable because this will c...
Definition: artificial_dissipation.h:211
bool use_v_anom_
If True will convect momentum and energy consistent with an anomalous velocity associated with artifi...
Definition: artificial_dissipation.h:186
int ir_
Definition: artificial_dissipation.h:197
void setup(const WxCryptSet &wxc) override
Setup.
real coeff_ion_heat_
Coefficient on artificial diffusivity for heat flux.
Definition: artificial_dissipation.h:175
real coeff_dens_
Coefficient on artificial diffusivity for density.
Definition: artificial_dissipation.h:169
real min_pressure_floor_
Pressure floor.
Definition: artificial_dissipation.h:166
std::string gradient_method_
gradient calculation method ("ip" or "ldg")
Definition: artificial_dissipation.h:202
real Zi_
Ion charge of species.
Definition: artificial_dissipation.h:160
std::unique_ptr< wxm::apps::mhd_two_temperature::AppSetupHelper > setup_helper_
Helper object that automates common setup routines.
Definition: artificial_dissipation.h:151
std::vector< int > q_indexes_
Definition: artificial_dissipation.h:204
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 min_density_floor_
Density floor.
Definition: artificial_dissipation.h:163
real Ai_
Mass of species.
Definition: artificial_dissipation.h:157
const std::vector< int > & getInputVariableIndexes(int flag) const override
Get input variable indices.
Definition: artificial_dissipation.h:56
real coeff_mom_
Coefficient on artificial diffusivity for moment.
Definition: artificial_dissipation.h:172
real cfl_diff_
Factor in dt calculation for diffusion.
Definition: artificial_dissipation.h:189
real diff_cap_
Maximum diffusivity.
Definition: artificial_dissipation.h:181
bool is_cyl_
Definition: artificial_dissipation.h:195
const std::vector< int > & getOutputVariableIndexes(int flag) const override
Get output variable indices.
Definition: artificial_dissipation.h:76
std::vector< int > grad_q_indexes_
Definition: artificial_dissipation.h:205
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...
const std::vector< int > & getAuxiliaryVariableIndexes(int flag) const override
Get auxiliary variable indices.
Definition: artificial_dissipation.h:66
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