]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Destroy tmp matrix in mmult.
authorRichard Schussnig <richard.schussnig@gmx.at>
Tue, 18 Aug 2020 18:33:56 +0000 (20:33 +0200)
committerRichard Schussnig <richard.schussnig@gmx.at>
Wed, 19 Aug 2020 16:37:05 +0000 (18:37 +0200)
When using a vector in the mmult, a tmp matrix with scaled rows is not destroyed - fix this.

source/lac/petsc_matrix_base.cc

index 24ffcb166b54e80b8fd4fc2b8aa15a7793d9e44a..e4cd99395180f698fcb30de7da6335edd6c785cd 100644 (file)
@@ -556,6 +556,8 @@ namespace PETScWrappers
                             PETSC_DEFAULT,
                             &result.petsc_matrix());
           AssertThrow(ierr == 0, ExcPETScError(ierr));
+          ierr = PETScWrappers::destroy_matrix(tmp);
+                           AssertThrow(ierr == 0, ExcPETScError(ierr));
         }
     }
   } // namespace internals

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.