{"id":15546710,"url":"https://github.com/pnkraemer/diffeqzoo","last_synced_at":"2025-04-23T18:10:51.039Z","repository":{"id":60563963,"uuid":"540043713","full_name":"pnkraemer/diffeqzoo","owner":"pnkraemer","description":"A zoo of implementations of differential equation problems in NumPy and JAX. Oscillators, chemical reactions, n-body problems, epidemiological models, IVPs, BVPs, and more.","archived":false,"fork":false,"pushed_at":"2023-12-28T10:41:09.000Z","size":683,"stargazers_count":15,"open_issues_count":20,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-20T01:21:26.728Z","etag":null,"topics":["boundary-value-problem","initial-value-problem","jax","numerical-methods","numpy","ordinary-differential-equations","scientific-computing"],"latest_commit_sha":null,"homepage":"https://diffeqzoo.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pnkraemer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-22T15:18:45.000Z","updated_at":"2025-03-29T12:59:32.000Z","dependencies_parsed_at":"2024-11-15T02:53:51.471Z","dependency_job_id":null,"html_url":"https://github.com/pnkraemer/diffeqzoo","commit_stats":{"total_commits":70,"total_committers":2,"mean_commits":35.0,"dds":"0.014285714285714235","last_synced_commit":"affa84c1398c24666c894d277107803c15381170"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pnkraemer%2Fdiffeqzoo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pnkraemer%2Fdiffeqzoo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pnkraemer%2Fdiffeqzoo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pnkraemer%2Fdiffeqzoo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pnkraemer","download_url":"https://codeload.github.com/pnkraemer/diffeqzoo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250487531,"owners_count":21438612,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["boundary-value-problem","initial-value-problem","jax","numerical-methods","numpy","ordinary-differential-equations","scientific-computing"],"created_at":"2024-10-02T13:03:43.051Z","updated_at":"2025-04-23T18:10:51.019Z","avatar_url":"https://github.com/pnkraemer.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# diffeqzoo\n\n[![PyPi Version](https://img.shields.io/pypi/v/diffeqzoo.svg?style=flat-square)](https://pypi.org/project/diffeqzoo/)\n[![Docs](https://readthedocs.org/projects/pip/badge/?version=latest\u0026style=flat-square)](https://diffeqzoo.readthedocs.io)\n[![GitHub stars](https://img.shields.io/github/stars/pnkraemer/diffeqzoo.svg?style=flat-square\u0026logo=github\u0026label=Stars\u0026logoColor=white)](https://github.com/pnkraemer/diffeqzoo)\n[![gh-actions](https://img.shields.io/github/actions/workflow/status/pnkraemer/diffeqzoo/ci.yaml?branch=main\u0026style=flat-square)](https://github.com/pnkraemer/diffeqzoo/actions?query=workflow%3Aci)\n\u003ca href=\"https://github.com/pnkraemer/diffeqzoo/blob/main/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/pnkraemer/diffeqzoo?style=flat-square\u0026color=2b9348\" alt=\"License Badge\"/\u003e\u003c/a\u003e\n\n_So, what was the initial condition of the restricted three-body problem again?_\n\n``diffeqzoo`` delivers all differential equation test problems in one place. It works with numpy and jax.\n\n\n## Installation\n\nGet the most recent stable version from PyPi:\n\n```\npip install diffeqzoo\n```\nOr directly from GitHub:\n```\npip install git+https://github.com/pnkraemer/diffeqzoo.git\n```\n\nThese commands assume that NumPy or JAX are installed separately by the user.\nRead more about installing this package [here](https://diffeqzoo.readthedocs.io/en/latest/getting_started/installation.html).\n\n## Features include\n\n* Oscillating systems (Lotka-Volterra, Fitzhugh-Nagumo, Van-der-Pol, ...)\n* Chaotic systems (Lorenz63, Lorenz96, Roessler, ...)\n* Epidemiological models (SIR, SEIR, SIRD, ...)\n* N-Body problems and celestial mechanics (Rigid-body, restricted-three-body, Pleiades, Henon-Heiles, ...)\n* Chemical reactions (HIRES, ROBER, ...)\n* Boundary value problems\n\n### As well as\n\n* Flexibly NumPy and JAX-backends. Other than one of those two, there are 0 (zero!) dependencies.\n* Mathematical descriptions **and BibTex entries** of the ODE problems\n* Compatibility with all NumPy/JAX-based ODE solvers: SciPy, JAX, Diffrax, ProbNum, Tornadox, etc..\n\nand many more goodies.\n\n* **DOCUMENTATION:** [documentation](https://diffeqzoo.readthedocs.io)\n* **ISSUE TRACKER:** [issue tracker](https://github.com/pnkraemer/diffeqzoo/issues)\n\n\n\n## Quick example\n```python \n\u003e\u003e\u003e from diffeqzoo import ivps, backend\n\u003e\u003e\u003e backend.select(\"numpy\")\n\u003e\u003e\u003e\n\u003e\u003e\u003e # Create test problems like this\n\u003e\u003e\u003e f, u0, t_span, f_args = ivps.lotka_volterra()\n\u003e\u003e\u003e x = f(u0, *f_args)\n\u003e\u003e\u003e print(x)\n[-10.  10.]\n\u003e\u003e\u003e\n\u003e\u003e\u003e # The numpy backend determines the type of input/output\n\u003e\u003e\u003e print(type(x))\n\u003cclass 'numpy.ndarray'\u003e\n\u003e\u003e\u003e\n\u003e\u003e\u003e # All sorts of ODEs are available, e.g., Rigid-Body:\n\u003e\u003e\u003e f, u0, t_span, f_args = ivps.rigid_body()\n\u003e\u003e\u003e print(f(u0, *f_args))\n[-0.     1.125 -0.   ]\n\u003e\u003e\u003e\n\u003e\u003e\u003e ## make it jax\n\u003e\u003e\u003e backend.change_to(\"jax\")\n\u003e\u003e\u003e f, u0, t_span, f_args = ivps.rigid_body()\n\u003e\u003e\u003e x = f(u0, *f_args)\n\u003e\u003e\u003e print(x)\n[-0.     1.125 -0.   ]\n\u003e\u003e\u003e print(type(x))\n\u003cclass 'jaxlib.xla_extension.ArrayImpl'\u003e\n\n```\n\n\n\n## Similar projects\n\n* F. Mazzia et al. published a [test set for IVP solvers](https://archimede.uniba.it/~testset/testsetivpsolvers/?page_id=51) for Matlab and Fortran. \n  There is a similar [test set for BVP solvers](https://archimede.uniba.it/~bvpsolvers/testsetbvpsolvers/). Neither one offers Python code, and both also run benchmarks, which `diffeqzoo` does not care about at all.\n* E. Hairer et al. published their [stiff ODE test set](https://www.unige.ch/~hairer/testset/testset.html), but there is no Python code\n* [NonlinearBenchmark](https://www.nonlinearbenchmark.org/) hosts datasets of nonlinear dynamical system observations. They are quite specialised problems, and don't contain the textbook problems like Lotka-Volterra, van der Pol, etc..\n* DifferentialEquations.jl provides [example ODE problems](https://diffeq.sciml.ai/stable/types/ode_types/#Example-Problems) in Julia.\n* [ProbNum's problem zoo](https://probnum.readthedocs.io/en/latest/api/problems/zoo.diffeq.html) offers a similar set of problems to `diffeqzoo` (no surprise -- the set of authors intersects) but tied to ProbNum's ODE solver interface. `diffeqzoo` is less of an API, switches more flexibly between numpy and jax (at the time of developing), and contains more problems.\n* W. Gilpin [published a benchmark](https://github.com/williamgilpin/dysts) for forecasting and data-driven modeling, which comes with a large number of (mostly chaotic) dynamical systems.\n* J. Meier lists a number of ODE attractors [on his website](http://www.3d-meier.de/tut19/Seite1.html).\n* GeometricProblems.jl curates a similar list of example problems with interesting geometric structure, in Julia ([link](https://github.com/JuliaGNI/GeometricProblems.jl))\n\nAnything missing in this list? Please open an issue or make a pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpnkraemer%2Fdiffeqzoo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpnkraemer%2Fdiffeqzoo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpnkraemer%2Fdiffeqzoo/lists"}