v0.14.0
Riemann_times_Tensor2_symmetric.hpp
Go to the documentation of this file.
1 /* This file has all of the declarations for expressions like
2  Riemann*Tensor2_symmetric and
3  Tensor2_symmetric*Riemann, yielding a Tensor2_symmetric. */
4 
5 #pragma once
6 
7 namespace FTensor
8 {
9  /* A(i,j,k,l)*B(i,k) */
10 
11  template <class A, class B, class T, class U, int Dim, char i, char j,
12  char k, char l>
14  {
17 
18  public:
22  : iterA(a), iterB(b)
23  {}
24  typename promote<T, U>::V operator()(const int N1, const int N2) const
25  {
26  return iterA(0, N1, 0, N2) * iterB(0, 0)
27  + iterA(0, N1, 1, N2) * iterB(0, 1)
28  + iterA(0, N1, 2, N2) * iterB(0, 2)
29  + iterA(1, N1, 0, N2) * iterB(1, 0)
30  + iterA(1, N1, 1, N2) * iterB(1, 1)
31  + iterA(1, N1, 2, N2) * iterB(1, 2)
32  + iterA(2, N1, 0, N2) * iterB(2, 0)
33  + iterA(2, N1, 1, N2) * iterB(2, 1)
34  + iterA(2, N1, 2, N2) * iterB(2, 2);
35  }
36  };
37 
38  template <class A, class B, class T, class U, int Dim, char i, char j,
39  char k, char l>
40  Tensor2_symmetric_Expr<
41  Riemann_times_Tensor2_symmetric_0<A, B, T, U, Dim, i, j, k, l>,
42  typename promote<T, U>::V, Dim, j, l>
45  {
46  using TensorExpr
49  j, l>(TensorExpr(a, b));
50  }
51 
52  /* B(i,k)*A(i,j,k,l) */
53 
54  template <class A, class B, class T, class U, int Dim, char i, char j,
55  char k, char l>
56  Tensor2_symmetric_Expr<
57  Riemann_times_Tensor2_symmetric_0<A, B, T, U, Dim, i, j, k, l>,
58  typename promote<T, U>::V, Dim, j, l>
61  {
62  using TensorExpr
65  j, l>(TensorExpr(a, b));
66  }
67 }
FTensor::Riemann_times_Tensor2_symmetric_0::iterB
Tensor2_symmetric_Expr< B, U, Dim, i, k > iterB
Definition: Riemann_times_Tensor2_symmetric.hpp:16
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_Tensor2_symmetric_0::iterA
Riemann_Expr< A, T, Dim, i, j, k, l > iterA
Definition: Riemann_times_Tensor2_symmetric.hpp:15
FTensor::Tensor2_symmetric_Expr< B, U, Dim, i, k >
FTensor::Riemann_times_Tensor2_symmetric_0::Riemann_times_Tensor2_symmetric_0
Riemann_times_Tensor2_symmetric_0(const Riemann_Expr< A, T, Dim, i, j, k, l > &a, const Tensor2_symmetric_Expr< B, U, Dim, i, k > &b)
Definition: Riemann_times_Tensor2_symmetric.hpp:19
FTensor::Riemann_times_Tensor2_symmetric_0
Definition: Riemann_times_Tensor2_symmetric.hpp:13
A
constexpr AssemblyType A
Definition: operators_tests.cpp:30
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
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
j
FTensor::Index< 'j', 3 > j
Definition: matrix_function.cpp:19
FTensor::Riemann_times_Tensor2_symmetric_0::operator()
promote< T, U >::V operator()(const int N1, const int N2) const
Definition: Riemann_times_Tensor2_symmetric.hpp:24
k
FTensor::Index< 'k', 3 > k
Definition: matrix_function.cpp:20
EshelbianPlasticity::U
@ U
Definition: EshelbianContact.cpp:197
l
FTensor::Index< 'l', 3 > l
Definition: matrix_function.cpp:21