Actual source code: petscdmadaptor.h
1: /*
2: Objects which encapsulate mesh adaptation operation
3: */
4: #pragma once
6: #include <petscdm.h>
7: #include <petscsnestypes.h>
8: #include <petscdmadaptortypes.h>
10: PETSC_EXTERN PetscClassId DMADAPTOR_CLASSID;
12: /*J
13: DMAdaptorType - String with the name of a PETSc DMAdaptor type
15: Level: beginner
17: Note:
18: [](dm_adaptor_table) for a table of available matrix types
20: .seealso: [](dm_adaptor_table), [](ch_unstructured), `DMAdaptorCreate()`, `DMAdaptor`, `DMAdaptorRegister()`
21: J*/
22: typedef const char *DMAdaptorType;
23: #define DMADAPTORGRADIENT "gradient"
24: #define DMADAPTORFLUX "flux"
26: PETSC_EXTERN PetscFunctionList DMAdaptorList;
27: PETSC_EXTERN PetscFunctionList DMAdaptorMonitorList;
28: PETSC_EXTERN PetscFunctionList DMAdaptorMonitorCreateList;
29: PETSC_EXTERN PetscFunctionList DMAdaptorMonitorDestroyList;
31: PETSC_EXTERN PetscErrorCode DMAdaptorCreate(MPI_Comm, DMAdaptor *);
32: PETSC_EXTERN PetscErrorCode DMAdaptorSetType(DMAdaptor, DMAdaptorType);
33: PETSC_EXTERN PetscErrorCode DMAdaptorGetType(DMAdaptor, DMAdaptorType *);
34: PETSC_EXTERN PetscErrorCode DMAdaptorRegister(const char[], PetscErrorCode (*)(DMAdaptor));
35: PETSC_EXTERN PetscErrorCode DMAdaptorRegisterAll(void);
36: PETSC_EXTERN PetscErrorCode DMAdaptorRegisterDestroy(void);
37: PETSC_EXTERN PetscErrorCode DMAdaptorSetOptionsPrefix(DMAdaptor, const char[]);
38: PETSC_EXTERN PetscErrorCode DMAdaptorSetFromOptions(DMAdaptor);
39: PETSC_EXTERN PetscErrorCode DMAdaptorSetUp(DMAdaptor);
40: PETSC_EXTERN PetscErrorCode DMAdaptorView(DMAdaptor, PetscViewer);
41: PETSC_EXTERN PetscErrorCode DMAdaptorDestroy(DMAdaptor *);
42: PETSC_EXTERN PetscErrorCode DMAdaptorGetSolver(DMAdaptor, SNES *);
43: PETSC_EXTERN PetscErrorCode DMAdaptorSetSolver(DMAdaptor, SNES);
44: PETSC_EXTERN PetscErrorCode DMAdaptorGetSequenceLength(DMAdaptor, PetscInt *);
45: PETSC_EXTERN PetscErrorCode DMAdaptorSetSequenceLength(DMAdaptor, PetscInt);
46: PETSC_EXTERN PetscErrorCode DMAdaptorGetTransferFunction(DMAdaptor, PetscErrorCode (**)(DMAdaptor, DM, Vec, DM, Vec, void *));
47: PETSC_EXTERN PetscErrorCode DMAdaptorSetTransferFunction(DMAdaptor, PetscErrorCode (*)(DMAdaptor, DM, Vec, DM, Vec, void *));
48: PETSC_EXTERN PetscErrorCode DMAdaptorGetMixedSetupFunction(DMAdaptor, PetscErrorCode (**)(DMAdaptor, DM));
49: PETSC_EXTERN PetscErrorCode DMAdaptorSetMixedSetupFunction(DMAdaptor, PetscErrorCode (*)(DMAdaptor, DM));
50: PETSC_EXTERN PetscErrorCode DMAdaptorAdapt(DMAdaptor, Vec, DMAdaptationStrategy, DM *, Vec *);
51: PETSC_EXTERN PetscErrorCode DMAdaptorGetCriterion(DMAdaptor, DMAdaptationCriterion *);
52: PETSC_EXTERN PetscErrorCode DMAdaptorSetCriterion(DMAdaptor, DMAdaptationCriterion);
54: PETSC_EXTERN PetscErrorCode DMAdaptorMonitorRegister(const char[], PetscViewerType, PetscViewerFormat, PetscErrorCode (*)(DMAdaptor, PetscInt, DM, DM, PetscInt, PetscReal[], Vec, PetscViewerAndFormat *), PetscErrorCode (*)(PetscViewer, PetscViewerFormat, void *, PetscViewerAndFormat **), PetscErrorCode (*)(PetscViewerAndFormat **));
55: PETSC_EXTERN PetscErrorCode DMAdaptorMonitorRegisterAll(void);
56: PETSC_EXTERN PetscErrorCode DMAdaptorMonitorRegisterDestroy(void);
57: PETSC_EXTERN PetscErrorCode DMAdaptorMonitor(DMAdaptor, PetscInt, DM, DM, PetscInt, PetscReal[], Vec);
58: PETSC_EXTERN PetscErrorCode DMAdaptorMonitorSet(DMAdaptor, PetscErrorCode (*)(DMAdaptor, PetscInt, DM, DM, PetscInt, PetscReal[], Vec, void *), void *, PetscCtxDestroyFn *);
59: PETSC_EXTERN PetscErrorCode DMAdaptorMonitorSetFromOptions(DMAdaptor, const char[], const char[], void *);
60: PETSC_EXTERN PetscErrorCode DMAdaptorMonitorCancel(DMAdaptor);
61: PETSC_EXTERN PetscErrorCode DMAdaptorMonitorSize(DMAdaptor, PetscInt, DM, DM, PetscInt, PetscReal[], Vec, PetscViewerAndFormat *);
62: PETSC_EXTERN PetscErrorCode DMAdaptorMonitorError(DMAdaptor, PetscInt, DM, DM, PetscInt, PetscReal[], Vec, PetscViewerAndFormat *);
63: PETSC_EXTERN PetscErrorCode DMAdaptorMonitorErrorDraw(DMAdaptor, PetscInt, DM, DM, PetscInt, PetscReal[], Vec, PetscViewerAndFormat *);
64: PETSC_EXTERN PetscErrorCode DMAdaptorMonitorErrorDrawLGCreate(PetscViewer, PetscViewerFormat, void *, PetscViewerAndFormat **);
65: PETSC_EXTERN PetscErrorCode DMAdaptorMonitorErrorDrawLG(DMAdaptor, PetscInt, DM, DM, PetscInt, PetscReal[], Vec, PetscViewerAndFormat *);