CeedBasis¶
-
int
CeedBasisGetCollocatedGrad
(CeedBasis basis, CeedScalar *collograd1d)¶ Return collocated grad matrix.
Backend Developer Functions
- Return
An error code: 0 - success, otherwise - failure
- Parameters
basis
: CeedBasis[out] collograd1d
: Row-major (Q1d * Q1d) matrix expressing derivatives of basis functions at quadrature points
-
int
CeedBasisGetCeed
(CeedBasis basis, Ceed *ceed)¶ Get Ceed associated with a CeedBasis.
Backend Developer Functions
- Return
An error code: 0 - success, otherwise - failure
- Parameters
basis
: CeedBasis[out] ceed
: Variable to store Ceed
-
int
CeedBasisIsTensor
(CeedBasis basis, bool *istensor)¶ Get tensor status for given CeedBasis.
Backend Developer Functions
- Return
An error code: 0 - success, otherwise - failure
- Parameters
basis
: CeedBasis[out] istensor
: Variable to store tensor status
-
int
CeedBasisGetData
(CeedBasis basis, void *data)¶ Get backend data of a CeedBasis.
Backend Developer Functions
- Return
An error code: 0 - success, otherwise - failure
- Parameters
basis
: CeedBasis[out] data
: Variable to store data
-
int
CeedBasisSetData
(CeedBasis basis, void *data)¶ Set backend data of a CeedBasis.
Backend Developer Functions
- Return
An error code: 0 - success, otherwise - failure
- Parameters
[out] basis
: CeedBasisdata
: Data to set
-
int
CeedBasisGetTopologyDimension
(CeedElemTopology topo, CeedInt *dim)¶ Get dimension for given CeedElemTopology.
Backend Developer Functions
- Return
An error code: 0 - success, otherwise - failure
- Parameters
topo
: CeedElemTopology[out] dim
: Variable to store dimension of topology
-
int
CeedBasisGetTensorContract
(CeedBasis basis, CeedTensorContract *contract)¶ Get CeedTensorContract of a CeedBasis.
Backend Developer Functions
- Return
An error code: 0 - success, otherwise - failure
- Parameters
basis
: CeedBasis[out] contract
: Variable to store CeedTensorContract
-
int
CeedBasisSetTensorContract
(CeedBasis basis, CeedTensorContract *contract)¶ Set CeedTensorContract of a CeedBasis.
Backend Developer Functions
- Return
An error code: 0 - success, otherwise - failure
- Parameters
[out] basis
: CeedBasiscontract
: CeedTensorContract to set
-
int
CeedMatrixMultiply
(Ceed ceed, const CeedScalar *matA, const CeedScalar *matB, CeedScalar *matC, 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
- Return
An error code: 0 - success, otherwise - failure
- Parameters
ceed
: A Ceed context for error handling[in] matA
: Row-major matrix A[in] matB
: Row-major matrix B[out] matC
: Row-major output matrix Cm
: Number of rows of Cn
: Number of columns of Ckk
: Number of columns of A/rows of B
-
int
CeedTensorContractCreate
(Ceed ceed, CeedBasis basis, CeedTensorContract *contract)¶ Create a CeedTensorContract object for a CeedBasis.
Backend Developer Functions
- Return
An error code: 0 - success, otherwise - failure
- Parameters
ceed
: A Ceed object where the CeedTensorContract will be createdbasis
: CeedBasis for which the tensor contraction will be used[out] contract
: Address of the variable where the newly created CeedTensorContract will be stored.
-
int
CeedTensorContractApply
(CeedTensorContract contract, CeedInt A, CeedInt B, CeedInt C, CeedInt J, const CeedScalar *restrict t, CeedTransposeMode tmode, 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
- Return
An error code: 0 - success, otherwise - failure
- Parameters
contract
: CeedTensorContract to useA
: First index of u, vB
: Middle index of u, one index of tC
: Last index of u, vJ
: Middle index of v, one index of t[in] t
: Tensor array to contract againsttmode
: Transpose mode for t, CEED_NOTRANSPOSE for t_jb CEED_TRANSPOSE for t_bjadd
: Add mode[in] u
: Input array[out] v
: Output array
-
int
CeedTensorContractGetCeed
(CeedTensorContract contract, Ceed *ceed)¶ Get Ceed associated with a CeedTensorContract.
Backend Developer Functions
- Return
An error code: 0 - success, otherwise - failure
- Parameters
contract
: CeedTensorContract[out] ceed
: Variable to store Ceed
-
int
CeedTensorContractGetData
(CeedTensorContract contract, void *data)¶ Get backend data of a CeedTensorContract.
Backend Developer Functions
- Return
An error code: 0 - success, otherwise - failure
- Parameters
contract
: CeedTensorContract[out] data
: Variable to store data
-
int
CeedTensorContractSetData
(CeedTensorContract contract, void *data)¶ Set backend data of a CeedTensorContract.
Backend Developer Functions
- Return
An error code: 0 - success, otherwise - failure
- Parameters
[out] contract
: CeedTensorContractdata
: Data to set
-
int
CeedTensorContractDestroy
(CeedTensorContract *contract)¶ Destroy a CeedTensorContract.
Backend Developer Functions
- Return
An error code: 0 - success, otherwise - failure
- Parameters
contract
: CeedTensorContract to destroy