CeedBasis

int CeedBasisGetCollocatedGrad(CeedBasis basis, CeedScalar *collo_grad_1d)

Return collocated grad matrix.

Backend Developer Functions

Parameters
  • basis[in] CeedBasis

  • collo_grad_1d[out] Row-major (Q_1d * Q_1d) matrix expressing derivatives of basis functions at quadrature points

Returns

An error code: 0 - success, otherwise - failure

int CeedBasisIsTensor(CeedBasis basis, bool *is_tensor)

Get tensor status for given CeedBasis.

Backend Developer Functions

Parameters
  • basis[in] CeedBasis

  • is_tensor[out] Variable to store tensor status

Returns

An error code: 0 - success, otherwise - failure

int CeedBasisGetData(CeedBasis basis, void *data)

Get backend data of a CeedBasis.

Backend Developer Functions

Parameters
  • basis[in] CeedBasis

  • data[out] Variable to store data

Returns

An error code: 0 - success, otherwise - failure

int CeedBasisSetData(CeedBasis basis, void *data)

Set backend data of a CeedBasis.

Backend Developer Functions

Parameters
  • basis[inout] CeedBasis

  • data[in] Data to set

Returns

An error code: 0 - success, otherwise - failure

int CeedBasisReference(CeedBasis basis)

Increment the reference counter for a CeedBasis.

Backend Developer Functions

Parameters
  • basis[inout] Basis to increment the reference counter

Returns

An error code: 0 - success, otherwise - failure

int CeedBasisGetFlopsEstimate(CeedBasis basis, CeedTransposeMode t_mode, CeedEvalMode eval_mode, CeedSize *flops)

Estimate number of FLOPs required to apply CeedBasis in t_mode and eval_mode.

Backend Developer Functions

Parameters
  • basis[in] Basis to estimate FLOPs for

  • t_mode[in] Apply basis or transpose

  • eval_mode[in] Basis evaluation mode

  • flops[out] Address of variable to hold FLOPs estimate

int CeedBasisGetTopologyDimension(CeedElemTopology topo, CeedInt *dim)

Get dimension for given CeedElemTopology.

Backend Developer Functions

Parameters
  • topo[in] CeedElemTopology

  • dim[out] Variable to store dimension of topology

Returns

An error code: 0 - success, otherwise - failure

int CeedBasisGetTensorContract(CeedBasis basis, CeedTensorContract *contract)

Get CeedTensorContract of a CeedBasis.

Backend Developer Functions

Parameters
  • basis[in] CeedBasis

  • contract[out] Variable to store CeedTensorContract

Returns

An error code: 0 - success, otherwise - failure

int CeedBasisSetTensorContract(CeedBasis basis, CeedTensorContract contract)

Set CeedTensorContract of a CeedBasis.

Backend Developer Functions

Parameters
  • basis[inout] CeedBasis

  • contract[in] CeedTensorContract to set

Returns

An error code: 0 - success, otherwise - failure

int CeedMatrixMatrixMultiply(Ceed ceed, const CeedScalar *mat_A, const CeedScalar *mat_B, CeedScalar *mat_C, CeedInt m, CeedInt n, CeedInt kk)

Return a reference implementation of matrix multiplication C = A B.

Note, this is a reference implementation for CPU CeedScalar pointers that is not intended for high performance.

Utility Functions

Parameters
  • ceed[in] Ceed context for error handling

  • mat_A[in] Row-major matrix A

  • mat_B[in] Row-major matrix B

  • mat_C[out] Row-major output matrix C

  • m[in] Number of rows of C

  • n[in] Number of columns of C

  • kk[in] Number of columns of A/rows of B

Returns

An error code: 0 - success, otherwise - failure

int CeedTensorContractCreate(Ceed ceed, CeedBasis basis, CeedTensorContract *contract)

Create a CeedTensorContract object for a CeedBasis.

Backend Developer Functions

Parameters
  • ceed[in] Ceed object where the CeedTensorContract will be created

  • basis[in] CeedBasis for which the tensor contraction will be used

  • contract[out] Address of the variable where the newly created CeedTensorContract will be stored.

Returns

An error code: 0 - success, otherwise - failure

int CeedTensorContractApply(CeedTensorContract contract, CeedInt A, CeedInt B, CeedInt C, CeedInt J, const CeedScalar *restrict t, CeedTransposeMode t_mode, const CeedInt add, const CeedScalar *restrict u, CeedScalar *restrict v)

Apply tensor contraction.

Contracts on the middle index NOTRANSPOSE: v_ajc = t_jb u_abc TRANSPOSE: v_ajc = t_bj u_abc If add != 0, “=” is replaced by “+=”

Backend Developer Functions

Parameters
  • contract[in] CeedTensorContract to use

  • A[in] First index of u, v

  • B[in] Middle index of u, one index of t

  • C[in] Last index of u, v

  • J[in] Middle index of v, one index of t

  • t[in] Tensor array to contract against

  • t_mode[in] Transpose mode for t, CEED_NOTRANSPOSE for t_jb CEED_TRANSPOSE for t_bj

  • add[in] Add mode

  • u[in] Input array

  • v[out] Output array

Returns

An error code: 0 - success, otherwise - failure

int CeedTensorContractGetCeed(CeedTensorContract contract, Ceed *ceed)

Get Ceed associated with a CeedTensorContract.

Backend Developer Functions

Parameters
  • contract[in] CeedTensorContract

  • ceed[out] Variable to store Ceed

Returns

An error code: 0 - success, otherwise - failure

int CeedTensorContractGetData(CeedTensorContract contract, void *data)

Get backend data of a CeedTensorContract.

Backend Developer Functions

Parameters
  • contract[in] CeedTensorContract

  • data[out] Variable to store data

Returns

An error code: 0 - success, otherwise - failure

int CeedTensorContractSetData(CeedTensorContract contract, void *data)

Set backend data of a CeedTensorContract.

Backend Developer Functions

Parameters
  • contract[inout] CeedTensorContract

  • data[in] Data to set

Returns

An error code: 0 - success, otherwise - failure

int CeedTensorContractReference(CeedTensorContract contract)

Increment the reference counter for a CeedTensorContract.

Backend Developer Functions

Parameters
  • contract[inout] CeedTensorContract to increment the reference counter

Returns

An error code: 0 - success, otherwise - failure

int CeedTensorContractDestroy(CeedTensorContract *contract)

Destroy a CeedTensorContract.

Backend Developer Functions

Parameters
  • contract[inout] CeedTensorContract to destroy

Returns

An error code: 0 - success, otherwise - failure