v0.14.0
one_over_1_minus_x.hpp
Go to the documentation of this file.
1 #include "FTensor.hpp"
2 using namespace FTensor;
3 
5 {
7 
8  y(i) += a1(i);
9  a1(i) *= 0.1;
10  return;
11 }
12 
13 inline void
15 {
17 
18  y(i) += a1(i) + 2 * a2(i);
19  a1(i) *= 0.1;
20  a2(i) *= 0.2;
21  return;
22 }
23 
26 {
29 
30  y(i) += a1(i) + 2 * a2(i) + 3 * (a1(j) * a2(j)) * a3(i);
31  a1(i) *= 0.1;
32  a2(i) *= 0.2;
33  a3(i) *= 0.3;
34  return;
35 }
36 
37 inline void
40 {
44 
45  y(i) += a1(i) + 2 * a2(i) + 3 * (a1(j) * a2(j)) * a3(i)
46  + 4 * (a1(j) * a3(j)) * (a2(k) * a2(k)) * a4(i);
47  a1(i) *= 0.1;
48  a2(i) *= 0.2;
49  a3(i) *= 0.3;
50  a4(i) *= 0.4;
51  return;
52 }
53 
54 inline void
57 {
61 
62  y(i) += a1(i) + 2 * a2(i) + 3 * (a1(j) * a2(j)) * a3(i)
63  + 4 * (a1(j) * a3(j)) * (a2(k) * a2(k)) * a4(i)
64  + 5 * (a1(j) * a4(j)) * (a2(k) * a3(k)) * a5(i);
65  a1(i) *= 0.1;
66  a2(i) *= 0.2;
67  a3(i) *= 0.3;
68  a4(i) *= 0.4;
69  a5(i) *= 0.5;
70  return;
71 }
72 
73 inline void
77 {
82 
83  y(i) += a1(i) + 2 * a2(i) + 3 * (a1(j) * a2(j)) * a3(i)
84  + 4 * (a1(j) * a3(j)) * (a2(k) * a2(k)) * a4(i)
85  + 5 * (a1(j) * a4(j)) * (a2(k) * a3(k)) * a5(i)
86  + 6 * (a1(j) * a5(j)) * (a2(k) * a4(k)) * (a3(l) * a3(l)) * a6(i);
87  a1(i) *= 0.1;
88  a2(i) *= 0.2;
89  a3(i) *= 0.3;
90  a4(i) *= 0.4;
91  a5(i) *= 0.5;
92  a6(i) *= 0.6;
93  return;
94 }
95 
96 inline void
100 {
105 
106  y(i) += a1(i) + 2 * a2(i) + 3 * (a1(j) * a2(j)) * a3(i)
107  + 4 * (a1(j) * a3(j)) * (a2(k) * a2(k)) * a4(i)
108  + 5 * (a1(j) * a4(j)) * (a2(k) * a3(k)) * a5(i)
109  + 6 * (a1(j) * a5(j)) * (a2(k) * a4(k)) * (a3(l) * a3(l)) * a6(i)
110  + 7 * (a1(j) * a6(j)) * (a2(k) * a5(k)) * (a3(l) * a4(l)) * a7(i);
111  a1(i) *= 0.1;
112  a2(i) *= 0.2;
113  a3(i) *= 0.3;
114  a4(i) *= 0.4;
115  a5(i) *= 0.5;
116  a6(i) *= 0.6;
117  a7(i) *= 0.7;
118  return;
119 }
120 
121 inline void
125 {
131 
132  y(i) += a1(i) + 2 * a2(i) + 3 * (a1(j) * a2(j)) * a3(i)
133  + 4 * (a1(j) * a3(j)) * (a2(k) * a2(k)) * a4(i)
134  + 5 * (a1(j) * a4(j)) * (a2(k) * a3(k)) * a5(i)
135  + 6 * (a1(j) * a5(j)) * (a2(k) * a4(k)) * (a3(l) * a3(l)) * a6(i)
136  + 7 * (a1(j) * a6(j)) * (a2(k) * a5(k)) * (a3(l) * a4(l)) * a7(i)
137  + 8 * (a1(j) * a7(j)) * (a2(k) * a6(k)) * (a3(l) * a5(l))
138  * (a4(m) * a4(m)) * a8(i);
139  a1(i) *= 0.1;
140  a2(i) *= 0.2;
141  a3(i) *= 0.3;
142  a4(i) *= 0.4;
143  a5(i) *= 0.5;
144  a6(i) *= 0.6;
145  a7(i) *= 0.7;
146  a8(i) *= 0.8;
147  return;
148 }
149 
150 inline void
154  Tensor1<double, 3> &a9)
155 {
161 
162  y(i) += a1(i) + 2 * a2(i) + 3 * (a1(j) * a2(j)) * a3(i)
163  + 4 * (a1(j) * a3(j)) * (a2(k) * a2(k)) * a4(i)
164  + 5 * (a1(j) * a4(j)) * (a2(k) * a3(k)) * a5(i)
165  + 6 * (a1(j) * a5(j)) * (a2(k) * a4(k)) * (a3(l) * a3(l)) * a6(i)
166  + 7 * (a1(j) * a6(j)) * (a2(k) * a5(k)) * (a3(l) * a4(l)) * a7(i)
167  + 8 * (a1(j) * a7(j)) * (a2(k) * a6(k)) * (a3(l) * a5(l))
168  * (a4(m) * a4(m)) * a8(i)
169  + 9 * (a1(j) * a8(j)) * (a2(k) * a7(k)) * (a3(l) * a6(l))
170  * (a4(m) * a5(m)) * a9(i);
171  a1(i) *= 0.1;
172  a2(i) *= 0.2;
173  a3(i) *= 0.3;
174  a4(i) *= 0.4;
175  a5(i) *= 0.5;
176  a6(i) *= 0.6;
177  a7(i) *= 0.7;
178  a8(i) *= 0.8;
179  a9(i) *= 0.9;
180  return;
181 }
a2
constexpr double a2
Definition: hcurl_check_approx_in_2d.cpp:39
FTensor
JSON compatible output.
Definition: Christof_constructor.hpp:6
func9
void func9(Tensor1< double, 3 > &y, Tensor1< double, 3 > &a1, Tensor1< double, 3 > &a2, Tensor1< double, 3 > &a3, Tensor1< double, 3 > &a4, Tensor1< double, 3 > &a5, Tensor1< double, 3 > &a6, Tensor1< double, 3 > &a7, Tensor1< double, 3 > &a8, Tensor1< double, 3 > &a9)
Definition: one_over_1_minus_x.hpp:151
a3
constexpr double a3
Definition: hcurl_check_approx_in_2d.cpp:40
func2
void func2(Tensor1< double, 3 > &y, Tensor1< double, 3 > &a1, Tensor1< double, 3 > &a2)
Definition: one_over_1_minus_x.hpp:14
FTensor::Tensor1< double, 3 >
func6
void func6(Tensor1< double, 3 > &y, Tensor1< double, 3 > &a1, Tensor1< double, 3 > &a2, Tensor1< double, 3 > &a3, Tensor1< double, 3 > &a4, Tensor1< double, 3 > &a5, Tensor1< double, 3 > &a6)
Definition: one_over_1_minus_x.hpp:74
func8
void func8(Tensor1< double, 3 > &y, Tensor1< double, 3 > &a1, Tensor1< double, 3 > &a2, Tensor1< double, 3 > &a3, Tensor1< double, 3 > &a4, Tensor1< double, 3 > &a5, Tensor1< double, 3 > &a6, Tensor1< double, 3 > &a7, Tensor1< double, 3 > &a8)
Definition: one_over_1_minus_x.hpp:122
func4
void func4(Tensor1< double, 3 > &y, Tensor1< double, 3 > &a1, Tensor1< double, 3 > &a2, Tensor1< double, 3 > &a3, Tensor1< double, 3 > &a4)
Definition: one_over_1_minus_x.hpp:38
a1
constexpr double a1
Definition: hcurl_check_approx_in_2d.cpp:38
func1
void func1(Tensor1< double, 3 > &y, Tensor1< double, 3 > &a1)
Definition: one_over_1_minus_x.hpp:4
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
a4
constexpr double a4
Definition: hcurl_check_approx_in_2d.cpp:41
FTensor::Index< 'i', 3 >
func5
void func5(Tensor1< double, 3 > &y, Tensor1< double, 3 > &a1, Tensor1< double, 3 > &a2, Tensor1< double, 3 > &a3, Tensor1< double, 3 > &a4, Tensor1< double, 3 > &a5)
Definition: one_over_1_minus_x.hpp:55
func7
void func7(Tensor1< double, 3 > &y, Tensor1< double, 3 > &a1, Tensor1< double, 3 > &a2, Tensor1< double, 3 > &a3, Tensor1< double, 3 > &a4, Tensor1< double, 3 > &a5, Tensor1< double, 3 > &a6, Tensor1< double, 3 > &a7)
Definition: one_over_1_minus_x.hpp:97
func3
void func3(Tensor1< double, 3 > &y, Tensor1< double, 3 > &a1, Tensor1< double, 3 > &a2, Tensor1< double, 3 > &a3)
Definition: one_over_1_minus_x.hpp:24
j
FTensor::Index< 'j', 3 > j
Definition: matrix_function.cpp:19
FTensor.hpp
Tensors class implemented by Walter Landry.
a6
constexpr double a6
Definition: hcurl_check_approx_in_2d.cpp:43
m
FTensor::Index< 'm', 3 > m
Definition: shallow_wave.cpp:80
k
FTensor::Index< 'k', 3 > k
Definition: matrix_function.cpp:20
l
FTensor::Index< 'l', 3 > l
Definition: matrix_function.cpp:21
a5
constexpr double a5
Definition: hcurl_check_approx_in_2d.cpp:42