Commits

Matt Knepley  committed eb268ff

DMPlex: In refinement, added GetTriEdgeInverse_Static() and GetTriSubfaceInverse_Static()

  • Participants
  • Parent commits fa7b5aa
  • Branches knepley/pylith

Comments (0)

Files changed (1)

File src/dm/impls/plex/plexrefine.c

 PETSC_STATIC_INLINE PetscInt GetTriEdge_Static(PetscInt o, PetscInt r) {
   return (o < 0 ? 2-(o+r) : o+r)%3;
 }
+PETSC_STATIC_INLINE PetscInt GetTriEdgeInverse_Static(PetscInt o, PetscInt s) {
+  return (o < 0 ? 2-(o+s) : 3+s-o)%3;
+}
 
 /* Return triangle subface for orientation o, if it is r for o == 0 */
 PETSC_STATIC_INLINE PetscInt GetTriSubface_Static(PetscInt o, PetscInt r) {
   return (o < 0 ? 3-(o+r) : o+r)%3;
 }
+PETSC_STATIC_INLINE PetscInt GetTriSubfaceInverse_Static(PetscInt o, PetscInt s) {
+  return (o < 0 ? 3-(o+s) : 3+s-o)%3;
+}
 
 /* Return quad edge for orientation o, if it is r for o == 0 */
 PETSC_STATIC_INLINE PetscInt GetQuadEdge_Static(PetscInt o, PetscInt r) {