aboutsummaryrefslogtreecommitdiff
path: root/src/petsc_flat_solver.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/petsc_flat_solver.c')
-rw-r--r--src/petsc_flat_solver.c23
1 files changed, 3 insertions, 20 deletions
diff --git a/src/petsc_flat_solver.c b/src/petsc_flat_solver.c
index 200e233..8f392e4 100644
--- a/src/petsc_flat_solver.c
+++ b/src/petsc_flat_solver.c
@@ -16,26 +16,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"