{ "info": { "author": "C. Hoeppke, A. Puiu", "author_email": "christoph.hoeppke@maths.ox.ac.uk", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# PyODESolver\nPython package for solving ODEs\n\n## Installation\n\nTo install PyODESolver execute:\n\n python3 -m pip install PyODESolver\n\nThis will make the package pyodesolver available for import.\nTo this this launch python3\n\n python3\n\nand import the new package pyodesolver\n\n import pyodesolver\n\n## Quickstart guide:\nTo get started with using PyODESolver include a solver method.\nIn this example we will use the explicit euler method to solve\nthe differential equation y'(t) = -2 * y(t), y(0) = pi. This\ndifferential equation has the exact solution\n\n y(t) = pi * exp(-2 * t).\n\nThe right hand side in the expression\n\n y'(t) = -2*y(t),\n y(0) = pi\n\nis called a RHSFunction. This example has been implemented in\nExampleFunc01 in the file rhs_function.py.\nTo use the explicit euler solver for this ODE we first import\nthe required files\n\n from method_explicit_euler import ExplicitEuler\n from rhs_function import ExampleFunc01\n import numpy as np\n\nwe can than construct a method object in our main function\nand call generate on it to get the solver object.\n\n\n if __name__ == \"__main__\":\n N = 10**3\n t = np.linspace(0, 1, num=N)\n y0 = np.pi\n ee_solver = ExplicitEuler(N, y0, [0, 1], ExampleFunc01())\n solution = ee_solver.generate()\n\nThe generator object is useful in this instance as it very\nlean in term of required memory and puts full control to the\nuser at it allows to generate new time steps as required. For example\none thread can be used for updating a plot and a different thread can\ncall next(solution) to match the framerate of the plot.\n\nTo extract the whole solution we can use:\n\n numericSol = []\n for (time, val) in solution:\n numericSol.append(val)\n\nTo plot the solution in this example we can use\n\n import matplotlib.pyplot as plt\n plt.plot(t, np.array(numericSol))\n plt.show()\n\n\n## Solving arbitrary ODEs\n\nTo solve a customised ode the only two components required are\nthe new RHSFunction and the Jacobian of this function. In cases\nwhere the Jacobian is unknown explicit methods will still function.\n\nTo implement a new RHSFunction the user can inherit from RHSFunction\nand define a new subclass\n\n class NewFunction(RHSFunction):\n ...\n\nRHSFunction has exposes three methods that raise NotImplementedErrors.\nThe user can then implement these methods by providing\n\n def eval(self, y_vec, time):\n ...\n\nand\n\n def jacobian(self, y_vec, time):\n ...\n\nto provide everything required for explicit and implicit methods.\nThe solution can be obtained as described in the Quick-start-guide.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Hoeppke/PyODESolver", "keywords": "", "license": "MIT license", "maintainer": "", "maintainer_email": "", "name": "PyODESolver", "package_url": "https://pypi.org/project/PyODESolver/", "platform": "", "project_url": "https://pypi.org/project/PyODESolver/", "project_urls": { "Homepage": "https://github.com/Hoeppke/PyODESolver" }, "release_url": "https://pypi.org/project/PyODESolver/0.1.2.dev0/", "requires_dist": [ "numpy", "matplotlib", "scipy" ], "requires_python": "", "summary": "A python package to solve first order ODEs", "version": "0.1.2.dev0" }, "last_serial": 4394467, "releases": { "0.1.1.dev0": [ { "comment_text": "", "digests": { "md5": "8edcae580dd61270a8d8c1024e4ff953", "sha256": "949ea968d90a2ea9cf114b46c7633bc9830de9f7f76eb3f479e28d56360e7015" }, "downloads": -1, "filename": "PyODESolver-0.1.1.dev0-py3-none-any.whl", "has_sig": false, "md5_digest": "8edcae580dd61270a8d8c1024e4ff953", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 18101, "upload_time": "2018-10-18T21:35:15", "url": "https://files.pythonhosted.org/packages/59/c3/62696c0342ac7eaf9060c036fcad05816fc22688568a2261e7fc2e8d1c2c/PyODESolver-0.1.1.dev0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3d7764660d108a0b79f0ae25fa57e361", "sha256": "d255b0113ae1d113744f400b9ff6ad24167e6b9f52b6467c4d379ec2fab126fb" }, "downloads": -1, "filename": "PyODESolver-0.1.1.dev0.tar.gz", "has_sig": false, "md5_digest": "3d7764660d108a0b79f0ae25fa57e361", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8905, "upload_time": "2018-10-18T21:35:16", "url": "https://files.pythonhosted.org/packages/fe/1a/8afcc3a13868259840f38353bfe9ee97509c0b964f9e7de012e46be9216f/PyODESolver-0.1.1.dev0.tar.gz" } ], "0.1.2.dev0": [ { "comment_text": "", "digests": { "md5": "761ba5d274ac970f407bddc4e3f0aab1", "sha256": "bde2b63bac79cdeb9ebba3ff9fe436195d8087ae08b704db181c67cc98060a4c" }, "downloads": -1, "filename": "PyODESolver-0.1.2.dev0-py3-none-any.whl", "has_sig": false, "md5_digest": "761ba5d274ac970f407bddc4e3f0aab1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 18282, "upload_time": "2018-10-19T14:50:35", "url": "https://files.pythonhosted.org/packages/62/fd/f57f35af5fbd55d38162053d144edd4c22a28bd8cfe4aa0a4b10836c2a4a/PyODESolver-0.1.2.dev0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2884240c73a3a6e33a33118af32b3087", "sha256": "b4c46a1913cb91afed2e16feea38ff48991fd7883cc6511883b742524b62fae8" }, "downloads": -1, "filename": "PyODESolver-0.1.2.dev0.tar.gz", "has_sig": false, "md5_digest": "2884240c73a3a6e33a33118af32b3087", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9253, "upload_time": "2018-10-19T14:50:36", "url": "https://files.pythonhosted.org/packages/41/73/90dbe77c2c35df7c1a5747ea706612f09419fc10b512d76af72b4bd6970e/PyODESolver-0.1.2.dev0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "761ba5d274ac970f407bddc4e3f0aab1", "sha256": "bde2b63bac79cdeb9ebba3ff9fe436195d8087ae08b704db181c67cc98060a4c" }, "downloads": -1, "filename": "PyODESolver-0.1.2.dev0-py3-none-any.whl", "has_sig": false, "md5_digest": "761ba5d274ac970f407bddc4e3f0aab1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 18282, "upload_time": "2018-10-19T14:50:35", "url": "https://files.pythonhosted.org/packages/62/fd/f57f35af5fbd55d38162053d144edd4c22a28bd8cfe4aa0a4b10836c2a4a/PyODESolver-0.1.2.dev0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2884240c73a3a6e33a33118af32b3087", "sha256": "b4c46a1913cb91afed2e16feea38ff48991fd7883cc6511883b742524b62fae8" }, "downloads": -1, "filename": "PyODESolver-0.1.2.dev0.tar.gz", "has_sig": false, "md5_digest": "2884240c73a3a6e33a33118af32b3087", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9253, "upload_time": "2018-10-19T14:50:36", "url": "https://files.pythonhosted.org/packages/41/73/90dbe77c2c35df7c1a5747ea706612f09419fc10b512d76af72b4bd6970e/PyODESolver-0.1.2.dev0.tar.gz" } ] }