v0.14.0
src
ftensor
src
FTensor
Tensor2
minus_Tensor2.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
Dim0,
int
Dim1,
char
i,
char
j>
8
class
minus_Tensor2
9
{
10
const
Tensor2_Expr<A, T, Dim0, Dim1, i, j>
iterA
;
11
12
public
:
13
T
operator()
(
const
int
N1,
const
int
N2)
const
{
return
-
iterA
(N1, N2); }
14
15
minus_Tensor2
(
const
Tensor2_Expr<A, T, Dim0, Dim1, i, j>
&
a
) :
iterA
(
a
) {}
16
};
17
18
template
<
class
A,
class
T,
int
Dim0,
int
Dim1,
char
i,
char
j>
19
Tensor2_Expr<minus_Tensor2<A, T, Dim0, Dim1, i, j>, T, Dim0, Dim1,
i
,
j
>
20
operator-
(
const
Tensor2_Expr<A, T, Dim0, Dim1, i, j>
&
a
)
21
{
22
using
TensorExpr =
minus_Tensor2<A, T, Dim0, Dim1, i, j>
;
23
return
Tensor2_Expr<TensorExpr, T, Dim0, Dim1, i, j>
(TensorExpr(
a
));
24
}
25
}
FTensor
JSON compatible output.
Definition:
Christof_constructor.hpp:6
FTensor::minus_Tensor2::minus_Tensor2
minus_Tensor2(const Tensor2_Expr< A, T, Dim0, Dim1, i, j > &a)
Definition:
minus_Tensor2.hpp:15
FTensor::Tensor2_Expr
Definition:
Tensor2_Expr.hpp:26
a
constexpr double a
Definition:
approx_sphere.cpp:30
FTensor::minus_Tensor2::iterA
const Tensor2_Expr< A, T, Dim0, Dim1, i, j > iterA
Definition:
minus_Tensor2.hpp:10
i
FTensor::Index< 'i', SPACE_DIM > i
Definition:
hcurl_divergence_operator_2d.cpp:27
FTensor::minus_Tensor2::operator()
T operator()(const int N1, const int N2) const
Definition:
minus_Tensor2.hpp:13
FTensor::minus_Tensor2
Definition:
minus_Tensor2.hpp:8
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
Generated by
Doxygen
1.8.17 and hosted at