WARPXM v1.10.0
Loading...
Searching...
No Matches
get_source.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 arbitrary
13{
23{
24public:
29
33 ~GetSource() override;
34
39 void setup(const WxCryptSet& wxc) override;
40
46 const std::vector<int>& getInputVariableIndexes(int flag) const override
47 {
48 return _input_indices;
49 }
50
56 const std::vector<int>& getAuxiliaryVariableIndexes(int flag) const override
57 {
58 return _aux_indices;
59 }
60
66 const std::vector<int>& getOutputVariableIndexes(int flag) const override
67 {
68 return _output_indices;
69 }
70
78 void evaluate_function(const real* q,
79 const real* aux,
80 const solverVariables_t* pSV,
81 real* result) const override;
82
83protected:
85 std::unique_ptr<WmApplication> _source_app;
86
88 std::vector<int> _input_indices;
89
91 std::vector<int> _aux_indices;
92
94 std::vector<int> _source_output_indices;
95
98 std::vector<int> _needed_indices;
99
101 std::vector<int> _output_indices;
102
103 mutable std::vector<real> _source;
104
105private:
106 GetSource& operator=(const GetSource& var);
107 GetSource(const GetSource& var);
108};
109} // namespace arbitrary
110} // namespace functions
111} // namespace apps
112} // 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
This function takes any source app and writes source to a specified output variable.
Definition: get_source.h:23
const std::vector< int > & getAuxiliaryVariableIndexes(int flag) const override
Grab aux variable indices.
Definition: get_source.h:56
void evaluate_function(const real *q, const real *aux, const solverVariables_t *pSV, real *result) const override
Redefinition of the function evaluator.
std::vector< int > _input_indices
Indices of source app input variable.
Definition: get_source.h:88
std::vector< int > _aux_indices
Indices of source app aux variable.
Definition: get_source.h:91
const std::vector< int > & getOutputVariableIndexes(int flag) const override
Grab output variable indices.
Definition: get_source.h:66
const std::vector< int > & getInputVariableIndexes(int flag) const override
Grab input variable indices.
Definition: get_source.h:46
std::vector< int > _needed_indices
Relative indicies of the source app output to copy.
Definition: get_source.h:98
void setup(const WxCryptSet &wxc) override
Setup.
std::vector< real > _source
Definition: get_source.h:103
std::vector< int > _source_output_indices
Indicies of the source app output.
Definition: get_source.h:94
std::vector< int > _output_indices
Indices of output variable.
Definition: get_source.h:101
std::unique_ptr< WmApplication > _source_app
Source app.
Definition: get_source.h:85
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