Date: 2026-05-01T06:11:46+00:00

Actual source code: mmgcommon.h

      1: #pragma once

      3: #include <petsc/private/dmpleximpl.h>

      5: #define PetscCallMMG_Private(ret, name, ...) \
      6:   do { \
      7:     PetscCall(PetscFPTrapPush(PETSC_FP_TRAP_OFF)); \
      8:     PetscStackPushExternal(PetscStringize(name)); \
      9:     int PETSC_UNUSED mmg_ierr_ = name(__VA_ARGS__); \
     10:     PetscStackPop; \
     11:     PetscCall(PetscFPTrapPop()); \
     12:     /* PetscCheck(mmg_ierr_ == (ret),PETSC_COMM_SELF,PETSC_ERR_LIB,"Error calling %s: error code %d",PetscStringize(__VA_ARGS__),mmg_ierr_); */ \
     13:   } while (0)

     15: // MMG sometimes returns 1, sometimes 0 when an error has occurred
     16: #define PetscCallMMG(name, ...)             PetscCallMMG_Private(MMG5_SUCCESS, name, __VA_ARGS__)
     17: #define PetscCallMMG_NONSTANDARD(name, ...) PetscCallMMG_Private(1, name, __VA_ARGS__)