From ffbd40b1fbc998427d92dd6f3e28d356b0a07bb1 Mon Sep 17 00:00:00 2001 From: Elias Pipping <elias.pipping@fu-berlin.de> Date: Wed, 27 Jul 2016 17:43:54 +0200 Subject: [PATCH] Fix initialisation --- dune/matrix-vector/triangularsolve.hh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dune/matrix-vector/triangularsolve.hh b/dune/matrix-vector/triangularsolve.hh index e41f362..4d7c42e 100644 --- a/dune/matrix-vector/triangularsolve.hh +++ b/dune/matrix-vector/triangularsolve.hh @@ -66,7 +66,8 @@ namespace MatrixVector { static Vector lowerTriangularSolve(Matrix const& L, Vector b, BitVector const* ignore, bool transpose = false) { - Vector x = 0; + Vector x = b; + x = 0; lowerTriangularSolve(L, std::move(b), x, ignore, transpose); return x; } @@ -120,7 +121,8 @@ namespace MatrixVector { static Vector upperTriangularSolve(Matrix const& U, Vector b, BitVector const* ignore, bool transpose = false) { - Vector x = 0; + Vector x = b; + x = 0; upperTriangularSolve(U, std::move(b), x, ignore, transpose); return x; } -- GitLab