From dc9052c98c9ebf2371c726a419c3a38fb7b920a0 Mon Sep 17 00:00:00 2001 From: Gaetan Bricteux <gaetan.bricteux@uclouvain.be> Date: Wed, 17 Jul 2013 10:11:25 +0000 Subject: [PATCH] fix PETSc --- Solver/linearSystemPETSc.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Solver/linearSystemPETSc.cpp b/Solver/linearSystemPETSc.cpp index f1b0cd9402..4449e51531 100644 --- a/Solver/linearSystemPETSc.cpp +++ b/Solver/linearSystemPETSc.cpp @@ -353,7 +353,11 @@ void linearSystemPETScBlockDouble::printMatlab(const char *filename) const PetscViewerSetFormat(viewer,PETSC_VIEWER_ASCII_MATLAB); printf("export mat to %s\n", filename); MatView(_a, viewer); +#if (PETSC_VERSION_RELEASE == 0 || ((PETSC_VERSION_MAJOR == 3) && (PETSC_VERSION_MINOR >= 2))) PetscViewerDestroy(&viewer); +#else + PetscViewerDestroy(viewer); +#endif return; } -- GitLab