removed debugging code from nonlinear solver when Jacobian is near

singular. The treatment of this case still needs to be further improved.
time-shift
Michel Juillard 2012-05-30 10:25:10 +02:00
parent eab165d3ee
commit 5af1effd8f
1 changed files with 1 additions and 2 deletions

View File

@ -116,8 +116,7 @@ for its = 1:maxit
p = e*[-r(1:end-n,1:end-n)\fvec(1:end-n);zeros(n,1)];
end
elseif bad_cond_flag && cond(fjac) > 1/sqrt(eps)
fjac
fjac2=fjac'*fjac
fjac2=fjac'*fjac;
p=-(fjac2+1e6*sqrt(nn*eps)*max(sum(abs(fjac2)))*eye(nn))\(fjac'*fvec);
else
p = -fjac\fvec ;