diffsol-nl
Non-linear solver foundation for diffsol — the non-linear operator and solver traits used by the ODE/DAE solvers, together with a Newton implementation.
Most users should depend on the diffsol crate
directly. Use diffsol-nl when you want to build on the non-linear solver layer itself.
Traits
- Operators: the
NonLinearOptrait describing a functionF(x), andNonLinearOpJacobiandescribing its JacobianJ(x). These are deliberately time-unaware; the richer, time-aware operator traits live in thediffsolcrate. - Solvers: the
NonLinearSolvertrait for solvingF(x) = 0. - Support types:
Convergence, theLineSearchtrait withNoLineSearchandBacktrackingLineSearchimplementations, and theNlErrorerror type.
Implementations
NewtonNonlinearSolver: a Newton solver built on top of adiffsol-laLinearSolver.
Each linear-algebra backend is selected via a feature flag, forwarded to diffsol-la:
nalgebra: nalgebra-backed containers and solvers (enabled by default).faer: faer-backed containers and solvers (enabled by default).cuda: in-built CUDA containers and solvers (disabled by default).suitesparse: the KLU sparse direct solver from SuiteSparse (disabled by default).
Links
- Main crate: https://crates.io/crates/diffsol
- Documentation: https://docs.rs/diffsol-nl
- Book: https://martinjrobins.github.io/diffsol/
License
Licensed under the MIT license. See the repository for details.