1 #pragma once 2 3 #include <petscdm.h> 4 5 #if defined(PETSC_HAVE_LIBCEED) 6 #include <ceed.h> 7 8 #if defined(PETSC_CLANG_STATIC_ANALYZER) 9 void PetscCallCEED(CeedErrorType); 10 #else 11 #define PetscCallCEED(...) \ 12 do { \ 13 CeedErrorType ierr_ceed_ = __VA_ARGS__; \ 14 PetscCheck(ierr_ceed_ == CEED_ERROR_SUCCESS, PETSC_COMM_SELF, PETSC_ERR_LIB, "libCEED error: %s", CeedErrorTypes[ierr_ceed_]); \ 15 } while (0) 16 #endif /* PETSC_CLANG_STATIC_ANALYZER */ 17 #define CHKERRQ_CEED(...) PetscCallCEED(__VA_ARGS__) 18 19 PETSC_EXTERN PetscErrorCode DMGetCeed(DM, Ceed *); 20 21 #endif 22