v0.14.0
src
ftensor
src
FTensor
Tensor2
Tensor2_divide_generic.hpp
Go to the documentation of this file.
1
/* Divides a Tensor2 by a generic, yielding a Tensor2. */
2
3
#pragma once
4
5
namespace
FTensor
6
{
7
template
<
class
A,
class
T,
class
U,
int
Dim0,
int
Dim1,
char
i,
char
j>
8
class
Tensor2_divide_generic
9
{
10
const
Tensor2_Expr<A, T, Dim0, Dim1, i, j>
iterA
;
11
const
U
d
;
12
13
public
:
14
typename
promote<T, U>::V
operator()
(
const
int
N1,
const
int
N2)
const
15
{
16
return
iterA
(N1, N2) /
d
;
17
}
18
19
Tensor2_divide_generic
(
const
Tensor2_Expr<A, T, Dim0, Dim1, i, j>
&
a
,
20
const
U
&d0)
21
:
iterA
(
a
),
d
(d0)
22
{}
23
};
24
25
template
<
class
A,
class
T,
class
U,
int
Dim0,
int
Dim1,
char
i,
char
j>
26
Tensor2_Expr<Tensor2_divide_generic<A, T, U, Dim0, Dim1, i, j>,
27
typename
promote<T, U>::V
, Dim0, Dim1,
i
,
j
>
28
operator/
(
const
Tensor2_Expr<A, T, Dim0, Dim1, i, j>
&
a
,
const
U
&d0)
29
{
30
using
TensorExpr =
Tensor2_divide_generic<A, T, U, Dim0, Dim1, i, j>
;
31
return
Tensor2_Expr<TensorExpr, typename promote<T, U>::V
, Dim0, Dim1,
i
,
32
j
>(TensorExpr(
a
, d0));
33
}
34
}
FTensor::Tensor2_divide_generic::iterA
const Tensor2_Expr< A, T, Dim0, Dim1, i, j > iterA
Definition:
Tensor2_divide_generic.hpp:10
FTensor
JSON compatible output.
Definition:
Christof_constructor.hpp:6
FTensor::Tensor2_divide_generic::d
const U d
Definition:
Tensor2_divide_generic.hpp:11
FTensor::Tensor2_divide_generic::Tensor2_divide_generic
Tensor2_divide_generic(const Tensor2_Expr< A, T, Dim0, Dim1, i, j > &a, const U &d0)
Definition:
Tensor2_divide_generic.hpp:19
FTensor::Tensor2_Expr
Definition:
Tensor2_Expr.hpp:26
FTensor::Tensor2_divide_generic
Definition:
Tensor2_divide_generic.hpp:8
FTensor::operator/
auto operator/(const Ddg_Expr< A, T, Dim01, Dim23, i, j, k, l > &a, const U &d0)
Definition:
Ddg_times_generic.hpp:36
FTensor::Tensor2_divide_generic::operator()
promote< T, U >::V operator()(const int N1, const int N2) const
Definition:
Tensor2_divide_generic.hpp:14
a
constexpr double a
Definition:
approx_sphere.cpp:30
FTensor::promote::V
T1 V
Definition:
promote.hpp:17
i
FTensor::Index< 'i', SPACE_DIM > i
Definition:
hcurl_divergence_operator_2d.cpp:27
j
FTensor::Index< 'j', 3 > j
Definition:
matrix_function.cpp:19
EshelbianPlasticity::U
@ U
Definition:
EshelbianContact.cpp:197
Generated by
Doxygen
1.8.17 and hosted at