However, in the second occurence of
return 0;
statement, max_iter is not updated before the return statement is
executed. In other words, I think
if ((resid = norm(s)/normb) < tol) {
x += alpha(0) * phat;
tol = resid;
return 0;
}
should infact be
if ((resid = norm(s)/normb) < tol) {
x += alpha(0) * phat;
tol = resid;
max_iter = i;
return 0;
}
Please correct me if I am wrong. If this is infact a bug, I would
appreciate if you can update the code regarding this.
thanks
raju
--
Kamaraju S Kusumanchi
http://www.people.cornell.edu/pages/kk288/
http://malayamaarutham.blogspot.com/