]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Make yesterday's changes also compile with petsc 2.2.x.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 10 Aug 2005 14:16:22 +0000 (14:16 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 10 Aug 2005 14:16:22 +0000 (14:16 +0000)
git-svn-id: https://svn.dealii.org/trunk@11271 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/source/petsc_matrix_base.cc

index 9243c06410c01ac9d8469760a3821d685edee2b5..4d903051f0259291b5495d73d546dc6a87edec76 100644 (file)
@@ -205,7 +205,11 @@ namespace PETScWrappers
                                      // now set all the entries of this row to
                                      // zero
     IS index_set;
+#if (PETSC_VERSION_MAJOR <= 2) && (PETSC_VERSION_MINOR <= 2)
+    const int petsc_row      = row;
+#else
     const PetscInt petsc_row = row;
+#endif
     ISCreateGeneral (get_mpi_communicator(), 1, &petsc_row, &index_set);
     
     static const PetscScalar zero = 0;
@@ -227,7 +231,11 @@ namespace PETScWrappers
                                      // now set all the entries of these rows
                                      // to zero
     IS index_set;
+#if (PETSC_VERSION_MAJOR <= 2) && (PETSC_VERSION_MINOR <= 2)
+    const std::vector<int>      petsc_rows (rows.begin(), rows.end());
+#else
     const std::vector<PetscInt> petsc_rows (rows.begin(), rows.end());
+#endif
 
                                      // call the functions. note that we have
                                      // to call them even if #rows is empty,

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.