v0.14.0
minus_Tensor1.hpp
Go to the documentation of this file.
1 /* Declares a wrapper class for the unary minus (-) operator. */
2 
3 #pragma once
4 
5 namespace FTensor
6 {
7  template <class A, class T, int Dim, char i> class minus_Tensor1
8  {
10 
11  public:
12  T operator()(const int N) const { return -iterA(N); }
13 
15  };
16 
17  template <class A, class T, int Dim, char i>
20  {
21  using TensorExpr = minus_Tensor1<A, T, Dim, i>;
22  return Tensor1_Expr<TensorExpr, T, Dim, i>(TensorExpr(a));
23  }
24 }
FTensor
JSON compatible output.
Definition: Christof_constructor.hpp:6
FTensor::minus_Tensor1::iterA
Tensor1_Expr< A, T, Dim, i > iterA
Definition: minus_Tensor1.hpp:9
FTensor::Tensor1_Expr
Definition: Tensor1_Expr.hpp:27
a
constexpr double a
Definition: approx_sphere.cpp:30
FTensor::minus_Tensor1::operator()
T operator()(const int N) const
Definition: minus_Tensor1.hpp:12
FTensor::minus_Tensor1::minus_Tensor1
minus_Tensor1(const Tensor1_Expr< A, T, Dim, i > &a)
Definition: minus_Tensor1.hpp:14
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::minus_Tensor1
Definition: minus_Tensor1.hpp:7