From ddd0c063e28c9a992e96b7733adc5dcf8ec15af2 Mon Sep 17 00:00:00 2001 From: wolf Date: Thu, 7 Oct 2004 20:10:19 +0000 Subject: [PATCH] Make two variables const only for newer petsc versions. git-svn-id: https://svn.dealii.org/trunk@9699 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 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)); -- 2.39.5