v0.14.0
src
ftensor
src
FTensor
Tensor2_symmetric
Tensor2_symmetric_minus_Tensor2_symmetric.hpp
Go to the documentation of this file.
1
/* Subtracts a Tensor2_symmetric from a Tensor2_symmetric, yielding a
2
Tensor2_symmetric. */
3
4
#pragma once
5
6
namespace
FTensor
7
{
8
/* Base Template */
9
template
<
class
A
,
class
B,
class
T,
class
U
,
int
Dim_0,
int
Dim_1,
char
i0,
10
char
j0,
char
i1,
char
j1>
11
class
Tensor2_symmetric_minus_Tensor2_symmetric
12
{};
13
14
/* A(i,j) - B(i,j) */
15
16
template
<
class
A,
class
B,
class
T,
class
U,
int
Dim,
char
i,
char
j>
17
class
Tensor2_symmetric_minus_Tensor2_symmetric
<
A
, B, T,
U
, Dim, Dim,
i
,
j
,
18
i
,
j
>
19
{
20
Tensor2_symmetric_Expr<A, T, Dim, i, j>
iterA
;
21
Tensor2_symmetric_Expr<B, U, Dim, i, j>
iterB
;
22
23
public
:
24
typename
promote<T, U>::V
operator()
(
const
int
N1,
const
int
N2)
const
25
{
26
return
iterA(N1, N2) - iterB(N1, N2);
27
}
28
29
Tensor2_symmetric_minus_Tensor2_symmetric
(
30
const
Tensor2_symmetric_Expr<A, T, Dim, i, j>
&
a
,
31
const
Tensor2_symmetric_Expr<B, U, Dim, i, j>
&b)
32
: iterA(
a
), iterB(b)
33
{}
34
};
35
36
/* A(i,j) - B(j,i) */
37
38
template
<
class
A,
class
B,
class
T,
class
U,
int
Dim,
char
i,
char
j>
39
class
Tensor2_symmetric_minus_Tensor2_symmetric
<
A
, B, T,
U
, Dim, Dim,
i
,
j
,
40
j
,
i
>
41
{
42
Tensor2_symmetric_Expr<A, T, Dim, i, j>
iterA
;
43
Tensor2_symmetric_Expr<B, U, Dim, j, i>
iterB
;
44
45
public
:
46
typename
promote<T, U>::V
operator()
(
const
int
N1,
const
int
N2)
const
47
{
48
return
iterA(N1, N2) - iterB(N1, N2);
49
}
50
51
Tensor2_symmetric_minus_Tensor2_symmetric
(
52
const
Tensor2_symmetric_Expr<A, T, Dim, i, j>
&
a
,
53
const
Tensor2_symmetric_Expr<B, U, Dim, j, i>
&b)
54
: iterA(
a
), iterB(b)
55
{}
56
};
57
58
template
<
class
A
,
class
B,
class
T,
class
U
,
int
Dim_0,
int
Dim_1,
char
i0,
59
char
j0,
char
i1,
char
j1>
60
Tensor2_symmetric_Expr<Tensor2_symmetric_minus_Tensor2_symmetric<
61
A
, B, T,
U
, Dim_0, Dim_1, i0, j0, i1, j1>,
62
typename
promote<T, U>::V
, Dim_0, i0, j0>
63
operator-
(
const
Tensor2_symmetric_Expr<A, T, Dim_0, i0, j0>
&
a
,
64
const
Tensor2_symmetric_Expr<B, U, Dim_1, i1, j1>
&b)
65
{
66
using
TensorExpr
67
=
Tensor2_symmetric_minus_Tensor2_symmetric
<
A
, B, T,
U
, Dim_0, Dim_1, i0,
68
j0, i1, j1>;
69
static_assert(
70
!std::is_empty<TensorExpr>::value,
71
"Indexes or Dimensions are not compatible with the - operator"
);
72
return
Tensor2_symmetric_Expr<TensorExpr, typename promote<T, U>::V
, Dim_0,
73
i0, j0>(TensorExpr(
a
, b));
74
}
75
}
FTensor::Tensor2_symmetric_minus_Tensor2_symmetric< A, B, T, U, Dim, Dim, i, j, j, i >::operator()
promote< T, U >::V operator()(const int N1, const int N2) const
Definition:
Tensor2_symmetric_minus_Tensor2_symmetric.hpp:46
FTensor
JSON compatible output.
Definition:
Christof_constructor.hpp:6
FTensor::Tensor2_symmetric_Expr
Definition:
Tensor2_symmetric_Expr.hpp:36
A
constexpr AssemblyType A
Definition:
operators_tests.cpp:30
FTensor::Tensor2_symmetric_minus_Tensor2_symmetric< A, B, T, U, Dim, Dim, i, j, j, i >::iterB
Tensor2_symmetric_Expr< B, U, Dim, j, i > iterB
Definition:
Tensor2_symmetric_minus_Tensor2_symmetric.hpp:43
a
constexpr double a
Definition:
approx_sphere.cpp:30
FTensor::Tensor2_symmetric_minus_Tensor2_symmetric
Definition:
Tensor2_symmetric_minus_Tensor2_symmetric.hpp:11
FTensor::promote::V
T1 V
Definition:
promote.hpp:17
FTensor::Tensor2_symmetric_minus_Tensor2_symmetric< A, B, T, U, Dim, Dim, i, j, i, j >::operator()
promote< T, U >::V operator()(const int N1, const int N2) const
Definition:
Tensor2_symmetric_minus_Tensor2_symmetric.hpp:24
FTensor::Tensor2_symmetric_minus_Tensor2_symmetric< A, B, T, U, Dim, Dim, i, j, j, i >::Tensor2_symmetric_minus_Tensor2_symmetric
Tensor2_symmetric_minus_Tensor2_symmetric(const Tensor2_symmetric_Expr< A, T, Dim, i, j > &a, const Tensor2_symmetric_Expr< B, U, Dim, j, i > &b)
Definition:
Tensor2_symmetric_minus_Tensor2_symmetric.hpp:51
FTensor::Tensor2_symmetric_minus_Tensor2_symmetric< A, B, T, U, Dim, Dim, i, j, j, i >::iterA
Tensor2_symmetric_Expr< A, T, Dim, i, j > iterA
Definition:
Tensor2_symmetric_minus_Tensor2_symmetric.hpp:42
FTensor::Tensor2_symmetric_minus_Tensor2_symmetric< A, B, T, U, Dim, Dim, i, j, i, j >::iterB
Tensor2_symmetric_Expr< B, U, Dim, i, j > iterB
Definition:
Tensor2_symmetric_minus_Tensor2_symmetric.hpp:21
i
FTensor::Index< 'i', SPACE_DIM > i
Definition:
hcurl_divergence_operator_2d.cpp:27
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::Tensor2_symmetric_minus_Tensor2_symmetric< A, B, T, U, Dim, Dim, i, j, i, j >::Tensor2_symmetric_minus_Tensor2_symmetric
Tensor2_symmetric_minus_Tensor2_symmetric(const Tensor2_symmetric_Expr< A, T, Dim, i, j > &a, const Tensor2_symmetric_Expr< B, U, Dim, i, j > &b)
Definition:
Tensor2_symmetric_minus_Tensor2_symmetric.hpp:29
EshelbianPlasticity::U
@ U
Definition:
EshelbianContact.cpp:197
FTensor::Tensor2_symmetric_minus_Tensor2_symmetric< A, B, T, U, Dim, Dim, i, j, i, j >::iterA
Tensor2_symmetric_Expr< A, T, Dim, i, j > iterA
Definition:
Tensor2_symmetric_minus_Tensor2_symmetric.hpp:20
Generated by
Doxygen
1.8.17 and hosted at