WARPXM v1.10.0
Loading...
Searching...
No Matches
gradient.h
Go to the documentation of this file.
1#ifndef WMGRADIENT_H
2#define WMGRADIENT_H
3
4// Wm includes
5#include "dfem/tools/tools.h"
7#include <memory>
8
9namespace wxm
10{
11namespace dfem
12{
13namespace variable_adjuster
14{
15namespace gradient
16{
17
29{
30public:
31 gradient() = default;
32
37 void setup(const WxCryptSet& wxc) override;
38
42 void solve(real time, variables_type& input) override;
43
44protected:
47
48 void ex_kernel(const WxRange& face_scope_range,
49 std::vector<wxm::array::patch_array_t*>& input);
50 void ldg_scheme(const int faceIndex,
51 const int local_face_node_index,
52 const int global_node_index_in,
53 const int global_node_index_out,
55 std::vector<wxm::array::patch_array_t*>& input);
56 void ip_scheme(const int faceIndex,
57 const int local_face_node_index,
58 const int global_node_index_in,
59 const int global_node_index_out,
61 std::vector<wxm::array::patch_array_t*>& input);
62
63 void in_kernel(const WxRange& element_scope_range,
64 std::vector<wxm::array::patch_array_t*>& input);
65 void co_kernel(const WxRange& element_scope_range,
66 std::vector<wxm::array::patch_array_t*>& input);
67
68 std::vector<size_t> _gradient_input_indexes;
69 std::vector<size_t> _gradient_output_indexes;
70
71 // Method type
72 std::string _gradient_method;
73
74 // Penalty for gradient solvers
77
78 // Spatial basis set name
79 std::string _basisSetName;
80
81 // Spatial basis set
83
84 // WmUDGGeometry
85 std::unique_ptr<WmUDGGeometry> _dg_geometry;
86
87 // Fluxes
88 std::vector<std::vector<std::vector<std::vector<real>>>> _numerical_fluxes;
89 std::vector<std::vector<std::vector<real>>> _internal_fluxes;
90
93
96
97 bool
139private:
141 gradient& operator=(const gradient& var) = delete;
142
144 gradient(const gradient& var) = delete;
145};
146
148} // namespace gradient
149} // namespace variable_adjuster
150} // namespace dfem
151} // namespace wxm
152
153#endif // WMGRADIENT_H
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 WmVariableAdjusterGradient class is a gradient adjuster.
Definition: gradient.h:29
wxm::dfem::tools::scope_t _element_flux
Definition: gradient.h:91
void ldg_scheme(const int faceIndex, const int local_face_node_index, const int global_node_index_in, const int global_node_index_out, solverVariables_t *pSV, std::vector< wxm::array::patch_array_t * > &input)
void in_kernel(const WxRange &element_scope_range, std::vector< wxm::array::patch_array_t * > &input)
wxm::dfem::tools::scope_t _face_flux
Definition: gradient.h:92
real _penalty_eta
Definition: gradient.h:76
WxRange _chunk_size_face
Definition: gradient.h:95
WmBasisArraySet _basis_set
Definition: gradient.h:82
std::unique_ptr< WmUDGGeometry > _dg_geometry
Definition: gradient.h:85
std::vector< size_t > _gradient_output_indexes
Definition: gradient.h:69
std::string _gradient_method
Definition: gradient.h:72
void setup(const WxCryptSet &wxc) override
Setup the spatial solver using the cryptset.
real _penalty_beta
Definition: gradient.h:75
WxRange _chunk_size_element
Definition: gradient.h:94
bool _standard_ldg_flux_alternation
"Standard" refers to the sign when adding the beta penalty for LDG, the u*_h numerical flux value as ...
Definition: gradient.h:98
std::vector< size_t > _gradient_input_indexes
Definition: gradient.h:68
void co_kernel(const WxRange &element_scope_range, std::vector< wxm::array::patch_array_t * > &input)
void solve(real time, variables_type &input) override
Solves the spatial system and puts result in _rhs.
std::vector< std::vector< std::vector< real > > > _internal_fluxes
Definition: gradient.h:89
std::string _basisSetName
Definition: gradient.h:79
std::vector< std::vector< std::vector< std::vector< real > > > > _numerical_fluxes
Definition: gradient.h:88
void ip_scheme(const int faceIndex, const int local_face_node_index, const int global_node_index_in, const int global_node_index_out, solverVariables_t *pSV, std::vector< wxm::array::patch_array_t * > &input)
void ex_kernel(const WxRange &face_scope_range, std::vector< wxm::array::patch_array_t * > &input)
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
Definition: wmapplication.h:38
#define real
Definition: wmoclunstructuredreconstruction.h:11