From 7d582395bb104774217f31ea29566661d5fbb1b1 Mon Sep 17 00:00:00 2001
From: Oliver Sander <sander@igpm.rwth-aachen.de>
Date: Thu, 11 Feb 2010 21:08:57 +0000
Subject: [PATCH] bugfix: properly set matrix and rhs sizes

[[Imported from SVN: r5541]]
---
 src/targetspacertrsolver.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/targetspacertrsolver.cc b/src/targetspacertrsolver.cc
index d40468b5..f44c2157 100644
--- a/src/targetspacertrsolver.cc
+++ b/src/targetspacertrsolver.cc
@@ -67,11 +67,11 @@ void TargetSpaceRiemannianTRSolver<TargetSpace>::solve()
             std::cout << "----------------------------------------------------" << std::endl;
         }
 
-        CorrectionType rhs;
+        CorrectionType rhs(1);   // length is 1 _block_
         CorrectionType corr(1);  // length is 1 _block_
         corr = 0;
 
-        MatrixType hesseMatrix;
+        MatrixType hesseMatrix(1,1);
 
         assembler_->assembleGradient(x_, rhs[0]);
         assembler_->assembleMatrix(x_, hesseMatrix[0][0]);
-- 
GitLab