CeedQFunction
-
int CeedQFunctionRegister(const char *name, const char *source, CeedInt vec_length, CeedQFunctionUser f, int (*init)(Ceed, const char*, CeedQFunction))
Register a gallery
CeedQFunctionLibrary Developer Functions
- Parameters:
name – [in] Name for this backend to respond to
source – [in] Absolute path to source of
CeedQFunction, “\path\CEED_DIR\gallery\folder\file.h:function_name”vec_length – [in] Vector length. Caller must ensure that number of quadrature points is a multiple of
vec_length.f – [in] Function pointer to evaluate action at quadrature points. See
CeedQFunctionUser.init – [in] Initialization function called by CeedQFunctionCreateInteriorByName() when the
CeedQFunctionis selected.
- Returns:
An error code: 0 - success, otherwise - failure
-
static int CeedQFunctionFieldSet(CeedQFunctionField *f, const char *field_name, CeedInt size, CeedEvalMode eval_mode)
Set a
CeedQFunctionfield, used by CeedQFunctionAddInput() and CeedQFunctionAddOutput()Library Developer Functions
- Parameters:
f – [out]
CeedQFunctionFieldfield_name – [in] Name of
CeedQFunctionfieldsize – [in] Size of
CeedQFunctionfield, (num_comp * 1) for CEED_EVAL_NONE and CEED_EVAL_WEIGHT, (num_comp * 1) for CEED_EVAL_INTERP for an \(H^1\) space or (num_comp * dim) for an \(H(\mathrm{div})\) or \(H(\mathrm{curl})\) space, (num_comp * dim) for CEED_EVAL_GRAD, or (num_comp * 1) for CEED_EVAL_DIV, and (num_comp * curl_dim) withcurl_dim = 1ifdim < 3andcurl_dim = dimfor CEED_EVAL_CURL.eval_mode – [in] CEED_EVAL_NONE to use values directly, CEED_EVAL_WEIGHT to use quadrature weights, CEED_EVAL_INTERP to use interpolated values, CEED_EVAL_GRAD to use gradients, CEED_EVAL_DIV to use divergence, CEED_EVAL_CURL to use curl
- Returns:
An error code: 0 - success, otherwise - failure
-
static int CeedQFunctionFieldView(CeedQFunctionField field, CeedInt field_number, bool in, const char *tabs, FILE *stream)
View a field of a
CeedQFunctionUtility Functions
- Parameters:
field – [in]
CeedQFunctionfield to viewfield_number – [in] Number of field being viewed
in – [in] true for input field, false for output
tabs – [in] Tabs to append before each new line
stream – [in] Stream to view to, e.g.,
stdout
- Returns:
An error code: 0 - success, otherwise - failure
-
static int CeedQFunctionView_Object(CeedObject qf, FILE *stream)
View a
CeedQFunctionpassed as aCeedObjectLibrary Developer Functions
- Parameters:
qf – [in]
CeedQFunctionto viewstream – [in] Filestream to write to
- Returns:
An error code: 0 - success, otherwise - failure
-
static int CeedQFunctionDestroy_Object(CeedObject *qf)
Destroy a
CeedQFunctionpassed as aCeedObjectLibrary Developer Functions
- Parameters:
qf – [inout] Address of
CeedQFunctionto destroy
- Returns:
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionSetFortranStatus(CeedQFunction qf, bool status)
Set flag to determine if Fortran interface is used.
Backend Developer Functions
- Parameters:
qf – [inout] CeedQFunction
status – [in] Boolean value to set as Fortran status
- Returns:
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionContextGetFieldIndex(CeedQFunctionContext ctx, const char *field_name, CeedInt *field_index)
Get index for
CeedQFunctionContextfield.Library Developer Functions
- Parameters:
ctx – [in]
CeedQFunctionContextfield_name – [in] Name of field
field_index – [out] Index of field, or
-1if field is not registered
- Returns:
An error code: 0 - success, otherwise - failure
-
int CeedQFunctionContextRegisterGeneric(CeedQFunctionContext ctx, const char *field_name, size_t field_offset, const char *field_description, CeedContextFieldType field_type, size_t num_values)
Common function for registering
CeedQFunctionContextfields.Library Developer Functions
- Parameters:
ctx – [inout]
CeedQFunctionContextfield_name – [in] Name of field to register
field_offset – [in] Offset of field to register
field_description – [in] Description of field, or
NULLfor nonefield_type – [in] CeedContextFieldType
num_values – [in] Number of values to register, must be contiguous in memory
- Returns:
An error code: 0 - success, otherwise - failure
-
static int CeedQFunctionContextDestroyData(CeedQFunctionContext ctx)
Destroy user data held by
CeedQFunctionContext, using function set by CeedQFunctionContextSetDataDestroy(), if applicable.Library Developer Functions
- Parameters:
ctx – [inout]
CeedQFunctionContextto destroy user data
- Returns:
An error code: 0 - success, otherwise - failure
-
static int CeedQFunctionContextView_Object(CeedObject ctx, FILE *stream)
View a
CeedQFunctionContextpassed as aCeedObjectLibrary Developer Functions
- Parameters:
ctx – [in]
CeedQFunctionContextto viewstream – [in] Filestream to write to
- Returns:
An error code: 0 - success, otherwise - failure
-
static int CeedQFunctionContextDestroy_Object(CeedObject *ctx)
Destroy a
CeedQFunctionContextpassed as aCeedObjectLibrary Developer Functions
- Parameters:
ctx – [inout] Address of
CeedQFunctionContextto destroy
- Returns:
An error code: 0 - success, otherwise - failure