v0.14.0
minus_Dg.hpp
Go to the documentation of this file.
1 /* Unary minus operator. */
2 
3 #pragma once
4 
5 namespace FTensor
6 {
7  template <class A, class T, int Dim01, int Dim2, char i, char j, char k>
8  class minus_Dg
9  {
11 
12  public:
13  T operator()(const int N1, const int N2, const int N3) const
14  {
15  return -iterA(N1, N2, N3);
16  }
17 
19  };
20 
21  template <class A, class T, int Dim01, int Dim2, char i, char j, char k>
22  Dg_Expr<minus_Dg<A, T, Dim01, Dim2, i, j, k>, T, Dim01, Dim2, i, j, k>
24  {
25  using TensorExpr = minus_Dg<A, T, Dim01, Dim2, i, j, k>;
27  }
28 }
FTensor
JSON compatible output.
Definition: Christof_constructor.hpp:6
FTensor::minus_Dg::minus_Dg
minus_Dg(const Dg_Expr< A, T, Dim01, Dim2, i, j, k > &a)
Definition: minus_Dg.hpp:18
a
constexpr double a
Definition: approx_sphere.cpp:30
FTensor::minus_Dg
Definition: minus_Dg.hpp:8
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
FTensor::minus_Dg::iterA
Dg_Expr< A, T, Dim01, Dim2, i, j, k > iterA
Definition: minus_Dg.hpp:10
FTensor::Dg_Expr
Definition: Dg_Expr.hpp:25
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
FTensor::minus_Dg::operator()
T operator()(const int N1, const int N2, const int N3) const
Definition: minus_Dg.hpp:13
k
FTensor::Index< 'k', 3 > k
Definition: matrix_function.cpp:20