Skip to content
Snippets Groups Projects
Commit 161a112e authored by Tom Fischer's avatar Tom Fischer
Browse files

Merge pull request #450 from wenqing/forPETSc35

Enabled PETSc 3.5
parents 5dd5a9c9 fa3207d1
No related branches found
No related tags found
No related merge requests found
...@@ -41,7 +41,11 @@ bool PETScLinearSolver::solve(const PETScVector &b, PETScVector &x) ...@@ -41,7 +41,11 @@ bool PETScLinearSolver::solve(const PETScVector &b, PETScVector &x)
PetscMemoryGetCurrentUsage(&mem1); PetscMemoryGetCurrentUsage(&mem1);
#endif #endif
#if (PETSC_VERSION_MAJOR == 3) && (PETSC_VERSION_MINOR > 4 || PETSC_VERSION_MAJOR > 3)
KSPSetOperators(_solver, _A.getRawMatrix(), _A.getRawMatrix());
#else
KSPSetOperators(_solver, _A.getRawMatrix(), _A.getRawMatrix(), DIFFERENT_NONZERO_PATTERN); KSPSetOperators(_solver, _A.getRawMatrix(), _A.getRawMatrix(), DIFFERENT_NONZERO_PATTERN);
#endif
KSPSolve(_solver, b.getData(), x.getData()); KSPSolve(_solver, b.getData(), x.getData());
......
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