v0.14.0
Searching...
No Matches
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 44 of file hcurl_check_approx_in_2d.cpp.

## ◆ diff2Fun()

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

Definition at line 92 of file hcurl_check_approx_in_2d.cpp.

92 {
94 // x,xx 0/000
95
96 30 * 4 * a6 * pow(x, 3) * pow(y, 0) +
97 20 * 3 * a5 * pow(x, 2) * pow(y, 1) +
98 12 * 2 * a4 * pow(x, 1) * pow(y, 2) +
99 6 * 1 * a3 * pow(x, 0) * pow(y, 3),
100
101 // x,xy 1/001
102
103 20 * 1 * a5 * pow(x, 3) * pow(y, 0) +
104 12 * 2 * a4 * pow(x, 2) * pow(y, 2) +
105 6 * 3 * a3 * pow(x, 1) * pow(y, 2) +
106 2 * 4 * a2 * pow(x, 0) * pow(y, 3),
107
108 // x,yx 2/010
109
110 5 * 4 * a5 * pow(x, 3) * pow(y, 0) +
111 8 * 3 * a4 * pow(x, 2) * pow(y, 1) +
112 9 * 2 * a3 * pow(x, 1) * pow(y, 2) +
113 8 * 1 * a2 * pow(x, 0) * pow(y, 3),
114
115 // x,yy 3/011
116
117 8 * 1 * a4 * pow(x, 3) * pow(y, 0) +
118 9 * 2 * a3 * pow(x, 2) * pow(y, 1) +
119 8 * 3 * a2 * pow(x, 1) * pow(y, 2) +
120 5 * 4 * a1 * pow(x, 0) * pow(y, 3),
121
122 // y,xx 4/100
123
124 5 * 4 * a5 * pow(x, 3) * pow(y, 0) +
125 8 * 3 * a4 * pow(x, 2) * pow(y, 1) +
126 9 * 2 * a3 * pow(x, 1) * pow(y, 2) +
127 8 * 1 * a2 * pow(x, 0) * pow(y, 3),
128
129 // y,xy 5/101
130
131 8 * 1 * a4 * pow(x, 3) * pow(y, 0) +
132 9 * 2 * a3 * pow(x, 2) * pow(y, 1) +
133 8 * 3 * a2 * pow(x, 1) * pow(y, 2) +
134 5 * 4 * a1 * pow(x, 0) * pow(y, 3),
135
136 // y,yx 6/110
137
138 2 * 4 * a4 * pow(x, 3) * pow(y, 0) +
139 6 * 3 * a3 * pow(x, 2) * pow(y, 1) +
140 12 * 2 * a2 * pow(x, 1) * pow(y, 2) +
141 20 * 1 * a1 * pow(x, 0) * pow(y, 3),
142
143 // y,yy 7/111
144
145 6 * 1 * a3 * pow(x, 3) * pow(y, 0) +
146 12 * 2 * a2 * pow(x, 2) * pow(y, 1) +
147 20 * 3 * a1 * pow(x, 1) * pow(y, 2) +
148 30 * 4 * a0 * pow(x, 0) * pow(y, 3),
149
150 // z,xx 8/200
151 0.,
152 // z,xy 9/201
153 0.,
154 // z,yx 10/210
155 0.,
156 // z,yy 11/211
157 0.);
158 }
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 )
inlinestatic
Examples
hcurl_check_approx_in_2d.cpp.

Definition at line 68 of file hcurl_check_approx_in_2d.cpp.

69 {
71 // x,x
72 30 * a6 * pow(x, 4) * pow(y, 0) + 20 * a5 * pow(x, 3) * pow(y, 1) +
73 12 * a4 * pow(x, 2) * pow(y, 2) + 6 * a3 * pow(x, 1) * pow(y, 3) +
74 2 * a2 * pow(x, 0) * pow(y, 4),
75 // x,y
76 5 * a5 * pow(x, 4) * pow(y, 0) + 8 * a4 * pow(x, 3) * pow(y, 1) +
77 9 * a3 * pow(x, 2) * pow(y, 2) + 8 * a2 * pow(x, 1) * pow(y, 3) +
78 5 * a1 * pow(x, 0) * pow(y, 4),
79 // y,x
80 5 * a5 * pow(x, 4) * pow(y, 0) + 8 * a4 * pow(x, 3) * pow(y, 1) +
81 9 * a3 * pow(x, 2) * pow(y, 2) + 8 * a2 * pow(x, 1) * pow(y, 3) +
82 5 * a1 * pow(x, 0) * pow(y, 4),
83 // y,y
84 2 * a4 * pow(x, 4) * pow(y, 0) + 6 * a3 * pow(x, 3) * pow(y, 1) +
85 12 * a2 * pow(x, 2) * pow(y, 2) + 20 * a1 * pow(x, 1) * pow(y, 3) +
86 30 * a0 * pow(x, 0) * pow(y, 4),
87 // z
88 0., 0.);
89 }

## ◆ fUn()

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

Definition at line 46 of file hcurl_check_approx_in_2d.cpp.

47 {
49 // x
50 6 * a6 * std::pow(x, 5) * std::pow(y, 0) +
51 5 * a5 * std::pow(x, 4) * std::pow(y, 1) +
52 4 * a4 * std::pow(x, 3) * std::pow(y, 2) +
53 3 * a3 * std::pow(x, 2) * std::pow(y, 3) +
54 2 * a2 * std::pow(x, 1) * std::pow(y, 4) +
55 1 * a1 * std::pow(x, 0) * std::pow(y, 5),
56 // y
57 1 * a5 * std::pow(x, 5) * std::pow(y, 0) +
58 2 * a4 * std::pow(x, 4) * std::pow(y, 1) +
59 3 * a3 * std::pow(x, 3) * std::pow(y, 2) +
60 4 * a2 * std::pow(x, 2) * std::pow(y, 3) +
61 5 * a1 * std::pow(x, 1) * std::pow(y, 4) +
62 6 * a0 * std::pow(x, 0) * std::pow(y, 5),
63
64 // z
65 0.);
66 }

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