1a4963045SJacob Faibussowitsch #pragma once 2012bc364SMatthew G. Knepley 3012bc364SMatthew G. Knepley #include <petscdmplex.h> 4012bc364SMatthew G. Knepley #include <petscdmplextransformtypes.h> 5012bc364SMatthew G. Knepley 6ce78bad3SBarry Smith /* SUBMANSEC = DM */ 7ce78bad3SBarry Smith 8012bc364SMatthew G. Knepley PETSC_EXTERN PetscClassId DMPLEXTRANSFORM_CLASSID; 9012bc364SMatthew G. Knepley 10c369401fSMatthew G. Knepley /*J 11ce78bad3SBarry Smith DMPlexTransformType - String with the name of a PETSc `DMPlexTransformType` 12c369401fSMatthew G. Knepley 13c369401fSMatthew G. Knepley Level: beginner 14c369401fSMatthew G. Knepley 15c369401fSMatthew G. Knepley Note: 16ce78bad3SBarry Smith [](plex_transform_table) for a table of available transformation types 17c369401fSMatthew G. Knepley 18c369401fSMatthew G. Knepley .seealso: [](plex_transform_table), [](ch_unstructured), `DMPlexTransformCreate()`, `DMPlexTransform`, `DMPlexTransformRegister()` 19c369401fSMatthew G. Knepley J*/ 20012bc364SMatthew G. Knepley typedef const char *DMPlexTransformType; 21012bc364SMatthew G. Knepley #define DMPLEXREFINEREGULAR "refine_regular" 22012bc364SMatthew G. Knepley #define DMPLEXREFINEALFELD "refine_alfeld" 23012bc364SMatthew G. Knepley #define DMPLEXREFINEPOWELLSABIN "refine_powell_sabin" 24012bc364SMatthew G. Knepley #define DMPLEXREFINEBOUNDARYLAYER "refine_boundary_layer" 25012bc364SMatthew G. Knepley #define DMPLEXREFINESBR "refine_sbr" 26012bc364SMatthew G. Knepley #define DMPLEXREFINETOBOX "refine_tobox" 27012bc364SMatthew G. Knepley #define DMPLEXREFINETOSIMPLEX "refine_tosimplex" 28a12d352dSMatthew G. Knepley #define DMPLEXREFINE1D "refine_1d" 29ce78bad3SBarry Smith #define DMPLEXEXTRUDETYPE "extrude" 30eaabba2dSMatthew G. Knepley #define DMPLEXCOHESIVEEXTRUDE "cohesive_extrude" 31012bc364SMatthew G. Knepley #define DMPLEXTRANSFORMFILTER "transform_filter" 32012bc364SMatthew G. Knepley 33012bc364SMatthew G. Knepley PETSC_EXTERN PetscFunctionList DMPlexTransformList; 34012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformCreate(MPI_Comm, DMPlexTransform *); 35012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformSetType(DMPlexTransform, DMPlexTransformType); 36012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformGetType(DMPlexTransform, DMPlexTransformType *); 37012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformRegister(const char[], PetscErrorCode (*)(DMPlexTransform)); 38012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformRegisterAll(void); 39012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformRegisterDestroy(void); 40012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformSetFromOptions(DMPlexTransform); 41012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformSetUp(DMPlexTransform); 42012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformView(DMPlexTransform, PetscViewer); 43012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformDestroy(DMPlexTransform *); 44012bc364SMatthew G. Knepley 45d410b0cfSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexGetTransformType(DM, DMPlexTransformType *); 46d410b0cfSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexSetTransformType(DM, DMPlexTransformType); 4761f058f9SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexGetTransform(DM, DMPlexTransform *); 4861f058f9SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexSetTransform(DM, DMPlexTransform); 4961f058f9SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexGetSaveTransform(DM, PetscBool *); 5061f058f9SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexSetSaveTransform(DM, PetscBool); 51d410b0cfSMatthew G. Knepley 52012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformGetDM(DMPlexTransform, DM *); 53012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformSetDM(DMPlexTransform, DM); 54d410b0cfSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformSetDimensions(DMPlexTransform, DM, DM); 559f4ada15SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformGetChart(DMPlexTransform, PetscInt *, PetscInt *); 569f4ada15SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformGetCellType(DMPlexTransform, PetscInt, DMPolytopeType *); 572827ebadSStefano Zampini PETSC_EXTERN PetscErrorCode DMPlexTransformGetCellTypeStratum(DMPlexTransform, DMPolytopeType, PetscInt *, PetscInt *); 589f4ada15SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformGetDepth(DMPlexTransform, PetscInt *); 599f4ada15SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformGetDepthStratum(DMPlexTransform, PetscInt, PetscInt *, PetscInt *); 60012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformGetActive(DMPlexTransform, DMLabel *); 61012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformSetActive(DMPlexTransform, DMLabel); 621cbae99dSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformGetTransformTypes(DMPlexTransform, DMLabel *); 631cbae99dSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformSetTransformTypes(DMPlexTransform, DMLabel); 64a4d5e7b4SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformGetMatchStrata(DMPlexTransform, PetscBool *); 65a4d5e7b4SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformSetMatchStrata(DMPlexTransform, PetscBool); 66a4d5e7b4SMatthew G. Knepley 67012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformGetTargetPoint(DMPlexTransform, DMPolytopeType, DMPolytopeType, PetscInt, PetscInt, PetscInt *); 68012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformGetSourcePoint(DMPlexTransform, PetscInt, DMPolytopeType *, DMPolytopeType *, PetscInt *, PetscInt *); 69012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformCellTransform(DMPlexTransform, DMPolytopeType, PetscInt, PetscInt *, PetscInt *, DMPolytopeType *[], PetscInt *[], PetscInt *[], PetscInt *[]); 70012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformCellTransformIdentity(DMPlexTransform, DMPolytopeType, PetscInt, PetscInt *, PetscInt *, DMPolytopeType *[], PetscInt *[], PetscInt *[], PetscInt *[]); 71012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformGetSubcellOrientationIdentity(DMPlexTransform, DMPolytopeType, PetscInt, PetscInt, DMPolytopeType, PetscInt, PetscInt, PetscInt *, PetscInt *); 72012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformGetSubcellOrientation(DMPlexTransform, DMPolytopeType, PetscInt, PetscInt, DMPolytopeType, PetscInt, PetscInt, PetscInt *, PetscInt *); 73d410b0cfSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformMapCoordinates(DMPlexTransform, DMPolytopeType, DMPolytopeType, PetscInt, PetscInt, PetscInt, PetscInt, const PetscScalar[], PetscScalar[]); 74012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformCreateDiscLabels(DMPlexTransform, DM); 75012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformApply(DMPlexTransform, DM, DM *); 769f4ada15SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformGetConeSize(DMPlexTransform, PetscInt, PetscInt *); 77012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformGetCone(DMPlexTransform, PetscInt, const PetscInt *[], const PetscInt *[]); 78012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformGetConeOriented(DMPlexTransform, PetscInt, PetscInt, const PetscInt *[], const PetscInt *[]); 79012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformRestoreCone(DMPlexTransform, PetscInt, const PetscInt *[], const PetscInt *[]); 80012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformGetCellVertices(DMPlexTransform, DMPolytopeType, PetscInt *, PetscScalar *[]); 81012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformGetSubcellVertices(DMPlexTransform, DMPolytopeType, DMPolytopeType, PetscInt, PetscInt *[]); 829fe9e680SJoe Wallwork PETSC_EXTERN PetscErrorCode DMPlexTransformAdaptLabel(DM, Vec, DMLabel, DMLabel, DM *); 83012bc364SMatthew G. Knepley 84012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexRefineRegularGetAffineTransforms(DMPlexTransform, DMPolytopeType, PetscInt *, PetscReal *[], PetscReal *[], PetscReal *[]); 85012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexRefineRegularGetAffineFaceTransforms(DMPlexTransform, DMPolytopeType, PetscInt *, PetscReal *[], PetscReal *[], PetscReal *[], PetscReal *[]); 86012bc364SMatthew G. Knepley 87d410b0cfSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformExtrudeGetLayers(DMPlexTransform, PetscInt *); 88d410b0cfSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformExtrudeSetLayers(DMPlexTransform, PetscInt); 89d410b0cfSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformExtrudeGetThickness(DMPlexTransform, PetscReal *); 90d410b0cfSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformExtrudeSetThickness(DMPlexTransform, PetscReal); 91d410b0cfSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformExtrudeGetTensor(DMPlexTransform, PetscBool *); 92d410b0cfSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformExtrudeSetTensor(DMPlexTransform, PetscBool); 93d410b0cfSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformExtrudeGetSymmetric(DMPlexTransform, PetscBool *); 94d410b0cfSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformExtrudeSetSymmetric(DMPlexTransform, PetscBool); 951fcf445aSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformExtrudeGetPeriodic(DMPlexTransform, PetscBool *); 961fcf445aSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformExtrudeSetPeriodic(DMPlexTransform, PetscBool); 9770ca1fe2SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformExtrudeGetNormal(DMPlexTransform, PetscReal[]); 98d410b0cfSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformExtrudeSetNormal(DMPlexTransform, const PetscReal[]); 9970ca1fe2SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformExtrudeSetNormalFunction(DMPlexTransform, PetscErrorCode (*)(PetscInt, PetscReal, const PetscReal[], PetscInt, PetscScalar[], void *)); 100d410b0cfSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformExtrudeSetThicknesses(DMPlexTransform, PetscInt, const PetscReal[]); 101d410b0cfSMatthew G. Knepley 102eaabba2dSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformCohesiveExtrudeGetTensor(DMPlexTransform, PetscBool *); 103eaabba2dSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformCohesiveExtrudeSetTensor(DMPlexTransform, PetscBool); 1042b987297SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformCohesiveExtrudeGetWidth(DMPlexTransform, PetscReal *); 1052b987297SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformCohesiveExtrudeSetWidth(DMPlexTransform, PetscReal); 106*3d951df1SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformCohesiveExtrudeGetUnsplit(DMPlexTransform, DMLabel *); 107eaabba2dSMatthew G. Knepley 1080528010dSStefano Zampini PETSC_EXTERN PetscErrorCode DMPlexCreateEphemeral(DMPlexTransform, const char[], DM *); 109