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

A slab of thickness one cell cut out of a tensor product chain complex. More...

#include <element.h>

Collaboration diagram for TPCC::Slab< n, k, Bint, Sint, Tint >:
Collaboration graph
[legend]

Public Member Functions

constexpr Slab (const Lexicographic< n, k, Bint, Sint, Tint > &from, const std::array< Tint, n - 1 > directions, const std::array< bool, n - 1 > &reverse, Tint normal_direction, Sint normal_coordinate)
 
constexpr Bint size () const
 
constexpr Bint block_size (Tint block) const
 The number of elements in one direction. More...
 
constexpr Element< n, k, Sint, Tint > operator[] (Bint index) const
 The element at position index, in the coordinates of the whole chain complex. More...
 

Private Types

typedef Lexicographic< n, k, Bint, Sint, Tint > super_class
 

Static Private Member Functions

static constexpr std::array< Sint, n - 1 > aux_dimensions (const Lexicographic< n, k, Bint, Sint, Tint > &from, const std::array< Tint, n - 1 > &directions)
 Compute the dimensions of the auxiliary object. More...
 

Private Attributes

const Lexicographic< n, k, Bint, Sint, Tint > & superset
 
const std::array< Tint, n - 1 > directions
 
const std::array< bool, n - 1 > reverse
 
const Tint normal_direction
 
const Sint normal_coordinate
 
const Lexicographic< n - 1,((k > 0) ? k - 1 :0), Bint, Sint, Tint > aux
 
std::array< Bint, binomial(n, k)> block_sizes
 The number of objects facing the same directions. More...
 

Detailed Description

template<int n, int k, typename Bint = unsigned int, typename Sint = unsigned short, typename Tint = unsigned char>
class TPCC::Slab< n, k, Bint, Sint, Tint >

A slab of thickness one cell cut out of a tensor product chain complex.

A slab is a submesh of (topological) codimension 1 cut out of an n-dimensional mesh. It is characterized by its normal_direction, the one missing from the complex, and the normal_coordinate, the position along the normal_direction. It only consists of elements which extend in the normal direction. In this respect, it differs from a CutPlane which contains elements within a hyperplane characterized by the same data.

Note
The data member superset is currently a reference, which might become outdated. We could replace it by some kind of smartpointer, but this induces overhead. AS of now, the focus of this project is on minimal overhead, such that we can use the functions for the managing of high order cochain finite elements on each mesh cell. Thus, we trade off safety for efficiency until there is a better idea.

Member Typedef Documentation

◆ super_class

template<int n, int k, typename Bint = unsigned int, typename Sint = unsigned short, typename Tint = unsigned char>
typedef Lexicographic<n, k, Bint, Sint, Tint> TPCC::Slab< n, k, Bint, Sint, Tint >::super_class
private

Constructor & Destructor Documentation

◆ Slab()

template<int n, int k, typename Bint = unsigned int, typename Sint = unsigned short, typename Tint = unsigned char>
constexpr TPCC::Slab< n, k, Bint, Sint, Tint >::Slab ( const Lexicographic< n, k, Bint, Sint, Tint > &  from,
const std::array< Tint, n - 1 >  directions,
const std::array< bool, n - 1 > &  reverse,
Tint  normal_direction,
Sint  normal_coordinate 
)
inlineconstexpr

Member Function Documentation

◆ aux_dimensions()

template<int n, int k, typename Bint = unsigned int, typename Sint = unsigned short, typename Tint = unsigned char>
static constexpr std::array<Sint, n - 1> TPCC::Slab< n, k, Bint, Sint, Tint >::aux_dimensions ( const Lexicographic< n, k, Bint, Sint, Tint > &  from,
const std::array< Tint, n - 1 > &  directions 
)
inlinestaticconstexprprivate

Compute the dimensions of the auxiliary object.

Here is the call graph for this function:

◆ block_size()

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

The number of elements in one direction.

◆ operator[]()

template<int n, int k, typename Bint = unsigned int, typename Sint = unsigned short, typename Tint = unsigned char>
constexpr Element<n, k, Sint, Tint> TPCC::Slab< n, k, Bint, Sint, Tint >::operator[] ( Bint  index) const
inlineconstexpr

The element at position index, in the coordinates of the whole chain complex.

The index refers to lexicographic ordering in the local coordinates of the Slab, as defined by directions and reverse. The Element returned has its coordinates in the superset. Thus, it contains a field for a coordinate normal_direction and the value of this coordinate is always normal_coordinate.

Here is the call graph for this function:

◆ size()

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

Member Data Documentation

◆ aux

template<int n, int k, typename Bint = unsigned int, typename Sint = unsigned short, typename Tint = unsigned char>
const Lexicographic<n - 1, ((k > 0) ? k - 1 : 0), Bint, Sint, Tint> TPCC::Slab< n, k, Bint, Sint, Tint >::aux
private

◆ block_sizes

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

The number of objects facing the same directions.

◆ directions

template<int n, int k, typename Bint = unsigned int, typename Sint = unsigned short, typename Tint = unsigned char>
const std::array<Tint, n - 1> TPCC::Slab< n, k, Bint, Sint, Tint >::directions
private

◆ normal_coordinate

template<int n, int k, typename Bint = unsigned int, typename Sint = unsigned short, typename Tint = unsigned char>
const Sint TPCC::Slab< n, k, Bint, Sint, Tint >::normal_coordinate
private

◆ normal_direction

template<int n, int k, typename Bint = unsigned int, typename Sint = unsigned short, typename Tint = unsigned char>
const Tint TPCC::Slab< n, k, Bint, Sint, Tint >::normal_direction
private

◆ reverse

template<int n, int k, typename Bint = unsigned int, typename Sint = unsigned short, typename Tint = unsigned char>
const std::array<bool, n - 1> TPCC::Slab< n, k, Bint, Sint, Tint >::reverse
private

◆ superset

template<int n, int k, typename Bint = unsigned int, typename Sint = unsigned short, typename Tint = unsigned char>
const Lexicographic<n, k, Bint, Sint, Tint>& TPCC::Slab< n, k, Bint, Sint, Tint >::superset
private

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