Skip to content
Snippets Groups Projects
Commit 5af1effd authored by MichelJuillard's avatar MichelJuillard
Browse files

removed debugging code from nonlinear solver when Jacobian is near

singular. The treatment of this case still needs to be further improved.
parent eab165d3
Branches
No related tags found
No related merge requests found
...@@ -116,8 +116,7 @@ for its = 1:maxit ...@@ -116,8 +116,7 @@ for its = 1:maxit
p = e*[-r(1:end-n,1:end-n)\fvec(1:end-n);zeros(n,1)]; p = e*[-r(1:end-n,1:end-n)\fvec(1:end-n);zeros(n,1)];
end end
elseif bad_cond_flag && cond(fjac) > 1/sqrt(eps) 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); p=-(fjac2+1e6*sqrt(nn*eps)*max(sum(abs(fjac2)))*eye(nn))\(fjac'*fvec);
else else
p = -fjac\fvec ; p = -fjac\fvec ;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment