pyodeint


Namepyodeint JSON
Version 0.10.7 PyPI version JSON
download
home_pagehttps://github.com/bjodah/pyodeint
SummaryPython binding for odeint from boost.
upload_time2024-05-20 10:36:48
maintainerNone
docs_urlNone
authorBjörn Dahlgren
requires_pythonNone
licenseBSD
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            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 <https://github.com/bjodah/pyodeint>`_ provides a
`Python <http://www.python.org>`_ binding to `odeint <http://www.odeint.com>`_.
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 <https://github.com/bjodah/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:
`<https://bjodah.github.io/pyodeint/latest>`_
(and the development version for the current master branch are found here:
`<http://hera.physchem.kth.se/~pyodeint/branches/master/html>`_).


Installation
------------
Simplest way to install is to use the `conda package manager <http://conda.pydata.org/docs/>`_:

::

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

tests should pass.

Binary distribution is available here:
`<https://anaconda.org/bjodah/pyodeint>`_

Source distribution is available here:
`<https://pypi.python.org/pypi/pyodeint>`_

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 <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/ <https://github.com/bjodah/pyodeint/tree/master/examples>`_, and rendered jupyter notebooks here:
`<http://hera.physchem.kth.se/~pyodeint/branches/master/examples>`_

See also
--------
`pyodesys <https://github.com/bjodah/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

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/bjodah/pyodeint",
    "name": "pyodeint",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "Bj\u00f6rn Dahlgren",
    "author_email": "bjodah@DELETEMEgmail.com",
    "download_url": "https://files.pythonhosted.org/packages/2d/0d/b822c155a6454761953ff8588b7185531a4053097cb298e140ad13b58262/pyodeint-0.10.7.tar.gz",
    "platform": null,
    "description": "pyodeint\n========\n\n.. image:: http://hackspett.bjodah.se/api/badges/6/status.svg\n   :target: http://hackspett.bjodah.se/repos/6\n   :alt: Build status\n.. image:: https://img.shields.io/pypi/v/pyodeint.svg\n   :target: https://pypi.python.org/pypi/pyodeint\n   :alt: PyPI version\n.. image:: https://img.shields.io/pypi/l/pyodeint.svg\n   :target: https://github.com/bjodah/pyodeint/blob/master/LICENSE\n   :alt: License\n.. image:: http://hera.physchem.kth.se/~pyodeint/branches/master/htmlcov/coverage.svg\n   :target: http://hera.physchem.kth.se/~pyodeint/branches/master/htmlcov\n   :alt: coverage\n.. image:: https://zenodo.org/badge/41257136.svg\n   :target: https://zenodo.org/badge/latestdoi/41257136\n\n`pyodeint <https://github.com/bjodah/pyodeint>`_ provides a\n`Python <http://www.python.org>`_ binding to `odeint <http://www.odeint.com>`_.\nCurrently, the following steppers are exposed:\n\n- ``rosenbrock4``: 4th order Rosenbrock (implicit multistep) stepper\n- ``dopri5``: 5th order DOPRI5 (explicit runge-kutta)\n- ``bs``: Bulirsch-Stoer stepper (modified midpoint rule).\n\nThe Rosenbrock4 stepper requires that the user provides a routine for\ncalculating the Jacobian.\n\nYou may also want to know that you can use ``pyodeint`` from\n`pyodesys <https://github.com/bjodah/pyodesys>`_\nwhich can e.g. derive the Jacobian analytically for you (pyodesys also provides\nplotting functions, C++ code-generation and more).\n\nDocumentation\n-------------\nAutogenerated API documentation for latest stable release is found here:\n`<https://bjodah.github.io/pyodeint/latest>`_\n(and the development version for the current master branch are found here:\n`<http://hera.physchem.kth.se/~pyodeint/branches/master/html>`_).\n\n\nInstallation\n------------\nSimplest way to install is to use the `conda package manager <http://conda.pydata.org/docs/>`_:\n\n::\n\n   $ conda install -c conda-forge pyodeint pytest\n   $ python -m pytest --pyargs pyodeint\n\ntests should pass.\n\nBinary distribution is available here:\n`<https://anaconda.org/bjodah/pyodeint>`_\n\nSource distribution is available here:\n`<https://pypi.python.org/pypi/pyodeint>`_\n\nhere is an example of how to build from source::\n\n   $ CPATH=/opt/boost_1_65_0/include python3 setup.py build_ext -i\n\n\nExamples\n--------\nThe classic van der Pol oscillator (see `examples/van_der_pol.py <examples/van_der_pol.py>`_)\n\n.. code:: python\n\n   >>> from pyodeint import integrate_adaptive  # also: integrate_predefined\n   >>> mu = 1.0\n   >>> def f(t, y, dydt):\n   ...     dydt[0] = y[1]\n   ...     dydt[1] = -y[0] + mu*y[1]*(1 - y[0]**2)\n   ... \n   >>> def j(t, y, Jmat, dfdt, fy=None):\n   ...     Jmat[0, 0] = 0\n   ...     Jmat[0, 1] = 1\n   ...     Jmat[1, 0] = -1 -mu*2*y[1]*y[0]\n   ...     Jmat[1, 1] = mu*(1 - y[0]**2)\n   ...     dfdt[0] = 0\n   ...     dfdt[1] = 0\n   ...\n   >>> y0 = [1, 0]; tend=10.0; dt0=1e-8; t0=0.0; atol=1e-8; rtol=1e-8\n   >>> tout, yout, info = integrate_adaptive(f, j, y0, t0, tend, dt0, atol, rtol,\n   ...                                       method='rosenbrock4', nsteps=1000)\n   >>> import matplotlib.pyplot as plt\n   >>> series = plt.plot(tout, yout)\n   >>> plt.show()  # doctest: +SKIP\n\n\n.. image:: https://raw.githubusercontent.com/bjodah/pyodeint/master/examples/van_der_pol.png\n\nFor more examples see `examples/ <https://github.com/bjodah/pyodeint/tree/master/examples>`_, and rendered jupyter notebooks here:\n`<http://hera.physchem.kth.se/~pyodeint/branches/master/examples>`_\n\nSee also\n--------\n`pyodesys <https://github.com/bjodah/pyodesys>`_ for how to automatically\ngenerate the jacobian callback function (and easily swtich to other solvers).\n\nLicense\n-------\nThe source code is Open Source and is released under the very permissive\n\"simplified (2-clause) BSD license\". See ``LICENSE`` for further details.\nContributors are welcome to suggest improvements at https://github.com/bjodah/pyodeint\n\nAuthor\n------\nBj\u00f6rn I. Dahlgren, contact:\n\n- gmail address: bjodah\n",
    "bugtrack_url": null,
    "license": "BSD",
    "summary": "Python binding for odeint from boost.",
    "version": "0.10.7",
    "project_urls": {
        "Homepage": "https://github.com/bjodah/pyodeint"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2d0db822c155a6454761953ff8588b7185531a4053097cb298e140ad13b58262",
                "md5": "b23a72975190210a3ac6657547272614",
                "sha256": "02e63f4e5516e6890979bef3a149690b8d67b6d20cad25a1337fa57f17486837"
            },
            "downloads": -1,
            "filename": "pyodeint-0.10.7.tar.gz",
            "has_sig": false,
            "md5_digest": "b23a72975190210a3ac6657547272614",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 117982,
            "upload_time": "2024-05-20T10:36:48",
            "upload_time_iso_8601": "2024-05-20T10:36:48.599797Z",
            "url": "https://files.pythonhosted.org/packages/2d/0d/b822c155a6454761953ff8588b7185531a4053097cb298e140ad13b58262/pyodeint-0.10.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-20 10:36:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "bjodah",
    "github_project": "pyodeint",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "circle": true,
    "appveyor": true,
    "lcname": "pyodeint"
}
        
Elapsed time: 0.23915s