v0.14.0
Tensor1_or_Tensor1.hpp
Go to the documentation of this file.
1 /* Adds two Tensor1's together yielding a Tensor2_symmetric. */
2 
3 #pragma once
4 
5 namespace FTensor
6 {
7  template <class A, class B, class T, class U, int Dim, char i, char j>
9  {
12 
13  public:
14  typename promote<T, U>::V operator()(const int N1, const int N2) const
15  {
16  return iterA(N1) + iterB(N2);
17  }
18 
21  : iterA(a), iterB(b)
22  {}
23  };
24 
25  template <class A, class B, class T, class U, int Dim, char i, char j>
26  Tensor2_symmetric_Expr<Tensor1_or_Tensor1<A, B, T, U, Dim, i, j>,
27  typename promote<T, U>::V, Dim, i, j>
30  {
33  i, j>(TensorExpr(a, b));
34  }
35 }
FTensor::Tensor1_or_Tensor1::iterA
Tensor1_Expr< A, T, Dim, i > iterA
Definition: Tensor1_or_Tensor1.hpp:10
FTensor
JSON compatible output.
Definition: Christof_constructor.hpp:6
FTensor::Tensor2_symmetric_Expr
Definition: Tensor2_symmetric_Expr.hpp:36
FTensor::Tensor1_or_Tensor1::iterB
Tensor1_Expr< B, U, Dim, j > iterB
Definition: Tensor1_or_Tensor1.hpp:11
FTensor::operator||
Ddg_Expr< Ddg_or_Ddg< A, B, T, U, Dim, i, j, k, l >, typename promote< T, U >::V, Dim, Dim, i, k, j, l > operator||(const Ddg_Expr< A, T, Dim, Dim, i, j, k, l > &a, const Ddg_Expr< B, U, Dim, Dim, i, l, k, j > &b)
Definition: Ddg_or_Ddg.hpp:33
FTensor::Tensor1_or_Tensor1
Definition: Tensor1_or_Tensor1.hpp:8
FTensor::Tensor1_Expr
Definition: Tensor1_Expr.hpp:27
a
constexpr double a
Definition: approx_sphere.cpp:30
FTensor::promote::V
T1 V
Definition: promote.hpp:17
FTensor::Tensor1_or_Tensor1::Tensor1_or_Tensor1
Tensor1_or_Tensor1(const Tensor1_Expr< A, T, Dim, i > &a, const Tensor1_Expr< B, U, Dim, j > &b)
Definition: Tensor1_or_Tensor1.hpp:19
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::Tensor1_or_Tensor1::operator()
promote< T, U >::V operator()(const int N1, const int N2) const
Definition: Tensor1_or_Tensor1.hpp:14