v0.14.0
Tensor2_antisymmetric_Expr.hpp
Go to the documentation of this file.
1 /* Declares a wrapper class for antisymmetric rank 2 Tensor expressions.
2  It is specialized for Tensor3_number_rhs_2. */
3 
4 #pragma once
5 
6 namespace FTensor
7 {
8  template <class A, class T, int Dim, char i, char j>
10  {
12 
13  public:
15  T operator()(const int N1, const int N2) const { return iter(N1, N2); }
16  };
17 
18  template <class A, class T, int Tensor_Dim, int Dim, char i, char j>
20  Dim, i, j>
21  {
23 
24  public:
26  : iter(a)
27  {}
28  T &operator()(const int N1, const int N2) { return iter(N1, N2); }
29  T operator()(const int N1, const int N2) const { return iter(N1, N2); }
30 
31  // /* Various assignment operators. I have to explicitly declare the
32  // second operator= because otherwise the compiler will generate its
33  // own and not use the template code. */
34 
35  // template<class B, class U>
36  // const
37  // Tensor2_antisymmetric_Expr<Tensor2_antisymmetric<A,Tensor_Dim>,T,Dim,i,j>
38  // & operator=(const Tensor2_antisymmetric_Expr<B,U,Dim,i,j> &result);
39 
40  // const
41  // Tensor2_antisymmetric_Expr<Tensor2_antisymmetric<A,Tensor_Dim>,T,Dim,i,j>
42  // & operator=(const
43  // Tensor2_antisymmetric_Expr<Tensor2_antisymmetric<A,Tensor_Dim>,T,Dim,i,j>
44  // &result);
45 
46  // template<class B, class U>
47  // const
48  // Tensor2_antisymmetric_Expr<Tensor2_antisymmetric<A,Tensor_Dim>,T,Dim,i,j>
49  // & operator+=(const Tensor2_antisymmetric_Expr<B,U,Dim,i,j> &result);
50 
51  // template<class B, class U>
52  // const
53  // Tensor2_antisymmetric_Expr<Tensor2_antisymmetric<A,Tensor_Dim>,T,Dim,i,j>
54  // & operator-=(const Tensor2_antisymmetric_Expr<B,U,Dim,i,j> &result);
55 
56  // template<class B, class U>
57  // const
58  // Tensor2_antisymmetric_Expr<Tensor2_antisymmetric<A,Tensor_Dim>,T,Dim,i,j>
59  // & operator&=(const Tensor2_antisymmetric_Expr<B,U,Dim,i,j> &result);
60 
61  // /* This is for when the indices are switched (i,j) -> (j,i). */
62 
63  // template<class B, class U>
64  // const
65  // Tensor2_antisymmetric_Expr<Tensor2_antisymmetric<A,Tensor_Dim>,T,Dim,i,j>
66  // & operator=(const Tensor2_antisymmetric_Expr<B,U,Dim,j,i> &result);
67 
68  // template<class B, class U>
69  // const
70  // Tensor2_antisymmetric_Expr<Tensor2_antisymmetric<A,Tensor_Dim>,T,Dim,i,j>
71  // & operator+=(const Tensor2_antisymmetric_Expr<B,U,Dim,j,i> &result);
72 
73  // template<class B, class U>
74  // const
75  // Tensor2_antisymmetric_Expr<Tensor2_antisymmetric<A,Tensor_Dim>,T,Dim,i,j>
76  // & operator-=(const Tensor2_antisymmetric_Expr<B,U,Dim,j,i> &result);
77 
78  // /* Operations with just generics. */
79 
80  // template<class U>
81  // const
82  // Tensor2_antisymmetric_Expr<Tensor2_antisymmetric<A,Tensor_Dim>,T,Dim,i,j>
83  // & operator=(const U &d); template<class U> const
84  // Tensor2_antisymmetric_Expr<Tensor2_antisymmetric<A,Tensor_Dim>,T,Dim,i,j>
85  // & operator+=(const U &d); template<class U> const
86  // Tensor2_antisymmetric_Expr<Tensor2_antisymmetric<A,Tensor_Dim>,T,Dim,i,j>
87  // & operator-=(const U &d); template<class U> const
88  // Tensor2_antisymmetric_Expr<Tensor2_antisymmetric<A,Tensor_Dim>,T,Dim,i,j>
89  // & operator*=(const U &d); template<class U> const
90  // Tensor2_antisymmetric_Expr<Tensor2_antisymmetric<A,Tensor_Dim>,T,Dim,i,j>
91  // & operator/=(const U &d);
92  };
93 }
FTensor::Tensor2_antisymmetric_Expr< Tensor2_antisymmetric< A, Tensor_Dim >, T, Dim, i, j >::iter
Tensor2_antisymmetric< A, Tensor_Dim > & iter
Definition: Tensor2_antisymmetric_Expr.hpp:22
FTensor
JSON compatible output.
Definition: Christof_constructor.hpp:6
FTensor::Tensor2_antisymmetric_Expr
Definition: Tensor2_antisymmetric_Expr.hpp:9
FTensor::Tensor2_antisymmetric_Expr::Tensor2_antisymmetric_Expr
Tensor2_antisymmetric_Expr(const A &a)
Definition: Tensor2_antisymmetric_Expr.hpp:14
A
constexpr AssemblyType A
Definition: operators_tests.cpp:30
FTensor::Tensor2_antisymmetric_Expr::iter
A iter
Definition: Tensor2_antisymmetric_Expr.hpp:11
FTensor::Tensor2_antisymmetric_Expr< Tensor2_antisymmetric< A, Tensor_Dim >, T, Dim, i, j >::Tensor2_antisymmetric_Expr
Tensor2_antisymmetric_Expr(Tensor2_antisymmetric< A, Tensor_Dim > &a)
Definition: Tensor2_antisymmetric_Expr.hpp:25
a
constexpr double a
Definition: approx_sphere.cpp:30
FTensor::Tensor2_antisymmetric
Definition: Tensor2_antisymmetric_value.hpp:9
FTensor::Tensor2_antisymmetric_Expr< Tensor2_antisymmetric< A, Tensor_Dim >, T, Dim, i, j >::operator()
T operator()(const int N1, const int N2) const
Definition: Tensor2_antisymmetric_Expr.hpp:29
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_antisymmetric_Expr::operator()
T operator()(const int N1, const int N2) const
Definition: Tensor2_antisymmetric_Expr.hpp:15
FTensor::Tensor2_antisymmetric_Expr< Tensor2_antisymmetric< A, Tensor_Dim >, T, Dim, i, j >::operator()
T & operator()(const int N1, const int N2)
Definition: Tensor2_antisymmetric_Expr.hpp:28