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 CeedQFunction.
Backend Developer Functions
- Parameters
qf – CeedQFunction
vec_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 CeedQFunction.
Backend Developer Functions
- Parameters
qf – CeedQFunction
num_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 CeedQFunctionGetKernelName(CeedQFunction qf, char **kernel_name)¶
Get the name of the user function for a CeedQFunction.
Backend Developer Functions
- Parameters
qf – CeedQFunction
kernel_name – [out] Variable to store source path string
- Returns
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionGetSourcePath(CeedQFunction qf, char **source_path)¶
Get the source path string for a CeedQFunction.
Backend Developer Functions
- Parameters
qf – CeedQFunction
source_path – [out] Variable to store source path string
- Returns
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionLoadSourceToBuffer(CeedQFunction qf, char **source_buffer)¶
Initalize and load QFunction source file into string buffer, including full text of local files in place of
#include "local.h"
.The
buffer
is set toNULL
if there is no QFunction source file. Note: Caller is responsible for freeing the string buffer withCeedFree()
.Backend Developer Functions
- Parameters
qf – CeedQFunction
source_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 CeedQFunction.
Backend Developer Functions
- Parameters
qf – CeedQFunction
f – [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 QFunctions from the Fortran interface, this function will return the Fortran context CeedQFunctionContext.
Backend Developer Functions
- Parameters
qf – 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 CeedQFunction.
Backend Developer Functions
- Parameters
qf – CeedQFunction
mem_type – 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 CeedQFunction.
Backend Developer Functions
- Parameters
qf – CeedQFunction
data – Data to restore
- Returns
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionGetInnerContext(CeedQFunction qf, CeedQFunctionContext *ctx)¶
Get true user context for a CeedQFunction Note: For all QFunctions this function will return the user CeedQFunctionContext and not interface context CeedQFunctionContext, if any such object exists.
- Parameters
qf – CeedQFunction
ctx – [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 CeedQFunction.
Backend Developer Functions
- Parameters
qf – CeedQFunction
mem_type – 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 CeedQFunction.
Backend Developer Functions
- Parameters
qf – CeedQFunction
data – Data to restore
- Returns
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionIsIdentity(CeedQFunction qf, bool *is_identity)¶
Determine if QFunction is identity.
Backend Developer Functions
- Parameters
qf – CeedQFunction
is_identity – [out] Variable to store identity status
- Returns
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionIsContextWritable(CeedQFunction qf, bool *is_writable)¶
Determine if QFunctionContext is writable.
Backend Developer Functions
- Parameters
qf – CeedQFunction
is_writable – [out] Variable to store context writeable staus
- Returns
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionGetData(CeedQFunction qf, void *data)¶
Get backend data of a CeedQFunction.
Backend Developer Functions
- Parameters
qf – CeedQFunction
data – [out] Variable to store data
- Returns
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionSetData(CeedQFunction qf, void *data)¶
Set backend data of a CeedQFunction.
Backend Developer Functions
- Parameters
qf – [out] CeedQFunction
data – Data to set
- Returns
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionReference(CeedQFunction qf)¶
Increment the reference counter for a CeedQFunction.
Backend Developer Functions
- Parameters
qf – CeedQFunction to 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 QFunction.
Backend Developer Functions
- Parameters
qf – QFunction to estimate FLOPs for
flops – Address of variable to hold FLOPs estimate
-
int CeedQFunctionContextGetCeed(CeedQFunctionContext ctx, Ceed *ceed)¶
Get the Ceed associated with a CeedQFunctionContext.
Backend Developer Functions
- Parameters
ctx – CeedQFunctionContext
ceed – [out] Variable to store Ceed
- Returns
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionContextHasValidData(CeedQFunctionContext ctx, bool *has_valid_data)¶
Check for valid data in a CeedQFunctionContext.
Backend Developer Functions
- Parameters
ctx – CeedQFunctionContext to check validity
has_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 CeedQFunctionContext.
Backend Developer Functions
- Parameters
ctx – CeedQFunctionContext to check
mem_type – 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 CeedQFunctionContext.
Backend Developer Functions
- Parameters
ctx – CeedQFunctionContext to retrieve state
state – [out] Variable to store state
- Returns
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionContextGetBackendData(CeedQFunctionContext ctx, void *data)¶
Get backend data of a CeedQFunctionContext.
Backend Developer Functions
- Parameters
ctx – CeedQFunctionContext
data – [out] Variable to store data
- Returns
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionContextSetBackendData(CeedQFunctionContext ctx, void *data)¶
Set backend data of a CeedQFunctionContext.
Backend Developer Functions
- Parameters
ctx – [out] CeedQFunctionContext
data – 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 QFunctionContext field, or
NULL
if no field has been registered with thisfield_name
Backend Developer Functions
- Parameters
ctx – [in] CeedQFunctionContext
field_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 *value)¶
Set QFunctionContext field.
Backend Developer Functions
- Parameters
ctx – CeedQFunctionContext
field_label – Label of field to set
field_type – Type of field to set
value – Value to set
- Returns
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionContextSetDouble(CeedQFunctionContext ctx, CeedContextFieldLabel field_label, double *values)¶
Set QFunctionContext field holding a double precision value.
Backend Developer Functions
- Parameters
ctx – CeedQFunctionContext
field_label – Label for field to register
values – Values to set
- Returns
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionContextSetInt32(CeedQFunctionContext ctx, CeedContextFieldLabel field_label, int *values)¶
Set QFunctionContext field holding an int32 value.
Backend Developer Functions
- Parameters
ctx – CeedQFunctionContext
field_label – Label for field to register
values – Values to set
- Returns
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionContextGetDataDestroy(CeedQFunctionContext ctx, CeedMemType *f_mem_type, CeedQFunctionContextDataDestroyUser *f)¶
Get additional destroy routine for CeedQFunctionContext user data.
Backend Developer Functions
- Parameters
ctx – [in] CeedQFunctionContext to get user destroy function
f_mem_type – [out] Memory type to use when passing data into
f
f – [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 CeedQFunctionContext.
Backend Developer Functions
- Parameters
ctx – CeedQFunctionContext to increment the reference counter
- Returns
An error code: 0 - success, otherwise - failure