WARPXM v1.10.0
Loading...
Searching...
No Matches
velocity_space_moment_taker.h
Go to the documentation of this file.
1#ifndef variable_adjuster_velocity_space_moment_taker_h
2#define variable_adjuster_velocity_space_moment_taker_h
3
4// WARPXM includes
7#include "dfem/tools/tools.h"
8
9// STL includes
10#include <memory>
11
12namespace wxm
13{
14namespace dfem
15{
16namespace variable_adjuster
17{
18namespace moment_taker
19{
20
30{
31public:
37
43 void setup(const WxCryptSet& wxc) override;
44
56 void solve(real time, variables_type& input) override;
57 void solve_old(real time, variables_type& input);
58 void solve_new(real time, variables_type& input);
59
68 std::vector<size_t> convertToOutputIndexes(const std::vector<int>& indexes) const;
69
70protected:
71private:
75 std::vector<std::vector<size_t>> _app_to_out_idcs_func_eval;
76
77 // The variables
78 std::vector<size_t> _moment_input_indexes;
79 std::vector<size_t> _moment_output_indexes;
80
81 // checking of indexes
82 std::vector<size_t> _out_idcs;
83 std::vector<size_t> _all_idcs;
84
85 // scopes
86 wxm::dfem::tools::scope_t _element_flux;
87
88 // velocity space basis set
89 std::unique_ptr<WmBasisArraySet> _velocity_space_basis_set;
90
91 // number of element nodes in each velocity space dimension
92 int _N_p_vx;
93 int _N_p_vy;
94 int _N_p_vz;
95
96 // weights
97 size_t _num_weights;
98 std::vector<real> _weights_vx;
99 std::vector<real> _weights_vy;
100 std::vector<real> _weights_vz;
101
102 // velocity space element determinant
103 // ASSUMPTION: All velocity space elements are same size and so this just needs to be
104 // calculated once
105 real _v_space_determinant;
106
107 // velocity space range
108 std::unique_ptr<WxRange> _velocity_space_element_range;
109 std::unique_ptr<WxRange> _full_velocity_space_element_range;
110
111 // Phase space geometry
112 std::shared_ptr<geometry::phase_space::PhaseSpaceDGGeometry> _phase_space_dg_geometry;
113
115 VelocitySpaceMomentTaker& operator=(const VelocitySpaceMomentTaker& var) = delete;
116
121 real calcDeterminant();
122
127 void generateVelocitySpaceElementRange1VPositive();
128
134 void generateVelocitySpaceElementRange1VNegative();
135};
136} // namespace moment_taker
137} // namespace variable_adjuster
138} // namespace dfem
139} // namespace wxm
140
141#endif
WxCryptSet extends WxCrypt by providing, in addition to name-value pairs, an set of named WxCryptSets...
Definition: wxcryptset.h:35
Definition: tools.h:22
The velocity space moment taker class takes moments in velocity space to calculate variables such as:...
Definition: velocity_space_moment_taker.h:30
void setup(const WxCryptSet &wxc) override
Setup the spatial solver using the cryptset.
std::vector< size_t > convertToOutputIndexes(const std::vector< int > &indexes) const
Converts output indexes of the patch array into indexes of _out_idcs e.g.
void solve(real time, variables_type &input) override
Solves the velocity space moment and puts solution back into input We are calculating a velocity spac...
The WmVariableAdjuster class is a base class for variable adjusters.
Definition: variable_adjuster.h:31
wxm::temporal_solver::variables_type variables_type
Definition: variable_adjuster.h:41
Base namespace for everything not included in the global namespace.
Definition: field_source.h:8
#define real
Definition: wmoclunstructuredreconstruction.h:11