xref: /petsc/src/dm/impls/forest/p4est/dmp8est.c (revision 0a96aa3bf9dab2395989eff53b4fb976d4f05537)
15bc33bd4SToby Isaac #include <petscsys.h>
2ed587871SSatish Balay #if defined(PETSC_HAVE_MPIUNI)
3ed587871SSatish Balay #undef MPI_SUCCESS
4ed587871SSatish Balay #endif
5b34044e4SToby Isaac #if defined(PETSC_HAVE_P4EST)
6b34044e4SToby Isaac #include <p4est_to_p8est.h>
7ef19d27cSToby Isaac #endif
8ed587871SSatish Balay #if defined(PETSC_HAVE_MPIUNI)
9ed587871SSatish Balay #define MPI_SUCCESS 0
10ed587871SSatish Balay #endif
115bc33bd4SToby Isaac 
125bc33bd4SToby Isaac static const PetscInt PetscFaceToP4estFace[6] = {4, 5, 2, 3, 1, 0};
13bb2ed840SToby Isaac static const PetscInt P4estFaceToPetscFace[6] = {5, 4, 2, 3, 0, 1};
14b5a892a1SMatthew G. Knepley static const PetscInt P4estFaceToPetscOrnt[6] = {-2, 0, 0, -3, -2, 0};
15943ba4e5SToby Isaac static const PetscInt PetscEdgeToP4estEdge[12] = {4, 1, 5, 0, 2, 7, 3, 6, 9, 8, 10, 11};
16bb2ed840SToby Isaac static const PetscInt P4estEdgeToPetscEdge[12] = {3, 1, 4, 6, 0, 2, 7, 5, 9, 8, 10, 11};
17b5a892a1SMatthew G. Knepley static const PetscInt P4estEdgeToPetscOrnt[12] = {-1, 0, 0, -1, 0, -1, -1, 0, -1, 0, 0, -1};
18943ba4e5SToby Isaac static const PetscInt PetscVertToP4estVert[8] = {0, 2, 3, 1, 4, 5, 7, 6};
19bb2ed840SToby Isaac static const PetscInt P4estVertToPetscVert[8] = {0, 3, 1, 2, 4, 5, 7, 6};
205bc33bd4SToby Isaac 
21d73861faSToby Isaac #define DMPFOREST DMP8EST
22d73861faSToby Isaac 
23d6a2e6abSJacob Faibussowitsch #define _append_pforest(a)  PetscConcat_(a,_p8est)
24d6a2e6abSJacob Faibussowitsch #define _infix_pforest(a,b) PetscConcat(_append_pforest(a),b)
25*0a96aa3bSJed Brown #include "pforest.h"
26