From: wolf Date: Thu, 7 Oct 2004 20:12:33 +0000 (+0000) Subject: Make some code conditional on the petsc version. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=de81cc22971ff8355aa6da4ad60187b3c2c0c7cd;p=dealii-svn.git 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 --- 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));