WARPXM v1.10.0
Loading...
Searching...
No Matches
submodule_rlc_with_load_rhs.h
Go to the documentation of this file.
1#pragma once
2
3// WARPXM includes
5
6namespace wxm
7{
8namespace apps
9{
10namespace functions
11{
12namespace unique_variable
13{
76{
77public:
83
89
94 void setup(const WxCryptSet& wxc) override;
95
101 const std::vector<int>& getInputVariableIndexes(int flag) const override
102 {
103 return _QI_idcs;
104 }
105
111 const std::vector<int>& getAuxiliaryVariableIndexes(int flag) const override
112 {
113 return _vload_idcs;
114 }
115
121 const std::vector<int>& getOutputVariableIndexes(int flag) const override
122 {
123 return _QI_idcs;
124 }
125
133 void evaluate_function(const real* q,
134 const real* aux,
135 const solverVariables_t* pSV,
136 real* result) const override;
137
138protected:
139 std::vector<int> _QI_idcs;
140 std::vector<int> _vload_idcs;
141 std::vector<real> _R;
142 std::vector<real> _L;
143 std::vector<real> _C;
146 int _N;
147 std::vector<real> _firetimes;
151
152 // variables used for submodule solver
153 mutable std::vector<std::vector<real>> _L_inv, _R_tot, _C_inv;
154 mutable std::vector<std::vector<real>> _LC, _LR;
155 mutable std::vector<real> _R_time;
156
157private:
160};
161
162} // namespace unique_variable
163} // namespace functions
164} // namespace apps
165} // 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 to set RHS for N-module RLC circuit with discharging capacitor, resistance, and inductance,...
Definition: submodule_rlc_with_load_rhs.h:76
std::vector< std::vector< real > > _L_inv
Definition: submodule_rlc_with_load_rhs.h:153
const std::vector< int > & getInputVariableIndexes(int flag) const override
Grab input variable indices.
Definition: submodule_rlc_with_load_rhs.h:101
const std::vector< int > & getOutputVariableIndexes(int flag) const override
Grab output variable indices.
Definition: submodule_rlc_with_load_rhs.h:121
real _R_line
Definition: submodule_rlc_with_load_rhs.h:145
std::vector< std::vector< real > > _LR
Definition: submodule_rlc_with_load_rhs.h:154
std::vector< real > _C
Definition: submodule_rlc_with_load_rhs.h:143
std::vector< std::vector< real > > _C_inv
Definition: submodule_rlc_with_load_rhs.h:153
real _L_line
Definition: submodule_rlc_with_load_rhs.h:144
real _R_max_multiplier
Definition: submodule_rlc_with_load_rhs.h:149
void setup(const WxCryptSet &wxc) override
Setup.
real _R_high
Definition: submodule_rlc_with_load_rhs.h:148
void evaluate_function(const real *q, const real *aux, const solverVariables_t *pSV, real *result) const override
Redefinition of the function evaluator.
std::vector< std::vector< real > > _LC
Definition: submodule_rlc_with_load_rhs.h:154
std::vector< real > _L
Definition: submodule_rlc_with_load_rhs.h:142
std::vector< real > _R_time
Definition: submodule_rlc_with_load_rhs.h:155
const std::vector< int > & getAuxiliaryVariableIndexes(int flag) const override
Grab auxiliary variable indices.
Definition: submodule_rlc_with_load_rhs.h:111
std::vector< int > _vload_idcs
Definition: submodule_rlc_with_load_rhs.h:140
std::vector< int > _QI_idcs
Definition: submodule_rlc_with_load_rhs.h:139
int _N
Definition: submodule_rlc_with_load_rhs.h:146
std::vector< real > _R
Definition: submodule_rlc_with_load_rhs.h:141
std::vector< std::vector< real > > _R_tot
Definition: submodule_rlc_with_load_rhs.h:153
real _transition_width
Definition: submodule_rlc_with_load_rhs.h:150
std::vector< real > _firetimes
Definition: submodule_rlc_with_load_rhs.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