v0.14.0
Loading...
Searching...
No Matches
Dg_and_Tensor1.hpp
Go to the documentation of this file.
1/* Multiply a Tensor1 and a Dg together but don't contract, yielding a
2 Dg. */
3
4#pragma once
5
6namespace FTensor
7{
8 /* A(i,j,k) & B(k) -> Dg */
9
10 template <class A, class B, class T, class U, int Dim01, int Dim2, char i,
11 char j, char k>
13 {
16
17 public:
18 typename promote<T, U>::V
19 operator()(const int N1, const int N2, const int N3) const
20 {
21 return iterA(N1, N2, N3) * iterB(N3);
22 }
23
26 : iterA(a), iterB(b)
27 {}
28 };
29
30 template <class A, class B, class T, class U, int Dim01, int Dim2, char i,
31 char j, char k>
32 Dg_Expr<Dg_and_Tensor1<A, B, T, U, Dim01, Dim2, i, j, k>,
33 typename promote<T, U>::V, Dim01, Dim2, i, j, k>
36 {
38 return Dg_Expr<TensorExpr, typename promote<T, U>::V, Dim01, Dim2, i, j, k>(
39 TensorExpr(a, b));
40 }
41
42 /* B(k) & A(i,j,k) -> Dg */
43
44 template <class A, class B, class T, class U, int Dim01, int Dim2, char i,
45 char j, char k>
46 Dg_Expr<Dg_and_Tensor1<A, B, T, U, Dim01, Dim2, i, j, k>,
47 typename promote<T, U>::V, Dim01, Dim2, i, j, k>
50 {
52 return Dg_Expr<TensorExpr, typename promote<T, U>::V, Dim01, Dim2, i, j, k>(
53 TensorExpr(a, b));
54 }
55}
static Number< 2 > N2
static Number< 1 > N1
constexpr double a
promote< T, U >::V operator()(const int N1, const int N2, const int N3) const
Dg_and_Tensor1(const Dg_Expr< A, T, Dim01, Dim2, i, j, k > &a, const Tensor1_Expr< B, U, Dim2, k > &b)
Tensor1_Expr< B, U, Dim2, k > iterB
Dg_Expr< A, T, Dim01, Dim2, i, j, k > iterA
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
const double T
Tensors class implemented by Walter Landry.
Definition: FTensor.hpp:51
Ddg_Expr< Ddg_and_Tensor2_symmetric< A, B, T, U, Dim01_0, Dim23_0, Dim_1, i0, j0, k0, l0, i1, j1 >, typename promote< T, U >::V, Dim01_0, Dim23_0, i0, j0, k0, l0 > operator&(const Ddg_Expr< A, T, Dim01_0, Dim23_0, i0, j0, k0, l0 > &a, const Tensor2_symmetric_Expr< B, U, Dim_1, i1, j1 > &b)
constexpr AssemblyType A