v0.6.10
Public Member Functions | Private Attributes | List of all members
Tensor3_antisymmetric< T, Tensor_Dim0, Tensor_Dim12 > Class Template Reference

#include <src/ftensor/src/FTensor/Tensor3_antisymmetric/Tensor3_antisymmetric_value.hpp>

Public Member Functions

 Tensor3_antisymmetric ()
 
 Tensor3_antisymmetric (T d001, T d101)
 
 Tensor3_antisymmetric (T d001, T d002, T d012, T d101, T d102, T d112, T d201, T d202, T d212)
 
 Tensor3_antisymmetric (T d001, T d002, T d003, T d012, T d013, T d023, T d101, T d102, T d103, T d112, T d113, T d123, T d201, T d202, T d203, T d212, T d213, T d223)
 
T & unsafe (const int N1, const int N2, const int N3)
 
operator() (const int N1, const int N2, const int N3) const
 
template<char i, char j, char k, int Dim0, int Dim12>
Tensor3_antisymmetric_Expr< Tensor3_antisymmetric< T, Tensor_Dim0, Tensor_Dim12 >, T, Dim0, Dim12, i, j, k > operator() (const Index< i, Dim0 >, const Index< j, Dim12 >, const Index< k, Dim12 >)
 
template<char i, char j, char k, int Dim0, int Dim12>
Tensor3_antisymmetric_Expr< const Tensor3_antisymmetric< T, Tensor_Dim0, Tensor_Dim12 >, T, Dim0, Dim12, i, j, k > operator() (const Index< i, Dim0 >, const Index< j, Dim12 >, const Index< k, Dim12 >) const
 

Private Attributes

data [Tensor_Dim0][(Tensor_Dim12 *(Tensor_Dim12-1))/2]
 

Detailed Description

template<class T, int Tensor_Dim0, int Tensor_Dim12>
class Tensor3_antisymmetric< T, Tensor_Dim0, Tensor_Dim12 >

Definition at line 4 of file Tensor3_antisymmetric_value.hpp.

Constructor & Destructor Documentation

◆ Tensor3_antisymmetric() [1/4]

template<class T, int Tensor_Dim0, int Tensor_Dim12>
Tensor3_antisymmetric< T, Tensor_Dim0, Tensor_Dim12 >::Tensor3_antisymmetric ( )

Definition at line 8 of file Tensor3_antisymmetric_value.hpp.

8 {}

◆ Tensor3_antisymmetric() [2/4]

template<class T, int Tensor_Dim0, int Tensor_Dim12>
Tensor3_antisymmetric< T, Tensor_Dim0, Tensor_Dim12 >::Tensor3_antisymmetric ( d001,
d101 
)

◆ Tensor3_antisymmetric() [3/4]

template<class T, int Tensor_Dim0, int Tensor_Dim12>
Tensor3_antisymmetric< T, Tensor_Dim0, Tensor_Dim12 >::Tensor3_antisymmetric ( d001,
d002,
d012,
d101,
d102,
d112,
d201,
d202,
d212 
)

Definition at line 17 of file Tensor3_antisymmetric_value.hpp.

19  {
21  (data,d001,d002,d012,d101,d102,d112,d201,d202,d212);
22  }
T data[Tensor_Dim0][(Tensor_Dim12 *(Tensor_Dim12-1))/2]

◆ Tensor3_antisymmetric() [4/4]

template<class T, int Tensor_Dim0, int Tensor_Dim12>
Tensor3_antisymmetric< T, Tensor_Dim0, Tensor_Dim12 >::Tensor3_antisymmetric ( d001,
d002,
d003,
d012,
d013,
d023,
d101,
d102,
d103,
d112,
d113,
d123,
d201,
d202,
d203,
d212,
d213,
d223 
)

Definition at line 25 of file Tensor3_antisymmetric_value.hpp.

28  {
30  (data,d001,d002,d003,d012,d013,d023,d101,d102,d103,d112,d113,d123,
31  d201,d202,d203,d212,d213,d223);
32  }
T data[Tensor_Dim0][(Tensor_Dim12 *(Tensor_Dim12-1))/2]

Member Function Documentation

◆ operator()() [1/3]

template<class T, int Tensor_Dim0, int Tensor_Dim12>
T Tensor3_antisymmetric< T, Tensor_Dim0, Tensor_Dim12 >::operator() ( const int  N1,
const int  N2,
const int  N3 
) const

Definition at line 62 of file Tensor3_antisymmetric_value.hpp.

63  {
64 #ifdef FTENSOR_DEBUG
65  if(N1>=Tensor_Dim0 || N1<0
66  || N2>=Tensor_Dim12 || N2<0 || N3>=Tensor_Dim12 || N3<0)
67  {
68  std::stringstream s;
69  s << "Bad index in Tensor3_antisymmetric<T,"
70  << Tensor_Dim0 << "," << Tensor_Dim12
71  << ">.operator("
72  << N1 << "," << N2 << "," << N3 << ") const"
73  << std::endl;
74  throw std::runtime_error(s.str());
75  }
76 #endif
77  return N2<N3 ? data[N1][N3-1+(N2*(2*(Tensor_Dim12-1)-N2-1))/2]
78  : (N2>N3 ? -data[N1][N2-1+(N3*(2*(Tensor_Dim12-1)-N3-1))/2] : 0.0);
79  }
T data[Tensor_Dim0][(Tensor_Dim12 *(Tensor_Dim12-1))/2]

◆ operator()() [2/3]

template<class T, int Tensor_Dim0, int Tensor_Dim12>
template<char i, char j, char k, int Dim0, int Dim12>
Tensor3_antisymmetric_Expr<Tensor3_antisymmetric<T,Tensor_Dim0,Tensor_Dim12>, T,Dim0,Dim12,i,j,k> Tensor3_antisymmetric< T, Tensor_Dim0, Tensor_Dim12 >::operator() ( const Index< i, Dim0 >  ,
const Index< j, Dim12 >  ,
const Index< k, Dim12 >   
)

Definition at line 87 of file Tensor3_antisymmetric_value.hpp.

89  {
91  <T,Tensor_Dim0,Tensor_Dim12>,T,Dim0,Dim12,i,j,k>(*this);
92  }

◆ operator()() [3/3]

template<class T, int Tensor_Dim0, int Tensor_Dim12>
template<char i, char j, char k, int Dim0, int Dim12>
Tensor3_antisymmetric_Expr<const Tensor3_antisymmetric <T,Tensor_Dim0,Tensor_Dim12>,T,Dim0,Dim12,i,j,k> Tensor3_antisymmetric< T, Tensor_Dim0, Tensor_Dim12 >::operator() ( const Index< i, Dim0 >  ,
const Index< j, Dim12 >  ,
const Index< k, Dim12 >   
) const

Definition at line 97 of file Tensor3_antisymmetric_value.hpp.

99  {
101  <T,Tensor_Dim0,Tensor_Dim12>,T,Dim0,Dim12,i,j,k>(*this);
102  }

◆ unsafe()

template<class T, int Tensor_Dim0, int Tensor_Dim12>
T& Tensor3_antisymmetric< T, Tensor_Dim0, Tensor_Dim12 >::unsafe ( const int  N1,
const int  N2,
const int  N3 
)

Definition at line 44 of file Tensor3_antisymmetric_value.hpp.

45  {
46 #ifdef FTENSOR_DEBUG
47  if(N1>=Tensor_Dim0 || N1<0
48  || N2>=Tensor_Dim12 || N2<0 || N3>=Tensor_Dim12 || N3<0
49  || N2>=N3)
50  {
51  std::stringstream s;
52  s << "Bad index in Tensor3_antisymmetric<T,"
53  << Tensor_Dim0 << "," << Tensor_Dim12
54  << ">.operator("
55  << N1 << "," << N2 << "," << N3 << ")" << std::endl;
56  throw std::runtime_error(s.str());
57  }
58 #endif
59  return data[N1][N3-1+(N2*(2*(Tensor_Dim12-1)-N2-1))/2];
60  }
T data[Tensor_Dim0][(Tensor_Dim12 *(Tensor_Dim12-1))/2]

Member Data Documentation

◆ data

template<class T, int Tensor_Dim0, int Tensor_Dim12>
T Tensor3_antisymmetric< T, Tensor_Dim0, Tensor_Dim12 >::data[Tensor_Dim0][(Tensor_Dim12 *(Tensor_Dim12-1))/2]
private

Definition at line 6 of file Tensor3_antisymmetric_value.hpp.


The documentation for this class was generated from the following file: