Sundials

Julia interface to Sundials, including a nonlinear solver (KINSOL), ODE's (CVODE and ARKODE), and DAE's (IDA) in a SciML scientific machine learning enabled manner

https://github.com/sciml/sundials.jl

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
    12 of 75 committers (16.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.6%) to scientific vocabulary

Keywords

arkode clang cvode dae differential-algebraic-equations differential-equations differentialequations hacktoberfest hybrid-differential-equation ida idas julia kinsol ode ordinary-differential-equations scientific-machine-learning sciml sensitivity-analysis sundials sundials-libraries

Keywords from Contributors

numerical sde julialang pde dde neural-ode neural-sde stochastic-differential-equations programming-language partial-differential-equations
Last synced: 6 months ago · JSON representation ·

Repository

Julia interface to Sundials, including a nonlinear solver (KINSOL), ODE's (CVODE and ARKODE), and DAE's (IDA) in a SciML scientific machine learning enabled manner

Basic Info
  • Host: GitHub
  • Owner: SciML
  • License: bsd-2-clause
  • Language: Julia
  • Default Branch: master
  • Homepage: https://diffeq.sciml.ai
  • Size: 1.76 MB
Statistics
  • Stars: 210
  • Watchers: 9
  • Forks: 79
  • Open Issues: 40
  • Releases: 131
Topics
arkode clang cvode dae differential-algebraic-equations differential-equations differentialequations hacktoberfest hybrid-differential-equation ida idas julia kinsol ode ordinary-differential-equations scientific-machine-learning sciml sensitivity-analysis sundials sundials-libraries
Created almost 13 years ago · Last pushed 6 months ago
Metadata Files
Readme License Citation

README.md

Sundials.jl

Join the chat at https://gitter.im/JuliaDiffEq/Lobby Tests codecov

Introduction

Sundials.jl is a Julia package that interfaces to the Sundials library (see source). Sundials (the C library and this package) provides the following:

  • CVODES - for integration and sensitivity analysis of ODEs. CVODES treats stiff and nonstiff ODE systems of the form y' = f(t,y,p), y(t0) = y0(p), where p is a set of parameters.
  • ARKStep - for integration of non-stiff, stiff, and mixed mode ODEs via split, linearly-implicit form, implicit, and IMEX Runge-Kutta methods on ODEs of the form My' = f_E(t,y,p) + f_i(t,y,p), y(t0) = y0(p) for a set of parameters p.
  • ERKStep - for integration of non-stiff, stiff, and mixed mode ODEs via split, linearly-implicit form, implicit, and IMEX Runge-Kutta methods on ODEs of the form y' = f(t,y,p), y(t0) = y0(p) for a set of parameters p.
  • IDAS - for integration and sensitivity analysis of DAEs. IDAS treats DAE systems of the form F(t,y,y',p) = 0, y(t0) = y0(p), y'(t0) = y0'(p)
  • KINSOL - for solution of nonlinear algebraic systems. KINSOL treats nonlinear systems of the form F(u) = 0

Note that CVODES and IDAS contain all functions provided by CVODE and IDA (for integration without sensitivity analysis). If you need to use the latter, you can set enable_sensitivities=false in deps/build.jl and (re)build the package.

Installation

Within Julia, use the package manager: julia using Pkg Pkg.add("Sundials")

To test the installation use julia using Pkg Pkg.test("Sundials")

Common Interface API

This package is part of the JuliaDiffEq common interface. This is documented in the DifferentialEquations.jl documentation. Thus the ODE tutorial applies. For example, the Lorenz attractor can be solved with CVODE_Adams as follows:

julia using Sundials function lorenz(du,u,p,t) du[1] = 10.0(u[2]-u[1]) du[2] = u[1]*(28.0-u[3]) - u[2] du[3] = u[1]*u[2] - (8/3)*u[3] end u0 = [1.0;0.0;0.0] tspan = (0.0,100.0) prob = ODEProblem(lorenz,u0,tspan) sol = solve(prob,CVODE_Adams()) using Plots; plot(sol,vars=(1,2,3))

Sundials.jl exports the CVODE_BDF, CVODE_Adams, and ARKODE methods for ODEs which are documented in the ODE Solvers page, and IDA which is documented in the DAE solvers page. Additionally, the ARKODE method can be used on SplitODEProblems to solve ODEs in IMEX form.

KINSOL High Level API

Along with the ODE solvers, Sundials contains the KINSOL nonlinear solver. It's called via:

julia kinsol(f, y0::Vector{Float64}; userdata::Any = nothing, linear_solver=:Dense, jac_upper=0, jac_lower=0)

where f(res,y) is an in-place function that computes the residual f(y)-res=0, and KINSOL attempts to find y such that res=0. This method is generally quite fast and the choice linear_solver=:Band is well-suited for problems with a banded Jacobian (you must specify the upper and lower band sizes). However, this is not as robust as many other techniques like trust-region methods, and thus we recommend NLsolve.jl for more general nonlinear solving.

Direct API

This package closely follows the Sundials C API. At a slightly higher level, many (but not all) Sundials.jl functions support passing Julia objects (like Arrays) instead of Sundials objects (like N_Vectors). The Julia package Clang.jl was used to wrap Sundials. This directly uses Sundials' headers sort-of like SWIG. Thus the general C documentation is the documentation for the direct API. See the test directory for usage examples of the direct interface.

For the wrapping code, see src/wrap_sundials.jl. Because of Clang.jl, Sundials.jl provides almost full coverage of the Sundials library (the serial version). A few things to note:

  • Macros like DENSE_ELEM are not available.
  • Nothing is exported from the module. You need to put Sundials. in front of everything.
  • The parallel versions of Sundials which require different N_Vector types have not been wrapped.

Citing

If you use this library, please cite both Sundials and the JuliaDiffEq project.

``` @article{rackauckas2017differentialequations, title={Differentialequations. jl--a performant and feature-rich ecosystem for solving differential equations in julia}, author={Rackauckas, Christopher and Nie, Qing}, journal={Journal of Open Research Software}, volume={5}, number={1}, year={2017}, publisher={Ubiquity Press} }

@article{gardner2022sundials, title={Enabling new flexibility in the {SUNDIALS} suite of nonlinear and differential/algebraic equation solvers}, author={Gardner, David J and Reynolds, Daniel R and Woodward, Carol S and Balos, Cody J}, journal={ACM Transactions on Mathematical Software (TOMS)}, publisher={ACM}, year={2022}, doi={10.1145/3539801} }

@article{hindmarsh2005sundials, title={{SUNDIALS}: Suite of nonlinear and differential/algebraic equation solvers}, author={Hindmarsh, Alan C and Brown, Peter N and Grant, Keith E and Lee, Steven L and Serban, Radu and Shumaker, Dan E and Woodward, Carol S}, journal={ACM Transactions on Mathematical Software (TOMS)}, volume={31}, number={3}, pages={363--396}, year={2005}, publisher={ACM} } ```

Owner

  • Name: SciML Open Source Scientific Machine Learning
  • Login: SciML
  • Kind: organization
  • Email: contact@chrisrackauckas.com

Open source software for scientific machine learning

Citation (CITATION.bib)

@article{DifferentialEquations.jl-2017,
 author = {Rackauckas, Christopher and Nie, Qing},
 doi = {10.5334/jors.151},
 journal = {The Journal of Open Research Software},
 keywords = {Applied Mathematics},
 note = {Exported from https://app.dimensions.ai on 2019/05/05},
 number = {1},
 pages = {},
 title = {DifferentialEquations.jl – A Performant and Feature-Rich Ecosystem for Solving Differential Equations in Julia},
 url = {https://app.dimensions.ai/details/publication/pub.1085583166 and http://openresearchsoftware.metajnl.com/articles/10.5334/jors.151/galley/245/download/},
 volume = {5},
 year = {2017}
}

GitHub Events

Total
  • Create event: 14
  • Commit comment event: 2
  • Release event: 2
  • Issues event: 4
  • Watch event: 3
  • Delete event: 13
  • Issue comment event: 53
  • Push event: 24
  • Pull request review comment event: 3
  • Pull request review event: 4
  • Pull request event: 39
  • Fork event: 3
Last Year
  • Create event: 14
  • Commit comment event: 2
  • Release event: 2
  • Issues event: 4
  • Watch event: 3
  • Delete event: 13
  • Issue comment event: 53
  • Push event: 24
  • Pull request review comment event: 3
  • Pull request review event: 4
  • Pull request event: 39
  • Fork event: 3

Committers

Last synced: 8 months ago

All Time
  • Total Commits: 944
  • Total Committers: 75
  • Avg Commits per committer: 12.587
  • Development Distribution Score (DDS): 0.493
Past Year
  • Commits: 29
  • Committers: 6
  • Avg Commits per committer: 4.833
  • Development Distribution Score (DDS): 0.655
Top Committers
Name Email Commits
Christopher Rackauckas C****t@C****m 479
Jose Daniel Lara j****a@b****u 121
oscarddssmith o****h@j****m 47
Yingbo Ma m****5@g****m 32
rodrigomha r****a@g****m 26
Alexey Stukalov a****v@g****m 26
Tony Kelman t****y@k****t 16
Tom Short t****t@i****g 15
Daines S****s@e****k 12
Tom Short t****s@g****m 12
dependabot[bot] 4****] 7
acroy a****y@g****m 7
Avik Pal a****l@m****u 7
ScottPJones s****s@a****u 5
github-actions[bot] 4****] 5
Sam Isaacson i****s 5
Elliot Saba s****t@g****m 5
Keno Fischer k****o@j****m 4
Takafumi Arakaki a****f@g****m 4
Kanav Gupta k****0@g****m 4
Dominique Luna d****2@g****m 4
Anant Thazhemadam a****m@g****m 4
David Widmann d****n 4
Utkarsh r****0@g****m 4
Anas_Abdelrehim a****r@g****m 4
Luke Stagner l****r@u****u 4
Pepijn de Vos p****s@j****m 4
Stuart Daines s****s@g****m 4
melonedo 4****o 3
lcontento l****o 3
and 45 more...

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 71
  • Total pull requests: 133
  • Average time to close issues: 8 months
  • Average time to close pull requests: 14 days
  • Total issue authors: 47
  • Total pull request authors: 31
  • Average comments per issue: 7.38
  • Average comments per pull request: 1.5
  • Merged pull requests: 101
  • Bot issues: 0
  • Bot pull requests: 13
Past Year
  • Issues: 4
  • Pull requests: 28
  • Average time to close issues: 3 days
  • Average time to close pull requests: about 9 hours
  • Issue authors: 4
  • Pull request authors: 9
  • Average comments per issue: 1.75
  • Average comments per pull request: 0.64
  • Merged pull requests: 13
  • Bot issues: 0
  • Bot pull requests: 2
Top Authors
Issue Authors
  • sjdaines (7)
  • ViralBShah (4)
  • portig (3)
  • jd-lara (3)
  • ChrisRackauckas (3)
  • staticfloat (3)
  • SebastianM-C (2)
  • JianghuiDu (2)
  • vpuri3 (2)
  • ufechner7 (2)
  • oscardssmith (2)
  • iajzenszmi (2)
  • topolarity (2)
  • japhir (1)
  • jguterl (1)
Pull Request Authors
  • ChrisRackauckas (42)
  • oscardssmith (17)
  • dependabot[bot] (12)
  • sjdaines (9)
  • avik-pal (7)
  • ViralBShah (6)
  • jd-lara (4)
  • pepijndevos (3)
  • thazhemadam (3)
  • vpuri3 (2)
  • Keno (2)
  • AayushSabharwal (2)
  • melonedo (2)
  • domluna (2)
  • oxinabox (2)
Top Labels
Issue Labels
bug (7) question (1)
Pull Request Labels
dependencies (12) github_actions (2)

Packages

  • Total packages: 1
  • Total downloads:
    • julia 2,918 total
  • Total dependent packages: 32
  • Total dependent repositories: 23
  • Total versions: 96
juliahub.com: Sundials

Julia interface to Sundials, including a nonlinear solver (KINSOL), ODE's (CVODE and ARKODE), and DAE's (IDA) in a SciML scientific machine learning enabled manner

  • Versions: 96
  • Dependent Packages: 32
  • Dependent Repositories: 23
  • Downloads: 2,918 Total
Rankings
Forks count: 1.4%
Dependent repos count: 1.6%
Dependent packages count: 2.3%
Average: 2.3%
Stargazers count: 3.9%
Last synced: 6 months ago

Dependencies

.github/workflows/CI.yml actions
  • actions/cache v1 composite
  • actions/checkout v2 composite
  • codecov/codecov-action v1 composite
  • julia-actions/julia-buildpkg v1 composite
  • julia-actions/julia-processcoverage v1 composite
  • julia-actions/julia-runtest v1 composite
  • julia-actions/setup-julia v1 composite
.github/workflows/CompatHelper.yml actions
  • julia-actions/setup-julia latest composite
.github/workflows/FormatCheck.yml actions
  • actions/checkout v1 composite
  • julia-actions/setup-julia latest composite
.github/workflows/Invalidations.yml actions
  • actions/checkout v3 composite
  • julia-actions/julia-buildpkg v1 composite
  • julia-actions/julia-invalidations v1 composite
  • julia-actions/setup-julia v1 composite
.github/workflows/TagBot.yml actions
  • JuliaRegistries/TagBot v1 composite