Go to the documentation of this file.
12 #pragma once // Ensure that file is included only once in a single compilation.
27 unsigned int binomial(
unsigned int n,
unsigned int k)
29 return TPCC::binomial<unsigned int>(n, k);
39 template <
unsigned int hyEdge_dim,
40 unsigned int space_dim,
42 typename index_t =
unsigned int>
48 template <
unsigned int hyEdge_dim,
unsigned int space_dim>
58 template <
unsigned int hyEdge_dim,
59 unsigned int space_dim,
61 typename index_t =
unsigned int>
64 static_assert(space_dim >= hyEdge_dim,
"Hypercube dim must not be bigger than spatial dim!");
71 template <
typename TPCC::boundaries bndT>
74 return elements.template boundary<bndT>();
79 template <
typename index_t =
unsigned int>
95 <<
"size, which is " << tpcc.size() <<
".");
96 return tpcc.operator[](
index);
101 template <
typename index_t =
unsigned int>
104 index_t
index = tpcc.index(elem);
105 hy_assert(
index < tpcc.size(),
"Returned index is larger than number of elements!");
111 template <
typename index_t =
unsigned int>
114 index_t
index = tpcc.index_in_slice(elem);
123 hy_assert(
index < elem.n_facets(),
"An element hast only " << elem.n_facets() <<
"facets. "
124 <<
"You requested number " <<
index
126 return elem.facet(
index);
133 return elem.direction_index();
141 "There are only " << elem.n_val - elem.k_val <<
" exterior directions.");
142 unsigned int acr_dir = elem.across_direction(
index);
144 "Exterior direction must be smaller than amount of spatial dimensions!");
153 "There are only " << elem.n_val - elem.k_val <<
" exterior directions.");
154 return elem.across_coordinate(
index);
162 "There are only " << elem.n_val - elem.k_val <<
" exterior directions.");
163 return elem.along_coordinate(
index);
Tensor coordinates for a facet of dimension k in the complex of dimension n.
Definition: element.h:38
This file provides the function hy_assert.
A namespace containing the different wrapper functions.
Definition: lapack.hxx:20
index
Definition: check_push_test.py:10
index_t get_index(const auto &tpcc, const auto &elem)
Return index of given element within TPCC.
Definition: tpcc.hxx:102
@ both
Definition: lexicographic.h:11
index_t get_index_in_slice(const auto &tpcc, const auto &elem)
Return index of given element within TPCC.
Definition: tpcc.hxx:112
boundaries
Definition: lexicographic.h:9
unsigned int exterior_coordinate(const auto &elem, const unsigned int index)
Return coordinate value with respect to index-th orthonormal direction on element.
Definition: tpcc.hxx:150
auto get_face(const auto &elem, const unsigned int index)
Return i-th element facet.
Definition: tpcc.hxx:121
auto tpcc_faces(const auto &elements)
Create a tensor product chain complex associated to the facets.
Definition: tpcc.hxx:72
unsigned int interior_coordinate(const auto &elem, const unsigned int index)
Return coordinate value with respect to index-th orthonormal direction of element.
Definition: tpcc.hxx:159
auto get_element(const auto &tpcc, const auto index)
Return the element of given index the TPCC.
Definition: tpcc.hxx:92
index_t n_elements(const auto &tpcc)
Return the element of given index the TPCC.
Definition: tpcc.hxx:80
unsigned int binomial(unsigned int n, unsigned int k)
Binomial coefficient of unsigned integers.
Definition: tpcc.hxx:27
Lexicographic enumeration of the k-dimensional faces in a tensor product chain complex of dimension n...
Definition: lexicographic.h:44
std::array< mat_entry_t, size()> & data()
Return data array that allows to manipulate the SmallMat.
Definition: dense_la.hxx:190
#define hy_assert(Expr, Msg)
The assertion to be used within HyperHDG — deactivate using -DNDEBUG compile flag.
Definition: hy_assert.hxx:38
TPCC::Lexicographic< space_dim, hyEdge_dim, bndT, index_t, unsigned int, unsigned int > tpcc_t
Type of a tensor product chain complex.
Definition: tpcc.hxx:44
unsigned int elem_orientation(const auto &elem)
Determine the orientation of an element.
Definition: tpcc.hxx:131
tpcc_t< hyEdge_dim, space_dim, bndT, index_t > create_tpcc(const SmallVec< space_dim, index_t > &vec)
Create a tensor product chain complex.
Definition: tpcc.hxx:62
This class implements a small/dense matrix.
Definition: dense_la.hxx:34
unsigned int exterior_direction(const auto &elem, const unsigned int index)
Return the index-th orthonormal direction to element.
Definition: tpcc.hxx:138