Skip to content

sundialr (Package for solving ODEs in R)

Peter Lee edited this page Apr 8, 2025 · 5 revisions

Background

sundialr is an interface to the well-respected SUNDIALS Ordinary Differential Equations (ODE) solving library by Lawrence Livermore National Laboratory and Southern Methodist University. SUNDIALS provides some of the most advanced, accurate and stable solvers for solving ODEs, Partial Differential Equations (PDEs), Differential Algebraic Equations (DAEs), nonlinear algebraic systems etc.

sundialr provides as interface to the cvode, cvodes, ida, idas solvers in SUNDIALS which can be used to solve and calculate sensitivities w.r.t. parameters and states for ODEs and DAEs. However, there are other solvers in SUNDIALs (e.g., KINSOL, ARKODE) to which an interface has not yet been created.

In addition, a simplified interface to the multiple solvers, multiple methods for calculating sensitivities (e.g., adjoint method) needs to be provided. We also aim to add a simple interface to cover common patterns seen in systems described by ODEs such as discontinuity in Right Hand Side (RHS), root-finding, forcing functions to the sundialr functions.

Related Work

There is one more package that provides an interface to SUNDIALS, r2sundials, however it also does not provide an interface to all the solvers and methods in underlying SUNDIALS.

Details of your coding project

The full code for the R package on CRAN can be found here

Expected impact

sundialr aims to bring the best ODE, DAE and nonlinear algebraic solvers to R. We constantly update the package to incorporate changes in SUNDIALS and aim to provide full coverage of this excellent library to allow users to solve large scale systems of equations in R. sundialr should have a wide impact for all users modeling systems described by ODEs and PDEs.

Mentors

Satyaprakash Nayak - https://github.com/sn248

I have extensive experience in developing R packages with complex build systems.

I am an experienced drug development researcher with more than a decade of experience in R. More about me can be found at my LinkedIn page.

Tests

Contributors, please provide some examples of your R package development and C++ skills and sundialr package extensively uses Rcpp which requires knowledge of C++.

Solution of Test

Clone this wiki locally