LLNL / sundials

Official development repository for SUNDIALS - a SUite of Nonlinear and DIfferential/ALgebraic equation Solvers. Pull requests are welcome for bug fixes and minor changes.
https://computing.llnl.gov/projects/sundials
BSD 3-Clause "New" or "Revised" License
520 stars 129 forks source link

Validation for Unset Linear Solver #598

Open Steven-Roberts opened 1 week ago

Steven-Roberts commented 1 week ago

When using the Newton solver with the linear solver unspecified, a segfault can occur at https://github.com/LLNL/sundials/blob/c28eaa3764a03705d61decb6025b409360e9d53f/src/sunnonlinsol/newton/sunnonlinsol_newton.c#L247

This was noticed in #597 which uses CVDOE, and I've seen similar behavior with ARKODE.

Additional validation is needed to alert users that a linear solver should be specified.