diff options
Diffstat (limited to 'src/petsc_confmetric_solver.c')
-rw-r--r-- | src/petsc_confmetric_solver.c | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/src/petsc_confmetric_solver.c b/src/petsc_confmetric_solver.c index a95fa5a..dbce686 100644 --- a/src/petsc_confmetric_solver.c +++ b/src/petsc_confmetric_solver.c @@ -17,26 +17,9 @@ #include <petsc.h> #include <petscversion.h> -#if PETSC_VERSION_MAJOR < 2 || (PETSC_VERSION_MAJOR == 2 && PETSC_VERSION_MINOR == 0) -/* Up to and including version 2.0.x */ -# include <sles.h> -#elif PETSC_VERSION_MAJOR == 2 && PETSC_VERSION_MINOR <= 1 -/* Up to and including version 2.1.x */ -# include <petscsles.h> -#else -/* Later versions */ -# include <petscmat.h> -# include <petscksp.h> -# define SLES KSP -# define SLESCreate KSPCreate -# define SLESSetOperators KSPSetOperators -# define SLESGetKSP(a,b) ((*b)=a,0) -# define SLESGetPC KSPGetPC -# define SLESSetFromOptions KSPSetFromOptions -/* # define SLESSolve(a,b,c,d) (KSPSetRhs((a),(b)),KSPSetSolution((a),(c)),KSPSolve(a),KSPGetIterationNumber(a,d)) */ -# define SLESSolve(a,b,c,d) (KSPSolve((a),(b),(c)),KSPGetIterationNumber(a,d)) -# define SLESDestroy KSPDestroy -#endif + +/* Include some definitions for backwards compatibility */ +#include "petsc_defines.h" #include "ellpetsc.h" #include "CactusPUGH/PUGH/src/include/pugh.h" |