v0.14.0
Riemann_times_Ddg.hpp
Go to the documentation of this file.
1 /* This file has the declaration for Riemann*Ddg
2  yielding a typename promote<T,U>::V. I simplify the expression by
3  removing the identically zero components of Riemann. */
4 
5 #pragma once
6 
7 namespace FTensor
8 {
9  /* A(i,j,k,l)*B(i,j,k,l) */
10 
11  template <class A, class B, class T, class U, int Dim, char i, char j,
12  char k, char l>
13  typename promote<T, U>::V
16  {
17  return a(1, 0, 0, 1) * b(1, 0, 0, 1) + a(2, 0, 0, 1) * b(2, 0, 0, 1)
18  + a(0, 1, 0, 1) * b(0, 1, 0, 1) + a(2, 1, 0, 1) * b(2, 1, 0, 1)
19  + a(0, 2, 0, 1) * b(0, 2, 0, 1) + a(1, 2, 0, 1) * b(1, 2, 0, 1)
20  + a(1, 0, 0, 2) * b(1, 0, 0, 2) + a(2, 0, 0, 2) * b(2, 0, 0, 2)
21  + a(0, 1, 0, 2) * b(0, 1, 0, 2) + a(2, 1, 0, 2) * b(2, 1, 0, 2)
22  + a(0, 2, 0, 2) * b(0, 2, 0, 2) + a(1, 2, 0, 2) * b(1, 2, 0, 2)
23  + a(1, 0, 1, 0) * b(1, 0, 1, 0) + a(2, 0, 1, 0) * b(2, 0, 1, 0)
24  + a(0, 1, 1, 0) * b(0, 1, 1, 0) + a(2, 1, 1, 0) * b(2, 1, 1, 0)
25  + a(0, 2, 1, 0) * b(0, 2, 1, 0) + a(1, 2, 1, 0) * b(1, 2, 1, 0)
26  + a(1, 0, 1, 2) * b(1, 0, 1, 2) + a(2, 0, 1, 2) * b(2, 0, 1, 2)
27  + a(0, 1, 1, 2) * b(0, 1, 1, 2) + a(2, 1, 1, 2) * b(2, 1, 1, 2)
28  + a(0, 2, 1, 2) * b(0, 2, 1, 2) + a(1, 2, 1, 2) * b(1, 2, 1, 2)
29  + a(1, 0, 2, 0) * b(1, 0, 2, 0) + a(2, 0, 2, 0) * b(2, 0, 2, 0)
30  + a(0, 1, 2, 0) * b(0, 1, 2, 0) + a(2, 1, 2, 0) * b(2, 1, 2, 0)
31  + a(0, 2, 2, 0) * b(0, 2, 2, 0) + a(1, 2, 2, 0) * b(1, 2, 2, 0)
32  + a(1, 0, 2, 1) * b(1, 0, 2, 1) + a(2, 0, 2, 1) * b(2, 0, 2, 1)
33  + a(0, 1, 2, 1) * b(0, 1, 2, 1) + a(2, 1, 2, 1) * b(2, 1, 2, 1)
34  + a(0, 2, 2, 1) * b(0, 2, 2, 1) + a(1, 2, 2, 1) * b(1, 2, 2, 1);
35  }
36 
37  template <class A, class B, class T, class U, int Dim, char i, char j,
38  char k, char l>
39  typename promote<T, U>::V
42 
43  {
44  return operator*(a, b);
45  }
46 
47  /* A(i,j,k,l)*B(i,k,j,l) */
48 
49  template <class A, class B, class T, class U, int Dim, char i, char j,
50  char k, char l>
51  typename promote<T, U>::V
54  {
55  return a(1, 0, 0, 1) * b(1, 0, 0, 1) + a(2, 0, 0, 1) * b(2, 0, 0, 1)
56  + a(0, 1, 0, 1) * b(0, 0, 1, 1) + a(2, 1, 0, 1) * b(2, 0, 1, 1)
57  + a(0, 2, 0, 1) * b(0, 0, 2, 1) + a(1, 2, 0, 1) * b(1, 0, 2, 1)
58  + a(1, 0, 0, 2) * b(1, 0, 0, 2) + a(2, 0, 0, 2) * b(2, 0, 0, 2)
59  + a(0, 1, 0, 2) * b(0, 0, 1, 2) + a(2, 1, 0, 2) * b(2, 0, 1, 2)
60  + a(0, 2, 0, 2) * b(0, 0, 2, 2) + a(1, 2, 0, 2) * b(1, 0, 2, 2)
61  + a(1, 0, 1, 0) * b(1, 1, 0, 0) + a(2, 0, 1, 0) * b(2, 1, 0, 0)
62  + a(0, 1, 1, 0) * b(0, 1, 1, 0) + a(2, 1, 1, 0) * b(2, 1, 1, 0)
63  + a(0, 2, 1, 0) * b(0, 1, 2, 0) + a(1, 2, 1, 0) * b(1, 1, 2, 0)
64  + a(1, 0, 1, 2) * b(1, 1, 0, 2) + a(2, 0, 1, 2) * b(2, 1, 0, 2)
65  + a(0, 1, 1, 2) * b(0, 1, 1, 2) + a(2, 1, 1, 2) * b(2, 1, 1, 2)
66  + a(0, 2, 1, 2) * b(0, 1, 2, 2) + a(1, 2, 1, 2) * b(1, 1, 2, 2)
67  + a(1, 0, 2, 0) * b(1, 2, 0, 0) + a(2, 0, 2, 0) * b(2, 2, 0, 0)
68  + a(0, 1, 2, 0) * b(0, 2, 1, 0) + a(2, 1, 2, 0) * b(2, 2, 1, 0)
69  + a(0, 2, 2, 0) * b(0, 2, 2, 0) + a(1, 2, 2, 0) * b(1, 2, 2, 0)
70  + a(1, 0, 2, 1) * b(1, 2, 0, 1) + a(2, 0, 2, 1) * b(2, 2, 0, 1)
71  + a(0, 1, 2, 1) * b(0, 2, 1, 1) + a(2, 1, 2, 1) * b(2, 2, 1, 1)
72  + a(0, 2, 2, 1) * b(0, 2, 2, 1) + a(1, 2, 2, 1) * b(1, 2, 2, 1);
73  }
74 
75  template <class A, class B, class T, class U, int Dim, char i, char j,
76  char k, char l>
77  typename promote<T, U>::V
80 
81  {
82  return operator*(a, b);
83  }
84 }
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
A
constexpr AssemblyType A
Definition: operators_tests.cpp:30
FTensor::Ddg_Expr
Definition: Ddg_Expr.hpp:28
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
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