WARPXM v1.10.0
Loading...
Searching...
No Matches
ndg_moment_slope_limiter_base.h
Go to the documentation of this file.
1#ifndef WMNDG_MOMENT_SLOPE_LIMITER_BASE_H
2#define WMNDG_MOMENT_SLOPE_LIMITER_BASE_H
3
4// Wm includes
5#include "dfem/tools/tools.h"
7
8#include <memory>
9
10namespace wxm
11{
12namespace dfem
13{
14namespace variable_adjuster
15{
16namespace limiter
17{
18
32{
33public:
34 /* Constructor */
36
41 virtual void setup(const WxCryptSet& wxc) override;
42
46 void solve(real time, variables_type& input) override;
47
48protected:
49 // void primitive_kernel(const WxRange& element_scope_range, real time,
50 // const std::vector<wxm::array::patch_array_t*>& input);
51
52 void primitive_kernel(const WxRange& element_scope_range,
53 real time,
54 std::string direction,
55 const std::vector<std::vector<real>>& input,
56 std::vector<std::vector<real>>& output);
57
58 virtual void averaging_kernel(const WxRange& element_scope_range,
59 const WxRange& face_scope_range,
60 const real time,
61 const std::vector<wxm::array::patch_array_t*>& input);
62
63 virtual void limiting_kernel(const WxRange& element_scope_range,
64 real time,
65 std::vector<wxm::array::patch_array_t*>& input) = 0;
66
67 virtual void allocate();
68 virtual void zero();
69
70 // variables associated with the solve
71 std::vector<real>
72 _global_averages; // num_elems x num_vars (averages for conserved vars q)
73 std::vector<real>
74 _global_centers; // num_elems x num_vars (centers for conserved vars q)
75 std::vector<real>
76 _global_maximums; // result of equation 6.3 num_elems x num_vars (for conserved q)
77 std::vector<real>
78 _global_minimums; // result of equation 6.3 num_elems x num_vars (for conserved q)
79
80 std::vector<real>
81 _global_w_averages; // num_elems x num_vars (average for primitive vars w)
82 std::vector<real>
83 _global_w_centers; // num_elems x num_vars (centers for primitive vars w)
84 std::vector<real> _global_w_maximums; // result of equation 6.3 num_elems x num_vars
85 // (for primitives w)
86 std::vector<real> _global_w_minimums; // result of equation 6.3 num_elems x num_vars
87 // (for primitives w)
88
89 // Applications
93
94 // Spatial basis set name
95 std::string _basisSetName;
96
97 // Spatial basis set
99
100 // WmUDGGeometry
101 std::unique_ptr<WmUDGGeometry> _dg_geometry;
102
103 // primitive variables
104 std::vector<std::vector<real>> _w;
105 std::vector<std::vector<real>> _in_vec;
106 std::vector<std::vector<real>> _out_vec;
107
108private:
111 operator=(const ndg_moment_slope_limiter_base& var) = delete;
112
115};
116
118} // namespace limiter
119} // namespace variable_adjuster
120} // namespace dfem
121} // namespace wxm
122
123#endif
Definition: wmbasisarrayset.h:13
WxCryptSet extends WxCrypt by providing, in addition to name-value pairs, an set of named WxCryptSets...
Definition: wxcryptset.h:35
WxRange represents a hyper-rectangular domain of an n-dimensional space of integers.
Definition: wxrange.h:23
Definition: tools.h:22
The ndg_moment_slope_base class is a base to apply slope-based limiting to dataset.
Definition: ndg_moment_slope_limiter_base.h:32
virtual void averaging_kernel(const WxRange &element_scope_range, const WxRange &face_scope_range, const real time, const std::vector< wxm::array::patch_array_t * > &input)
void primitive_kernel(const WxRange &element_scope_range, real time, std::string direction, const std::vector< std::vector< real > > &input, std::vector< std::vector< real > > &output)
wxm::dfem::tools::scope_t _averaging_scope
Definition: ndg_moment_slope_limiter_base.h:91
virtual void limiting_kernel(const WxRange &element_scope_range, real time, std::vector< wxm::array::patch_array_t * > &input)=0
WmBasisArraySet _basis_set
Definition: ndg_moment_slope_limiter_base.h:98
std::unique_ptr< WmUDGGeometry > _dg_geometry
Definition: ndg_moment_slope_limiter_base.h:101
wxm::dfem::tools::scope_t _averaging_face_scope
Definition: ndg_moment_slope_limiter_base.h:92
std::vector< real > _global_minimums
Definition: ndg_moment_slope_limiter_base.h:78
std::vector< std::vector< real > > _in_vec
Definition: ndg_moment_slope_limiter_base.h:105
std::vector< real > _global_centers
Definition: ndg_moment_slope_limiter_base.h:74
std::vector< real > _global_w_maximums
Definition: ndg_moment_slope_limiter_base.h:84
std::vector< std::vector< real > > _out_vec
Definition: ndg_moment_slope_limiter_base.h:106
virtual void setup(const WxCryptSet &wxc) override
Setup the spatial solver using the cryptset.
std::vector< real > _global_averages
Definition: ndg_moment_slope_limiter_base.h:72
void solve(real time, variables_type &input) override
Solves the spatial system and puts result in _rhs.
std::vector< real > _global_w_minimums
Definition: ndg_moment_slope_limiter_base.h:86
std::vector< std::vector< real > > _w
Definition: ndg_moment_slope_limiter_base.h:104
wxm::dfem::tools::scope_t _limiting_scope
Definition: ndg_moment_slope_limiter_base.h:90
std::string _basisSetName
Definition: ndg_moment_slope_limiter_base.h:95
std::vector< real > _global_w_averages
Definition: ndg_moment_slope_limiter_base.h:81
std::vector< real > _global_w_centers
Definition: ndg_moment_slope_limiter_base.h:83
std::vector< real > _global_maximums
Definition: ndg_moment_slope_limiter_base.h:76
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