]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Make some code conditional on the petsc version.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 7 Oct 2004 20:12:33 +0000 (20:12 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 7 Oct 2004 20:12:33 +0000 (20:12 +0000)
git-svn-id: https://svn.dealii.org/branches/Branch-5-0@9700 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/source/petsc_matrix_base.cc

index d297e8052746ff2575066b20b81472afb21943d0..0302710c9a38696074d96ed904419f2311eec127 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.