v0.14.0
Tensor3_antisymmetric_Expr.hpp
Go to the documentation of this file.
1 /* Declare a wrapper class for rank 3 Tensor expressions,
2  antisymmetric in the last two indices. I specialize it for when I
3  wrap a simple Tensor3_antisymmetric(_ptr) so that it has a
4  reference to the Tensor3_antisymmetric(_ptr) and not a copy.
5  Otherwise assignment wouldn't work. */
6 
7 #pragma once
8 
12 // #include "Tensor3_antisymmetric_mod_Tensor1.hpp"
14 
15 namespace FTensor
16 {
17  template <class A, class T, int Dim0, int Dim12, char i, char j, char k>
19  {
21 
22  public:
24  T operator()(const int N1, const int N2, const int N3) const
25  {
26  return iter(N1, N2, N3);
27  }
28  };
29 
30  template <class A, class T, int Dim0, int Dim12, char i, char j, char k>
32  Dim0, Dim12, i, j, k>
33  {
35 
36  public:
38  : iter(a)
39  {}
40  T operator()(const int N1, const int N2, const int N3) const
41  {
42  return iter(N1, N2, N3);
43  }
44 
45  /* Various assignment operators. I have to explicitly declare the
46  second operator= because otherwise the compiler will generate its
47  own and not use the template code. */
48 
49  template <class B, class U>
51  Dim12, i, j, k> &
52  operator=(
54 
56  Dim12, i, j, k> &
57  operator=(
59  T, Dim0, Dim12, i, j, k> &result);
60 
61  /* This is for when the indices are switched (i,j,k) -> (i,k,j). */
62 
63  template <class B, class U>
65  Dim12, i, j, k> &
66  operator=(
68  };
69 }
70 
FTensor
JSON compatible output.
Definition: Christof_constructor.hpp:6
FTensor::Tensor3_antisymmetric_Expr::iter
A iter
Definition: Tensor3_antisymmetric_Expr.hpp:20
FTensor::Tensor3_antisymmetric_Expr< Tensor3_antisymmetric< A, Dim0, Dim12 >, T, Dim0, Dim12, i, j, k >::Tensor3_antisymmetric_Expr
Tensor3_antisymmetric_Expr(Tensor3_antisymmetric< A, Dim0, Dim12 > &a)
Definition: Tensor3_antisymmetric_Expr.hpp:37
Tensor3_antisymmetric_times_Tensor3.hpp
A
constexpr AssemblyType A
Definition: operators_tests.cpp:30
FTensor::Tensor3_antisymmetric_Expr
Definition: Tensor3_antisymmetric_Expr.hpp:18
FTensor::Tensor3_antisymmetric_Expr::Tensor3_antisymmetric_Expr
Tensor3_antisymmetric_Expr(const A &a)
Definition: Tensor3_antisymmetric_Expr.hpp:23
Tensor3_antisymmetric_or_Tensor3_antisymmetric.hpp
FTensor::Tensor3_antisymmetric_Expr::operator()
T operator()(const int N1, const int N2, const int N3) const
Definition: Tensor3_antisymmetric_Expr.hpp:24
a
constexpr double a
Definition: approx_sphere.cpp:30
FTensor::Tensor3_antisymmetric
Definition: Tensor3_antisymmetric_value.hpp:8
FTensor::Tensor3_antisymmetric_Expr< Tensor3_antisymmetric< A, Dim0, Dim12 >, T, Dim0, Dim12, i, j, k >::iter
Tensor3_antisymmetric< A, Dim0, Dim12 > & iter
Definition: Tensor3_antisymmetric_Expr.hpp:34
FTensor::Tensor3_antisymmetric_Expr< Tensor3_antisymmetric< A, Dim0, Dim12 >, T, Dim0, Dim12, i, j, k >::operator()
T operator()(const int N1, const int N2, const int N3) const
Definition: Tensor3_antisymmetric_Expr.hpp:40
Tensor3_antisymmetric_plus_Tensor3_antisymmetric.hpp
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
Tensor3_antisymmetric_times_generic.hpp
j
FTensor::Index< 'j', 3 > j
Definition: matrix_function.cpp:19
Tensor3_antisymmetric_Expr_equals.hpp
k
FTensor::Index< 'k', 3 > k
Definition: matrix_function.cpp:20