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 103a336bb1SMatthew G. Knepley PETSC_EXTERN PetscClassId DMADAPTOR_CLASSID; 11ac09b921SBarry Smith 123a336bb1SMatthew G. Knepley /*J 133a336bb1SMatthew G. Knepley DMAdaptorType - String with the name of a PETSc DMAdaptor type 145675c177SMatthew G. Knepley 153a336bb1SMatthew G. Knepley Level: beginner 165675c177SMatthew G. Knepley 173a336bb1SMatthew G. Knepley Note: 183a336bb1SMatthew G. Knepley [](dm_adaptor_table) for a table of available matrix types 193a336bb1SMatthew G. Knepley 203a336bb1SMatthew G. Knepley .seealso: [](dm_adaptor_table), [](ch_unstructured), `DMAdaptorCreate()`, `DMAdaptor`, `DMAdaptorRegister()` 213a336bb1SMatthew G. Knepley J*/ 223a336bb1SMatthew G. Knepley typedef const char *DMAdaptorType; 233a336bb1SMatthew G. Knepley #define DMADAPTORGRADIENT "gradient" 243a336bb1SMatthew G. Knepley #define DMADAPTORFLUX "flux" 253a336bb1SMatthew G. Knepley 263a336bb1SMatthew G. Knepley PETSC_EXTERN PetscFunctionList DMAdaptorList; 278b724c91SMatthew G. Knepley PETSC_EXTERN PetscFunctionList DMAdaptorMonitorList; 288b724c91SMatthew G. Knepley PETSC_EXTERN PetscFunctionList DMAdaptorMonitorCreateList; 298b724c91SMatthew G. Knepley PETSC_EXTERN PetscFunctionList DMAdaptorMonitorDestroyList; 305675c177SMatthew G. Knepley 315675c177SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorCreate(MPI_Comm, DMAdaptor *); 323a336bb1SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorSetType(DMAdaptor, DMAdaptorType); 333a336bb1SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorGetType(DMAdaptor, DMAdaptorType *); 343a336bb1SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorRegister(const char[], PetscErrorCode (*)(DMAdaptor)); 353a336bb1SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorRegisterAll(void); 363a336bb1SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorRegisterDestroy(void); 37*e03fd340SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorSetOptionsPrefix(DMAdaptor, const char[]); 385675c177SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorSetFromOptions(DMAdaptor); 393a336bb1SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorSetUp(DMAdaptor); 403a336bb1SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorView(DMAdaptor, PetscViewer); 413a336bb1SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorDestroy(DMAdaptor *); 425675c177SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorGetSolver(DMAdaptor, SNES *); 435675c177SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorSetSolver(DMAdaptor, SNES); 44ad7f8140SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorGetSequenceLength(DMAdaptor, PetscInt *); 45ad7f8140SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorSetSequenceLength(DMAdaptor, PetscInt); 468e21cdf6SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorGetTransferFunction(DMAdaptor, PetscErrorCode (**)(DMAdaptor, DM, Vec, DM, Vec, void *)); 478e21cdf6SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorSetTransferFunction(DMAdaptor, PetscErrorCode (*)(DMAdaptor, DM, Vec, DM, Vec, void *)); 483a336bb1SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorGetMixedSetupFunction(DMAdaptor, PetscErrorCode (**)(DMAdaptor, DM)); 493a336bb1SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorSetMixedSetupFunction(DMAdaptor, PetscErrorCode (*)(DMAdaptor, DM)); 50174e7490SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorAdapt(DMAdaptor, Vec, DMAdaptationStrategy, DM *, Vec *); 518b724c91SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorGetCriterion(DMAdaptor, DMAdaptationCriterion *); 528b724c91SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorSetCriterion(DMAdaptor, DMAdaptationCriterion); 538b724c91SMatthew G. Knepley 548b724c91SMatthew 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 **)); 558b724c91SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorMonitorRegisterAll(void); 568b724c91SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorMonitorRegisterDestroy(void); 578b724c91SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorMonitor(DMAdaptor, PetscInt, DM, DM, PetscInt, PetscReal[], Vec); 588b724c91SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorMonitorSet(DMAdaptor, PetscErrorCode (*)(DMAdaptor, PetscInt, DM, DM, PetscInt, PetscReal[], Vec, void *), void *, PetscErrorCode (*)(void **)); 598b724c91SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorMonitorSetFromOptions(DMAdaptor, const char[], const char[], void *); 608b724c91SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorMonitorCancel(DMAdaptor); 618b724c91SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorMonitorSize(DMAdaptor, PetscInt, DM, DM, PetscInt, PetscReal[], Vec, PetscViewerAndFormat *); 628b724c91SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorMonitorError(DMAdaptor, PetscInt, DM, DM, PetscInt, PetscReal[], Vec, PetscViewerAndFormat *); 638b724c91SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorMonitorErrorDraw(DMAdaptor, PetscInt, DM, DM, PetscInt, PetscReal[], Vec, PetscViewerAndFormat *); 648b724c91SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorMonitorErrorDrawLGCreate(PetscViewer, PetscViewerFormat, void *, PetscViewerAndFormat **); 658b724c91SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMAdaptorMonitorErrorDrawLG(DMAdaptor, PetscInt, DM, DM, PetscInt, PetscReal[], Vec, PetscViewerAndFormat *); 66