WARPXM v1.10.0
Loading...
Searching...
No Matches
ohms_law.h
Go to the documentation of this file.
1#pragma once
2
3// WarpM includes
5
6namespace wxm
7{
8namespace apps
9{
10namespace hallmhd
11{
12namespace hyperresistivity
13{
14
31class OhmsLaw : public WmApplication
32{
33public:
38
42 ~OhmsLaw() override;
43
48 void setup(const WxCryptSet& wxc) override;
49
55 const std::vector<int>& getInputVariableIndexes(int flag) const override
56 {
57 return _inputVariables;
58 }
59
65 const std::vector<int>& getOutputVariableIndexes(int flag) const override
66 {
67 return _outputVariables;
68 }
69
79 const real* aux,
80 const solverVariables_t* pSV,
81 std::vector<std::vector<real>>& internalFlux) const override;
82
94 const real* q_r,
95 const real* aux_l,
96 const real* aux_r,
97 const solverVariables_t* pFV,
98 real* numericalFlux) const override;
99
100protected:
102 std::vector<int> _inputVariables;
103 std::vector<int> _outputVariables;
104
107 int _ir, _ith, _iz; // r, theta, and z indices
108
109 // flux tensor is used to calculate left and right fluxes for numerical flux
110 // mutable because this will continuously be changed upon call, but functions are
111 // labled const.
112 // this is just a helper vector so this behavior should be justified.
113 mutable std::vector<std::vector<real>> _flux_tensor;
114};
115
116} // namespace hyperresistivity
117} // namespace hallmhd
118} // namespace apps
119} // 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
The OhmsLaw class calculates the internal (or analytic) flux term for the hyperresistive term of Ohm'...
Definition: ohms_law.h:32
std::string _coordinate_system
Definition: ohms_law.h:105
std::vector< int > _inputVariables
Definition: ohms_law.h:102
const std::vector< int > & getOutputVariableIndexes(int flag) const override
Get output variable indices.
Definition: ohms_law.h:65
int _ith
Definition: ohms_law.h:107
real _hyperresistive_nu
Definition: ohms_law.h:101
std::vector< std::vector< real > > _flux_tensor
Definition: ohms_law.h:113
const std::vector< int > & getInputVariableIndexes(int flag) const override
Get input variable indices.
Definition: ohms_law.h:55
real internal_flux(const real *q, const real *aux, const solverVariables_t *pSV, std::vector< std::vector< real > > &internalFlux) const override
Internal flux definition.
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 definition.
std::vector< int > _outputVariables
Definition: ohms_law.h:103
void setup(const WxCryptSet &wxc) override
Setup.
int _radial_index
Definition: ohms_law.h:106
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