1 #include <petscsys.h> 2 #if defined(PETSC_HAVE_P4EST) 3 #include <p4est_to_p8est.h> 4 #endif 5 6 static const PetscInt PetscFaceToP4estFace[6] = {4, 5, 2, 3, 1, 0}; 7 8 static const PetscInt PetscOrntToP4estOrnt[6][8] = 9 { 10 {0, 4, 7, 3, 1, 5, 6, 2}, 11 {1, 5, 6, 2, 0, 4, 7, 3}, 12 {1, 5, 6, 2, 0, 4, 7, 3}, 13 {4, 7, 3, 0, 2, 1, 5, 6}, 14 {0, 4, 7, 3, 1, 5, 6, 2}, 15 {1, 5, 6, 2, 0, 4, 7, 3} 16 }; 17 18 static PetscInt PetscOrientToP4estOrient(PetscInt p4estFace, PetscInt petscOrient) 19 { 20 return PetscOrntToP4estOrnt[p4estFace][4+petscOrient]; 21 } 22 23 #define _append_pforest(a) a ## _p8est 24 #include "pforest.c" 25