Commit fed5fea6 authored by Dave Moxey's avatar Dave Moxey
Browse files

Add fixes for Debian packages

parent d2712617
......@@ -72,7 +72,7 @@ find_path (PETSC_DIR include/petsc.h
HINTS ENV PETSC_DIR
PATHS
# Debian paths
/usr/lib/petscdir/3.4
/usr/lib/petscdir/3.4 /usr/lib/petscdir/3.4.2
/usr/lib/petscdir/3.3 /usr/lib/petscdir/3.2 /usr/lib/petscdir/3.1
/usr/lib/petscdir/3.0.0 /usr/lib/petscdir/2.3.3 /usr/lib/petscdir/2.3.2
$ENV{HOME}/petsc
......
......@@ -36,6 +36,7 @@
#include <MultiRegions/GlobalLinSysPETSc.h>
#include "petscis.h"
#include "petscversion.h"
namespace Nektar
{
......@@ -207,7 +208,11 @@ namespace Nektar
KSPSetTolerances(
m_ksp, tolerance, PETSC_DEFAULT, PETSC_DEFAULT, PETSC_DEFAULT);
KSPSetFromOptions(m_ksp);
#if PETSC_VERSION_GE(3,5,0)
KSPSetOperators(m_ksp, m_matrix, m_matrix);
#else
KSPSetOperators(m_ksp, m_matrix, m_matrix, SAME_NONZERO_PATTERN);
#endif
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment