SciML / NonlinearSolve.jl

High-performance and differentiation-enabled nonlinear solvers (Newton methods), bracketed rootfinding (bisection, Falsi), with sparsity and Newton-Krylov support.
https://docs.sciml.ai/NonlinearSolve/stable/
MIT License
226 stars 40 forks source link

Auto-batching Nonlinear Solvers and Beyond #287

Closed avik-pal closed 9 months ago

avik-pal commented 9 months ago

Playing around with a new package to generalize the solvers to BatchedArrays. Collecting all the patches here needed to make that work.

Example Usage

using NonlinearSolve, BatchedArrays

f(u, p) = u .^ 2 .- p

probB = NonlinearProblem(f, BatchedArray(rand(16, 32), 2.0)  # Solve 32 nonlinear problems simultaneously

solve(probB, NewtonRaphson())
codecov[bot] commented 9 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (0026bc1) 48.24% compared to head (ce3d7aa) 93.94%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #287 +/- ## =========================================== + Coverage 48.24% 93.94% +45.69% =========================================== Files 19 19 Lines 1824 1832 +8 =========================================== + Hits 880 1721 +841 + Misses 944 111 -833 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

avik-pal commented 9 months ago

Pulled into other PRs