CeedQFunction

int CeedQFunctionRegister(const char *name, const char *source, CeedInt vec_length, CeedQFunctionUser f, int (*init)(Ceed, const char*, CeedQFunction))

Register a gallery CeedQFunction

Library 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 CeedQFunction is 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 CeedQFunction field, used by CeedQFunctionAddInput() and CeedQFunctionAddOutput()

Library Developer Functions

Parameters:
Returns:

An error code: 0 - success, otherwise - failure

static int CeedQFunctionFieldView(CeedQFunctionField field, CeedInt field_number, bool in, FILE *stream)

View a field of a CeedQFunction

Utility Functions

Parameters:
  • field[in] CeedQFunction field to view

  • field_number[in] Number of field being viewed

  • in[in] true for input field, false for output

  • stream[in] Stream to view to, e.g., stdout

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 CeedQFunctionContext field.

Library Developer Functions

Parameters:
  • ctx[in] CeedQFunctionContext

  • field_name[in] Name of field

  • field_index[out] Index of field, or -1 if 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 CeedQFunctionContext fields.

Library Developer Functions

Parameters:
  • ctx[inout] CeedQFunctionContext

  • field_name[in] Name of field to register

  • field_offset[in] Offset of field to register

  • field_description[in] Description of field, or NULL for none

  • field_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] CeedQFunctionContext to destroy user data

Returns:

An error code: 0 - success, otherwise - failure