template<size_t K>
Rodin::Variational::PyramidIndex struct

Indexing of the tensor-product modes on the reference pyramid.

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

template<size_t K>
static size_t Rodin::Variational::PyramidIndex<K>::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.

template<size_t K>
static size_t Rodin::Variational::PyramidIndex<K>::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.

template<size_t K>
static void Rodin::Variational::PyramidIndex<K>::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.

template<size_t K>
static IJ Rodin::Variational::PyramidIndex<K>::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.

template<size_t K>
static size_t Rodin::Variational::PyramidIndex<K>::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.