xref: /petsc/include/petscdmceed.h (revision a2c9b50f2d9e15250a9a32fb5af7429e63ab8ebc)
1f918ec44SMatthew G. Knepley #if !defined(PETSCDMCEED_H)
2f918ec44SMatthew G. Knepley #define PETSCDMCEED_H
3f918ec44SMatthew G. Knepley 
4f918ec44SMatthew G. Knepley #include <petscdm.h>
5f918ec44SMatthew G. Knepley 
6f918ec44SMatthew G. Knepley #if defined(PETSC_HAVE_LIBCEED)
7f918ec44SMatthew G. Knepley #include <ceed.h>
8f918ec44SMatthew G. Knepley 
9*a2c9b50fSJeremy L Thompson #define CHKERRQ_CEED(ierr)                                                     \
10*a2c9b50fSJeremy L Thompson   do {                                                                         \
11*a2c9b50fSJeremy L Thompson     PetscErrorCode ierr_ = (ierr);                                             \
12*a2c9b50fSJeremy L Thompson     if (ierr_ != CEED_ERROR_SUCCESS)                                           \
13*a2c9b50fSJeremy L Thompson       SETERRQ1(PETSC_COMM_SELF, PETSC_ERR_LIB, "libCEED error: %s",             \
14*a2c9b50fSJeremy L Thompson               CeedErrorTypes[ierr_]);                                          \
15*a2c9b50fSJeremy L Thompson   } while (0)
16*a2c9b50fSJeremy L Thompson 
17f918ec44SMatthew G. Knepley PETSC_EXTERN PetscErrorCode DMGetCeed(DM, Ceed *);
18*a2c9b50fSJeremy L Thompson 
19f918ec44SMatthew G. Knepley #endif
20f918ec44SMatthew G. Knepley 
21f918ec44SMatthew G. Knepley #endif
22