xref: /petsc/include/petscdmplextransform.h (revision 2827ebad7ef18d4ed3f6d7633d71fb685bb29d6f)
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 *);
41*2827ebadSStefano Zampini PETSC_EXTERN PetscErrorCode DMPlexTransformGetCellTypeStratum(DMPlexTransform, DMPolytopeType, PetscInt *, PetscInt *);
429f4ada15SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformGetDepth(DMPlexTransform, PetscInt *);
439f4ada15SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformGetDepthStratum(DMPlexTransform, PetscInt, PetscInt *, PetscInt *);
44012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformGetActive(DMPlexTransform, DMLabel *);
45012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformSetActive(DMPlexTransform, DMLabel);
46012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformGetTargetPoint(DMPlexTransform, DMPolytopeType, DMPolytopeType, PetscInt, PetscInt, PetscInt *);
47012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformGetSourcePoint(DMPlexTransform, PetscInt, DMPolytopeType *, DMPolytopeType *, PetscInt *, PetscInt *);
48012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformCellTransform(DMPlexTransform, DMPolytopeType, PetscInt, PetscInt *, PetscInt *, DMPolytopeType *[], PetscInt *[], PetscInt *[], PetscInt *[]);
49012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformCellTransformIdentity(DMPlexTransform, DMPolytopeType, PetscInt, PetscInt *, PetscInt *, DMPolytopeType *[], PetscInt *[], PetscInt *[], PetscInt *[]);
50012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformGetSubcellOrientationIdentity(DMPlexTransform, DMPolytopeType, PetscInt, PetscInt, DMPolytopeType, PetscInt, PetscInt, PetscInt *, PetscInt *);
51012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformGetSubcellOrientation(DMPlexTransform, DMPolytopeType, PetscInt, PetscInt, DMPolytopeType, PetscInt, PetscInt, PetscInt *, PetscInt *);
52d410b0cfSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformMapCoordinates(DMPlexTransform, DMPolytopeType, DMPolytopeType, PetscInt, PetscInt, PetscInt, PetscInt, const PetscScalar[], PetscScalar[]);
53012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformCreateDiscLabels(DMPlexTransform, DM);
54012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformApply(DMPlexTransform, DM, DM *);
559f4ada15SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformGetConeSize(DMPlexTransform, PetscInt, PetscInt *);
56012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformGetCone(DMPlexTransform, PetscInt, const PetscInt *[], const PetscInt *[]);
57012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformGetConeOriented(DMPlexTransform, PetscInt, PetscInt, const PetscInt *[], const PetscInt *[]);
58012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformRestoreCone(DMPlexTransform, PetscInt, const PetscInt *[], const PetscInt *[]);
59012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformGetCellVertices(DMPlexTransform, DMPolytopeType, PetscInt *, PetscScalar *[]);
60012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformGetSubcellVertices(DMPlexTransform, DMPolytopeType, DMPolytopeType, PetscInt, PetscInt *[]);
619fe9e680SJoe Wallwork PETSC_EXTERN PetscErrorCode DMPlexTransformAdaptLabel(DM, Vec, DMLabel, DMLabel, DM *);
62012bc364SMatthew G. Knepley 
63012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexRefineRegularGetAffineTransforms(DMPlexTransform, DMPolytopeType, PetscInt *, PetscReal *[], PetscReal *[], PetscReal *[]);
64012bc364SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexRefineRegularGetAffineFaceTransforms(DMPlexTransform, DMPolytopeType, PetscInt *, PetscReal *[], PetscReal *[], PetscReal *[], PetscReal *[]);
65012bc364SMatthew G. Knepley 
66d410b0cfSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformExtrudeGetLayers(DMPlexTransform, PetscInt *);
67d410b0cfSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformExtrudeSetLayers(DMPlexTransform, PetscInt);
68d410b0cfSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformExtrudeGetThickness(DMPlexTransform, PetscReal *);
69d410b0cfSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformExtrudeSetThickness(DMPlexTransform, PetscReal);
70d410b0cfSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformExtrudeGetTensor(DMPlexTransform, PetscBool *);
71d410b0cfSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformExtrudeSetTensor(DMPlexTransform, PetscBool);
72d410b0cfSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformExtrudeGetSymmetric(DMPlexTransform, PetscBool *);
73d410b0cfSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformExtrudeSetSymmetric(DMPlexTransform, PetscBool);
741fcf445aSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformExtrudeGetPeriodic(DMPlexTransform, PetscBool *);
751fcf445aSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformExtrudeSetPeriodic(DMPlexTransform, PetscBool);
7670ca1fe2SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformExtrudeGetNormal(DMPlexTransform, PetscReal[]);
77d410b0cfSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformExtrudeSetNormal(DMPlexTransform, const PetscReal[]);
7870ca1fe2SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformExtrudeSetNormalFunction(DMPlexTransform, PetscErrorCode (*)(PetscInt, PetscReal, const PetscReal[], PetscInt, PetscScalar[], void *));
79d410b0cfSMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexTransformExtrudeSetThicknesses(DMPlexTransform, PetscInt, const PetscReal[]);
80d410b0cfSMatthew G. Knepley 
819f6c5813SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMPlexCreateEphemeral(DMPlexTransform, DM *);
829f6c5813SMatthew G. Knepley 
83012bc364SMatthew G. Knepley #endif
84