From: wolf Date: Thu, 7 Oct 2004 20:10:19 +0000 (+0000) Subject: Make two variables const only for newer petsc versions. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ddd0c063e28c9a992e96b7733adc5dcf8ec15af2;p=dealii-svn.git Make two variables const only for newer petsc versions. git-svn-id: https://svn.dealii.org/trunk@9699 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 29fefb2181..a568ba55eb 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));