v0.14.0
Ddg_mod_Ddg.hpp
Go to the documentation of this file.
1 /* Subtracts Ddg-Ddg -> Riemann */
2 
3 #pragma once
4 
5 namespace FTensor
6 {
7  /* A(i,j,k,l) - B(i,l,k,j) */
8 
9  template <class A, class B, class T, class U, int Dim, char i, char j,
10  char k, char l>
12  {
15 
16  public:
17  typename promote<T, U>::V
18  operator()(const int N1, const int N2, const int N3, const int N4) const
19  {
20  return iterA(N1, N2, N3, N4) - iterB(N1, N4, N3, N2);
21  }
22 
25  : iterA(a), iterB(b)
26  {}
27  };
28 
29  template <class A, class B, class T, class U, int Dim, char i, char j,
30  char k, char l>
31  Riemann_Expr<Ddg_mod_Ddg<A, B, T, U, Dim, i, j, k, l>,
32  typename promote<T, U>::V, Dim, i, j, k, l>
35  {
38  TensorExpr(a, b));
39  }
40 }
FTensor
JSON compatible output.
Definition: Christof_constructor.hpp:6
FTensor::Ddg_mod_Ddg::iterB
Ddg_Expr< B, U, Dim, Dim, i, l, k, j > iterB
Definition: Ddg_mod_Ddg.hpp:14
FTensor::operator%
Riemann_Expr< Ddg_mod_Ddg< A, B, T, U, Dim, i, j, k, l >, typename promote< T, U >::V, Dim, i, j, k, l > operator%(const Ddg_Expr< A, T, Dim, Dim, i, j, k, l > &a, const Ddg_Expr< B, U, Dim, Dim, i, l, k, j > &b)
Definition: Ddg_mod_Ddg.hpp:33
A
constexpr AssemblyType A
Definition: operators_tests.cpp:30
FTensor::Ddg_Expr< A, T, Dim, Dim, i, j, k, l >
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::Ddg_mod_Ddg::operator()
promote< T, U >::V operator()(const int N1, const int N2, const int N3, const int N4) const
Definition: Ddg_mod_Ddg.hpp:18
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
FTensor::Ddg_mod_Ddg
Definition: Ddg_mod_Ddg.hpp:11
j
FTensor::Index< 'j', 3 > j
Definition: matrix_function.cpp:19
FTensor::Ddg_mod_Ddg::Ddg_mod_Ddg
Ddg_mod_Ddg(const Ddg_Expr< A, T, Dim, Dim, i, j, k, l > &a, const Ddg_Expr< B, U, Dim, Dim, i, l, k, j > &b)
Definition: Ddg_mod_Ddg.hpp:23
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
FTensor::Ddg_mod_Ddg::iterA
Ddg_Expr< A, T, Dim, Dim, i, j, k, l > iterA
Definition: Ddg_mod_Ddg.hpp:13