From beb5e415be1962410ed0905fdf681e1da3c46c2a Mon Sep 17 00:00:00 2001 From: James Tocknell Date: Sun, 15 Dec 2024 13:32:16 +1100 Subject: [PATCH] Update docs before new release This updates what versions of SUNDIALS to use, and fixes up package names/import names. --- docs/guide.rst | 12 ++++++------ docs/index.rst | 4 ++-- docs/installation.rst | 14 ++++++++------ docs/solvers.rst | 8 ++++---- 4 files changed, 20 insertions(+), 18 deletions(-) diff --git a/docs/guide.rst b/docs/guide.rst index a717ff7f..b94c1bce 100644 --- a/docs/guide.rst +++ b/docs/guide.rst @@ -6,10 +6,10 @@ Structure of ``odes`` and User's Guide There are a number of different ways of using ``odes`` to solve a system of ODEs/DAEs: - * :py:class:`scikits.odes.ode.ode` and :py:class:`scikits.odes.dae.dae` classes, which provides an object oriented interface and significant amount of control of the solver. - * :py:func:`scikits.odes.odeint.odeint`, a single function alternative to the object + * :py:class:`scikits_odes.ode.ode` and :py:class:`scikits_odes.dae.dae` classes, which provides an object oriented interface and significant amount of control of the solver. + * :py:func:`scikits_odes.odeint.odeint`, a single function alternative to the object oriented interface. - * Accessing the lower-level solver-specific wrappers, such as the modules in :py:mod:`scikits.odes.sundials`. + * Accessing the lower-level solver-specific wrappers, such as the modules in :py:mod:`scikits_odes_sundials`. In general, a user supplies a function with the signature:: @@ -30,7 +30,7 @@ The simplest user program using the ``odeint`` interface, assuming you have implemented the ODE ``right_hand_side`` mentioned above, is:: import numpy as np - from scikits.odes.odeint import odeint + from scikits_odes.odeint import odeint tout = np.linspace(0, 1) initial_values = np.array([0]) @@ -93,7 +93,7 @@ The simplest user program using the ``ode`` interface, assuming you have implemented the ODE ``right_hand_side`` mentioned above, is:: import numpy as np - from scikits.odes.ode import ode + from scikits_odes.ode import ode SOLVER = 'cvode' tout = np.linspace(0, 1) @@ -132,7 +132,7 @@ The simplest user program using the ``dae`` interface, assuming you have implemented the DAE ``right_hand_side`` mentioned above, is:: import numpy as np - from scikits.odes.dae import dae + from scikits_odes.dae import dae SOLVER = 'ida' tout = np.linspace(0, 1) diff --git a/docs/index.rst b/docs/index.rst index 0be8c8b3..5d7d506a 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -8,9 +8,9 @@ Welcome to the ODES scikit documentation! The ODES scikit provides access to Ordinary Differential Equation (ODE) solvers and Differential Algebraic Equation (DAE) solvers not included in `scipy`_. A -convenience function :py:func:`scikits.odes.odeint.odeint` is available for fast +convenience function :py:func:`scikits_odes.odeint.odeint` is available for fast and fire and forget integration. Object oriented class solvers -:py:class:`scikits.odes.ode.ode` and :py:class:`scikits.odes.dae.dae` are +:py:class:`scikits_odes.ode.ode` and :py:class:`scikits_odes.dae.dae` are available for fine control. Finally, the low levels solvers are also directly exposed for specialised needs. diff --git a/docs/installation.rst b/docs/installation.rst index f53e10f1..d185340b 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -47,8 +47,10 @@ with ``odes``: * - SUNDIALS version - ``odes`` version + * - 7.x + - 3.1.x * - 6.x - - 2.7.x + - 2.7.x and 3.0.x * - 5.x - 2.6.x * - 4.x @@ -67,7 +69,7 @@ Installation ------------ To install ``odes``, use:: - pip install scikits.odes + pip install scikits-odes which will download the latest version from PyPI. This will handle the installation of the additional runtime dependencies of ``odes``. You should then run the tests to make sure everything is set up correctly. @@ -79,7 +81,7 @@ Testing your version of ``odes`` To test the version in python, use in the python shell:: >>> import pkg_resources - >>> pkg_resources.get_distribution("scikits.odes").version + >>> pkg_resources.get_distribution("scikits-odes").version Running the Tests @@ -90,7 +92,7 @@ You need nose to run the tests. To install nose, run:: To run the tests, in the python shell:: - >>> import scikits.odes as od; od.test() + >>> import scikits_odes as od; od.test() Note that the sundials library must be in your ``LD_LIBRARY_PATH``. So, make sure the directory ``$SUNDIALS_INST/lib`` is included. You can do this for example as follows (assuming sundials was installed in ``/usr/local``:: @@ -120,7 +122,7 @@ LAPACK Not Found ................ Most issues with using ``odes`` are due to incorrectly setting the LAPACK libraries, resulting in error, typically:: - AttributeError: module 'scikits.odes.sundials.cvode' has no attribute 'CVODE' + AttributeError: module 'scikits_odes_sundials.cvode' has no attribute 'CVODE' or:: @@ -189,7 +191,7 @@ You can verify that lapack is available (although the nix install will have run many tests to check this already), try the following python snippet in the interpreter:: import numpy as np - from scikits.odes.odeint import odeint + from scikits_odes.odeint import odeint tout = np.linspace(0, 1) initial_values = np.array([1]) diff --git a/docs/solvers.rst b/docs/solvers.rst index 55d9bbe4..65d5f89f 100644 --- a/docs/solvers.rst +++ b/docs/solvers.rst @@ -5,10 +5,10 @@ Choosing a Solver ``odes`` interfaces with a number of different solvers: `CVODE `_ - ODE solver with BDF linear multistep method for stiff problems and Adams-Moulton linear multistep method for nonstiff problems. Supports modern features such as: root (event) finding, error control, and (Krylov-)preconditioning. See :py:mod:`scikits.odes.sundials.cvode` for more details and solver specific arguments. Part of SUNDIALS, it is a replacement for the earlier ``vode``/``dvode``. + ODE solver with BDF linear multistep method for stiff problems and Adams-Moulton linear multistep method for nonstiff problems. Supports modern features such as: root (event) finding, error control, and (Krylov-)preconditioning. See :py:mod:`scikits_odes_sundials.cvode` for more details and solver specific arguments. Part of SUNDIALS, it is a replacement for the earlier ``vode``/``dvode``. `IDA `_ - DAE solver with BDF linear multistep method for stiff problems and Adams-Moulton linear multistep method for nonstiff problems. Supports modern features such as: root (event) finding, error control, and (Krylov-)preconditioning. See :py:mod:`scikits.odes.sundials.ida` for more details and solver specific arguments. Part of SUNDIALS. + DAE solver with BDF linear multistep method for stiff problems and Adams-Moulton linear multistep method for nonstiff problems. Supports modern features such as: root (event) finding, error control, and (Krylov-)preconditioning. See :py:mod:`scikits_odes_sundials.ida` for more details and solver specific arguments. Part of SUNDIALS. `dopri5 `_ Part of :py:mod:`scipy.integrate`, explicit Runge-Kutta method of order (4)5 with stepsize control. @@ -20,10 +20,10 @@ Choosing a Solver `lsodi `_ Part of `odepack `_, IDA should be - used instead of this. See :py:mod:`scikits.odes.lsodiint` for more details. + used instead of this. See :py:mod:`scikits_odes.lsodiint` for more details. `ddaspk `_ - Part of `daspk `_, IDA should be used instead of this. See :py:mod:`scikits.odes.ddaspkint` for more details. + Part of `daspk `_, IDA should be used instead of this. See :py:mod:`scikits_odes.ddaspkint` for more details. Support for other SUNDIALS solvers (e.g. ARKODE) is currently not implemented, nor is support for non-serial methods (e.g. MPI, OpenMP). Contributions adding