JuliaNLSolvers / NLsolve.jl

Julia solvers for systems of nonlinear equations and mixed complementarity problems

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cache for intermediate values

dawbarton opened this issue · comments

I was looking through the source code to understand how to use the cache objects (NewtonCache and friends) and I noticed that it doesn't appear to be possible to pass through a cache variable from the main nlsolve interface.

Furthermore, though the newton, trust_region, and anderson function all have a cache object as the last positional argument, it doesn't actually get passed through to the corresponding newton_ function that does the work - a second cache object is actually created (though I'm guessing the compiler is smart enough to notice that the first one isn't used).

Is the user really supposed to call the underscored methods directly to use the cache object? If not, I can make a PR to fix.

No, this is not intentional! I’m guessing you’re not doing this tonight, so I might have a stab at this tonight if you don’t intend to.