Metadata-Version: 2.4
Name: scikits-odes-core
Version: 3.1.1
Summary: Core support module for scikits-odes
Author-email: "B. Malengier" <benny.malengier@gmail.org>
Maintainer-email: "B. Malengier" <benny.malengier@gmail.org>
License: # Copyright (C) 2011-12  Pavol Kišon
        # Copyright (C) 2011-12  Benny Malengier
        
        All rights reserved.
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
          a. Redistributions of source code must retain the above copyright notice,
             this list of conditions and the following disclaimer.
          b. Redistributions in binary form must reproduce the above copyright
             notice, this list of conditions and the following disclaimer in the
             documentation and/or other materials provided with the distribution.
          c. Neither the name of the Enthought nor the names of its contributors
             may be used to endorse or promote products derived from this software
             without specific prior written permission.
        
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
        ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
        ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
        LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
        OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
        DAMAGE.
        
        
Project-URL: Homepage, http://cage.ugent.be/~bm/progs.html
Project-URL: Documentation, https://scikits-odes.readthedocs.io/en/stable/
Project-URL: Repository, https://github.com/bmcage/odes
Project-URL: Issues, https://github.com/bmcage/odes/issues
Project-URL: Paper, https://doi.org/10.21105/joss.00165
Project-URL: DOI, https://doi.org/10.5281/zenodo.5511691
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: BSD License
Classifier: Topic :: Scientific/Engineering
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Dynamic: license-file

[![Documentation Status](https://readthedocs.org/projects/scikits-odes/badge/?version=stable)](https://scikits-odes.readthedocs.org/en/stable/?badge=stable)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5511691.svg)](https://doi.org/10.5281/zenodo.5511691)
[![Paper DOI](http://joss.theoj.org/papers/10.21105/joss.00165/status.svg)](https://doi.org/10.21105/joss.00165)

This package contains the core support classes for ODES.
`pip install scikits-odes` to get all the available solvers.


ODES is a scikit for Python 3.7+ offering extra ode/dae solvers, as an extension
to what is available in scipy.
The documentation is available at [Read The
Docs](https://scikits-odes.readthedocs.io/), and API docs can be found at
https://bmcage.github.io/odes.

# Available solvers:
ODES provides interfaces to the following solvers:
* BDF linear multistep method for stiff problems (CVODE and IDA from SUNDIALS)
* Adams-Moulton linear multistep method for nonstiff problems (CVODE and IDA
  from SUNDIALS)
* Explicit Runge-Kutta method of order (4)5 with stepsize control (*dopri5*
  from `scipy.integrate`)
* Explicit Runge-Kutta method of order 8(5,3) with stepsize control (*dop853*
  from `scipy.integrate`)
* Historical solvers: *lsodi* and *ddaspk* are available for comparison reasons.
  Use IDA instead! Note that *lsodi* fails on architecture *aarch64*.


# Usage
A simple example solving the Van der Pol oscillator is as follows:

```python
import matplotlib.pyplot as plt
import numpy as np
from scikits_odes import ode

t0, y0 = 1, np.array([0.5, 0.5])  # initial condition
def van_der_pol(t, y, ydot):
    """ we create rhs equations for the problem"""
    ydot[0] = y[1]
    ydot[1] = 1000*(1.0-y[0]**2)*y[1]-y[0]

solution = ode('cvode', van_der_pol, old_api=False).solve(np.linspace(t0,500,200), y0)
plt.plot(solution.values.t, solution.values.y[:,0], label='Van der Pol oscillator')
plt.show()
```

For simplicity there is also a convenience function `odeint` wrapping the ode
solver class. See the [User Guide](https://scikits-odes.readthedocs.io/) for a
simple example for `odeint`, as well as simple examples for object orientated
interfaces and further examples using ODES solvers.


# Projects that use odes
You can learn by example from following code that uses ODES:
* Centrifuge simulation, a wrapper around the ida solver: see
  [centrifuge-1d](https://github.com/bmcage/centrifuge-1d/blob/master/centrifuge1d/modules/shared/solver.py)

You have a project using odes? Do a pull request to add your project.

# Citing ODES
If you use ODES as part of your research, can you please cite the
[ODES JOSS paper](https://doi.org/10.21105/joss.00165). Additionally, if you use
one of the SUNDIALS solvers, we strongly encourage you to cite the
[SUNDIALS papers](https://computation.llnl.gov/projects/sundials/publications).
