v0.14.0
Dg_and_Tensor2_symmetric.hpp
Go to the documentation of this file.
1 /* Multiply a Tensor2_symmetric and a Dg together but don't
2  contract, yielding a Dg. */
3 
4 #pragma once
5 
6 namespace FTensor
7 {
8  /* A(i,j,k) & B(i,j) -> Dg */
9 
10  template <class A, class B, class T, class U, int Dim01, int Dim2, char i,
11  char j, char k>
13  {
16 
17  public:
18  typename promote<T, U>::V
19  operator()(const int N1, const int N2, const int N3) const
20  {
21  return iterA(N1, N2, N3) * iterB(N1, N2);
22  }
23 
26  : iterA(a), iterB(b)
27  {}
28  };
29 
30  template <class A, class B, class T, class U, int Dim01, int Dim2, char i,
31  char j, char k>
32  Dg_Expr<Dg_and_Tensor2_symmetric<A, B, T, U, Dim01, Dim2, i, j, k>,
33  typename promote<T, U>::V, Dim01, Dim2, i, j, k>
36  {
37  using TensorExpr
39  return Dg_Expr<TensorExpr, typename promote<T, U>::V, Dim01, Dim2, i, j, k>(
40  TensorExpr(a, b));
41  }
42 
43  /* B(i,j) & A(i,j,k) -> Dg */
44 
45  template <class A, class B, class T, class U, int Dim01, int Dim2, char i,
46  char j, char k>
47  Dg_Expr<Dg_and_Tensor2_symmetric<A, B, T, U, Dim01, Dim2, i, j, k>,
48  typename promote<T, U>::V, Dim01, Dim2, i, j, k>
51  {
52  using TensorExpr
54  return Dg_Expr<TensorExpr, typename promote<T, U>::V, Dim01, Dim2, i, j, k>(
55  TensorExpr(a, b));
56  }
57 }
FTensor::Dg_and_Tensor2_symmetric::operator()
promote< T, U >::V operator()(const int N1, const int N2, const int N3) const
Definition: Dg_and_Tensor2_symmetric.hpp:19
FTensor
JSON compatible output.
Definition: Christof_constructor.hpp:6
FTensor::Tensor2_symmetric_Expr< B, U, Dim01, i, j >
A
constexpr AssemblyType A
Definition: operators_tests.cpp:30
FTensor::Dg_and_Tensor2_symmetric::iterA
Dg_Expr< A, T, Dim01, Dim2, i, j, k > iterA
Definition: Dg_and_Tensor2_symmetric.hpp:14
a
constexpr double a
Definition: approx_sphere.cpp:30
FTensor::operator&
Ddg_Expr< Ddg_and_Tensor2_symmetric< A, B, T, U, Dim01_0, Dim23_0, Dim_1, i0, j0, k0, l0, i1, j1 >, typename promote< T, U >::V, Dim01_0, Dim23_0, i0, j0, k0, l0 > operator&(const Ddg_Expr< A, T, Dim01_0, Dim23_0, i0, j0, k0, l0 > &a, const Tensor2_symmetric_Expr< B, U, Dim_1, i1, j1 > &b)
Definition: Ddg_and_Tensor2_symmetric.hpp:69
FTensor::promote::V
T1 V
Definition: promote.hpp:17
FTensor::Dg_and_Tensor2_symmetric::Dg_and_Tensor2_symmetric
Dg_and_Tensor2_symmetric(const Dg_Expr< A, T, Dim01, Dim2, i, j, k > &a, const Tensor2_symmetric_Expr< B, U, Dim01, i, j > &b)
Definition: Dg_and_Tensor2_symmetric.hpp:24
FTensor::Dg_and_Tensor2_symmetric::iterB
Tensor2_symmetric_Expr< B, U, Dim01, i, j > iterB
Definition: Dg_and_Tensor2_symmetric.hpp:15
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
FTensor::Dg_and_Tensor2_symmetric
Definition: Dg_and_Tensor2_symmetric.hpp:12
FTensor::Dg_Expr
Definition: Dg_Expr.hpp:25
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