Skip to content
Snippets Groups Projects
Commit 8f77d5b7 authored by Axel Modave's avatar Axel Modave
Browse files

update solver for PETSc 3.2 (bis)

parent d0d038fa
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@
#include <petscksp.h>
#include "linearSystemPETSc.h"
#if (PETSC_VERSION_RELEASE == 0) // petsc-dev
#if (PETSC_VERSION_RELEASE == 0 || ((PETSC_VERSION_MAJOR == 3) && (PETSC_VERSION_MINOR == 2))) // petsc-dev
#define PetscTruth PetscBool
#define PetscOptionsGetTruth PetscOptionsGetBool
#endif
......@@ -46,7 +46,7 @@ linearSystemPETSc<scalar>::~linearSystemPETSc()
{
clear();
if(_kspAllocated)
#if (PETSC_VERSION_RELEASE == 0) // petsc-dev
#if (PETSC_VERSION_RELEASE == 0 || ((PETSC_VERSION_MAJOR == 3) && (PETSC_VERSION_MINOR == 2))) // petsc-dev
_try(KSPDestroy(&_ksp));
#else
_try(KSPDestroy(_ksp));
......@@ -151,7 +151,7 @@ template <class scalar>
void linearSystemPETSc<scalar>::clear()
{
if(_isAllocated){
#if (PETSC_VERSION_RELEASE == 0) // petsc-dev
#if (PETSC_VERSION_RELEASE == 0 || ((PETSC_VERSION_MAJOR == 3) && (PETSC_VERSION_MINOR == 2))) // petsc-dev
_try(MatDestroy(&_a));
_try(VecDestroy(&_x));
_try(VecDestroy(&_b));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment