Loading...
Searching...
No Matches
basix::indexing Namespace Reference

Indexing. More...

## Functions

constexpr int | idx (int p)
| Compute trivial indexing in a 1D array (for completeness).
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.

## Detailed Description

Indexing.

## Function Documentation

## idx() [1/3]

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

constexpr

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

Parameters

  p | Index in x

Returns
  1D Index

## idx() [2/3]

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

  p | Index in x
  q | Index in y

Returns
  1D Index

## idx() [3/3]

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

constexpr

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

Parameters

  p | Index in x.
  q | Index in y.
  r | Index in z.

Returns
  1D Index.