From 8cd572f56c3407ae624d99b77f2964415a020e14 Mon Sep 17 00:00:00 2001 From: ESeNonFossiIo Date: Mon, 18 Apr 2016 11:25:58 +0200 Subject: [PATCH] add guard on PETSc version --- source/lac/petsc_parallel_sparse_matrix.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/lac/petsc_parallel_sparse_matrix.cc b/source/lac/petsc_parallel_sparse_matrix.cc index cade60680d..237bf29268 100644 --- a/source/lac/petsc_parallel_sparse_matrix.cc +++ b/source/lac/petsc_parallel_sparse_matrix.cc @@ -893,6 +893,9 @@ namespace PETScWrappers IndexSet SparseMatrix::locally_owned_domain_indices () const { +#if DEAL_II_PETSC_VERSION_LT(3,3,0) + Assert(false,ExcNotImplemented()); +#else PetscInt n_rows, n_cols, min, max, size; PetscErrorCode ierr; IS *rows = nullptr; @@ -914,11 +917,15 @@ namespace PETScWrappers Assert(size==max-min+1, ExcMessage("PETSc is requiring non contiguous memory allocation.")); return locally_owned_domain_indices; +#endif } IndexSet SparseMatrix::locally_owned_range_indices () const { +#if DEAL_II_PETSC_VERSION_LT(3,3,0) + Assert(false,ExcNotImplemented()); +#else PetscInt n_rows, n_cols, min, max, size; PetscErrorCode ierr; IS *rows = nullptr; @@ -940,6 +947,7 @@ namespace PETScWrappers Assert(size==max-min+1, ExcMessage("PETSc is requiring non contiguous memory allocation.")); return locally_owned_range_indices; +#endif } } -- 2.39.5