template<int n, int k, typename Sint = unsigned short, typename Tint = unsigned char>
class TPCC::Element< n, k, Sint, Tint >
Tensor coordinates for a facet of dimension k
in the complex of dimension n
.
Each element is characterized by its orientation and its position in the complex. The orientation is described by a combination of k
coordinates which span the element. It has no extension across these coordinates.
The coordinates of an Element are stored in the array positions. Its length is n
and it is ordered the same way as the coordinates in the whole chain complex. Thus, the first entry in there refers to the 'global' first coordinate, no matter whether this is a coordinate direction in which the Element extends. These global coordinates are accessed by operator[]().
The k
local coordinates of the Element in the directions in which it extends are accessed by along_coordinate(). Their global counterparts are numbered by along_direction().
The n-k
coordinates orthogonal to the element are accessed by across_coordinate(). The corresponding global directions are numbered by across_direction().
An imbortant feature of Element is that you can obtain an Element object for each of its boundary elements through facet().
- Template Parameters
-
n | The dimension of the tensor chain complex |
k | The dimension of this element |
Sint | The integer type used for indexing in a single fiber |
Tint | The integer type used for indexing fibers, directions, etc. |
template<int n, int k, typename Sint = unsigned short, typename Tint = unsigned char>
constexpr Tint TPCC::Element< n, k, Sint, Tint >::along_direction |
( |
Tint |
index | ) |
const |
|
inlineconstexpr |
Mapping from local to global coordinate directions.
The Element extends along k
integer coordinates, which are mapped through orientation to the n
integer coordinates of the complex. This function maps the local coordinate direction of the Element to the global direction in the chain complex.
template<int n, int k, typename Sint = unsigned short, typename Tint = unsigned char>
constexpr Element<n, k - 1, Sint, Tint> TPCC::Element< n, k, Sint, Tint >::facet |
( |
Tint |
index | ) |
const |
|
inlineconstexpr |
Enumeration of the boundary facets of the element.
Such a boundary facet shares all directions into which it extends, except one. Conversely, it is orthogonal to the same coordinate directions plus one. It has the same one-dimensional coordinates for all shared directions. For the one direction which was eliminated, the coordinate is either the same as for the element for the lower boundary, or plus one for the upper.
template<int n, int k, typename Sint = unsigned short, typename Tint = unsigned char>
Function for printing the data stored in the element.
The format used is within enclosing parentheses as follows:
-
Each
along_direction
in order
-
A colon
-
Each
across_direction
in order
-
A space
-
Coordinates from 0 to
n-1
separated by commas
- Note
- This function is also used in the consistency tests, therefore, the comparison data must be changed if the output format is changed.
template<int n, int k, typename Sint = unsigned short, typename Tint = unsigned char>
template<int , int , typename , typename , typename >
template<int n, int k, typename Sint = unsigned short, typename Tint = unsigned char>
A Combination enumerating the coordinate directions along which the element is aligned.
Since combinations are generated in descending order, coordinates usually are referenced in ascending order, the directions are actually not the value in the combination or its complement. The index i
returned by the combination is immediately replaced by n-1-i
.