v0.14.0
Types.hpp
Go to the documentation of this file.
1 /** \file Types.hpp
2  * \brief Types
3  */
4 
5 
6 
7 #ifndef __TYPES_HPP__
8 #define __TYPES_HPP__
9 
10 namespace MoFEM {
11 
12 /**
13  * @brief Types
14  *
15  */
16 namespace Types {
17 
18 typedef int DofIdx; ///< Index of DOF
19 typedef int MoFEMDofIdx; ///< Index of DOF using mofem native index
20 typedef int PetscLocalDofIdx; ///< Index of DOF using local petsc index
21 typedef int PetscGlobalDofIdx; ///< Index of DOF using global pets index
22 typedef int FEIdx; ///< Index of the element
23 typedef int EntIdx; ///< Index of DOF on the entity
24 typedef int EntPart; ///< Partition owning entity
25 typedef double FieldData; ///< Field data type
26 typedef int ApproximationOrder; ///< Approximation on the entity
27 typedef int FieldCoefficientsNumber; ///< Number of field coefficients
28 typedef char FieldBitNumber; ///< Field bit number
29 
30 // typedef checked_uint128_t UId;
31 typedef uint128_t UId; ///< Unique Id
32 typedef int ShortId; ///< Unique Id in the field
33 
34 typedef std::bitset<BITREFEDGES_SIZE> BitRefEdges;
35 
36 /**
37  * \brief Bit structure attached to each entity identifying to what mesh entity
38  * is attached.
39  */
40 typedef std::bitset<BITREFLEVEL_SIZE> BitRefLevel;
41 
42 typedef std::bitset<BITFIELDID_SIZE> BitFieldId; ///< Field Id
43 typedef std::bitset<BITFEID_SIZE> BitFEId; ///< Finite element Id
44 typedef std::bitset<BITPROBLEMID_SIZE> BitProblemId; ///< Problem Id
45 typedef std::bitset<BITINTERFACEUID_SIZE> BitIntefaceId;
46 
47 /**
48  * \typedef CubitBCType
49  * bc & material meshsets
50  *
51  */
52 typedef std::bitset<32> CubitBCType;
53 
54 // array with std allocators (i.e. concept of capacity is useful here)
55 // typedef ublas::unbounded_array<int,std::allocator<int> > IntAllocator;
56 // typedef ublas::unbounded_array<double,std::allocator<double> >
57 // DoubleAllocator;
58 template <typename T>
59 using VecAllocator = std::vector<T, std::allocator<T>>;
60 
64 
65 template <typename T>
66 using UBlasVector = ublas::vector<T, VecAllocator<T>>;
70 #ifdef WITH_ADOL_C
72 #endif
73 
74 template <typename T>
75 using UBlasMatrix = ublas::matrix<T, ublas::row_major, VecAllocator<T>>;
79 #ifdef WITH_ADOL_C
81 #endif
82 
83 // bounded vector & matrices
84 template <typename T, size_t N>
85 using VectorBoundedArray = ublas::vector<T, ublas::bounded_array<T, N>>;
86 
98 #ifdef WITH_ADOL_C
100 #endif
101 
102 template <typename T, size_t N>
103 using MatrixBoundedArray =
104  ublas::matrix<T, ublas::row_major, ublas::bounded_array<T, N>>;
107 #ifdef WITH_ADOL_C
109 #endif
110 
111 // shallow adaptor classes
112 template <typename T>
114  ublas::vector<T, ublas::shallow_array_adaptor<T>>;
117 
118 template <typename T>
120  ublas::matrix<double, ublas::row_major,
121  ublas::shallow_array_adaptor<double>>;
122 
123 /**
124  * @brief Matrix adaptor.
125  *
126  * \code
127  * MatrixAdaptor mat = MatrixAdaptor(3, 3,
128  * ublas::shallow_array_adaptor<double>(9, ptr));
129  * \endcode
130  *
131  */
133 
134 } // namespace Types
135 
136 using namespace Types;
137 
138 } // namespace MoFEM
139 
140 #endif // __TYPES_HPP__
UBlasMatrix< double >
MoFEM::Types::VectorDouble6
VectorBoundedArray< double, 6 > VectorDouble6
Definition: Types.hpp:95
MoFEM::Types::PetscGlobalDofIdx
int PetscGlobalDofIdx
Index of DOF using global pets index.
Definition: Types.hpp:21
MoFEM::Types::MatrixComplexDouble
UBlasMatrix< std::complex< double > > MatrixComplexDouble
Definition: Types.hpp:78
MoFEM::Types::VectorDouble3
VectorBoundedArray< double, 3 > VectorDouble3
Definition: Types.hpp:92
MoFEM::Types::MatrixShallowArrayAdaptor
ublas::matrix< double, ublas::row_major, ublas::shallow_array_adaptor< double > > MatrixShallowArrayAdaptor
Definition: Types.hpp:121
FTensor::row_major
@ row_major
Definition: Layout.hpp:13
MatrixBoundedArray< adouble, 9 >
MoFEM::Types::BitProblemId
std::bitset< BITPROBLEMID_SIZE > BitProblemId
Problem Id.
Definition: Types.hpp:44
MoFEM::Types::VectorInt5
VectorBoundedArray< int, 5 > VectorInt5
Definition: Types.hpp:89
MoFEM::Types::BitFieldId
std::bitset< BITFIELDID_SIZE > BitFieldId
Field Id.
Definition: Types.hpp:42
MoFEM::Types::VectorIntAdaptor
VectorShallowArrayAdaptor< int > VectorIntAdaptor
Definition: Types.hpp:116
MoFEM::Types::FEIdx
int FEIdx
Index of the element.
Definition: Types.hpp:22
MoFEM::Types::BitFEId
std::bitset< BITFEID_SIZE > BitFEId
Finite element Id.
Definition: Types.hpp:43
MoFEM::Types::VectorInt3
VectorBoundedArray< int, 3 > VectorInt3
Definition: Types.hpp:87
MoFEM::Types::MoFEMDofIdx
int MoFEMDofIdx
Index of DOF using mofem native index.
Definition: Types.hpp:19
MoFEM::Types::MatrixADouble
UBlasMatrix< adouble > MatrixADouble
Definition: Types.hpp:80
MoFEM
implementation of Data Operators for Forces and Sources
Definition: Common.hpp:10
MoFEM::Types::ShortId
int ShortId
Unique Id in the field.
Definition: Types.hpp:32
MoFEM::Types::EntPart
int EntPart
Partition owning entity.
Definition: Types.hpp:24
MoFEM::Types::VectorInt9
VectorBoundedArray< int, 9 > VectorInt9
Definition: Types.hpp:91
MoFEM::Types::UId
uint128_t UId
Unique Id.
Definition: Types.hpp:31
MoFEM::Types::MatrixInt
UBlasMatrix< int > MatrixInt
Definition: Types.hpp:76
double
MoFEM::Types::FieldCoefficientsNumber
int FieldCoefficientsNumber
Number of field coefficients.
Definition: Types.hpp:27
MoFEM::Types::EntIdx
int EntIdx
Index of DOF on the entity.
Definition: Types.hpp:23
MoFEM::Types::VectorInt6
VectorBoundedArray< int, 6 > VectorInt6
Definition: Types.hpp:90
MoFEM::Types::UBlasMatrix
ublas::matrix< T, ublas::row_major, VecAllocator< T > > UBlasMatrix
Definition: Types.hpp:75
MoFEM::Types::VectorAdaptor
VectorShallowArrayAdaptor< double > VectorAdaptor
Definition: Types.hpp:115
MoFEM::Types::DoubleAllocator
VecAllocator< double > DoubleAllocator
Definition: Types.hpp:62
MoFEM::Types::VectorADouble9
VectorBoundedArray< adouble, 9 > VectorADouble9
Definition: Types.hpp:99
MoFEM::Types::VecAllocator
std::vector< T, std::allocator< T > > VecAllocator
Definition: Types.hpp:59
MoFEM::Types::MatrixComplexDouble3by3
MatrixBoundedArray< std::complex< double >, 9 > MatrixComplexDouble3by3
Definition: Types.hpp:106
MoFEM::Types::BitIntefaceId
std::bitset< BITINTERFACEUID_SIZE > BitIntefaceId
Definition: Types.hpp:45
MoFEM::Types::VectorBoundedArray
ublas::vector< T, ublas::bounded_array< T, N > > VectorBoundedArray
Definition: Types.hpp:85
MoFEM::Types::VectorDouble5
VectorBoundedArray< double, 5 > VectorDouble5
Definition: Types.hpp:94
MoFEM::Types::CubitBCType
std::bitset< 32 > CubitBCType
Definition: Types.hpp:52
MoFEM::Types::ApproximationOrder
int ApproximationOrder
Approximation on the entity.
Definition: Types.hpp:26
MoFEM::Types::PetscLocalDofIdx
int PetscLocalDofIdx
Index of DOF using local petsc index.
Definition: Types.hpp:20
MoFEM::Types::UBlasVector
ublas::vector< T, VecAllocator< T > > UBlasVector
Definition: Types.hpp:66
MoFEM::Types::BitRefEdges
std::bitset< BITREFEDGES_SIZE > BitRefEdges
Definition: Types.hpp:34
MoFEM::Types::VectorInt
UBlasVector< int > VectorInt
Definition: Types.hpp:67
MoFEM::Types::FieldBitNumber
char FieldBitNumber
Field bit number.
Definition: Types.hpp:28
MatrixBoundedArray< double, 9 >
UBlasVector< double >
MoFEM::Types::FieldData
double FieldData
Field data type.
Definition: Types.hpp:25
MoFEM::Types::IntAllocator
VecAllocator< int > IntAllocator
Definition: Types.hpp:61
MoFEM::Types::ComplexDoubleAllocator
VecAllocator< std::complex< double > > ComplexDoubleAllocator
Definition: Types.hpp:63
MoFEM::Types::VectorShallowArrayAdaptor
ublas::vector< T, ublas::shallow_array_adaptor< T > > VectorShallowArrayAdaptor
Definition: Types.hpp:114
MoFEM::Types::MatrixAdaptor
MatrixShallowArrayAdaptor< double > MatrixAdaptor
Matrix adaptor.
Definition: Types.hpp:132
MoFEM::Types::BitRefLevel
std::bitset< BITREFLEVEL_SIZE > BitRefLevel
Bit structure attached to each entity identifying to what mesh entity is attached.
Definition: Types.hpp:40
MoFEM::Types::VectorADouble
UBlasVector< adouble > VectorADouble
Definition: Types.hpp:71
MoFEM::Types::VectorDouble9
VectorBoundedArray< double, 9 > VectorDouble9
Definition: Types.hpp:96
MoFEM::Types::VectorInt4
VectorBoundedArray< int, 4 > VectorInt4
Definition: Types.hpp:88
MoFEM::Types::VectorComplexDouble
UBlasVector< std::complex< double > > VectorComplexDouble
Definition: Types.hpp:69
MoFEM::Types::MatrixBoundedArray
ublas::matrix< T, ublas::row_major, ublas::bounded_array< T, N > > MatrixBoundedArray
Definition: Types.hpp:104
MoFEM::Types::VectorDouble4
VectorBoundedArray< double, 4 > VectorDouble4
Definition: Types.hpp:93
MoFEM::Types::VectorDouble12
VectorBoundedArray< double, 12 > VectorDouble12
Definition: Types.hpp:97
MoFEM::Types::DofIdx
int DofIdx
Index of DOF.
Definition: Types.hpp:18