NonlinearSolve.jl: High-Performance and Robust Solvers for Systems of Nonlinear Equations in Julia
Avik Pal, Flemming Holtorf, Axel Larsson, Torkel Loman, Utkarsh, Frank Schäefer, Qingyu Qu, Alan Edelman, Chris Rackauckas
TL;DR
NonlinearSolve.jl addresses the challenge of solving nonlinear systems defined by $f(u, θ)=0$ across scientific domains. It introduces a Julia-native framework with a unified API, automatic solver selection, GPU-accelerated static kernels, and sparse automatic differentiation, enabling scalable performance for large problems. The paper demonstrates robustness and speed through benchmarks against PETSc SNES, Sundials KINSOL, MINPACK, and NLsolve, and showcases applicability to DFN battery initialization and large ill-conditioned Brusselator systems. This work enables scalable, flexible nonlinear solving within the SciML ecosystem, unlocking new modeling and simulation capabilities across disciplines.
Abstract
Efficiently solving nonlinear equations underpins numerous scientific and engineering disciplines, yet scaling these solutions for challenging system models remains a challenge. This paper presents NonlinearSolve.jl -- a suite of high-performance open-source nonlinear equation solvers implemented natively in the Julia programming language. NonlinearSolve.jl distinguishes itself by offering a unified API that accommodates a diverse range of solver specifications alongside features such as automatic algorithm selection based on runtime analysis, support for GPU-accelerated computation through static array kernels, and the utilization of sparse automatic differentiation and Jacobian-free Krylov methods for large-scale problem-solving. Through rigorous comparison with established tools such as PETSc SNES, Sundials KINSOL, and MINPACK, NonlinearSolve.jl demonstrates robustness and efficiency, achieving significant advancements in solving nonlinear equations while being implemented in a high-level programming language. The capabilities of NonlinearSolve.jl unlock new potentials in modeling and simulation across various domains, making it a valuable addition to the computational toolkit of researchers and practitioners alike.
