v0.14.0
Tensor2_symmetric_plus_generic.hpp
Go to the documentation of this file.
1 /* Adds a Tensor2_symmetric to a generic, yielding a
2  Tensor2_symmetric. */
3 
4 #pragma once
5 
6 namespace FTensor
7 {
8  template <class A, class T, class U, int Dim, char i, char j>
10  {
11  auto TensorExpr = [&a, d0](const int N1, const int N2) {
12  return a.operator()(N1, N2) + d0;
13  };
14  return Tensor2_symmetric_Expr<decltype(TensorExpr),
15  typename promote<T, U>::V, Dim, i, j>(
16  TensorExpr);
17  }
18 
19  template <class A, class T, class U, int Dim, char i, char j>
21  {
22  auto TensorExpr = [&a, d0](const int N1, const int N2) {
23  return a.operator()(N1, N2) + d0;
24  };
25  return Tensor2_symmetric_Expr<decltype(TensorExpr),
26  typename promote<T, U>::V, Dim, i, j>(
27  TensorExpr);
28  }
29 }
FTensor
JSON compatible output.
Definition: Christof_constructor.hpp:6
FTensor::Tensor2_symmetric_Expr
Definition: Tensor2_symmetric_Expr.hpp:36
a
constexpr double a
Definition: approx_sphere.cpp:30
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::operator+
Ddg_Expr< Ddg_plus_Ddg< A, B, T, U, Dim01_0, Dim23_0, Dim01_1, Dim23_1, i0, j0, k0, l0, i1, j1, k1, l1 >, 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 Ddg_Expr< B, U, Dim01_1, Dim23_1, i1, j1, k1, l1 > &b)
Definition: Ddg_plus_Ddg.hpp:66
EshelbianPlasticity::U
@ U
Definition: EshelbianContact.cpp:197