Go to the documentation of this file.
3 #ifndef DUNE_PETSCUTILITY_HH
4 #define DUNE_PETSCUTILITY_HH
9 #include <petscversion.h>
10 #include <dune/common/exceptions.hh>
16 :
public Dune::Exception
23 #define PETSC_GUARD_START {
25 #define PETSC_GUARD_END(err_var) \
26 if (err_var != 0) DUNE_THROW(Dune::PDELab::PetscException,"PETSc problem"); \
29 #define PETSC_CALL(x) \
31 PetscErrorCode __petsc_err = (x); \
32 PETSC_GUARD_END(__petsc_err)
35 #define DUNE_PETSC_NEWER(MAJOR,MINOR,SUBMINOR) \
36 PETSC_VERSION_MAJOR > MAJOR || \
37 (PETSC_VERSION_MAJOR >= MAJOR && \
38 PETSC_VERSION_MINOR >= MINOR && \
39 PETSC_VERSION_SUBMINOR >= SUBMINOR)
43 #endif // DUNE_PETSCUTILITY_HH