Note: this is documentation for an old release. View the latest documentation at docs.fenicsproject.org/basix/v0.9.0/cpp/namespacebasix_1_1indexing.html

Basix 0.5.0

Home     Installation     Demos     C++ docs     Python docs

Functions
basix::indexing Namespace Reference

Indexing. More...

Functions

constexpr int idx (int p)
 
constexpr int idx (int p, int q)
 
constexpr int idx (int p, int q, int r)
 

Detailed Description

Indexing.

Function Documentation

◆ idx() [1/3]

constexpr int basix::indexing::idx ( int  p)
constexpr

Compute trivial indexing in a 1D array (for completeness)

Parameters
pIndex in x
Returns
1D Index

◆ idx() [2/3]

constexpr int basix::indexing::idx ( int  p,
int  q 
)
constexpr

Compute indexing in a 2D triangular array compressed into a 1D array. This can be used to find the index of a derivative returned by FiniteElement::tabulate. For instance to find d2N/dx2, use FiniteElement::tabulate(2, points)[idx(2, 0)];

Parameters
pIndex in x
qIndex in y
Returns
1D Index

◆ idx() [3/3]

constexpr int basix::indexing::idx ( int  p,
int  q,
int  r 
)
constexpr

Compute indexing in a 3D tetrahedral array compressed into a 1D array

Parameters
pIndex in x
qIndex in y
rIndex in z
Returns
1D Index