WARPXM v1.10.0
Loading...
Searching...
No Matches
ndg_tu_alibadi.h
Go to the documentation of this file.
1#ifndef WMNDG_TU_ALIBADI_H
2#define WMNDG_TU_ALIBADI_H
3
4// Wm includes
5#include "dfem/tools/tools.h"
8
9#include <memory>
10
11namespace wxm
12{
13namespace dfem
14{
15namespace variable_adjuster
16{
17namespace limiter
18{
19
45{
46public:
47 /* Constructor */
48 ndg_tu_alibadi() = default;
49
54 virtual void setup(const WxCryptSet& wxc) override;
55
56 // /**
57 // * @brief Solves the spatial system and puts result in _rhs
58 // */
59 // void solve(real time, variables_type& input) override;
60
61protected:
62 virtual void
63 averaging_kernel(const WxRange& element_scope_range,
64 const WxRange& face_scope_range,
65 const real time,
66 const std::vector<wxm::array::patch_array_t*>& input) override;
67
68 virtual void limiting_kernel(const WxRange& element_scope_range,
69 real time,
70 std::vector<wxm::array::patch_array_t*>& input) override;
71
72 void face_average(const WxRange& face_scope_range,
73 const real time,
74 const std::vector<wxm::array::patch_array_t*>& input);
75
76 void face_gradient(const WxRange& face_scope_range,
77 const std::vector<wxm::array::patch_array_t*>& input);
78
79 void unlimited_centroid_gradient(const WxRange& element_scope_range);
80 void limited_centroid_gradient(const WxRange& element_scope_range);
81 void reconstruct_primitives(const WxRange& element_scope_range);
82
83 std::vector<std::vector<real>>
84 _q_avg_face_nodes; // [num_vars] x [num_faces * num_face_nodes]
85 std::vector<std::vector<real>>
86 _w_avg_face_nodes; // [num_vars] x [num_faces * num_face_nodes]
87
88 std::vector<std::vector<real>> _w_face_gradients; // [num_vars] x [num_faces*3]
89 std::vector<std::vector<real>>
90 _w_unlimited_centroid_gradients; // [num_vars] x [num_elements*3]
91 std::vector<std::vector<real>>
92 _w_limited_centroid_gradients; // [num_vars] x [num_elements*3]
93
94 std::vector<std::vector<real>> _w_limited; // [num_vars] x [num_elements * N_p]
95 std::vector<std::vector<real>> _dw_limited; // [num_vars] x [num_elements * N_p]
96
97 virtual void allocate() override;
98 virtual void zero() override;
99
100 // static std::mutex _mutex;
101
102private:
104 ndg_tu_alibadi& operator=(const ndg_tu_alibadi& var) = delete;
105
107 ndg_tu_alibadi(const ndg_tu_alibadi& var) = delete;
108};
109// std::mutex ndg_tu_alibadi::_mutex;
110
112} // namespace limiter
113} // namespace variable_adjuster
114} // namespace dfem
115} // namespace wxm
116
117#endif
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
The ndg_moment_slope_base class is a base to apply slope-based limiting to dataset.
Definition: ndg_moment_slope_limiter_base.h:32
The ndg_tu_alibdi class applies limiters to a dataset This is my attempt at implementation of DG limi...
Definition: ndg_tu_alibadi.h:45
void reconstruct_primitives(const WxRange &element_scope_range)
void face_average(const WxRange &face_scope_range, const real time, const std::vector< wxm::array::patch_array_t * > &input)
std::vector< std::vector< real > > _q_avg_face_nodes
Definition: ndg_tu_alibadi.h:84
std::vector< std::vector< real > > _w_limited_centroid_gradients
Definition: ndg_tu_alibadi.h:92
std::vector< std::vector< real > > _w_face_gradients
Definition: ndg_tu_alibadi.h:88
std::vector< std::vector< real > > _dw_limited
Definition: ndg_tu_alibadi.h:95
std::vector< std::vector< real > > _w_unlimited_centroid_gradients
Definition: ndg_tu_alibadi.h:90
void unlimited_centroid_gradient(const WxRange &element_scope_range)
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) override
virtual void limiting_kernel(const WxRange &element_scope_range, real time, std::vector< wxm::array::patch_array_t * > &input) override
std::vector< std::vector< real > > _w_limited
Definition: ndg_tu_alibadi.h:94
void limited_centroid_gradient(const WxRange &element_scope_range)
std::vector< std::vector< real > > _w_avg_face_nodes
Definition: ndg_tu_alibadi.h:86
void face_gradient(const WxRange &face_scope_range, const std::vector< wxm::array::patch_array_t * > &input)
virtual void setup(const WxCryptSet &wxc) override
Setup the spatial solver using the cryptset.
Base namespace for everything not included in the global namespace.
Definition: field_source.h:8
#define real
Definition: wmoclunstructuredreconstruction.h:11