xref: /petsc/include/petscdmplextransform.h (revision 1fcf445a439848b2e538efa39b3f63deb630163e)
16524c165SJacob Faibussowitsch #ifndef PETSCDMPLEXTRANSFORM_H
2012bc364SMatthew G. Knepley #define PETSCDMPLEXTRANSFORM_H
3012bc364SMatthew G. Knepley 
4012bc364SMatthew G. Knepley #include <petscdmplex.h>
5012bc364SMatthew G. Knepley #include <petscdmplextransformtypes.h>
6012bc364SMatthew G. Knepley 
7012bc364SMatthew G. Knepley PETSC_EXTERN PetscClassId DMPLEXTRANSFORM_CLASSID;
8012bc364SMatthew G. Knepley 
9012bc364SMatthew G. Knepley typedef const char *DMPlexTransformType;
10012bc364SMatthew G. Knepley #define DMPLEXREFINEREGULAR       "refine_regular"
11012bc364SMatthew G. Knepley #define DMPLEXREFINEALFELD        "refine_alfeld"
12012bc364SMatthew G. Knepley #define DMPLEXREFINEPOWELLSABIN   "refine_powell_sabin"
13012bc364SMatthew G. Knepley #define DMPLEXREFINEBOUNDARYLAYER "refine_boundary_layer"
14012bc364SMatthew G. Knepley #define DMPLEXREFINESBR           "refine_sbr"
15012bc364SMatthew G. Knepley #define DMPLEXREFINETOBOX         "refine_tobox"
16012bc364SMatthew G. Knepley #define DMPLEXREFINETOSIMPLEX     "refine_tosimplex"
17a12d352dSMatthew G. Knepley #define DMPLEXREFINE1D            "refine_1d"
18012bc364SMatthew G. Knepley #define DMPLEXEXTRUDE             "extrude"
19012bc364SMatthew G. Knepley #define DMPLEXTRANSFORMFILTER     "transform_filter"
20012bc364SMatthew G. Knepley 
21012bc364SMatthew G. Knepley PETSC_EXTERN PetscFunctionList DMPlexTransformList;
22012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode    DMPlexTransformCreate(MPI_Comm, DMPlexTransform *);
23012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode    DMPlexTransformSetType(DMPlexTransform, DMPlexTransformType);
24012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode    DMPlexTransformGetType(DMPlexTransform, DMPlexTransformType *);
25012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode    DMPlexTransformRegister(const char[], PetscErrorCode (*)(DMPlexTransform));
26012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode    DMPlexTransformRegisterAll(void);
27012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode    DMPlexTransformRegisterDestroy(void);
28012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode    DMPlexTransformSetFromOptions(DMPlexTransform);
29012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode    DMPlexTransformSetUp(DMPlexTransform);
30012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode    DMPlexTransformView(DMPlexTransform, PetscViewer);
31012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode    DMPlexTransformDestroy(DMPlexTransform *);
32012bc364SMatthew G. Knepley 
33d410b0cfSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexGetTransformType(DM, DMPlexTransformType *);
34d410b0cfSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexSetTransformType(DM, DMPlexTransformType);
35d410b0cfSMatthew G. Knepley 
36012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformGetDM(DMPlexTransform, DM *);
37012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformSetDM(DMPlexTransform, DM);
38d410b0cfSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformSetDimensions(DMPlexTransform, DM, DM);
399f4ada15SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformGetChart(DMPlexTransform, PetscInt *, PetscInt *);
409f4ada15SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformGetCellType(DMPlexTransform, PetscInt, DMPolytopeType *);
419f4ada15SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformGetDepth(DMPlexTransform, PetscInt *);
429f4ada15SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformGetDepthStratum(DMPlexTransform, PetscInt, PetscInt *, PetscInt *);
43012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformGetActive(DMPlexTransform, DMLabel *);
44012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformSetActive(DMPlexTransform, DMLabel);
45012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformGetTargetPoint(DMPlexTransform, DMPolytopeType, DMPolytopeType, PetscInt, PetscInt, PetscInt *);
46012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformGetSourcePoint(DMPlexTransform, PetscInt, DMPolytopeType *, DMPolytopeType *, PetscInt *, PetscInt *);
47012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformCellTransform(DMPlexTransform, DMPolytopeType, PetscInt, PetscInt *, PetscInt *, DMPolytopeType *[], PetscInt *[], PetscInt *[], PetscInt *[]);
48012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformCellTransformIdentity(DMPlexTransform, DMPolytopeType, PetscInt, PetscInt *, PetscInt *, DMPolytopeType *[], PetscInt *[], PetscInt *[], PetscInt *[]);
49012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformGetSubcellOrientationIdentity(DMPlexTransform, DMPolytopeType, PetscInt, PetscInt, DMPolytopeType, PetscInt, PetscInt, PetscInt *, PetscInt *);
50012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformGetSubcellOrientation(DMPlexTransform, DMPolytopeType, PetscInt, PetscInt, DMPolytopeType, PetscInt, PetscInt, PetscInt *, PetscInt *);
51d410b0cfSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformMapCoordinates(DMPlexTransform, DMPolytopeType, DMPolytopeType, PetscInt, PetscInt, PetscInt, PetscInt, const PetscScalar[], PetscScalar[]);
52012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformCreateDiscLabels(DMPlexTransform, DM);
53012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformApply(DMPlexTransform, DM, DM *);
549f4ada15SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformGetConeSize(DMPlexTransform, PetscInt, PetscInt *);
55012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformGetCone(DMPlexTransform, PetscInt, const PetscInt *[], const PetscInt *[]);
56012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformGetConeOriented(DMPlexTransform, PetscInt, PetscInt, const PetscInt *[], const PetscInt *[]);
57012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformRestoreCone(DMPlexTransform, PetscInt, const PetscInt *[], const PetscInt *[]);
58012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformGetCellVertices(DMPlexTransform, DMPolytopeType, PetscInt *, PetscScalar *[]);
59012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformGetSubcellVertices(DMPlexTransform, DMPolytopeType, DMPolytopeType, PetscInt, PetscInt *[]);
609fe9e680SJoe Wallwork PETSC_EXTERN PetscErrorCode DMPlexTransformAdaptLabel(DM, Vec, DMLabel, DMLabel, DM *);
61012bc364SMatthew G. Knepley 
62012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexRefineRegularGetAffineTransforms(DMPlexTransform, DMPolytopeType, PetscInt *, PetscReal *[], PetscReal *[], PetscReal *[]);
63012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexRefineRegularGetAffineFaceTransforms(DMPlexTransform, DMPolytopeType, PetscInt *, PetscReal *[], PetscReal *[], PetscReal *[], PetscReal *[]);
64012bc364SMatthew G. Knepley 
65d410b0cfSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformExtrudeGetLayers(DMPlexTransform, PetscInt *);
66d410b0cfSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformExtrudeSetLayers(DMPlexTransform, PetscInt);
67d410b0cfSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformExtrudeGetThickness(DMPlexTransform, PetscReal *);
68d410b0cfSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformExtrudeSetThickness(DMPlexTransform, PetscReal);
69d410b0cfSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformExtrudeGetTensor(DMPlexTransform, PetscBool *);
70d410b0cfSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformExtrudeSetTensor(DMPlexTransform, PetscBool);
71d410b0cfSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformExtrudeGetSymmetric(DMPlexTransform, PetscBool *);
72d410b0cfSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformExtrudeSetSymmetric(DMPlexTransform, PetscBool);
73*1fcf445aSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformExtrudeGetPeriodic(DMPlexTransform, PetscBool *);
74*1fcf445aSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformExtrudeSetPeriodic(DMPlexTransform, PetscBool);
7570ca1fe2SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformExtrudeGetNormal(DMPlexTransform, PetscReal[]);
76d410b0cfSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformExtrudeSetNormal(DMPlexTransform, const PetscReal[]);
7770ca1fe2SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformExtrudeSetNormalFunction(DMPlexTransform, PetscErrorCode (*)(PetscInt, PetscReal, const PetscReal[], PetscInt, PetscScalar[], void *));
78d410b0cfSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformExtrudeSetThicknesses(DMPlexTransform, PetscInt, const PetscReal[]);
79d410b0cfSMatthew G. Knepley 
809f6c5813SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexCreateEphemeral(DMPlexTransform, DM *);
819f6c5813SMatthew G. Knepley 
82012bc364SMatthew G. Knepley #endif
83