]> https://gitweb.dealii.org/ - dealii.git/commitdiff
PETscWrappers: Bugfix: use MAT_INPLACE_MATRIX instead of MAT_REUSE_MATRIX
authorMatthias Maier <tamiko@43-1.org>
Mon, 17 Sep 2018 17:47:05 +0000 (12:47 -0500)
committerMatthias Maier <tamiko@43-1.org>
Wed, 19 Sep 2018 14:54:18 +0000 (09:54 -0500)
This fixes a bug with the transpose() function when used with PETSc 3.9
or newer.

source/lac/petsc_matrix_base.cc

index 7ec261dfd40aaecd4de8b1816a9ad61f2487f33e..9ad476e4fd8df6860f3e5a0cbf407f6f0f98602b 100644 (file)
@@ -605,7 +605,12 @@ namespace PETScWrappers
   void
   MatrixBase::transpose()
   {
+#  if DEAL_II_PETSC_VERSION_LT(3, 8, 0)
     const PetscErrorCode ierr = MatTranspose(matrix, MAT_REUSE_MATRIX, &matrix);
+#  else
+    const PetscErrorCode ierr =
+      MatTranspose(matrix, MAT_INPLACE_MATRIX, &matrix);
+#  endif
     AssertThrow(ierr == 0, 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.