1#ifndef TATOOINE_ANALYTICAL_NUMERICAL_FRANKES_TEST_H
2#define TATOOINE_ANALYTICAL_NUMERICAL_FRANKES_TEST_H
12template <
floating_po
int Real>
32 auto const a = 9 * q(0) - 2;
33 auto const b = 9 * q(1) - 2;
34 auto const c = 9 * q(0) + 1;
35 auto const d = 9 * q(1) + 1;
36 auto const e = 9 * q(0) - 7;
37 auto const f = 9 * q(1) - 3;
38 auto const g = 9 * q(0) - 4;
39 auto const h = 9 * q(1) - 7;
40 auto const term1 = 0.75 * std::exp(-a * a / 4 - b * b / 4);
41 auto const term2 = 0.75 * std::exp(-c * c / 49 - d / 10);
42 auto const term3 = 0.5 * std::exp(-e * e / 4 - f * f / 4);
43 auto const term4 = -0.2 * std::exp(-g * g - h * h);
45 return term1 + term2 + term3 + term4;
57template <
floating_po
int Real>
60 analytical::numerical::frankes_test<Real>>,
85 auto constexpr exp51 = gcem::exp(Real(51));
86 auto constexpr exp63 = gcem::exp(Real(63));
87 auto constexpr exp65 = gcem::exp(Real(65));
92 auto a = gcem::exp(-(Real(405) * yy) / Real(4) - (Real(9) * y) / Real(10) -
93 (Real(20169) * xx) / Real(196) -
94 (Real(18) * x) / Real(49) - Real(66));
95 auto constexpr b = gcem::exp(Real(431) / Real(490));
96 auto constexpr c = gcem::exp(Real(59) / Real(490));
97 auto d = gcem::exp((Real(4050) * xx) / Real(49) +
98 (Real(459) * x) / Real(49) + Real(63));
100 gcem::exp((Real(4293) * xx) / Real(196) + (Real(3546) * x) / Real(49));
101 auto f = gcem::exp((Real(4050) * xx) / Real(49) +
102 (Real(3123) * x) / Real(98) + Real(51));
106 (b * ((Real(4860) * exp65 * x + Real(540) * exp65) *
107 gcem::exp((Real(405) * yy) / Real(4) +
108 (Real(405) * xx) / Real(4)) +
109 c * ((Real(59535) * exp63 * x - Real(13230) * exp63) *
110 gcem::exp(Real(81) * yy + (Real(99) * y) / Real(10) +
111 (Real(4050) * xx) / Real(49) +
112 (Real(459) * x) / Real(49)) +
113 (Real(28224) - Real(63504) * x) *
114 gcem::exp((Real(81) * yy) / Real(4) +
115 (Real(1269) * y) / Real(10) +
116 (Real(4293) * xx) / Real(196) +
117 (Real(3546) * x) / Real(49)))) +
118 (Real(39690) * exp51 * x - Real(30870) * exp51) *
119 gcem::exp(Real(81) * yy + (Real(72) * y) / Real(5) +
120 (Real(4050) * xx) / Real(49) +
121 (Real(3123) * x) / Real(98) + Real(1) / Real(2)))) /
124 (b * (Real(27) * gcem::exp((Real(405) * yy) / Real(4) +
125 (Real(405) * xx) / Real(4) + Real(65)) +
126 c * ((Real(1215) * d * y - Real(270) * d) *
127 gcem::exp(Real(81) * yy + (Real(99) * y) / Real(10)) +
128 (Real(1008) * e - Real(1296) * e * y) *
129 gcem::exp((Real(81) * yy) / Real(4) +
130 (Real(1269) * y) / Real(10)))) +
131 (Real(810) * f * y - Real(270) * f) *
132 gcem::exp(Real(81) * yy + (Real(72) * y) / Real(5) +
133 Real(1) / Real(2)))) /
138template <
floating_po
int Real>
Definition: tensor_concepts.h:33
Definition: algorithm.h:6
constexpr auto diff(polynomial< Real, Degree > const &f)
Definition: polynomial.h:179
Franke's Test Function. See Here
Definition: frankes_test.h:13
constexpr frankes_test() noexcept=default
auto constexpr evaluate(fixed_size_vec< 2 > auto const &q, Real const t) const -> tensor_type
Definition: frankes_test.h:30
vec_type pos_type
Definition: axis_aligned_bounding_box.h:109
constexpr differentiated_field() noexcept=default
Definition: differentiated_field.h:173
Real real_type
Definition: field.h:17
vec< real_type, NumDimensions > pos_type
Definition: field.h:20
Tensor tensor_type
Definition: field.h:18
Real real_type
Definition: interpolation.h:25
interpolation_tensor_type< tensor< Real, Dims... > > tensor_type
Definition: interpolation.h:135
constexpr auto evaluate(pos_type const &x, real_type const t) const -> tensor_type
Definition: differentiated_field.h:61