PyramidIndex
Indexing of the tensor-product modes on the reference pyramid.
Defined in Rodin/Variational/H1/H1Element.hpp
template < size_t K> struct PyramidIndex;
Public types
- struct IJ
- Pair of tensor-product indices of a pyramid mode.
Public static variables
- static size_t Count constexpr
- Number of entries.
Public static functions
- static auto getLayerOffset(size_t layer) -> size_t constexpr
- Gets the index offset of a pyramid layer.
- static auto getIndex(size_t i, size_t j, size_t k) -> size_t constexpr
- Gets the linear index of a tensor-product mode.
- static void decode(size_t idx, size_t& i, size_t& j, size_t& k) constexpr
- Decodes a linear index into its tensor-product indices.
- static auto getTriangleLattice(size_t alpha) -> IJ constexpr
- Gets the number of modes on a triangular lattice.
- static auto getSideIndex(size_t local, size_t alpha) -> size_t constexpr
- Gets the index of a mode on a pyramid side.
Function documentation
static size_t getLayerOffset(size_t layer) constexpr
Gets the index offset of a pyramid layer.
| Parameters | |
|---|---|
| layer | Lattice layer index. |
| Returns | The index offset of a pyramid layer. |
static size_t getIndex(size_t i, size_t j, size_t k) constexpr
Gets the linear index of a tensor-product mode.
| Parameters | |
|---|---|
| i | Index of the requested entry. |
| j | Index of the second coordinate. |
| k | Index of the requested lattice entry. |
| Returns | The linear index of a tensor-product mode. |
static void decode(size_t idx, size_t& i, size_t& j, size_t& k) constexpr
Decodes a linear index into its tensor-product indices.
| Parameters | |
|---|---|
| idx | Index of the requested entry. |
| i | Index of the requested entry. |
| j | Index of the second coordinate. |
| k | Storage for the decoded lattice index. |
static IJ getTriangleLattice(size_t alpha) constexpr
Gets the number of modes on a triangular lattice.
| Parameters | |
|---|---|
| alpha | Basis or lattice index in the reference element. |
| Returns | The number of modes on a triangular lattice. |
static size_t getSideIndex(size_t local, size_t alpha) constexpr
Gets the index of a mode on a pyramid side.
| Parameters | |
|---|---|
| local | Index in the local numbering. |
| alpha | Basis or lattice index in the reference element. |
| Returns | The index of a mode on a pyramid side. |