]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make sure not to work with possibly uninitialized variables 14280/head
authorMartin Kronbichler <martin.kronbichler@uni-a.de>
Sun, 18 Sep 2022 13:51:09 +0000 (15:51 +0200)
committerMartin Kronbichler <martin.kronbichler@uni-a.de>
Sun, 18 Sep 2022 13:51:09 +0000 (15:51 +0200)
tests/matrix_free/stokes_computation.cc
tests/numerics/no_flux_18.cc

index baf0623f19a8cafe67b6e5de259d50103d4cf894..58a4c813df8c93c1d26f5c9f4359175386c3d250 100644 (file)
@@ -256,7 +256,7 @@ namespace StokesClass
       // apply the top right block
       {
         LinearAlgebra::distributed::BlockVector<double> dst_tmp(dst);
-        dst_tmp.block(0) *= 0.0;
+        dst_tmp.block(0) = 0.0;
         stokes_matrix.vmult(utmp, dst_tmp); // B^T
         utmp.block(0) *= -1.0;
         utmp.block(0) += src.block(0);
index 5bd134fdcfbbd0da9498664d071d331fb59db337..7d42a17830372288bb5f385e3ddb7eaf656973e5 100644 (file)
@@ -257,7 +257,7 @@ namespace StokesClass
       // apply the top right block
       {
         LinearAlgebra::distributed::BlockVector<double> dst_tmp(dst);
-        dst_tmp.block(0) *= 0.0;
+        dst_tmp.block(0) = 0.0;
         stokes_matrix.vmult(utmp, dst_tmp); // B^T
         utmp.block(0) *= -1.0;
         utmp.block(0) += src.block(0);

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.