1 #ifndef PETSC_DM_PLEX_MMGCOMMON_H 2 #define PETSC_DM_PLEX_MMGCOMMON_H 3 4 #include <petsc/private/dmpleximpl.h> 5 6 #define PetscCallMMG_Private(ret,...) do { \ 7 PetscStackPush(PetscStringize(__VA_ARGS__)); \ 8 PetscErrorCode PETSC_UNUSED mmg_ierr_ = __VA_ARGS__; \ 9 PetscStackPop; \ 10 /* PetscCheck(mmg_ierr_ == (ret),PETSC_COMM_SELF,PETSC_ERR_LIB,"Error calling %s: error code %d",PetscStringize(__VA_ARGS__),mmg_ierr_); */ \ 11 } while (0) 12 13 // MMG sometimes returns 1, sometimes 0 when an error has occurred 14 #define PetscCallMMG(...) PetscCallMMG_Private(MMG5_SUCCESS,__VA_ARGS__) 15 #define PetscCallMMG_NONSTANDARD(...) PetscCallMMG_Private(1,__VA_ARGS__) 16 #endif // PETSC_DM_PLEX_MMGCOMMON_H 17