CeedOperator

typedef struct CeedOperatorField_private *CeedOperatorField

Handle for object describing CeedOperator fields.

int CeedOperatorGetNumArgs(CeedOperator op, CeedInt *num_args)

Get the number of arguments associated with a CeedOperator

Backend Developer Functions

Parameters:
  • op[in] CeedOperator

  • num_args[out] Variable to store vector number of arguments

Returns:

An error code: 0 - success, otherwise - failure

int CeedOperatorHasTensorBases(CeedOperator op, bool *has_tensor_bases)

Get the tensor product status of all bases for a CeedOperator.

has_tensor_bases is only set to true if every field uses a tensor-product basis.

Backend Developer Functions

Parameters:
  • op[in] CeedOperator

  • has_tensor_bases[out] Variable to store tensor bases status

Returns:

An error code: 0 - success, otherwise - failure

int CeedOperatorIsImmutable(CeedOperator op, bool *is_immutable)

Get a boolean value indicating if the CeedOperator is immutable.

Backend Developer Functions

Parameters:
  • op[in] CeedOperator

  • is_immutable[out] Variable to store immutability status

Returns:

An error code: 0 - success, otherwise - failure

int CeedOperatorIsSetupDone(CeedOperator op, bool *is_setup_done)

Get the setup status of a CeedOperator

Backend Developer Functions

Parameters:
  • op[in] CeedOperator

  • is_setup_done[out] Variable to store setup status

Returns:

An error code: 0 - success, otherwise - failure

int CeedOperatorGetQFunction(CeedOperator op, CeedQFunction *qf)

Get the CeedQFunction associated with a CeedOperator

Backend Developer Functions

Parameters:
  • op[in] CeedOperator

  • qf[out] Variable to store CeedQFunction

Returns:

An error code: 0 - success, otherwise - failure

int CeedOperatorIsComposite(CeedOperator op, bool *is_composite)

Get a boolean value indicating if the CeedOperator is composite.

Backend Developer Functions

Parameters:
  • op[in] CeedOperator

  • is_composite[out] Variable to store composite status

Returns:

An error code: 0 - success, otherwise - failure

int CeedOperatorGetData(CeedOperator op, void *data)

Get the backend data of a CeedOperator

Backend Developer Functions

Parameters:
  • op[in] CeedOperator

  • data[out] Variable to store data

Returns:

An error code: 0 - success, otherwise - failure

int CeedOperatorSetData(CeedOperator op, void *data)

Set the backend data of a CeedOperator

Backend Developer Functions

Parameters:
  • op[inout] CeedOperator

  • data[in] Data to set

Returns:

An error code: 0 - success, otherwise - failure

int CeedOperatorReference(CeedOperator op)

Increment the reference counter for a CeedOperator

Backend Developer Functions

Parameters:
  • op[inout] CeedOperator to increment the reference counter

Returns:

An error code: 0 - success, otherwise - failure

int CeedOperatorSetSetupDone(CeedOperator op)

Set the setup flag of a CeedOperator to true

Backend Developer Functions

Parameters:
  • op[inout] CeedOperator

Returns:

An error code: 0 - success, otherwise - failure

int CeedOperatorGetBasisPointer(CeedBasis basis, CeedEvalMode eval_mode, const CeedScalar *identity, const CeedScalar **basis_ptr)

Select correct basis matrix pointer based on CeedEvalMode.

Backend Developer Functions

Parameters:
  • basis[in] CeedBasis from which to get the basis matrix

  • eval_mode[in] Current basis evaluation mode

  • identity[in] Pointer to identity matrix

  • basis_ptr[out] CeedBasis pointer to set

int CeedOperatorCreateActivePointBlockRestriction(CeedElemRestriction rstr, CeedElemRestriction *point_block_rstr)

Create point block restriction for active CeedOperatorField

Backend Developer Functions

Parameters:
  • rstr[in] Original CeedElemRestriction for active field

  • point_block_rstr[out] Address of the variable where the newly created CeedElemRestriction will be stored

Returns:

An error code: 0 - success, otherwise - failure

int CeedQFunctionAssemblyDataCreate(Ceed ceed, CeedQFunctionAssemblyData *data)

Create object holding CeedQFunction assembly data for CeedOperator

Backend Developer Functions

Parameters:
  • ceed[in] Ceed object used to create the CeedQFunctionAssemblyData

  • data[out] Address of the variable where the newly created CeedQFunctionAssemblyData will be stored

Returns:

An error code: 0 - success, otherwise - failure

int CeedQFunctionAssemblyDataReference(CeedQFunctionAssemblyData data)

Increment the reference counter for a CeedQFunctionAssemblyData

Backend Developer Functions

Parameters:
  • data[inout] CeedQFunctionAssemblyData to increment the reference counter

Returns:

An error code: 0 - success, otherwise - failure

int CeedQFunctionAssemblyDataSetReuse(CeedQFunctionAssemblyData data, bool reuse_data)

Set re-use of CeedQFunctionAssemblyData

Backend Developer Functions

Parameters:
  • data[inout] CeedQFunctionAssemblyData to mark for reuse

  • reuse_data[in] Boolean flag indicating data re-use

Returns:

An error code: 0 - success, otherwise - failure

int CeedQFunctionAssemblyDataSetUpdateNeeded(CeedQFunctionAssemblyData data, bool needs_data_update)

Mark CeedQFunctionAssemblyData as stale.

Backend Developer Functions

Parameters:
  • data[inout] CeedQFunctionAssemblyData to mark as stale

  • needs_data_update[in] Boolean flag indicating if update is needed or completed

Returns:

An error code: 0 - success, otherwise - failure

int CeedQFunctionAssemblyDataIsUpdateNeeded(CeedQFunctionAssemblyData data, bool *is_update_needed)

Determine if CeedQFunctionAssemblyData needs update.

Backend Developer Functions

Parameters:
  • data[in] CeedQFunctionAssemblyData to mark as stale

  • is_update_needed[out] Boolean flag indicating if re-assembly is required

Returns:

An error code: 0 - success, otherwise - failure

int CeedQFunctionAssemblyDataReferenceCopy(CeedQFunctionAssemblyData data, CeedQFunctionAssemblyData *data_copy)

Copy the pointer to a CeedQFunctionAssemblyData.

Both pointers should be destroyed with CeedQFunctionAssemblyDataDestroy().

Note: If the value of *data_copy passed to this function is non-NULL , then it is assumed that *data_copy is a pointer to a CeedQFunctionAssemblyData. This CeedQFunctionAssemblyData will be destroyed if *data_copy is the only reference to this CeedQFunctionAssemblyData.

Backend Developer Functions

Parameters:
  • data[in] CeedQFunctionAssemblyData to copy reference to

  • data_copy[inout] Variable to store copied reference

Returns:

An error code: 0 - success, otherwise - failure

int CeedQFunctionAssemblyDataIsSetup(CeedQFunctionAssemblyData data, bool *is_setup)

Get setup status for internal objects for CeedQFunctionAssemblyData

Backend Developer Functions

Parameters:
  • data[in] CeedQFunctionAssemblyData to retrieve status

  • is_setup[out] Boolean flag for setup status

Returns:

An error code: 0 - success, otherwise - failure

int CeedQFunctionAssemblyDataSetObjects(CeedQFunctionAssemblyData data, CeedVector vec, CeedElemRestriction rstr)

Set internal objects for CeedQFunctionAssemblyData

Backend Developer Functions

Parameters:
  • data[inout] CeedQFunctionAssemblyData to set objects

  • vec[in] CeedVector to store assembled CeedQFunction at quadrature points

  • rstr[in] CeedElemRestriction for CeedVector containing assembled CeedQFunction

Returns:

An error code: 0 - success, otherwise - failure

int CeedQFunctionAssemblyDataGetObjects(CeedQFunctionAssemblyData data, CeedVector *vec, CeedElemRestriction *rstr)

Get internal objects for CeedQFunctionAssemblyData

Backend Developer Functions

Parameters:
  • data[inout] CeedQFunctionAssemblyData to set objects

  • vec[out] CeedVector to store assembled CeedQFunction at quadrature points

  • rstr[out] CeedElemRestriction for CeedVector containing assembled CeedQFunction

Returns:

An error code: 0 - success, otherwise - failure

int CeedQFunctionAssemblyDataDestroy(CeedQFunctionAssemblyData *data)

Destroy CeedQFunctionAssemblyData

Backend Developer Functions

Parameters:
  • data[inout] CeedQFunctionAssemblyData to destroy

Returns:

An error code: 0 - success, otherwise - failure

int CeedOperatorGetOperatorAssemblyData(CeedOperator op, CeedOperatorAssemblyData *data)

Get CeedOperatorAssemblyData

Backend Developer Functions

Parameters:
  • op[in] CeedOperator to assemble

  • data[out] CeedQFunctionAssemblyData

Returns:

An error code: 0 - success, otherwise - failure

int CeedOperatorAssemblyDataCreate(Ceed ceed, CeedOperator op, CeedOperatorAssemblyData *data)

Create object holding CeedOperator assembly data.

The CeedOperatorAssemblyData holds an array with references to every active CeedBasis used in the CeedOperator. An array with references to the corresponding active CeedElemRestriction is also stored. For each active CeedBasis, theCeedOperatorAssemblyDataholds an array of all input and output @ref CeedEvalMode for thisCeedBasis. TheCeedOperatorAssemblyDataholds an array of offsets for indexing into the assembledCeedQFunctionarrays to the row representing each @ref CeedEvalMode. The number of input columns across all active bases for the assembledCeedQFunctionis also stored. Lastly, theCeedOperatorAssemblydata holds assembled matrices representing the full action of theCeedBasis` for all CeedEvalMode.

Backend Developer Functions

Parameters:
  • ceed[in] Ceed object used to create the CeedOperatorAssemblyData

  • op[in] CeedOperator to be assembled

  • data[out] Address of the variable where the newly created CeedOperatorAssemblyData will be stored

Returns:

An error code: 0 - success, otherwise - failure

int CeedOperatorAssemblyDataGetEvalModes(CeedOperatorAssemblyData data, CeedInt *num_active_bases_in, CeedInt **num_eval_modes_in, const CeedEvalMode ***eval_modes_in, CeedSize ***eval_mode_offsets_in, CeedInt *num_active_bases_out, CeedInt **num_eval_modes_out, const CeedEvalMode ***eval_modes_out, CeedSize ***eval_mode_offsets_out, CeedSize *num_output_components)

Get CeedOperator CeedEvalMode for assembly.

Note: See CeedOperatorAssemblyDataCreate() for a full description of the data stored in this object.

Backend Developer Functions

Parameters:
  • data[in] CeedOperatorAssemblyData

  • num_active_bases_in[out] Total number of active bases for input

  • num_eval_modes_in[out] Pointer to hold array of numbers of input CeedEvalMode, or NULL. eval_modes_in[0] holds an array of eval modes for the first active CeedBasis.

  • eval_modes_in[out] Pointer to hold arrays of input CeedEvalMode, or NULL

  • eval_mode_offsets_in[out] Pointer to hold arrays of input offsets at each quadrature point

  • num_active_bases_out[out] Total number of active bases for output

  • num_eval_modes_out[out] Pointer to hold array of numbers of output CeedEvalMode, or NULL

  • eval_modes_out[out] Pointer to hold arrays of output CeedEvalMode, or NULL

  • eval_mode_offsets_out[out] Pointer to hold arrays of output offsets at each quadrature point

  • num_output_components[out] The number of columns in the assembled CeedQFunction matrix for each quadrature point, including contributions of all active bases

Returns:

An error code: 0 - success, otherwise - failure

int CeedOperatorAssemblyDataGetBases(CeedOperatorAssemblyData data, CeedInt *num_active_bases_in, CeedBasis **active_bases_in, const CeedScalar ***assembled_bases_in, CeedInt *num_active_bases_out, CeedBasis **active_bases_out, const CeedScalar ***assembled_bases_out)

Get CeedOperator CeedBasis data for assembly.

Note: See CeedOperatorAssemblyDataCreate() for a full description of the data stored in this object.

Backend Developer Functions

Parameters:
  • data[in] CeedOperatorAssemblyData

  • num_active_bases_in[out] Number of active input bases, or NULL

  • active_bases_in[out] Pointer to hold active input CeedBasis, or NULL

  • assembled_bases_in[out] Pointer to hold assembled active input B , or NULL

  • num_active_bases_out[out] Number of active output bases, or NULL

  • active_bases_out[out] Pointer to hold active output CeedBasis, or NULL

  • assembled_bases_out[out] Pointer to hold assembled active output B , or NULL

Returns:

An error code: 0 - success, otherwise - failure

int CeedOperatorAssemblyDataGetElemRestrictions(CeedOperatorAssemblyData data, CeedInt *num_active_elem_rstrs_in, CeedElemRestriction **active_elem_rstrs_in, CeedInt *num_active_elem_rstrs_out, CeedElemRestriction **active_elem_rstrs_out)

Get CeedOperator CeedBasis data for assembly.

Note: See CeedOperatorAssemblyDataCreate() for a full description of the data stored in this object.

Backend Developer Functions

Parameters:
  • data[in] CeedOperatorAssemblyData

  • num_active_elem_rstrs_in[out] Number of active input element restrictions, or NULL

  • active_elem_rstrs_in[out] Pointer to hold active input CeedElemRestriction, or NULL

  • num_active_elem_rstrs_out[out] Number of active output element restrictions, or NULL

  • active_elem_rstrs_out[out] Pointer to hold active output CeedElemRestriction, or NULL

Returns:

An error code: 0 - success, otherwise - failure

int CeedOperatorAssemblyDataDestroy(CeedOperatorAssemblyData *data)

Destroy CeedOperatorAssemblyData

Backend Developer Functions

Parameters:
  • data[inout] CeedOperatorAssemblyData to destroy

Returns:

An error code: 0 - success, otherwise - failure

int CeedOperatorGetFallback(CeedOperator op, CeedOperator *op_fallback)

Retrieve fallback CeedOperator with a reference Ceed for advanced CeedOperator functionality.

Backend Developer Functions

Parameters:
  • op[in] CeedOperator to retrieve fallback for

  • op_fallback[out] Fallback CeedOperator

Returns:

An error code: 0 - success, otherwise - failure

int CeedOperatorGetFallbackParent(CeedOperator op, CeedOperator *parent)

Get the parent CeedOperator for a fallback CeedOperator

Backend Developer Functions

Parameters:
  • op[in] CeedOperator context

  • parent[out] Variable to store parent CeedOperator context

Returns:

An error code: 0 - success, otherwise - failure

int CeedOperatorGetFallbackParentCeed(CeedOperator op, Ceed *parent)

Get the Ceed context of the parent CeedOperator for a fallback CeedOperator

Backend Developer Functions

Parameters:
  • op[in] CeedOperator context

  • parent[out] Variable to store parent Ceed context

Returns:

An error code: 0 - success, otherwise - failure