]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Make two variables const only for newer petsc versions.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 7 Oct 2004 20:10:19 +0000 (20:10 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 7 Oct 2004 20:10:19 +0000 (20:10 +0000)
git-svn-id: https://svn.dealii.org/trunk@9699 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/source/petsc_matrix_base.cc

index 29fefb2181dd76902f9dd05862a46246890908fa..a568ba55eb7bc914114a25ec27e72ac99153bb95 100644 (file)
@@ -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));

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.