v0.14.0
generic_minus_Tensor1.hpp
Go to the documentation of this file.
1 /* Subtracts a Tensor1 from a generic, yielding a Tensor1. */
2 
3 #pragma once
4 
5 namespace FTensor
6 {
7  template <class A, class T, class U, int Dim, char i>
9  {
11  U d;
12 
13  public:
14  typename promote<T, U>::V operator()(const int N) const
15  {
16  return d - iterA(N);
17  }
18 
20  : iterA(a), d(d0)
21  {}
22  };
23 
24  template <class A, class T, class U, int Dim, char i>
26  typename promote<T, U>::V, Dim, i>
28  {
29  using TensorExpr = generic_minus_Tensor1<A, T, U, Dim, i>;
31  TensorExpr(a, d0));
32  }
33 }
FTensor
JSON compatible output.
Definition: Christof_constructor.hpp:6
FTensor::generic_minus_Tensor1::iterA
Tensor1_Expr< A, T, Dim, i > iterA
Definition: generic_minus_Tensor1.hpp:10
FTensor::generic_minus_Tensor1::d
U d
Definition: generic_minus_Tensor1.hpp:11
FTensor::Tensor1_Expr
Definition: Tensor1_Expr.hpp:27
a
constexpr double a
Definition: approx_sphere.cpp:30
FTensor::promote::V
T1 V
Definition: promote.hpp:17
FTensor::generic_minus_Tensor1
Definition: generic_minus_Tensor1.hpp:8
FTensor::generic_minus_Tensor1::generic_minus_Tensor1
generic_minus_Tensor1(const Tensor1_Expr< A, T, Dim, i > &a, const U &d0)
Definition: generic_minus_Tensor1.hpp:19
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
FTensor::generic_minus_Tensor1::operator()
promote< T, U >::V operator()(const int N) const
Definition: generic_minus_Tensor1.hpp:14
N
const int N
Definition: speed_test.cpp:3
Tensor1_Expr
Definition: single.cpp:11
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
EshelbianPlasticity::U
@ U
Definition: EshelbianContact.cpp:197