Published July 17, 2024 | Version v0.10.0
Software Open

CyRK - ODE Integrator Implemented in Cython and Numba

  • 1. University of Maryland, College Park / NASA Goddard

Contributors

Description

Runge-Kutta ODE Integrator Implemented in Cython and Numba

CyRK provides fast integration tools to solve systems of ODEs using an adaptive time stepping scheme. CyRK can accept differential equations that are written in pure Python, njited numba, or cython-based cdef functions. These kinds of functions are generally easier to implement than pure c functions and can be used in existing Python software. Using CyRK can speed up development time while avoiding the slow performance that comes with using pure Python-based solvers like SciPy's `solve_ivp`.

The purpose of this package is to provide some functionality of scipy's solve_ivp with greatly improved performance.

Currently, CyRK's numba-based (njit-safe) nbsolve_ivp implementation is 10-140+x faster than scipy's solve_ivp function. The cython-based pysolve_ivp which accepts njit'd functions or pure Python is 20-50+x faster than scipy. The cython-based cysolve_ivp function that works with cython-based cdef methods is 50-750x faster than scipy.

An additional benefit of the two cython implementations is that they are pre-compiled. This avoids most of the start-up performance hit experienced by just-in-time compilers like numba.

To install simply run: `pip install CyRK` from a terminal where python 3.8-3.12 has been installed. The numpy, cython, and numba python packages are required. If you run into problems please check out the GitHub page for troubleshooting help or get in touch.

CyRK is open-source and we encourage you to learn more and contribute to its development. Find out how you can help here.

Files

CyRK-main.zip

Files (2.1 MB)

Name Size Download all
md5:9fd011c7717275b8a2e8e868f4babd2a
2.1 MB Preview Download

Additional details

Dates

Updated
2024-02-13
Updated for CyRK v0.8.6

Software

Repository URL
https://github.com/jrenaud90/CyRK
Programming language
Python, Cython, C
Development Status
Active