DMFieldCreateShell#

Create a DMFIELDSHELL, a DMField whose evaluation is implemented entirely by user-supplied callbacks.

Synopsis#

#include "petscdmfield.h" 
PetscErrorCode DMFieldCreateShell(DM dm, PetscInt numComponents, DMFieldContinuity continuity, PetscCtx ctx, DMField *field)

Collective

Input Parameters#

  • dm - the DM on which the field lives

  • numComponents - the number of components of the field

  • continuity - the continuity of the field (e.g. DMFIELD_VERTEX)

  • ctx - optional application context returned by DMFieldShellGetContext()

Output Parameter#

  • field - the newly created DMField of type DMFIELDSHELL

Note#

After creation the user must register the desired evaluation callbacks with DMFieldShellSetEvaluate(), DMFieldShellSetEvaluateFE(), DMFieldShellSetEvaluateFV(), and optionally DMFieldShellSetDestroy(), DMFieldShellSetGetDegree(), and DMFieldShellSetCreateDefaultQuadrature().

See Also#

DMField, DMFIELDSHELL, DMFieldShellGetContext(), DMFieldShellSetEvaluate(), DMFieldShellSetEvaluateFE(), DMFieldShellSetEvaluateFV(), DMFieldShellSetDestroy()

Level#

intermediate

Location#

src/dm/field/impls/shell/dmfieldshell.c

Examples#

src/dm/field/tutorials/ex1.c


Index of all DM routines
Table of Contents for all manual pages
Index of all manual pages