From: Luca Heltai Date: Mon, 20 Feb 2006 00:44:10 +0000 (+0000) Subject: Fixed bug that prevented block minres to work. X-Git-Tag: v8.0.0~12259 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f90679072127504af20941ca4a67b9ca909e325;p=dealii.git Fixed bug that prevented block minres to work. git-svn-id: https://svn.dealii.org/trunk@12423 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/include/lac/solver_minres.h b/deal.II/lac/include/lac/solver_minres.h index aa2ace847f..55ed34ef41 100644 --- a/deal.II/lac/include/lac/solver_minres.h +++ b/deal.II/lac/include/lac/solver_minres.h @@ -210,7 +210,7 @@ SolverMinRes::solve (const MATRIX &A, deallog.push("minres"); - unsigned int VS = b.size(); + // unsigned int VS = b.size(); // Memory allocation @@ -229,13 +229,13 @@ SolverMinRes::solve (const MATRIX &A, // resize the vectors, but do not set // the values since they'd be overwritten // soon anyway. - u[0]->reinit(VS,true); - u[1]->reinit(VS,true); - u[2]->reinit(VS,true); - m[0]->reinit(VS,true); - m[1]->reinit(VS,true); - m[2]->reinit(VS,true); - v.reinit(VS,true); + u[0]->reinit(b,true); + u[1]->reinit(b,true); + u[2]->reinit(b,true); + m[0]->reinit(b,true); + m[1]->reinit(b,true); + m[2]->reinit(b,true); + v.reinit(b,true); // some values needed double delta[3]; @@ -274,11 +274,11 @@ SolverMinRes::solve (const MATRIX &A, r_l2 = r0; - u[0]->reinit(VS); + u[0]->reinit(b); delta[0] = 1.; - m[0]->reinit(VS); - m[1]->reinit(VS); - m[2]->reinit(VS); + m[0]->reinit(b); + m[1]->reinit(b); + m[2]->reinit(b); conv = this->control().check(0,r_l2); @@ -287,7 +287,7 @@ SolverMinRes::solve (const MATRIX &A, if (delta[1]!=0) v *= 1./std::sqrt(delta[1]); else - v.reinit(VS); + v.reinit(b); A.vmult(*u[2],v); u[2]->add (-std::sqrt(delta[1]/delta[0]), *u[0]);