From: Wolfgang Bangerth Date: Thu, 7 Oct 2004 20:10:19 +0000 (+0000) Subject: Make two variables const only for newer petsc versions. X-Git-Tag: v8.0.0~14772 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=06964fbb4aeb343b438446aef6ba9203bf2c99d7;p=dealii.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));