v0.13.1
Static Public Member Functions | List of all members
ApproxFunctions Struct Reference

Static Public Member Functions

static FTensor::Tensor1< double, BASE_DIMfUn (const double x, const double y, double z)
 
static FTensor::Tensor2< double, BASE_DIM, SPACE_DIMdiffFun (const double x, const double y)
 
static FTensor::Tensor3< double, BASE_DIM, SPACE_DIM, SPACE_DIMdiff2Fun (const double x, const double y)
 

Detailed Description

Examples
hcurl_check_approx_in_2d.cpp, and scalar_check_approximation.cpp.

Definition at line 56 of file hcurl_check_approx_in_2d.cpp.

Member Function Documentation

◆ diff2Fun()

static FTensor::Tensor3< double, BASE_DIM, SPACE_DIM, SPACE_DIM > ApproxFunctions::diff2Fun ( const double  x,
const double  y 
)
static
Examples
hcurl_check_approx_in_2d.cpp.

Definition at line 104 of file hcurl_check_approx_in_2d.cpp.

104 {
106 // x,xx 0/000
107
108 30 * 4 * a6 * pow(x, 3) * pow(y, 0) +
109 20 * 3 * a5 * pow(x, 2) * pow(y, 1) +
110 12 * 2 * a4 * pow(x, 1) * pow(y, 2) +
111 6 * 1 * a3 * pow(x, 0) * pow(y, 3),
112
113 // x,xy 1/001
114
115 20 * 1 * a5 * pow(x, 3) * pow(y, 0) +
116 12 * 2 * a4 * pow(x, 2) * pow(y, 2) +
117 6 * 3 * a3 * pow(x, 1) * pow(y, 2) +
118 2 * 4 * a2 * pow(x, 0) * pow(y, 3),
119
120 // x,yx 2/010
121
122 5 * 4 * a5 * pow(x, 3) * pow(y, 0) +
123 8 * 3 * a4 * pow(x, 2) * pow(y, 1) +
124 9 * 2 * a3 * pow(x, 1) * pow(y, 2) +
125 8 * 1 * a2 * pow(x, 0) * pow(y, 3),
126
127 // x,yy 3/011
128
129 8 * 1 * a4 * pow(x, 3) * pow(y, 0) +
130 9 * 2 * a3 * pow(x, 2) * pow(y, 1) +
131 8 * 3 * a2 * pow(x, 1) * pow(y, 2) +
132 5 * 4 * a1 * pow(x, 0) * pow(y, 3),
133
134 // y,xx 4/100
135
136 5 * 4 * a5 * pow(x, 3) * pow(y, 0) +
137 8 * 3 * a4 * pow(x, 2) * pow(y, 1) +
138 9 * 2 * a3 * pow(x, 1) * pow(y, 2) +
139 8 * 1 * a2 * pow(x, 0) * pow(y, 3),
140
141 // y,xy 5/101
142
143 8 * 1 * a4 * pow(x, 3) * pow(y, 0) +
144 9 * 2 * a3 * pow(x, 2) * pow(y, 1) +
145 8 * 3 * a2 * pow(x, 1) * pow(y, 2) +
146 5 * 4 * a1 * pow(x, 0) * pow(y, 3),
147
148 // y,yx 6/110
149
150 2 * 4 * a4 * pow(x, 3) * pow(y, 0) +
151 6 * 3 * a3 * pow(x, 2) * pow(y, 1) +
152 12 * 2 * a2 * pow(x, 1) * pow(y, 2) +
153 20 * 1 * a1 * pow(x, 0) * pow(y, 3),
154
155 // y,yy 7/111
156
157 6 * 1 * a3 * pow(x, 3) * pow(y, 0) +
158 12 * 2 * a2 * pow(x, 2) * pow(y, 1) +
159 20 * 3 * a1 * pow(x, 1) * pow(y, 2) +
160 30 * 4 * a0 * pow(x, 0) * pow(y, 3),
161
162 // z,xx 8/200
163 0.,
164 // z,xy 9/201
165 0.,
166 // z,yx 10/210
167 0.,
168 // z,yy 11/211
169 0.);
170 }
constexpr double a5
constexpr double a2
constexpr double a4
constexpr double a0
constexpr double a3
constexpr double a1
constexpr double a6

◆ diffFun()

static FTensor::Tensor2< double, BASE_DIM, SPACE_DIM > ApproxFunctions::diffFun ( const double  x,
const double  y 
)
static
Examples
hcurl_check_approx_in_2d.cpp, and scalar_check_approximation.cpp.

Definition at line 80 of file hcurl_check_approx_in_2d.cpp.

81 {
83 // x,x
84 30 * a6 * pow(x, 4) * pow(y, 0) + 20 * a5 * pow(x, 3) * pow(y, 1) +
85 12 * a4 * pow(x, 2) * pow(y, 2) + 6 * a3 * pow(x, 1) * pow(y, 3) +
86 2 * a2 * pow(x, 0) * pow(y, 4),
87 // x,y
88 5 * a5 * pow(x, 4) * pow(y, 0) + 8 * a4 * pow(x, 3) * pow(y, 1) +
89 9 * a3 * pow(x, 2) * pow(y, 2) + 8 * a2 * pow(x, 1) * pow(y, 3) +
90 5 * a1 * pow(x, 0) * pow(y, 4),
91 // y,x
92 5 * a5 * pow(x, 4) * pow(y, 0) + 8 * a4 * pow(x, 3) * pow(y, 1) +
93 9 * a3 * pow(x, 2) * pow(y, 2) + 8 * a2 * pow(x, 1) * pow(y, 3) +
94 5 * a1 * pow(x, 0) * pow(y, 4),
95 // y,y
96 2 * a4 * pow(x, 4) * pow(y, 0) + 6 * a3 * pow(x, 3) * pow(y, 1) +
97 12 * a2 * pow(x, 2) * pow(y, 2) + 20 * a1 * pow(x, 1) * pow(y, 3) +
98 30 * a0 * pow(x, 0) * pow(y, 4),
99 // z
100 0., 0.);
101 }

◆ fUn()

static FTensor::Tensor1< double, BASE_DIM > ApproxFunctions::fUn ( const double  x,
const double  y,
double  z 
)
static
Examples
hcurl_check_approx_in_2d.cpp, and scalar_check_approximation.cpp.

Definition at line 58 of file hcurl_check_approx_in_2d.cpp.

59 {
61 // x
62 6 * a6 * std::pow(x, 5) * std::pow(y, 0) +
63 5 * a5 * std::pow(x, 4) * std::pow(y, 1) +
64 4 * a4 * std::pow(x, 3) * std::pow(y, 2) +
65 3 * a3 * std::pow(x, 2) * std::pow(y, 3) +
66 2 * a2 * std::pow(x, 1) * std::pow(y, 4) +
67 1 * a1 * std::pow(x, 0) * std::pow(y, 5),
68 // y
69 1 * a5 * std::pow(x, 5) * std::pow(y, 0) +
70 2 * a4 * std::pow(x, 4) * std::pow(y, 1) +
71 3 * a3 * std::pow(x, 3) * std::pow(y, 2) +
72 4 * a2 * std::pow(x, 2) * std::pow(y, 3) +
73 5 * a1 * std::pow(x, 1) * std::pow(y, 4) +
74 6 * a0 * std::pow(x, 0) * std::pow(y, 5),
75
76 // z
77 0.);
78 }

The documentation for this struct was generated from the following file: