Skip to content

A C++/Thrust/Cuda library for a fast evaluation of high-dimensional sets of ordinary differential equations.

License

Notifications You must be signed in to change notification settings

statphysandml/ODEVisualization

Repository files navigation

ODEVisualization

A comprehensive Python library for visualizing and analyzing ordinary differential equations (ODEs) with CUDA acceleration.

Features

ODEVisualization is a high-performance C++/CUDA library with Python bindings that focuses on fast evaluation of high-dimensional sets of ordinary differential equations on GPUs.

The library can be used to:

  • Find and evaluate fixed points (attractive and repulsive) in high-dimensional flow fields
  • Visualize two-dimensional views of high-dimensional flow fields
  • Integrate sets of ODEs with GPU acceleration
  • Perform recursive grid computations for detailed phase space analysis
  • Analyze flow equations and Jacobians for dynamical systems

Installation

Prerequisites

  • Python 3.8 or higher
  • CMake 3.18 or higher
  • CUDA Toolkit (for GPU acceleration)
  • C++17 compatible compiler

Install from PyPI (Recommended)

pip install odevisualization

Install from Source

git clone https://github.com/statphysandml/ODEVisualization.git
cd ODEVisualization/odevis
pip install .

CUDA Architecture Support

If you need to specify CUDA architectures:

pip install . --install-option="--cmake-cuda-architectures=70;75;80"

Build Options

Use superbuild (automatic dependency management):

pip install . --install-option="--use-superbuild"

Use system dependencies:

pip install . --install-option="--use-system-deps"

Quick Start

import odesolver as ode
import numpy as np

# Define your ODE system
# Example: Lorenz attractor
def lorenz_system(t, state, params):
    x, y, z = state
    sigma, rho, beta = params
    
    dxdt = sigma * (y - x)
    dydt = x * (rho - z) - y
    dzdt = x * y - beta * z
    
    return np.array([dxdt, dydt, dzdt])

# Set up initial conditions and parameters
initial_state = np.array([1.0, 1.0, 1.0])
params = np.array([10.0, 28.0, 8.0/3.0])

# Create and run simulation
# (Specific API details will depend on the actual implementation)

Examples

The library includes several example systems:

  • Lorenz Attractor: Classic chaotic system
  • Three-Point System: Multi-body dynamics
  • Four-Point System: Extended multi-body system

See the examples/ directory for complete implementations.

Development Installation

For development:

git clone https://github.com/statphysandml/ODEVisualization.git
cd ODEVisualization/odevis
pip install -e .[dev]

Run tests:

pytest

Documentation

Full documentation is available at: https://odevisualization.readthedocs.io

Support and Development

For support, questions, or development discussions:

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Citation

If you use ODEVisualization in your research, please cite:

@software{odevisualization,
  title={ODEVisualization: GPU-Accelerated Analysis of Ordinary Differential Equations},
  author={Kades, Lukas},
  url={https://github.com/statphysandml/ODEVisualization},
  version={1.0.0},
  year={2025}
}

About

A C++/Thrust/Cuda library for a fast evaluation of high-dimensional sets of ordinary differential equations.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •