From de81cc22971ff8355aa6da4ad60187b3c2c0c7cd Mon Sep 17 00:00:00 2001 From: wolf Date: Thu, 7 Oct 2004 20:12:33 +0000 Subject: [PATCH] Make some code conditional on the petsc version. git-svn-id: https://svn.dealii.org/branches/Branch-5-0@9700 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/source/petsc_matrix_base.cc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/deal.II/lac/source/petsc_matrix_base.cc b/deal.II/lac/source/petsc_matrix_base.cc index d297e80527..0302710c9a 100644 --- a/deal.II/lac/source/petsc_matrix_base.cc +++ b/deal.II/lac/source/petsc_matrix_base.cc @@ -46,10 +46,18 @@ namespace PETScWrappers // get a representation of the present // row - int ncols; + int ncols; + +#if (PETSC_VERSION_MAJOR <= 2) && \ + ((PETSC_VERSION_MINOR < 2) || \ + ((PETSC_VERSION_MINOR == 2) && (PETSC_VERSION_SUBMINOR == 0))) + int *colnums; + PetscScalar *values; +#else const int *colnums; const PetscScalar *values; - +#endif + int ierr; ierr = MatGetRow(*matrix, this->a_row, &ncols, &colnums, &values); AssertThrow (ierr == 0, MatrixBase::ExcPETScError(ierr)); -- 2.39.5