v0.14.0
Tensor2_symmetric_minus_generic.hpp
Go to the documentation of this file.
1 /* Subtracts a generic from a Tensor2_symmetric, 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  {
12  const U d;
13 
14  public:
15  typename promote<T, U>::V operator()(const int N1, const int N2) const
16  {
17  return iterA(N1, N2) - d;
18  }
19 
22  : iterA(a), d(d0)
23  {}
24  };
25 
26  template <class A, class T, class U, int Dim, char i, char j>
27  Tensor2_symmetric_Expr<Tensor2_symmetric_minus_generic<A, T, U, Dim, i, j>,
28  typename promote<T, U>::V, Dim, i, j>
30  {
33  i, j>(TensorExpr(a, d0));
34  }
35 }
FTensor
JSON compatible output.
Definition: Christof_constructor.hpp:6
FTensor::Tensor2_symmetric_Expr
Definition: Tensor2_symmetric_Expr.hpp:36
FTensor::Tensor2_symmetric_minus_generic::iterA
const Tensor2_symmetric_Expr< A, T, Dim, i, j > iterA
Definition: Tensor2_symmetric_minus_generic.hpp:11
FTensor::Tensor2_symmetric_minus_generic::Tensor2_symmetric_minus_generic
Tensor2_symmetric_minus_generic(const Tensor2_symmetric_Expr< A, T, Dim, i, j > &a, const U &d0)
Definition: Tensor2_symmetric_minus_generic.hpp:20
a
constexpr double a
Definition: approx_sphere.cpp:30
FTensor::promote::V
T1 V
Definition: promote.hpp:17
FTensor::Tensor2_symmetric_minus_generic::d
const U d
Definition: Tensor2_symmetric_minus_generic.hpp:12
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
FTensor::Tensor2_symmetric_minus_generic
Definition: Tensor2_symmetric_minus_generic.hpp:9
FTensor::operator-
Ddg_Expr< Ddg_minus_Ddg< A, B, T, U, Dim01, Dim23, i, j, k, l >, typename promote< T, U >::V, Dim01, Dim23, i, j, k, l > operator-(const Ddg_Expr< A, T, Dim01, Dim23, i, j, k, l > &a, const Ddg_Expr< B, U, Dim01, Dim23, i, j, k, l > &b)
Definition: Ddg_minus_Ddg.hpp:33
j
FTensor::Index< 'j', 3 > j
Definition: matrix_function.cpp:19
EshelbianPlasticity::U
@ U
Definition: EshelbianContact.cpp:197
FTensor::Tensor2_symmetric_minus_generic::operator()
promote< T, U >::V operator()(const int N1, const int N2) const
Definition: Tensor2_symmetric_minus_generic.hpp:15