Actual source code: petscdmfield.h
1: #ifndef PETSCDMFIELD_H
2: #define PETSCDMFIELD_H
4: #include <petscdm.h>
5: #include <petscdt.h>
6: #include <petscfe.h>
8: /* SUBMANSEC = DM */
10: PETSC_EXTERN PetscErrorCode DMFieldInitializePackage(void);
11: PETSC_EXTERN PetscErrorCode DMFieldFinalizePackage(void);
13: PETSC_EXTERN PetscClassId DMFIELD_CLASSID;
15: /*J
16: DMFieldType - String with the name of a `DMField` method
18: Level: intermediate
20: .seealso: `DMField`, `DMFieldSetType()`, `DMFieldGetType()`, `DMFieldRegister()`
21: J*/
22: typedef const char *DMFieldType;
23: #define DMFIELDDA "da"
24: #define DMFIELDDS "ds"
25: #define DMFIELDSHELL "shell"
27: PETSC_EXTERN PetscFunctionList DMFieldList;
28: PETSC_EXTERN PetscErrorCode DMFieldSetType(DMField, DMFieldType);
29: PETSC_EXTERN PetscErrorCode DMFieldGetType(DMField, DMFieldType *);
30: PETSC_EXTERN PetscErrorCode DMFieldRegister(const char[], PetscErrorCode (*)(DMField));
32: typedef enum {
33: DMFIELD_VERTEX,
34: DMFIELD_EDGE,
35: DMFIELD_FACET,
36: DMFIELD_CELL
37: } DMFieldContinuity;
38: PETSC_EXTERN const char *const DMFieldContinuities[];
40: PETSC_EXTERN PetscErrorCode DMFieldDestroy(DMField *);
41: PETSC_EXTERN PetscErrorCode DMFieldView(DMField, PetscViewer);
43: PETSC_EXTERN PetscErrorCode DMFieldGetDM(DMField, DM *);
44: PETSC_EXTERN PetscErrorCode DMFieldGetNumComponents(DMField, PetscInt *);
45: PETSC_EXTERN PetscErrorCode DMFieldGetContinuity(DMField, DMFieldContinuity *);
47: PETSC_EXTERN PetscErrorCode DMFieldEvaluate(DMField, Vec, PetscDataType, void *, void *, void *);
48: PETSC_EXTERN PetscErrorCode DMFieldEvaluateFE(DMField, IS, PetscQuadrature, PetscDataType, void *, void *, void *);
49: PETSC_EXTERN PetscErrorCode DMFieldEvaluateFV(DMField, IS, PetscDataType, void *, void *, void *);
50: PETSC_EXTERN PetscErrorCode DMFieldCreateFEGeom(DMField, IS, PetscQuadrature, PetscBool, PetscFEGeom **);
52: PETSC_EXTERN PetscErrorCode DMFieldCreateDefaultQuadrature(DMField, IS, PetscQuadrature *);
54: PETSC_EXTERN PetscErrorCode DMFieldGetDegree(DMField, IS, PetscInt *, PetscInt *);
56: PETSC_EXTERN PetscErrorCode DMFieldCreateDA(DM, PetscInt, const PetscScalar *, DMField *);
57: PETSC_EXTERN PetscErrorCode DMFieldCreateDS(DM, PetscInt, Vec, DMField *);
58: PETSC_EXTERN PetscErrorCode DMFieldCreateDSWithDG(DM, DM, PetscInt, Vec, Vec, DMField *);
60: PETSC_EXTERN PetscErrorCode DMFieldCreateShell(DM, PetscInt, DMFieldContinuity, void *, DMField *);
61: PETSC_EXTERN PetscErrorCode DMFieldShellSetDestroy(DMField, PetscErrorCode (*)(DMField));
62: PETSC_EXTERN PetscErrorCode DMFieldShellGetContext(DMField, void *);
63: PETSC_EXTERN PetscErrorCode DMFieldShellSetEvaluate(DMField, PetscErrorCode (*)(DMField, Vec, PetscDataType, void *, void *, void *));
64: PETSC_EXTERN PetscErrorCode DMFieldShellSetEvaluateFE(DMField, PetscErrorCode (*)(DMField, IS, PetscQuadrature, PetscDataType, void *, void *, void *));
65: PETSC_EXTERN PetscErrorCode DMFieldShellEvaluateFEDefault(DMField, IS, PetscQuadrature, PetscDataType, void *, void *, void *);
66: PETSC_EXTERN PetscErrorCode DMFieldShellSetEvaluateFV(DMField, PetscErrorCode (*)(DMField, IS, PetscDataType, void *, void *, void *));
67: PETSC_EXTERN PetscErrorCode DMFieldShellEvaluateFVDefault(DMField, IS, PetscDataType, void *, void *, void *);
68: PETSC_EXTERN PetscErrorCode DMFieldShellSetGetDegree(DMField, PetscErrorCode (*)(DMField, IS, PetscInt *, PetscInt *));
69: PETSC_EXTERN PetscErrorCode DMFieldShellSetCreateDefaultQuadrature(DMField, PetscErrorCode (*)(DMField, IS, PetscQuadrature *));
71: #endif