JuliaNLSolvers / NLsolve.jl

Julia solvers for systems of nonlinear equations and mixed complementarity problems
Other
330 stars 66 forks source link

broadcast for singular newton #200

Closed matthieugomez closed 5 years ago

matthieugomez commented 5 years ago

The line failed because cache.p has the dimension of cache.g, not vec(cache.g). I have readded the test to make sure there is no runtime error, even though I do not assert convergence.

pkofod commented 5 years ago

This is that singular newton again :) Thanks

Singularity is really a concern though, is it something you're hitting in each iteration or just occationally?

matthieugomez commented 5 years ago

Just occasionally, and I'm not sure there is an actual solution in these cases.

pkofod commented 5 years ago

Just occasionally, and I'm not sure there is an actual solution in these cases.

Alright. Just wanted to be sure that you're aware that if the Jacobian is actually singular at the solution, Newton's method is potentially a very expensive way to achieve no more than linear convergence. We'd need to implement tensor methods for that, but it doesn't seem worth the trouble.