v0.14.0
src
ftensor
src
FTensor
Dg
Dg_divide_generic.hpp
Go to the documentation of this file.
1
/* Divides a Dg by a generic, yielding a Dg. */
2
3
#pragma once
4
5
namespace
FTensor
6
{
7
template
<
class
A
,
class
T,
class
U
,
int
Dim01,
int
Dim2,
char
i
,
char
j
,
8
char
k
>
9
class
Dg_divide_generic
10
{
11
Dg_Expr<A, T, Dim01, Dim2, i, j, k>
iterA
;
12
U
d
;
13
14
public
:
15
typename
promote<T, U>::V
16
operator()
(
const
int
N1,
const
int
N2,
const
int
N3)
const
17
{
18
return
iterA
(N1, N2, N3) /
d
;
19
}
20
21
Dg_divide_generic
(
const
Dg_Expr<A, T, Dim01, Dim2, i, j, k>
&
a
,
22
const
U
&d0)
23
:
iterA
(
a
),
d
(d0)
24
{}
25
};
26
27
/* A(i,j,k)/d0->Dg */
28
29
template
<
class
A
,
class
T,
class
U
,
int
Dim01,
int
Dim2,
char
i
,
char
j
,
30
char
k
>
31
Dg_Expr<Dg_divide_generic<A, T, U, Dim01, Dim2, i, j, k>,
32
typename
promote<T, U>::V
, Dim01, Dim2,
i
,
j
,
k
>
33
operator/
(
const
Dg_Expr<A, T, Dim01, Dim2, i, j, k>
&
a
,
const
U
&d0)
34
{
35
using
TensorExpr =
Dg_divide_generic<A, T, U, Dim01, Dim2, i, j, k>
;
36
return
Dg_Expr<TensorExpr, typename promote<T, U>::V
, Dim01, Dim2,
i
,
j
,
k
>(
37
TensorExpr(
a
, d0));
38
}
39
}
FTensor
JSON compatible output.
Definition:
Christof_constructor.hpp:6
FTensor::Dg_divide_generic::Dg_divide_generic
Dg_divide_generic(const Dg_Expr< A, T, Dim01, Dim2, i, j, k > &a, const U &d0)
Definition:
Dg_divide_generic.hpp:21
FTensor::Dg_divide_generic
Definition:
Dg_divide_generic.hpp:9
FTensor::Dg_divide_generic::d
U d
Definition:
Dg_divide_generic.hpp:12
A
constexpr AssemblyType A
Definition:
operators_tests.cpp:30
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
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
FTensor::Dg_divide_generic::iterA
Dg_Expr< A, T, Dim01, Dim2, i, j, k > iterA
Definition:
Dg_divide_generic.hpp:11
FTensor::Dg_Expr
Definition:
Dg_Expr.hpp:25
j
FTensor::Index< 'j', 3 > j
Definition:
matrix_function.cpp:19
FTensor::Dg_divide_generic::operator()
promote< T, U >::V operator()(const int N1, const int N2, const int N3) const
Definition:
Dg_divide_generic.hpp:16
k
FTensor::Index< 'k', 3 > k
Definition:
matrix_function.cpp:20
EshelbianPlasticity::U
@ U
Definition:
EshelbianContact.cpp:197
Generated by
Doxygen
1.8.17 and hosted at