1: #ifndef PETSC_DM_PLEX_MMGCOMMON_H
2: #define PETSC_DM_PLEX_MMGCOMMON_H
4: #include <petsc/private/dmpleximpl.h>
6: #define PetscCallMMG_Private(ret, ...) \
7: do { \
8: PetscStackPushExternal(PetscStringize(__VA_ARGS__)); \
9: PetscErrorCode PETSC_UNUSED mmg_ierr_ = __VA_ARGS__; \
10: PetscStackPop; \
12: } while (0)
14: // MMG sometimes returns 1, sometimes 0 when an error has occurred
15: #define PetscCallMMG(...) PetscCallMMG_Private(MMG5_SUCCESS, __VA_ARGS__)
16: #define PetscCallMMG_NONSTANDARD(...) PetscCallMMG_Private(1, __VA_ARGS__)
17: #endif // PETSC_DM_PLEX_MMGCOMMON_H