xref: /petsc/src/dm/impls/forest/p4est/dmp8est.c (revision 061e922f3926be00487707c73b78dd3d40309129)
1 #include <petscsys.h>
2 #if defined(PETSC_HAVE_MPIUNI)
3   #undef MPI_SUCCESS
4 #endif
5 #if defined(PETSC_HAVE_P4EST)
6   #include <p4est_to_p8est.h>
7 #endif
8 #if defined(PETSC_HAVE_MPIUNI)
9   #define MPI_SUCCESS 0
10 #endif
11 
12 static const PetscInt PetscFaceToP4estFace[6]  = {4, 5, 2, 3, 1, 0};
13 static const PetscInt P4estFaceToPetscFace[6]  = {5, 4, 2, 3, 0, 1};
14 static const PetscInt P4estFaceToPetscOrnt[6]  = {-2, 0, 0, -3, -2, 0};
15 static const PetscInt PetscEdgeToP4estEdge[12] = {4, 1, 5, 0, 2, 7, 3, 6, 9, 8, 10, 11};
16 static const PetscInt P4estEdgeToPetscEdge[12] = {3, 1, 4, 6, 0, 2, 7, 5, 9, 8, 10, 11};
17 static const PetscInt P4estEdgeToPetscOrnt[12] = {-1, 0, 0, -1, 0, -1, -1, 0, -1, 0, 0, -1};
18 static const PetscInt PetscVertToP4estVert[8]  = {0, 2, 3, 1, 4, 5, 7, 6};
19 static const PetscInt P4estVertToPetscVert[8]  = {0, 3, 1, 2, 4, 5, 7, 6};
20 
21 #define DMPFOREST DMP8EST
22 
23 #define _append_pforest(a)   PetscConcat_(a, _p8est)
24 #define _infix_pforest(a, b) PetscConcat(_append_pforest(a), b)
25 #include "pforest.h"
26