/usr/include/dune/pdelab/backend/petscutility.hh is in libdune-pdelab-dev 2.0.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=4 sw=2 sts=2:
#ifndef DUNE_PETSCUTILITY_HH
#define DUNE_PETSCUTILITY_HH
#if HAVE_PETSC
#include <petscsys.h>
#include <petscversion.h>
#include <dune/common/exceptions.hh>
namespace Dune {
namespace PDELab {
class PetscException
: public Dune::Exception
{};
} // namespace PDELab
} // namespace Dune
#define PETSC_GUARD_START {
#define PETSC_GUARD_END(err_var) \
if (err_var != 0) DUNE_THROW(Dune::PDELab::PetscException,"PETSc problem"); \
}
#define PETSC_CALL(x) \
PETSC_GUARD_START \
PetscErrorCode __petsc_err = (x); \
PETSC_GUARD_END(__petsc_err)
#define DUNE_PETSC_NEWER(MAJOR,MINOR,SUBMINOR) \
PETSC_VERSION_MAJOR > MAJOR || \
(PETSC_VERSION_MAJOR >= MAJOR && \
PETSC_VERSION_MINOR >= MINOR && \
PETSC_VERSION_SUBMINOR >= SUBMINOR)
#endif // HAVE_PETSC
#endif // DUNE_PETSCUTILITY_HH
|