]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
fix PETSc stuff introduced by me the other day with version < 3
authorheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 3 Mar 2011 17:16:40 +0000 (17:16 +0000)
committerheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 3 Mar 2011 17:16:40 +0000 (17:16 +0000)
git-svn-id: https://svn.dealii.org/trunk@23459 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/lac/petsc_parallel_sparse_matrix.cc
deal.II/source/lac/petsc_sparse_matrix.cc

index e5287a1698a55669889176af2181037fa2ef7ab8..f16739d89a78c3f03c84284731f7fdb9d99338af 100644 (file)
@@ -557,7 +557,10 @@ namespace PETScWrappers
                                           // MatZeroRows(). Otherwise one can
                                           // not write into that row
                                           // afterwards.
-#if DEAL_II_PETSC_VERSION_LT(3,1,0)
+#if DEAL_II_PETSC_VERSION_LT(3,0,0)
+         ierr = MatSetOption (matrix, MAT_KEEP_ZEROED_ROWS);
+         AssertThrow (ierr == 0, ExcPETScError(ierr));
+#elif DEAL_II_PETSC_VERSION_LT(3,1,0)
          ierr = MatSetOption (matrix, MAT_KEEP_ZEROED_ROWS, PETSC_TRUE);
          AssertThrow (ierr == 0, ExcPETScError(ierr));
 #else
index 5b06c323f4e4491d27aaba8d96412d451b662eb2..19379aa04f118c5f0b33a18d9769a100a141918f 100644 (file)
@@ -293,7 +293,10 @@ namespace PETScWrappers
                                           // MatZeroRows(). Otherwise one can
                                           // not write into that row
                                           // afterwards.
-#if DEAL_II_PETSC_VERSION_LT(3,1,0)
+#if DEAL_II_PETSC_VERSION_LT(3,0,0)
+         ierr = MatSetOption (matrix, MAT_KEEP_ZEROED_ROWS);
+         AssertThrow (ierr == 0, ExcPETScError(ierr));
+#elif DEAL_II_PETSC_VERSION_LT(3,1,0)
          ierr = MatSetOption (matrix, MAT_KEEP_ZEROED_ROWS, PETSC_TRUE);
          AssertThrow (ierr == 0, ExcPETScError(ierr));
 #else

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.