From ced1ae1de25588a267e70d809ac723ea176b5276 Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Sun, 18 Sep 2022 15:51:09 +0200 Subject: [PATCH] Make sure not to work with possibly uninitialized variables --- tests/matrix_free/stokes_computation.cc | 2 +- tests/numerics/no_flux_18.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/matrix_free/stokes_computation.cc b/tests/matrix_free/stokes_computation.cc index baf0623f19..58a4c813df 100644 --- a/tests/matrix_free/stokes_computation.cc +++ b/tests/matrix_free/stokes_computation.cc @@ -256,7 +256,7 @@ namespace StokesClass // apply the top right block { LinearAlgebra::distributed::BlockVector 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); diff --git a/tests/numerics/no_flux_18.cc b/tests/numerics/no_flux_18.cc index 5bd134fdcf..7d42a17830 100644 --- a/tests/numerics/no_flux_18.cc +++ b/tests/numerics/no_flux_18.cc @@ -257,7 +257,7 @@ namespace StokesClass // apply the top right block { LinearAlgebra::distributed::BlockVector 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); -- 2.39.5