Basix 0.10.0.0

Home     Installation     Demos     C++ docs     Python docs

basix::indexing Namespace Reference

Indexing. More...

Functions

constexpr int idx (int p)
 Compute trivial indexing in a 1D array (for completeness). More...
 
constexpr int idx (int p, int q)
 
constexpr int idx (int p, int q, int r)
 Compute indexing in a 3D tetrahedral array compressed into a 1D array. More...
 

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.