]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fixed bug that prevented block minres to work.
authorLuca Heltai <luca.heltai@sissa.it>
Mon, 20 Feb 2006 00:44:10 +0000 (00:44 +0000)
committerLuca Heltai <luca.heltai@sissa.it>
Mon, 20 Feb 2006 00:44:10 +0000 (00:44 +0000)
git-svn-id: https://svn.dealii.org/trunk@12423 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/solver_minres.h

index aa2ace847f5fb8cb42ac73a0b3a1b29692ba1ef0..55ed34ef416a66057dc284209546cadbb91770a6 100644 (file)
@@ -210,7 +210,7 @@ SolverMinRes<VECTOR>::solve (const MATRIX         &A,
   deallog.push("minres");
 
 
-  unsigned int VS = b.size();
+  // unsigned int VS = b.size();
 
   
                                   // Memory allocation
@@ -229,13 +229,13 @@ SolverMinRes<VECTOR>::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<VECTOR>::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<VECTOR>::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]);

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.