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