v0.14.0
Loading...
Searching...
No Matches
Tensor2_times_generic.hpp
Go to the documentation of this file.
1/* Multiplies a Tensor2 with a generic, yielding a Tensor2. */
2
3#pragma once
4
5namespace FTensor
6{
7 template <class A, class T, class U, int Dim0, int Dim1, char i, char j>
9 {
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
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_times_generic<A, T, U, Dim0, Dim1, i, j>,
27 typename promote<T, U>::V, Dim0, Dim1, i, j>
29 {
32 j>(TensorExpr(a, d0));
33 }
34
35 template <class A, class T, class U, int Dim0, int Dim1, char i, char j>
36 Tensor2_Expr<Tensor2_times_generic<A, T, U, Dim0, Dim1, i, j>,
37 typename promote<T, U>::V, Dim0, Dim1, i, j>
39 {
42 j>(TensorExpr(a, d0));
43 }
44}
static Number< 2 > N2
static Number< 1 > N1
constexpr double a
Tensor2_times_generic(const Tensor2_Expr< A, T, Dim0, Dim1, i, j > &a, const U &d0)
const Tensor2_Expr< A, T, Dim0, Dim1, i, j > iterA
promote< T, U >::V operator()(const int N1, const int N2) const
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'j', 3 > j
Tensors class implemented by Walter Landry.
Definition: FTensor.hpp:51
promote< T, U >::V operator*(const Ddg_Expr< A, T, Dim, Dim, i, j, k, l > &a, const Ddg_Expr< B, U, Dim, Dim, i, k, j, l > &b)