From b8e663808e035c6b2a30481d3de2763b872f5e07 Mon Sep 17 00:00:00 2001 From: wolf Date: Wed, 10 Aug 2005 14:16:22 +0000 Subject: [PATCH] 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 --- deal.II/lac/source/petsc_matrix_base.cc | 8 ++++++++ 1 file changed, 8 insertions(+) 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, -- 2.39.5