v0.7.26
FTensor.hpp
Go to the documentation of this file.
1 /** \file FTensor.hpp
2 * \brief Tensors class implemented by Walter Landry.
3 * \ingroup ftensor
4 
5 *
6 * The main repository is available under link
7 <https://bitbucket.org/wlandry/ftensor>.
8 * For more details look at reference \cite landry2003implementing.
9 * See link <http://www.wlandry.net/Presentations/FTensor.pdf>.
10 *
11 * Note this implementation is modified for proposes of MoFEM.
12 *
13 */
14 
15 /* Include file for the Fast Tensor classes (FTensor). Everything is
16  in namespace FTensor. */
17 
18 #pragma once
19 
20 #include <cmath>
21 #include <complex>
22 #include <type_traits>
23 
24 #ifdef FTENSOR_DEBUG
25 #include <iostream>
26 #include <sstream>
27 #include <stdexcept>
28 #endif
29 #include "FTensor/Layout.hpp"
30 
31 #ifdef WITH_ADOL_C
32 #include <adolc/adolc.h>
33 #include <adolc/adtl.h>
34 #endif
35 
36 /**
37  * \brief Tensors class implemented by Walter Landry.
38  * \ingroup ftensor
39 
40 
41  * The main repository is available under link
42  <https://bitbucket.org/wlandry/ftensor>.
43  * For more details look at reference \cite landry2003implementing.
44  * See link <http://www.wlandry.net/Presentations/FTensor.pdf>.
45  *
46  * Note this implementation is modified for proposes of MoFEM.
47 
48  */
49 namespace FTensor
50 {
51  template <class T> class Tensor0;
52 
53  template <class T, const int I> class PackPtr
54  {};
55 
56  template <class T, int Dim> class Tensor1;
57  template <class A, class T, int Dim, char i> class Tensor1_Expr;
58 
59  template <class T, int Dim1, int Dim2>
60  class Tensor2;
61  template <class A, class T, int Dim1, int Dim2, char i, char j>
62  class Tensor2_Expr;
63  template <class A, class T, int N> class Tensor2_number_rhs_0;
64  template <class A, class T, int N> class Tensor2_number_rhs_1;
65 
66  template <class T, int Dim> class Tensor2_symmetric;
67  template <class A, class T, int Dim, char i, char j>
69 
70  template <class T, int Dim> class Tensor2_antisymmetric;
71  template <class A, class T, int Dim, char i, char j>
73 
74  template <class T, int Dim0, int Dim1, int Dim2> class Tensor3;
75  template <class A, class T, int Dim0, int Dim1, int Dim2, char i, char j,
76  char k>
77  class Tensor3_Expr;
78  template <class A, class T, int N> class Tensor3_number_rhs_0;
79  template <class A, class T, int N> class Tensor3_number_rhs_2;
80  template <class A, class T, int N> class Tensor3_number_rhs_2;
81  template <class A, class T, int N1, int N2> class Tensor3_number_rhs_01;
82  template <class A, class T, int N1, int N2> class Tensor3_number_rhs_02;
83  template <class A, class T, int N1, int N2> class Tensor3_number_rhs_12;
84 
85  template <class T, int Dim01, int Dim2> class Dg;
86  template <class A, class T, int Dim01, int Dim2, char i, char j, char k>
87  class Dg_Expr;
88  template <class A, class T, int N> class Dg_number_rhs_0;
89  template <class A, class T, int N> class Dg_number_rhs_2;
90  template <class A, class T, int N1, int N2> class Dg_number_rhs_01;
91  template <class A, class T, int N1, int N2> class Dg_number_rhs_12;
92 
93  template <class T, int Dim0, int Dim12> class Christof;
94  template <class A, class T, int Dim0, int Dim12, char i, char j, char k>
96 
97  template <class T, int Dim0, int Dim12> class Tensor3_antisymmetric;
98  template <class A, class T, int Dim0, int Dim12, char i, char j, char k>
100 
101  template <class T, int Dim0, int Dim1, int Dim2, int Dim3> class Tensor4;
102  template <class A, class T, int Dim0, int Dim1, int Dim2, int Dim3, char i,
103  char j, char k, char l>
104  class Tensor4_Expr;
105 
106  template <class T, int Dim> class Riemann;
107  template <class A, class T, int Dim, char i, char j, char k, char l>
108  class Riemann_Expr;
109 
110  template <class T, int Dim01, int Dim23> class Ddg;
111  template <class A, class T, int Dim01, int Dim23, char i, char j, char k,
112  char l>
113  class Ddg_Expr;
114  template <class A, class T, int N0, int N1> class Ddg_number_rhs_01;
115  template <class A, class T, int N0> class Ddg_number_rhs_0;
116 
117  template <class T> class Tensor_Levi_Civita;
118 }
119 
120 #include "FTensor/Index.hpp"
121 #include "FTensor/Number.hpp"
122 #include "FTensor/promote.hpp"
123 
124 #include "FTensor/Levi_Civita.hpp"
125 #include "FTensor/cross.hpp"
126 
127 #include "FTensor/Christof.hpp"
128 #include "FTensor/Ddg.hpp"
129 #include "FTensor/Dg.hpp"
130 #include "FTensor/Riemann.hpp"
131 #include "FTensor/Tensor0.hpp"
132 #include "FTensor/Tensor1.hpp"
133 #include "FTensor/Tensor2.hpp"
136 #include "FTensor/Tensor3.hpp"
139 #include "FTensor/Tensor4.hpp"
141 
142 /***************************************************************************/ /**
143 * \defgroup ftensor Tensor template library
144 * \brief Efficient Template Tensor library
145 ******************************************************************************/
Fully Antisymmetric Levi-Civita Tensor.