xref: /petsc/include/petscdmadaptor.h (revision 4e8208cbcbc709572b8abe32f33c78b69c819375)
15675c177SMatthew G. Knepley /*
25675c177SMatthew G. Knepley       Objects which encapsulate mesh adaptation operation
35675c177SMatthew G. Knepley */
4a4963045SJacob Faibussowitsch #pragma once
5ac09b921SBarry Smith 
65675c177SMatthew G. Knepley #include <petscdm.h>
73a336bb1SMatthew G. Knepley #include <petscsnestypes.h>
83a336bb1SMatthew G. Knepley #include <petscdmadaptortypes.h>
95675c177SMatthew G. Knepley 
10ce78bad3SBarry Smith /* SUBMANSEC = DM */
11ce78bad3SBarry Smith 
123a336bb1SMatthew G. Knepley PETSC_EXTERN PetscClassId DMADAPTOR_CLASSID;
13ac09b921SBarry Smith 
143a336bb1SMatthew G. Knepley /*J
153a336bb1SMatthew G. Knepley    DMAdaptorType - String with the name of a PETSc DMAdaptor type
165675c177SMatthew G. Knepley 
173a336bb1SMatthew G. Knepley    Level: beginner
185675c177SMatthew G. Knepley 
193a336bb1SMatthew G. Knepley    Note:
203a336bb1SMatthew G. Knepley    [](dm_adaptor_table) for a table of available matrix types
213a336bb1SMatthew G. Knepley 
223a336bb1SMatthew G. Knepley .seealso: [](dm_adaptor_table), [](ch_unstructured), `DMAdaptorCreate()`, `DMAdaptor`, `DMAdaptorRegister()`
233a336bb1SMatthew G. Knepley J*/
243a336bb1SMatthew G. Knepley typedef const char *DMAdaptorType;
253a336bb1SMatthew G. Knepley #define DMADAPTORGRADIENT "gradient"
263a336bb1SMatthew G. Knepley #define DMADAPTORFLUX     "flux"
273a336bb1SMatthew G. Knepley 
283a336bb1SMatthew G. Knepley PETSC_EXTERN PetscFunctionList DMAdaptorList;
298b724c91SMatthew G. Knepley PETSC_EXTERN PetscFunctionList DMAdaptorMonitorList;
308b724c91SMatthew G. Knepley PETSC_EXTERN PetscFunctionList DMAdaptorMonitorCreateList;
318b724c91SMatthew G. Knepley PETSC_EXTERN PetscFunctionList DMAdaptorMonitorDestroyList;
325675c177SMatthew G. Knepley 
335675c177SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorCreate(MPI_Comm, DMAdaptor *);
343a336bb1SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorSetType(DMAdaptor, DMAdaptorType);
353a336bb1SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorGetType(DMAdaptor, DMAdaptorType *);
363a336bb1SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorRegister(const char[], PetscErrorCode (*)(DMAdaptor));
373a336bb1SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorRegisterAll(void);
383a336bb1SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorRegisterDestroy(void);
39e03fd340SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorSetOptionsPrefix(DMAdaptor, const char[]);
405675c177SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorSetFromOptions(DMAdaptor);
413a336bb1SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorSetUp(DMAdaptor);
423a336bb1SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorView(DMAdaptor, PetscViewer);
433a336bb1SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorDestroy(DMAdaptor *);
445675c177SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorGetSolver(DMAdaptor, SNES *);
455675c177SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorSetSolver(DMAdaptor, SNES);
46ad7f8140SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorGetSequenceLength(DMAdaptor, PetscInt *);
47ad7f8140SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorSetSequenceLength(DMAdaptor, PetscInt);
488e21cdf6SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorGetTransferFunction(DMAdaptor, PetscErrorCode (**)(DMAdaptor, DM, Vec, DM, Vec, void *));
498e21cdf6SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorSetTransferFunction(DMAdaptor, PetscErrorCode (*)(DMAdaptor, DM, Vec, DM, Vec, void *));
503a336bb1SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorGetMixedSetupFunction(DMAdaptor, PetscErrorCode (**)(DMAdaptor, DM));
513a336bb1SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorSetMixedSetupFunction(DMAdaptor, PetscErrorCode (*)(DMAdaptor, DM));
52174e7490SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorAdapt(DMAdaptor, Vec, DMAdaptationStrategy, DM *, Vec *);
538b724c91SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorGetCriterion(DMAdaptor, DMAdaptationCriterion *);
548b724c91SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorSetCriterion(DMAdaptor, DMAdaptationCriterion);
558b724c91SMatthew G. Knepley 
568b724c91SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorMonitorRegister(const char[], PetscViewerType, PetscViewerFormat, PetscErrorCode (*)(DMAdaptor, PetscInt, DM, DM, PetscInt, PetscReal[], Vec, PetscViewerAndFormat *), PetscErrorCode (*)(PetscViewer, PetscViewerFormat, void *, PetscViewerAndFormat **), PetscErrorCode (*)(PetscViewerAndFormat **));
578b724c91SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorMonitorRegisterAll(void);
588b724c91SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorMonitorRegisterDestroy(void);
598b724c91SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorMonitor(DMAdaptor, PetscInt, DM, DM, PetscInt, PetscReal[], Vec);
60*2a8381b2SBarry Smith PETSC_EXTERN PetscErrorCode DMAdaptorMonitorSet(DMAdaptor, PetscErrorCode (*)(DMAdaptor, PetscInt, DM, DM, PetscInt, PetscReal[], Vec, PetscCtx), PetscCtx, PetscCtxDestroyFn *);
618b724c91SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorMonitorSetFromOptions(DMAdaptor, const char[], const char[], void *);
628b724c91SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorMonitorCancel(DMAdaptor);
638b724c91SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorMonitorSize(DMAdaptor, PetscInt, DM, DM, PetscInt, PetscReal[], Vec, PetscViewerAndFormat *);
648b724c91SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorMonitorError(DMAdaptor, PetscInt, DM, DM, PetscInt, PetscReal[], Vec, PetscViewerAndFormat *);
658b724c91SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorMonitorErrorDraw(DMAdaptor, PetscInt, DM, DM, PetscInt, PetscReal[], Vec, PetscViewerAndFormat *);
668b724c91SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorMonitorErrorDrawLGCreate(PetscViewer, PetscViewerFormat, void *, PetscViewerAndFormat **);
678b724c91SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorMonitorErrorDrawLG(DMAdaptor, PetscInt, DM, DM, PetscInt, PetscReal[], Vec, PetscViewerAndFormat *);
68