v0.14.0
Tensor1_minus_Tensor1.hpp
Go to the documentation of this file.
1 /* Subtracts a Tensor1 from a Tensor1, yielding a Tensor1. */
2 
3 #pragma once
4 
5 namespace FTensor
6 {
7  template <class A, class B, class T, class U, int Dim, char i>
9  {
12 
13  public:
14  typename promote<T, U>::V operator()(const int N) const
15  {
16  return iterA(N) - iterB(N);
17  }
18 
21  : iterA(a), iterB(b)
22  {}
23  };
24 
25  template <class A, class B, class T, class U, char i, int Dim>
27  typename promote<T, U>::V, Dim, i>
30  {
33  TensorExpr(a, b));
34  }
35 }
FTensor
JSON compatible output.
Definition: Christof_constructor.hpp:6
FTensor::Tensor1_minus_Tensor1::operator()
promote< T, U >::V operator()(const int N) const
Definition: Tensor1_minus_Tensor1.hpp:14
FTensor::Tensor1_minus_Tensor1::iterA
Tensor1_Expr< A, T, Dim, i > iterA
Definition: Tensor1_minus_Tensor1.hpp:10
FTensor::Tensor1_minus_Tensor1::Tensor1_minus_Tensor1
Tensor1_minus_Tensor1(const Tensor1_Expr< A, T, Dim, i > &a, const Tensor1_Expr< B, U, Dim, i > &b)
Definition: Tensor1_minus_Tensor1.hpp:19
FTensor::Tensor1_Expr
Definition: Tensor1_Expr.hpp:27
a
constexpr double a
Definition: approx_sphere.cpp:30
FTensor::Tensor1_minus_Tensor1
Definition: Tensor1_minus_Tensor1.hpp:8
FTensor::promote::V
T1 V
Definition: promote.hpp:17
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
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
FTensor::Tensor1_minus_Tensor1::iterB
Tensor1_Expr< B, U, Dim, i > iterB
Definition: Tensor1_minus_Tensor1.hpp:11