v0.13.2
Loading...
Searching...
No Matches
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
6namespace 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}
static Number< 2 > N2
static Number< 1 > N1
constexpr double a
T operator()(const int N1, const int N2) const
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'j', 3 > j
const double T
Tensors class implemented by Walter Landry.
Definition: FTensor.hpp:51
constexpr AssemblyType A