CeedQFunction
-
typedef struct CeedQFunctionField_private *CeedQFunctionField
Handle for object describing CeedQFunction fields.
-
int CeedQFunctionGetVectorLength(CeedQFunction qf, CeedInt *vec_length)
Get the vector length of a
CeedQFunctionBackend Developer Functions
- Parameters:
qf – [in]
CeedQFunctionvec_length – [out] Variable to store vector length
- Returns:
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionGetNumArgs(CeedQFunction qf, CeedInt *num_input, CeedInt *num_output)
Get the number of inputs and outputs to a
CeedQFunctionBackend Developer Functions
- Parameters:
qf – [in]
CeedQFunctionnum_input – [out] Variable to store number of input fields
num_output – [out] Variable to store number of output fields
- Returns:
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionGetName(CeedQFunction qf, const char **name)
Get the name of the
CeedQFunction.Use the
nameif created via CeedQFunctionCreateInteriorByName(), otherwise return the kernel name via CeedQFunctionGetKernelName().Backend Developer Functions
- Parameters:
qf – [in]
CeedQFunctionname – [out] Variable to store
CeedQFunctionname
- Returns:
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionGetKernelName(CeedQFunction qf, const char **kernel_name)
Get the name of the user function for a
CeedQFunctionBackend Developer Functions
- Parameters:
qf – [in]
CeedQFunctionkernel_name – [out] Variable to store string holding kernel name
- Returns:
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionGetSourcePath(CeedQFunction qf, const char **source_path)
Get the source path string for a
CeedQFunctionBackend Developer Functions
- Parameters:
qf – [in]
CeedQFunctionsource_path – [out] Variable to store source path string
- Returns:
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionLoadSourceToBuffer(CeedQFunction qf, const char **source_buffer)
Initialize and load
CeedQFunctionsource file into string buffer, including full text of local files in place of#include "local.h".The
bufferis set toNULLif there is noCeedQFunctionsource file.Note: This function may as well return a mutable buffer, but all current uses do not modify it. (This is just a downside of
constsemantics with output arguments instead of returns.)Note: Caller is responsible for freeing the string buffer with CeedFree().
Backend Developer Functions
- Parameters:
qf – [in]
CeedQFunctionsource_buffer – [out] String buffer for source file contents
- Returns:
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionGetUserFunction(CeedQFunction qf, CeedQFunctionUser *f)
Get the User Function for a
CeedQFunctionBackend Developer Functions
- Parameters:
qf – [in]
CeedQFunctionf – [out] Variable to store user function
- Returns:
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionGetContext(CeedQFunction qf, CeedQFunctionContext *ctx)
Get global context for a
CeedQFunction.Note: For
CeedQFunctionfrom the Fortran interface, this function will return the Fortran contextCeedQFunctionContext.Backend Developer Functions
- Parameters:
qf – [in] CeedQFunction
ctx – [out] Variable to store CeedQFunctionContext
- Returns:
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionGetContextData(CeedQFunction qf, CeedMemType mem_type, void *data)
Get context data of a
CeedQFunctionBackend Developer Functions
- Parameters:
qf – [in]
CeedQFunctionmem_type – [in] Memory type on which to access the data. If the backend uses a different memory type, this will perform a copy.
data – [out] Data on memory type mem_type
- Returns:
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionRestoreContextData(CeedQFunction qf, void *data)
Restore context data of a
CeedQFunctionBackend Developer Functions
- Parameters:
qf – [in]
CeedQFunctiondata – [inout] Data to restore
- Returns:
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionGetInnerContext(CeedQFunction qf, CeedQFunctionContext *ctx)
Get true user context for a
CeedQFunctionNote: For all
CeedQFunctionthis function will return the userCeedQFunctionContextand not interface contextCeedQFunctionContext, if any such object exists.- Parameters:
qf – [in]
CeedQFunctionctx – [out] Variable to store
CeedQFunctionContext
- Returns:
An error code: 0 - success, otherwise - failure Backend Developer Functions
-
int CeedQFunctionGetInnerContextData(CeedQFunction qf, CeedMemType mem_type, void *data)
Get inner context data of a
CeedQFunctionBackend Developer Functions
- Parameters:
qf – [in]
CeedQFunctionmem_type – [in] Memory type on which to access the data. If the backend uses a different memory type, this will perform a copy.
data – [out] Data on memory type mem_type
- Returns:
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionRestoreInnerContextData(CeedQFunction qf, void *data)
Restore inner context data of a
CeedQFunctionBackend Developer Functions
- Parameters:
qf – [in]
CeedQFunctiondata – [inout] Data to restore
- Returns:
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionIsIdentity(CeedQFunction qf, bool *is_identity)
Determine if
CeedQFunctionis identity.Backend Developer Functions
- Parameters:
qf – [in]
CeedQFunctionis_identity – [out] Variable to store identity status
- Returns:
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionIsContextWritable(CeedQFunction qf, bool *is_writable)
Determine if
CeedQFunctionContextis writable.Backend Developer Functions
- Parameters:
qf – [in]
CeedQFunctionis_writable – [out] Variable to store context writeable status
- Returns:
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionGetData(CeedQFunction qf, void *data)
Get backend data of a
CeedQFunctionBackend Developer Functions
- Parameters:
qf – [in]
CeedQFunctiondata – [out] Variable to store data
- Returns:
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionSetData(CeedQFunction qf, void *data)
Set backend data of a
CeedQFunctionBackend Developer Functions
- Parameters:
qf – [inout]
CeedQFunctiondata – [in] Data to set
- Returns:
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionIsImmutable(CeedQFunction qf, bool *is_immutable)
Get a boolean value indicating if the
CeedQFunctionis immutable.Backend Developer Functions
- Parameters:
qf – [in]
CeedOperatoris_immutable – [out] Variable to store immutability status
- Returns:
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionSetImmutable(CeedQFunction qf)
Set the immutable flag of a
CeedQFunctiontotrueBackend Developer Functions
- Parameters:
qf – [inout]
CeedQFunction
- Returns:
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionReference(CeedQFunction qf)
Increment the reference counter for a
CeedQFunctionBackend Developer Functions
- Parameters:
qf – [inout]
CeedQFunctionto increment the reference counter
- Returns:
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionGetFlopsEstimate(CeedQFunction qf, CeedSize *flops)
Estimate number of FLOPs per quadrature required to apply
CeedQFunctionBackend Developer Functions
- Parameters:
qf – [in]
CeedQFunctionto estimate FLOPs forflops – [out] Address of variable to hold FLOPs estimate
-
int CeedQFunctionContextGetCeed(CeedQFunctionContext ctx, Ceed *ceed)
Get the
Ceedassociated with aCeedQFunctionContextBackend Developer Functions
- Parameters:
ctx – [in]
CeedQFunctionContextceed – [out] Variable to store
Ceed
- Returns:
An error code: 0 - success, otherwise - failure
-
Ceed CeedQFunctionContextReturnCeed(CeedQFunctionContext ctx)
Return the
Ceedassociated with aCeedQFunctionContextBackend Developer Functions
- Parameters:
ctx – [in]
CeedQFunctionContext
- Returns:
Ceedassociated withctx
-
int CeedQFunctionContextHasValidData(CeedQFunctionContext ctx, bool *has_valid_data)
Check for valid data in a
CeedQFunctionContextBackend Developer Functions
- Parameters:
ctx – [in]
CeedQFunctionContextto check validityhas_valid_data – [out] Variable to store validity
- Returns:
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionContextHasBorrowedDataOfType(CeedQFunctionContext ctx, CeedMemType mem_type, bool *has_borrowed_data_of_type)
Check for borrowed data of a specific CeedMemType in a
CeedQFunctionContextBackend Developer Functions
- Parameters:
ctx – [in]
CeedQFunctionContextto checkmem_type – [in] Memory type to check
has_borrowed_data_of_type – [out] Variable to store result
- Returns:
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionContextGetState(CeedQFunctionContext ctx, uint64_t *state)
Get the state of a
CeedQFunctionContextBackend Developer Functions
- Parameters:
ctx – [in]
CeedQFunctionContextto retrieve statestate – [out] Variable to store state
- Returns:
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionContextGetBackendData(CeedQFunctionContext ctx, void *data)
Get backend data of a
CeedQFunctionContextBackend Developer Functions
- Parameters:
ctx – [in]
CeedQFunctionContextdata – [out] Variable to store data
- Returns:
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionContextSetBackendData(CeedQFunctionContext ctx, void *data)
Set backend data of a
CeedQFunctionContextBackend Developer Functions
- Parameters:
ctx – [inout]
CeedQFunctionContextdata – [in] Data to set
- Returns:
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionContextGetFieldLabel(CeedQFunctionContext ctx, const char *field_name, CeedContextFieldLabel *field_label)
Get label for a registered
CeedQFunctionContextfield, orNULLif no field has been registered with thisfield_nameBackend Developer Functions
- Parameters:
ctx – [in]
CeedQFunctionContextfield_name – [in] Name of field to retrieve label
field_label – [out] Variable to field label
- Returns:
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionContextSetGeneric(CeedQFunctionContext ctx, CeedContextFieldLabel field_label, CeedContextFieldType field_type, void *values)
Set
CeedQFunctionContextfield.Backend Developer Functions
- Parameters:
ctx – [inout]
CeedQFunctionContextfield_label – [in] Label of field to set
field_type – [in] Type of field to set
values – [in] Value to set
- Returns:
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionContextGetGenericRead(CeedQFunctionContext ctx, CeedContextFieldLabel field_label, CeedContextFieldType field_type, size_t *num_values, void *values)
Get
CeedQFunctionContextfield data, read-only.Backend Developer Functions
- Parameters:
ctx – [in]
CeedQFunctionContextfield_label – [in] Label of field to read
field_type – [in] Type of field to read
num_values – [out] Number of values in the field label
values – [out] Pointer to context values
- Returns:
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionContextRestoreGenericRead(CeedQFunctionContext ctx, CeedContextFieldLabel field_label, CeedContextFieldType field_type, void *values)
Restore
CeedQFunctionContextfield data, read-only.Backend Developer Functions
- Parameters:
ctx – [in]
CeedQFunctionContextfield_label – [in] Label of field to restore
field_type – [in] Type of field to restore
values – [out] Pointer to context values
- Returns:
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionContextSetDouble(CeedQFunctionContext ctx, CeedContextFieldLabel field_label, double *values)
Set
CeedQFunctionContextfield holding double precision values.Backend Developer Functions
- Parameters:
ctx – [inout]
CeedQFunctionContextfield_label – [in] Label for field to set
values – [in] Values to set
- Returns:
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionContextGetDoubleRead(CeedQFunctionContext ctx, CeedContextFieldLabel field_label, size_t *num_values, const double **values)
Get
CeedQFunctionContextfield holding double precision values, read-only.Backend Developer Functions
- Parameters:
ctx – [in]
CeedQFunctionContextfield_label – [in] Label for field to get
num_values – [out] Number of values in the field label
values – [out] Pointer to context values
- Returns:
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionContextRestoreDoubleRead(CeedQFunctionContext ctx, CeedContextFieldLabel field_label, const double **values)
Restore
CeedQFunctionContextfield holding double precision values, read-only.Backend Developer Functions
- Parameters:
ctx – [in]
CeedQFunctionContextfield_label – [in] Label for field to restore
values – [out] Pointer to context values
- Returns:
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionContextSetInt32(CeedQFunctionContext ctx, CeedContextFieldLabel field_label, int32_t *values)
Set CeedQFunctionContext field holding
int32values.Backend Developer Functions
- Parameters:
ctx – [inout] CeedQFunctionContext
field_label – [in] Label for field to set
values – [in] Values to set
- Returns:
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionContextGetInt32Read(CeedQFunctionContext ctx, CeedContextFieldLabel field_label, size_t *num_values, const int32_t **values)
Get
CeedQFunctionContextfield holdingint32values, read-only.Backend Developer Functions
- Parameters:
ctx – [in]
CeedQFunctionContextfield_label – [in] Label for field to get
num_values – [out] Number of values in the field label
values – [out] Pointer to context values
- Returns:
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionContextRestoreInt32Read(CeedQFunctionContext ctx, CeedContextFieldLabel field_label, const int32_t **values)
Restore
CeedQFunctionContextfield holdingint32values, read-only.Backend Developer Functions
- Parameters:
ctx – [in]
CeedQFunctionContextfield_label – [in] Label for field to restore
values – [out] Pointer to context values
- Returns:
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionContextSetBoolean(CeedQFunctionContext ctx, CeedContextFieldLabel field_label, bool *values)
Set
CeedQFunctionContextfield holding boolean values.Backend Developer Functions
- Parameters:
ctx – [inout]
CeedQFunctionContextfield_label – [in] Label for field to set
values – [in] Values to set
- Returns:
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionContextGetBooleanRead(CeedQFunctionContext ctx, CeedContextFieldLabel field_label, size_t *num_values, const bool **values)
Get
CeedQFunctionContextfield holding boolean values, read-only.Backend Developer Functions
- Parameters:
ctx – [in]
CeedQFunctionContextfield_label – [in] Label for field to get
num_values – [out] Number of values in the field label
values – [out] Pointer to context values
- Returns:
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionContextRestoreBooleanRead(CeedQFunctionContext ctx, CeedContextFieldLabel field_label, const bool **values)
Restore
CeedQFunctionContextfield holding boolean values, read-only.Backend Developer Functions
- Parameters:
ctx – [in]
CeedQFunctionContextfield_label – [in] Label for field to restore
values – [out] Pointer to context values
- Returns:
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionContextGetDataDestroy(CeedQFunctionContext ctx, CeedMemType *f_mem_type, CeedQFunctionContextDataDestroyUser *f)
Get additional destroy routine for
CeedQFunctionContextuser data.Backend Developer Functions
- Parameters:
ctx – [in]
CeedQFunctionContextto get user destroy functionf_mem_type – [out] Memory type to use when passing data into
ff – [out] Additional routine to use to destroy user data
- Returns:
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionContextReference(CeedQFunctionContext ctx)
Increment the reference counter for a
CeedQFunctionContextBackend Developer Functions
- Parameters:
ctx – [inout]
CeedQFunctionContextto increment the reference counter
- Returns:
An error code: 0 - success, otherwise - failure
Macros
-
CEED_QFUNCTION_ATTR
This macro defines compiler attributes to the CEED_QFUNCTION to force inlining for called functions.
The
inlinedeclaration does not necessarily enforce a compiler to inline a function. This can be detrimental to performance, so here we force inlining to occur unless inlining has been forced off (like during debugging).