HyperHDG
|
Lexicographic enumeration of the k
-dimensional faces in a tensor product chain complex of dimension n
.
More...
#include <lexicographic.h>
Public Types | |
typedef Bint | global_index_t |
Index type for addressing in the tensor product. More... | |
typedef Sint | fiber_index_t |
Index type for addressing in the fibers. More... | |
typedef Tint | dimension_index_t |
Index type for addressing dimensions and elements of the chain complex. More... | |
typedef Element< n, k, Sint, Tint > | value_type |
The type of elements of this set in the complex. More... | |
Public Member Functions | |
constexpr | Lexicographic (const std::array< Sint, n > &d) |
Constructor setting the dimensions of the complex. More... | |
constexpr Bint | size () const |
The number of elements in this set. More... | |
constexpr Bint | block_size (Tint block) const |
The number of elements in one direction. More... | |
constexpr Sint | fiber_dimension (Tint i) const |
Dimension of the fiber with given index in the tensor product. More... | |
value_type | operator[] (Bint index) const |
Descriptor for the element at given index . More... | |
Bint | index_in_slice (const value_type &e) const |
Bint | index (const value_type &e) const |
Find index of a given element. More... | |
template<boundaries bndT = bnd> | |
constexpr Lexicographic< n, k - 1, bndT, Bint, Sint, Tint > | boundary () const |
Static Public Member Functions | |
static constexpr Tint | order () |
The tensor order of the chain complex. More... | |
static constexpr Tint | cell_dimension () |
The dimension of the elements, index in the chain complex. More... | |
Private Attributes | |
std::array< Sint, n > | dimensions |
The dimension of the fibers in each direction. More... | |
std::array< Bint, binomial(n, k)> | block_sizes |
The number of objects facing the same directions. More... | |
std::array< Bint, binomial(n, k)> | block_sizes_bnd |
Lexicographic enumeration of the k
-dimensional faces in a tensor product chain complex of dimension n
.
n | The dimension of the tensor product (the order of the tensor) |
k | The dimensions of the object considered |
Bint | The big integer used for addressing in the whole tensor product |
Sint | The small integer used for addressing in each fiber |
Tint | The tiny integer with values addressing the fibers |
The numbering for k==0
and k==n
is lexicographic with the first coordinate changing fastest and the last one slowest. For k
between those values, the set of elements consists of n
over k
separate sets, one for each combination of k
different coordinates.
These sets form the slowest moving part of the enumeration, and they are enumerated based such that the elements orthogonal to the first n-k
coordinates are first, those orthogonal to the last coordinates last.
The next level in the enumaration is formed by the fact that these sets can be split into 'sheets', connected sets which are not connected to each other. They are characterized by their coordinates orthogonal to the chosen k
. Thus, their enumeration follows a lexicographic scheme with first fastest for these coordinates.
The fastes level of enumeration is inside each sheet, where again the first coordinates run fastest.
typedef Tint TPCC::Lexicographic< n, k, bnd, Bint, Sint, Tint >::dimension_index_t |
Index type for addressing dimensions and elements of the chain complex.
typedef Sint TPCC::Lexicographic< n, k, bnd, Bint, Sint, Tint >::fiber_index_t |
Index type for addressing in the fibers.
typedef Bint TPCC::Lexicographic< n, k, bnd, Bint, Sint, Tint >::global_index_t |
Index type for addressing in the tensor product.
typedef Element<n, k, Sint, Tint> TPCC::Lexicographic< n, k, bnd, Bint, Sint, Tint >::value_type |
The type of elements of this set in the complex.
|
inlineconstexpr |
Constructor setting the dimensions of the complex.
|
inlineconstexpr |
The number of elements in one direction.
|
inlineconstexpr |
|
inlinestaticconstexpr |
The dimension of the elements, index in the chain complex.
|
inlineconstexpr |
Dimension of the fiber with given index in the tensor product.
Bint TPCC::Lexicographic< n, k, bnd, Bint, Sint, Tint >::index | ( | const value_type & | e | ) | const |
Find index of a given element.
|
inline |
Element< n, k, Sint, Tint > TPCC::Lexicographic< n, k, bnd, Bint, Sint, Tint >::operator[] | ( | Bint | index | ) | const |
Descriptor for the element at given index
.
|
inlinestaticconstexpr |
The tensor order of the chain complex.
|
inlineconstexpr |
The number of elements in this set.
|
private |
The number of objects facing the same directions.
|
private |
|
private |
The dimension of the fibers in each direction.