Skip to content
dModversePublic

About

C++ code generation for ODEs with sensitivity propagation, forward and adjoint, to second order.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

cppDE

R-CMD-check docs

cppDE generates, compiles and runs C++ solvers for systems of ordinary differential equations given as equations in R. The solvers return the derivatives of the solution in the initial values and parameters, by forward sensitivities or by a discrete adjoint, to first and second order, across time- and state-triggered events. Integrators are variable-order BDF and Adams methods, a Rosenbrock method of order 4 and an explicit Runge-Kutta pair, with dense or sparse linear algebra. cvode() solves the same models with SUNDIALS CVODES, cppFUN() generates algebraic functions with their derivatives, and batches of conditions are solved in parallel. cppDE is the ODE backend of dMod2.

Installation

# install.packages("remotes")
remotes::install_github("dModverse/cppDE")

Models are compiled at run time and need a C++17 compiler (Rtools on Windows) and Python with SymPy, which reticulate provides on first use. SUNDIALS (for cvode()), SuiteSparse/KLU (for sparse Jacobians) and OpenMP (for parallel batches) are optional and detected at install time.

License

MIT. Parts of the C++ solver core in inst/include/cppde/ are derived from SUNDIALS/CVODE (BSD-3-Clause) and Boost.Odeint (Boost Software License 1.0); inst/COPYRIGHTS lists the files concerned and reproduces the license texts.

About

C++ code generation for ODEs with sensitivity propagation, forward and adjoint, to second order.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages