v0.14.0
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 
5 namespace 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 }
FTensor
JSON compatible output.
Definition: Christof_constructor.hpp:6
FTensor::operator*
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)
Definition: Ddg_times_Ddg.hpp:79
FTensor::Tensor2_times_generic::operator()
promote< T, U >::V operator()(const int N1, const int N2) const
Definition: Tensor2_times_generic.hpp:14
FTensor::Tensor2_times_generic::d
const U & d
Definition: Tensor2_times_generic.hpp:11
FTensor::Tensor2_Expr
Definition: Tensor2_Expr.hpp:26
a
constexpr double a
Definition: approx_sphere.cpp:30
FTensor::promote::V
T1 V
Definition: promote.hpp:17
FTensor::Tensor2_times_generic::Tensor2_times_generic
Tensor2_times_generic(const Tensor2_Expr< A, T, Dim0, Dim1, i, j > &a, const U &d0)
Definition: Tensor2_times_generic.hpp:19
FTensor::Tensor2_times_generic
Definition: Tensor2_times_generic.hpp:8
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
FTensor::Tensor2_times_generic::iterA
const Tensor2_Expr< A, T, Dim0, Dim1, i, j > iterA
Definition: Tensor2_times_generic.hpp:10
EshelbianPlasticity::U
@ U
Definition: EshelbianContact.cpp:197