From: wolf Date: Wed, 10 Aug 2005 14:16:22 +0000 (+0000) Subject: Make yesterday's changes also compile with petsc 2.2.x. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b8e663808e035c6b2a30481d3de2763b872f5e07;p=dealii-svn.git Make yesterday's changes also compile with petsc 2.2.x. git-svn-id: https://svn.dealii.org/trunk@11271 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 9243c06410..4d903051f0 100644 --- a/deal.II/lac/source/petsc_matrix_base.cc +++ b/deal.II/lac/source/petsc_matrix_base.cc @@ -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 petsc_rows (rows.begin(), rows.end()); +#else const std::vector petsc_rows (rows.begin(), rows.end()); +#endif // call the functions. note that we have // to call them even if #rows is empty,