HyperHDG
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
TPCC::Lexicographic< n, k, bnd, Bint, Sint, Tint > Class Template Reference

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
 

Detailed Description

template<int n, int k, boundaries bnd = both, typename Bint = unsigned int, typename Sint = unsigned short, typename Tint = unsigned char>
class TPCC::Lexicographic< n, k, bnd, Bint, Sint, Tint >

Lexicographic enumeration of the k-dimensional faces in a tensor product chain complex of dimension n.

Template Parameters
nThe dimension of the tensor product (the order of the tensor)
kThe dimensions of the object considered
BintThe big integer used for addressing in the whole tensor product
SintThe small integer used for addressing in each fiber
TintThe 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.

Member Typedef Documentation

◆ dimension_index_t

template<int n, int k, boundaries bnd = both, typename Bint = unsigned int, typename Sint = unsigned short, typename Tint = unsigned char>
typedef Tint TPCC::Lexicographic< n, k, bnd, Bint, Sint, Tint >::dimension_index_t

Index type for addressing dimensions and elements of the chain complex.

◆ fiber_index_t

template<int n, int k, boundaries bnd = both, typename Bint = unsigned int, typename Sint = unsigned short, typename Tint = unsigned char>
typedef Sint TPCC::Lexicographic< n, k, bnd, Bint, Sint, Tint >::fiber_index_t

Index type for addressing in the fibers.

◆ global_index_t

template<int n, int k, boundaries bnd = both, typename Bint = unsigned int, typename Sint = unsigned short, typename Tint = unsigned char>
typedef Bint TPCC::Lexicographic< n, k, bnd, Bint, Sint, Tint >::global_index_t

Index type for addressing in the tensor product.

◆ value_type

template<int n, int k, boundaries bnd = both, typename Bint = unsigned int, typename Sint = unsigned short, typename Tint = unsigned char>
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.

Constructor & Destructor Documentation

◆ Lexicographic()

template<int n, int k, boundaries bnd = both, typename Bint = unsigned int, typename Sint = unsigned short, typename Tint = unsigned char>
constexpr TPCC::Lexicographic< n, k, bnd, Bint, Sint, Tint >::Lexicographic ( const std::array< Sint, n > &  d)
inlineconstexpr

Constructor setting the dimensions of the complex.

Member Function Documentation

◆ block_size()

template<int n, int k, boundaries bnd = both, typename Bint = unsigned int, typename Sint = unsigned short, typename Tint = unsigned char>
constexpr Bint TPCC::Lexicographic< n, k, bnd, Bint, Sint, Tint >::block_size ( Tint  block) const
inlineconstexpr

The number of elements in one direction.

◆ boundary()

template<int n, int k, boundaries bnd = both, typename Bint = unsigned int, typename Sint = unsigned short, typename Tint = unsigned char>
template<boundaries bndT = bnd>
constexpr Lexicographic<n, k - 1, bndT, Bint, Sint, Tint> TPCC::Lexicographic< n, k, bnd, Bint, Sint, Tint >::boundary ( ) const
inlineconstexpr

◆ cell_dimension()

template<int n, int k, boundaries bnd = both, typename Bint = unsigned int, typename Sint = unsigned short, typename Tint = unsigned char>
static constexpr Tint TPCC::Lexicographic< n, k, bnd, Bint, Sint, Tint >::cell_dimension ( )
inlinestaticconstexpr

The dimension of the elements, index in the chain complex.

◆ fiber_dimension()

template<int n, int k, boundaries bnd = both, typename Bint = unsigned int, typename Sint = unsigned short, typename Tint = unsigned char>
constexpr Sint TPCC::Lexicographic< n, k, bnd, Bint, Sint, Tint >::fiber_dimension ( Tint  i) const
inlineconstexpr

Dimension of the fiber with given index in the tensor product.

◆ index()

template<int n, int k, boundaries bnd, typename Bint , typename Sint , typename Tint >
Bint TPCC::Lexicographic< n, k, bnd, Bint, Sint, Tint >::index ( const value_type e) const

Find index of a given element.

◆ index_in_slice()

template<int n, int k, boundaries bnd = both, typename Bint = unsigned int, typename Sint = unsigned short, typename Tint = unsigned char>
Bint TPCC::Lexicographic< n, k, bnd, Bint, Sint, Tint >::index_in_slice ( const value_type e) const
inline

◆ operator[]()

template<int n, int k, boundaries bnd, typename Bint , typename Sint , typename Tint >
Element< n, k, Sint, Tint > TPCC::Lexicographic< n, k, bnd, Bint, Sint, Tint >::operator[] ( Bint  index) const

Descriptor for the element at given index.

◆ order()

template<int n, int k, boundaries bnd = both, typename Bint = unsigned int, typename Sint = unsigned short, typename Tint = unsigned char>
static constexpr Tint TPCC::Lexicographic< n, k, bnd, Bint, Sint, Tint >::order ( )
inlinestaticconstexpr

The tensor order of the chain complex.

◆ size()

template<int n, int k, boundaries bnd = both, typename Bint = unsigned int, typename Sint = unsigned short, typename Tint = unsigned char>
constexpr Bint TPCC::Lexicographic< n, k, bnd, Bint, Sint, Tint >::size ( ) const
inlineconstexpr

The number of elements in this set.

Member Data Documentation

◆ block_sizes

template<int n, int k, boundaries bnd = both, typename Bint = unsigned int, typename Sint = unsigned short, typename Tint = unsigned char>
std::array<Bint, binomial(n, k)> TPCC::Lexicographic< n, k, bnd, Bint, Sint, Tint >::block_sizes
private

The number of objects facing the same directions.

◆ block_sizes_bnd

template<int n, int k, boundaries bnd = both, typename Bint = unsigned int, typename Sint = unsigned short, typename Tint = unsigned char>
std::array<Bint, binomial(n, k)> TPCC::Lexicographic< n, k, bnd, Bint, Sint, Tint >::block_sizes_bnd
private

◆ dimensions

template<int n, int k, boundaries bnd = both, typename Bint = unsigned int, typename Sint = unsigned short, typename Tint = unsigned char>
std::array<Sint, n> TPCC::Lexicographic< n, k, bnd, Bint, Sint, Tint >::dimensions
private

The dimension of the fibers in each direction.


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