https://github.com/bjodah/pyodeint

Python wrapper around odeint (from the boost C++ library)

https://github.com/bjodah/pyodeint

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.8%) to scientific vocabulary

Keywords

ordinary-differential-equations python wrapper
Last synced: 5 months ago · JSON representation

Repository

Python wrapper around odeint (from the boost C++ library)

Basic Info
  • Host: GitHub
  • Owner: bjodah
  • License: bsd-2-clause
  • Language: C++
  • Default Branch: master
  • Size: 6.89 MB
Statistics
  • Stars: 20
  • Watchers: 5
  • Forks: 3
  • Open Issues: 0
  • Releases: 22
Topics
ordinary-differential-equations python wrapper
Created over 10 years ago · Last pushed 7 months ago
Metadata Files
Readme Changelog License Authors

README.rst

pyodeint
========

.. image:: http://hackspett.bjodah.se/api/badges/6/status.svg
   :target: http://hackspett.bjodah.se/repos/6
   :alt: Build status
.. image:: https://img.shields.io/pypi/v/pyodeint.svg
   :target: https://pypi.python.org/pypi/pyodeint
   :alt: PyPI version
.. image:: https://img.shields.io/pypi/l/pyodeint.svg
   :target: https://github.com/bjodah/pyodeint/blob/master/LICENSE
   :alt: License
.. image:: http://hera.physchem.kth.se/~pyodeint/branches/master/htmlcov/coverage.svg
   :target: http://hera.physchem.kth.se/~pyodeint/branches/master/htmlcov
   :alt: coverage
.. image:: https://zenodo.org/badge/41257136.svg
   :target: https://zenodo.org/badge/latestdoi/41257136

`pyodeint `_ provides a
`Python `_ binding to `odeint `_.
Currently, the following steppers are exposed:

- ``rosenbrock4``: 4th order Rosenbrock (implicit multistep) stepper
- ``dopri5``: 5th order DOPRI5 (explicit runge-kutta)
- ``bs``: Bulirsch-Stoer stepper (modified midpoint rule).

The Rosenbrock4 stepper requires that the user provides a routine for
calculating the Jacobian.

You may also want to know that you can use ``pyodeint`` from
`pyodesys `_
which can e.g. derive the Jacobian analytically for you (pyodesys also provides
plotting functions, C++ code-generation and more).

Documentation
-------------
Autogenerated API documentation for latest stable release is found here:
``_
(and the development version for the current master branch are found here:
``_).


Installation
------------
Simplest way to install is to use the `conda package manager `_:

::

   $ conda install -c conda-forge pyodeint pytest
   $ python -m pytest --pyargs pyodeint

tests should pass.

Binary distribution is available here:
``_

Source distribution is available here:
``_

here is an example of how to build from source::

   $ CPATH=/opt/boost_1_65_0/include python3 setup.py build_ext -i


Examples
--------
The classic van der Pol oscillator (see `examples/van_der_pol.py `_)

.. code:: python

   >>> from pyodeint import integrate_adaptive  # also: integrate_predefined
   >>> mu = 1.0
   >>> def f(t, y, dydt):
   ...     dydt[0] = y[1]
   ...     dydt[1] = -y[0] + mu*y[1]*(1 - y[0]**2)
   ... 
   >>> def j(t, y, Jmat, dfdt, fy=None):
   ...     Jmat[0, 0] = 0
   ...     Jmat[0, 1] = 1
   ...     Jmat[1, 0] = -1 -mu*2*y[1]*y[0]
   ...     Jmat[1, 1] = mu*(1 - y[0]**2)
   ...     dfdt[0] = 0
   ...     dfdt[1] = 0
   ...
   >>> y0 = [1, 0]; tend=10.0; dt0=1e-8; t0=0.0; atol=1e-8; rtol=1e-8
   >>> tout, yout, info = integrate_adaptive(f, j, y0, t0, tend, dt0, atol, rtol,
   ...                                       method='rosenbrock4', nsteps=1000)
   >>> import matplotlib.pyplot as plt
   >>> series = plt.plot(tout, yout)
   >>> plt.show()  # doctest: +SKIP


.. image:: https://raw.githubusercontent.com/bjodah/pyodeint/master/examples/van_der_pol.png

For more examples see `examples/ `_, and rendered jupyter notebooks here:
``_

See also
--------
`pyodesys `_ for how to automatically
generate the jacobian callback function (and easily swtich to other solvers).

License
-------
The source code is Open Source and is released under the very permissive
"simplified (2-clause) BSD license". See ``LICENSE`` for further details.
Contributors are welcome to suggest improvements at https://github.com/bjodah/pyodeint

Author
------
Björn I. Dahlgren, contact:

- gmail address: bjodah

Owner

  • Name: Bjorn
  • Login: bjodah
  • Kind: user

GitHub Events

Total
  • Watch event: 1
  • Push event: 15
  • Pull request event: 3
  • Create event: 3
Last Year
  • Watch event: 1
  • Push event: 15
  • Pull request event: 3
  • Create event: 3

Committers

Last synced: 8 months ago

All Time
  • Total Commits: 137
  • Total Committers: 1
  • Avg Commits per committer: 137.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 1
  • Committers: 1
  • Avg Commits per committer: 1.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Björn Dahlgren b****h@g****m 137

Issues and Pull Requests

Last synced: 7 months ago

All Time
  • Total issues: 3
  • Total pull requests: 41
  • Average time to close issues: 10 months
  • Average time to close pull requests: 14 days
  • Total issue authors: 3
  • Total pull request authors: 1
  • Average comments per issue: 3.33
  • Average comments per pull request: 0.0
  • Merged pull requests: 37
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • jgout (1)
  • yurivict (1)
  • bjodah (1)
Pull Request Authors
  • bjodah (46)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 2
  • Total downloads:
    • pypi 230 last-month
  • Total dependent packages: 1
    (may contain duplicates)
  • Total dependent repositories: 4
    (may contain duplicates)
  • Total versions: 40
  • Total maintainers: 1
pypi.org: pyodeint

Python binding for odeint from boost.

  • Versions: 33
  • Dependent Packages: 0
  • Dependent Repositories: 2
  • Downloads: 230 Last month
Rankings
Dependent packages count: 10.0%
Dependent repos count: 11.6%
Stargazers count: 13.9%
Average: 16.3%
Forks count: 16.9%
Downloads: 29.0%
Maintainers (1)
Last synced: 5 months ago
conda-forge.org: pyodeint
  • Versions: 7
  • Dependent Packages: 1
  • Dependent Repositories: 2
Rankings
Dependent repos count: 20.1%
Dependent packages count: 29.0%
Average: 38.9%
Stargazers count: 50.1%
Forks count: 56.4%
Last synced: 6 months ago

Dependencies

setup.py pypi
  • numpy *