v0.14.0
Tensor1_and_Tensor1.hpp
Go to the documentation of this file.
1 /* Multiply two Tensor1's together but don't contract, yielding a
2  Tensor1. */
3 
4 #pragma once
5 
6 namespace FTensor
7 {
8  template <class A, class B, class T, class U, int Dim, char i>
10  {
13 
14  public:
15  typename promote<T, U>::V operator()(const int N) const
16  {
17  return iterA(N) * iterB(N);
18  }
19 
22  : iterA(a), iterB(b)
23  {}
24  };
25 
26  template <class A, class B, class T, class U, int Dim, char i>
28  typename promote<T, U>::V, Dim, i>
31  {
32  using TensorExpr = Tensor1_and_Tensor1<A, B, T, U, Dim, i>;
34  TensorExpr(a, b));
35  }
36 }
FTensor
JSON compatible output.
Definition: Christof_constructor.hpp:6
FTensor::Tensor1_and_Tensor1
Definition: Tensor1_and_Tensor1.hpp:9
FTensor::Tensor1_and_Tensor1::operator()
promote< T, U >::V operator()(const int N) const
Definition: Tensor1_and_Tensor1.hpp:15
FTensor::Tensor1_Expr
Definition: Tensor1_Expr.hpp:27
a
constexpr double a
Definition: approx_sphere.cpp:30
FTensor::operator&
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)
Definition: Ddg_and_Tensor2_symmetric.hpp:69
FTensor::promote::V
T1 V
Definition: promote.hpp:17
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
N
const int N
Definition: speed_test.cpp:3
Tensor1_Expr
Definition: single.cpp:11
FTensor::Tensor1_and_Tensor1::iterB
Tensor1_Expr< B, U, Dim, i > iterB
Definition: Tensor1_and_Tensor1.hpp:12
FTensor::Tensor1_and_Tensor1::iterA
Tensor1_Expr< A, T, Dim, i > iterA
Definition: Tensor1_and_Tensor1.hpp:11
FTensor::Tensor1_and_Tensor1::Tensor1_and_Tensor1
Tensor1_and_Tensor1(const Tensor1_Expr< A, T, Dim, i > &a, const Tensor1_Expr< B, U, Dim, i > &b)
Definition: Tensor1_and_Tensor1.hpp:20