v0.14.0
Riemann_times_Tensor1.hpp
Go to the documentation of this file.
1 /* This file has all of the declarations for expressions like
2  Riemann*Tensor1, yielding a Tensor3_antisymmetric. */
3 
4 #pragma once
5 
6 namespace FTensor
7 {
8  /* A(i,j,k,l)*B(i) */
9 
10  template <class A, class B, class T, class U, int Dim, char i, char j,
11  char k, char l>
13  {
16 
17  public:
20  : iterA(a), iterB(b)
21  {}
22  typename promote<T, U>::V
23  operator()(const int N1, const int N2, const int N3) const
24  {
25  return iterA(0, N1, N2, N3) * iterB(0) + iterA(1, N1, N2, N3) * iterB(1)
26  + iterA(2, N1, N2, N3) * iterB(2);
27  }
28  };
29 
30  template <class A, class B, class T, class U, int Dim, char i, char j,
31  char k, char l>
32  Tensor3_antisymmetric_Expr<
33  Riemann_times_Tensor1_0<A, B, T, U, Dim, i, j, k, l>,
34  typename promote<T, U>::V, Dim, Dim, j, k, l>
37  {
40  Dim, Dim, j, k, l>(TensorExpr(a, b));
41  }
42 
43  /* B(i)*A(i,j,k,l) */
44 
45  template <class A, class B, class T, class U, int Dim, char i, char j,
46  char k, char l>
47  Tensor3_antisymmetric_Expr<
48  Riemann_times_Tensor1_0<A, B, T, U, Dim, i, j, k, l>,
49  typename promote<T, U>::V, Dim, Dim, j, k, l>
52  {
55  Dim, Dim, j, k, l>(TensorExpr(a, b));
56  }
57 
58  /* A(i,j,k,l)*B(j) */
59 
60  template <class A, class B, class T, class U, int Dim, char i, char j,
61  char k, char l>
63  {
66 
67  public:
70  : iterA(a), iterB(b)
71  {}
72  typename promote<T, U>::V
73  operator()(const int N1, const int N2, const int N3) const
74  {
75  return iterA(N1, 0, N2, N3) * iterB(0) + iterA(N1, 1, N2, N3) * iterB(1)
76  + iterA(N1, 2, N2, N3) * iterB(2);
77  }
78  };
79 
80  template <class A, class B, class T, class U, int Dim, char i, char j,
81  char k, char l>
82  Tensor3_antisymmetric_Expr<
83  Riemann_times_Tensor1_1<A, B, T, U, Dim, i, j, k, l>,
84  typename promote<T, U>::V, Dim, Dim, i, k, l>
87  {
90  Dim, Dim, i, k, l>(TensorExpr(a, b));
91  }
92 
93  /* B(j)*A(i,j,k,l) */
94 
95  template <class A, class B, class T, class U, int Dim, char i, char j,
96  char k, char l>
97  Tensor3_antisymmetric_Expr<
98  Riemann_times_Tensor1_1<A, B, T, U, Dim, i, j, k, l>,
99  typename promote<T, U>::V, Dim, Dim, i, k, l>
102  {
105  Dim, Dim, i, k, l>(TensorExpr(a, b));
106  }
107 
108  /* A(i,j,k,l)*B(k) */
109 
110  template <class A, class B, class T, class U, int Dim, char i, char j,
111  char k, char l>
113  {
116 
117  public:
120  : iterA(a), iterB(b)
121  {}
122  typename promote<T, U>::V
123  operator()(const int N1, const int N2, const int N3) const
124  {
125  return iterA(N1, N2, 0, N3) * iterB(0) + iterA(N1, N2, 1, N3) * iterB(1)
126  + iterA(N1, N2, 2, N3) * iterB(2);
127  }
128  };
129 
130  template <class A, class B, class T, class U, int Dim, char i, char j,
131  char k, char l>
132  Tensor3_antisymmetric_Expr<
133  Riemann_times_Tensor1_2<A, B, T, U, Dim, i, j, k, l>,
134  typename promote<T, U>::V, Dim, Dim, i, j, l>
137  {
140  Dim, Dim, i, j, l>(TensorExpr(a, b));
141  }
142 
143  /* B(k)*A(i,j,k,l) */
144 
145  template <class A, class B, class T, class U, int Dim, char i, char j,
146  char k, char l>
147  Tensor3_antisymmetric_Expr<
148  Riemann_times_Tensor1_2<A, B, T, U, Dim, i, j, k, l>,
149  typename promote<T, U>::V, Dim, Dim, i, j, l>
152  {
155  Dim, Dim, i, j, l>(TensorExpr(a, b));
156  }
157 
158  /* A(i,j,k,l)*B(l) */
159 
160  template <class A, class B, class T, class U, int Dim, char i, char j,
161  char k, char l>
163  {
166 
167  public:
170  : iterA(a), iterB(b)
171  {}
172  typename promote<T, U>::V
173  operator()(const int N1, const int N2, const int N3) const
174  {
175  return iterA(N1, N2, N3, 0) * iterB(0) + iterA(N1, N2, N3, 1) * iterB(1)
176  + iterA(N1, N2, N3, 2) * iterB(2);
177  }
178  };
179 
180  template <class A, class B, class T, class U, int Dim, char i, char j,
181  char k, char l>
182  Tensor3_antisymmetric_Expr<
183  Riemann_times_Tensor1_3<A, B, T, U, Dim, i, j, k, l>,
184  typename promote<T, U>::V, Dim, Dim, i, j, k>
187  {
190  Dim, Dim, i, j, k>(TensorExpr(a, b));
191  }
192 
193  /* B(l)*A(i,j,k,l) */
194 
195  template <class A, class B, class T, class U, int Dim, char i, char j,
196  char k, char l>
197  Tensor3_antisymmetric_Expr<
198  Riemann_times_Tensor1_3<A, B, T, U, Dim, i, j, k, l>,
199  typename promote<T, U>::V, Dim, Dim, i, j, k>
202  {
205  Dim, Dim, i, j, k>(TensorExpr(a, b));
206  }
207 }
FTensor
JSON compatible output.
Definition: Christof_constructor.hpp:6
FTensor::operator*
promote< T, U >::V operator*(const Ddg_Expr< A, T, Dim, Dim, i, j, k, l > &a, const Ddg_Expr< B, U, Dim, Dim, i, k, j, l > &b)
Definition: Ddg_times_Ddg.hpp:79
FTensor::Riemann_times_Tensor1_0::Riemann_times_Tensor1_0
Riemann_times_Tensor1_0(const Riemann_Expr< A, T, Dim, i, j, k, l > &a, const Tensor1_Expr< B, U, Dim, i > &b)
Definition: Riemann_times_Tensor1.hpp:18
FTensor::Riemann_times_Tensor1_1::Riemann_times_Tensor1_1
Riemann_times_Tensor1_1(const Riemann_Expr< A, T, Dim, i, j, k, l > &a, const Tensor1_Expr< B, U, Dim, j > &b)
Definition: Riemann_times_Tensor1.hpp:68
FTensor::Riemann_times_Tensor1_0
Definition: Riemann_times_Tensor1.hpp:12
FTensor::Riemann_times_Tensor1_2::iterB
Tensor1_Expr< B, U, Dim, k > iterB
Definition: Riemann_times_Tensor1.hpp:115
A
constexpr AssemblyType A
Definition: operators_tests.cpp:30
FTensor::Tensor3_antisymmetric_Expr
Definition: Tensor3_antisymmetric_Expr.hpp:18
FTensor::Riemann_times_Tensor1_0::iterB
Tensor1_Expr< B, U, Dim, i > iterB
Definition: Riemann_times_Tensor1.hpp:15
FTensor::Riemann_times_Tensor1_1::iterB
Tensor1_Expr< B, U, Dim, j > iterB
Definition: Riemann_times_Tensor1.hpp:65
FTensor::Tensor1_Expr< B, U, Dim, i >
a
constexpr double a
Definition: approx_sphere.cpp:30
FTensor::Riemann_Expr
Definition: Riemann_Expr.hpp:15
FTensor::promote::V
T1 V
Definition: promote.hpp:17
FTensor::Riemann_times_Tensor1_1
Definition: Riemann_times_Tensor1.hpp:62
FTensor::Riemann_times_Tensor1_3
Definition: Riemann_times_Tensor1.hpp:162
FTensor::Riemann_times_Tensor1_1::iterA
Riemann_Expr< A, T, Dim, i, j, k, l > iterA
Definition: Riemann_times_Tensor1.hpp:64
FTensor::Riemann_times_Tensor1_2::operator()
promote< T, U >::V operator()(const int N1, const int N2, const int N3) const
Definition: Riemann_times_Tensor1.hpp:123
FTensor::Riemann_times_Tensor1_3::operator()
promote< T, U >::V operator()(const int N1, const int N2, const int N3) const
Definition: Riemann_times_Tensor1.hpp:173
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
FTensor::Riemann_times_Tensor1_0::operator()
promote< T, U >::V operator()(const int N1, const int N2, const int N3) const
Definition: Riemann_times_Tensor1.hpp:23
FTensor::Riemann_times_Tensor1_3::iterB
Tensor1_Expr< B, U, Dim, l > iterB
Definition: Riemann_times_Tensor1.hpp:165
FTensor::Riemann_times_Tensor1_2
Definition: Riemann_times_Tensor1.hpp:112
FTensor::Riemann_times_Tensor1_2::iterA
Riemann_Expr< A, T, Dim, i, j, k, l > iterA
Definition: Riemann_times_Tensor1.hpp:114
j
FTensor::Index< 'j', 3 > j
Definition: matrix_function.cpp:19
FTensor::Riemann_times_Tensor1_2::Riemann_times_Tensor1_2
Riemann_times_Tensor1_2(const Riemann_Expr< A, T, Dim, i, j, k, l > &a, const Tensor1_Expr< B, U, Dim, k > &b)
Definition: Riemann_times_Tensor1.hpp:118
FTensor::Riemann_times_Tensor1_0::iterA
Riemann_Expr< A, T, Dim, i, j, k, l > iterA
Definition: Riemann_times_Tensor1.hpp:14
FTensor::Riemann_times_Tensor1_3::iterA
Riemann_Expr< A, T, Dim, i, j, k, l > iterA
Definition: Riemann_times_Tensor1.hpp:164
k
FTensor::Index< 'k', 3 > k
Definition: matrix_function.cpp:20
FTensor::Riemann_times_Tensor1_1::operator()
promote< T, U >::V operator()(const int N1, const int N2, const int N3) const
Definition: Riemann_times_Tensor1.hpp:73
EshelbianPlasticity::U
@ U
Definition: EshelbianContact.cpp:197
l
FTensor::Index< 'l', 3 > l
Definition: matrix_function.cpp:21
FTensor::Riemann_times_Tensor1_3::Riemann_times_Tensor1_3
Riemann_times_Tensor1_3(const Riemann_Expr< A, T, Dim, i, j, k, l > &a, const Tensor1_Expr< B, U, Dim, l > &b)
Definition: Riemann_times_Tensor1.hpp:168