SciML/diffeqpy

Solving differential equations in Python using DifferentialEquations.jl and the SciML Scientific Machine Learning organization

What it solves

diffeqpy provides a high-performance interface for solving a wide variety of differential equations directly within Python. It bridges the gap between Python's ease of use and the advanced, high-performance numerical solvers found in the Julia language's DifferentialEquations.jl ecosystem.

How it works

The package acts as a wrapper around DifferentialEquations.jl. It allows users to define problems (such as ODEs, SDEs, or DAEs) in Python and execute them using Julia's core routines. To maximize performance, it includes a de.jit function to compile Python derivative functions into efficient native code and supports seval for defining functions directly in Julia syntax. It also integrates with juliacall for handling complex types like mass matrices and sparse arrays.

Who it’s for

Researchers, scientists, and engineers who need to solve complex differential equations in Python but require the speed and specialized solver options (like GPU acceleration and ensemble solving) typically associated with high-performance computing languages.

Highlights

  • Broad Equation Support: Solves Ordinary (ODE), Stochastic (SDE), Delay (DDE), and Differential-Algebraic Equations (DAE), as well as discrete and hybrid equations.
  • GPU Acceleration: Supports solving large ensembles of ODEs in parallel on GPUs via DiffEqGPU.
  • Performance Optimization: Offers JIT compilation of problems to reduce inner-loop overhead.
  • Cores and Parallelism: Supports multiple CPU cores through various ensemble solving strategies (Serial, Threads, Distributed, SplitThreads).
  • Flexible Integration: Allows defining functions in either Python or Julia for maximum efficiency.

Related

  • Project
  • Project
  • Project
  • Project
  • Project