diff --git a/v3.0.0a3/_modules/index.html b/v3.0.0a3/_modules/index.html new file mode 100644 index 0000000..03e300a --- /dev/null +++ b/v3.0.0a3/_modules/index.html @@ -0,0 +1,112 @@ + + + + + + + Overview: module code — Odes 3.0.0a3 documentation + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/v3.0.0a3/_modules/scikits_odes/dae.html b/v3.0.0a3/_modules/scikits_odes/dae.html new file mode 100644 index 0000000..f50e7ea --- /dev/null +++ b/v3.0.0a3/_modules/scikits_odes/dae.html @@ -0,0 +1,454 @@ + + + + + + + scikits_odes.dae — Odes 3.0.0a3 documentation + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +

Source code for scikits_odes.dae

+# -*- coding: utf-8 -*-
+# Authors: B. Malengier based on ode.py
+r"""
+First-order DAE solver
+======================
+
+User-friendly interface to various numerical integrators for solving an
+algebraic system of first order ODEs with prescribed initial conditions:
+
+.. math::
+    A \frac{dy(t)}{dt} = f(t,y(t)),
+
+    y(t=0)[i] = y0[i],
+
+    \frac{d y(t=0)}{dt}[i]  = yprime0[i],
+
+where :math:`i = 0, ..., len(y0) - 1`; :math:`A` is a (possibly singular) matrix
+of size :math:`i × i`; and :math:`f(t,y)` is a vector of size :math:`i` or more generally, equations of the form
+
+.. math::
+    G(t,y,y') = 0
+
+"""
+__all__ = ['dae']
+__docformat__ = "restructuredtext en"
+import re
+import sys
+
+from scikits_odes_core import DaeBase
+
+
+#------------------------------------------------------------------------------
+# User interface
+#------------------------------------------------------------------------------
+
+
+[docs] +class dae(object): + """ + A generic interface class to differential algebraic equations. + + Define equation res = G(t,y,y') which can eg be G = f(y,t) - A y' when + solving A y' = f(y,t), and where (optional) jac is the jacobian matrix of + the nonlinear system see fortran source code), so d res/dy + scaling * d + res/dy' or d res/dy depending on the backend. + + Parameters + ---------- + integrator_name : ``'ida'``, ``'ddaspk'`` or ``'lsodi'`` + The integrator solver to use. + + eqsres : residual function + Residual of the DAE. The signature of this function depends on the + solver used, see the solver documentation for details. + Generally however, you can assume the following signature to work: + + ``eqsres(x, y, yprime, return_residual)`` + + with + x : independent variable, eg the time, float + y : array of n unknowns in x + yprime : dy/dx array of n unknowns in x, dimension = dim(y) + return_residual: array that must be updated with the value of the residuals, so G(t,y,y'). The dimension is equal to dim(y) + return value: integer, 0 for success. It is not guaranteed that a solver takes this status into account + + Some solvers will allow userdata to be passed to eqsres, or optional + formats that are more performant. + + options : mapping + Additional options for initialization, solver dependent + See set_options method of the `integrator_name` you selected for + details. + + + See Also + -------- + odeint : an ODE integrator with a simpler interface based on lsoda from + ODEPACK + ode : class around vode ODE integrator + + + Notes + ----- + Possible future solvers + + ddaskr: Not included, starting hints: + http://osdir.com/ml/python.f2py.user/2005-07/msg00014.html + Modified Extended Backward Differentiation Formulae (MEBDF): Not included. + Fortran codes: http://www.ma.ic.ac.uk/~jcash/IVP_software/readme.html + + Examples + -------- + DAE arise in many applications of dynamical systems, as well as in + discritisations of PDE (eg moving mesh combined with method of + lines). + As an easy example, consider the simple oscillator, which we write as + G(y,y',t) = 0 instead of the normal ode, and solve as a DAE. + + >>> from __future__ import print_function + >>> from numpy import cos, sin, sqrt + >>> k = 4.0 + >>> m = 1.0 + >>> initx = [1, 0.1] + >>> initxp = [initx[1], -k/m*initx[0]] + >>> def reseqn(t, x, xdot, result): + ... # we create residual equations for the problem + ... result[0] = m*xdot[1] + k*x[0] + ... result[1] = xdot[0] - x[1] + >>> from scikits.odes import dae + >>> solver = dae('ida', reseqn) + >>> result = solver.solve([0., 1., 2.], initx, initxp) + """ + + LOADED = False + + def __init__(self, integrator_name, eqsres, **options): + integrator = find_dae_integrator(integrator_name) + if integrator is None: + raise ValueError('No integrator name match with %s or is not available.'\ + %(repr(integrator_name))) + else: + self._integrator = integrator(eqsres, **options) + +
+[docs] + def set_options(self, **options): + """ + Set specific options for the solver. + See the solver documentation for details. + + Calling set_options a second time, normally resets the solver. + """ + return self._integrator.set_options(**options)
+ + +
+[docs] + def solve(self, tspan, y0, yp0): + """ + Runs the solver. + + Parameters + ---------- + tspan : list/array + A list of times at which the computed value will be returned. Must + contain the start time as first entry. + y0 : list/array + list array of initial values + yp0 : list/array + list array of initial values of derivatives + + Returns + ------- + old_api is False : namedtuple + namedtuple with the following attributes + + =========== ========================================== + Field Meaning + =========== ========================================== + ``flag`` An integer flag (StatusEnumXXX) + ``values`` Named tuple with entries array t and array y and array ydot. y will correspond to y_retn value and ydot to yp_retn! + ``errors`` Named tuple with entries t and y and ydot of error + ``roots`` Named tuple with entries array t and array y and array ydot + ``tstop`` Named tuple with entries array t and array y and array ydot + ``message`` String with message in case of an error + =========== ========================================== + + old_api is True : tuple + tuple with the following elements in order + + ========== ========================================== + Field Meaning + ========== ========================================== + ``flag`` indicating return status of the solver + ``t`` numpy array of times at which the computations were successful + ``y`` numpy array of values corresponding to times t (values of y[i, :] ~ t[i]) + ``yp`` numpy array of derivatives corresponding to times t (values of yp[i, :] ~ t[i]) + ``t_err`` float or None - if recoverable error occurred (for example reached maximum number of allowed iterations), this is the time at which it happened + ``y_err`` numpy array of values corresponding to time t_err + ``yp_err`` numpy array of derivatives corresponding to time t_err + ========== ========================================== + + """ + return self._integrator.solve(tspan, y0, yp0)
+ + +
+[docs] + def init_step(self, t0, y0, yp0, y_ic0_retn = None, yp_ic0_retn = None): + """ + Initializes the solver and allocates memory. It is not needed to + call this method if solve is used to compute the solution. In the case + step is used, init_step must be called first. + + Parameters + ---------- + t0 : number + initial time + y0 : list/array + initial condition for y + yp0 : list/array + initial condition for yp + y_ic0 : numpy array + (optional) returns the calculated consistent initial condition for y + yp_ic0 : numpy array + (optional) returns the calculated consistent initial condition for y + derivated. + + Returns + ------- + old_api is False : namedtuple + namedtuple with the following attributes + + =========== ========================================== + Field Meaning + =========== ========================================== + ``flag`` An integer flag (StatusEnumXXX) + ``values`` Named tuple with entries t and y and ydot. y will correspond to y_retn value and ydot to yp_retn! + ``errors`` Named tuple with entries t and y and ydot + ``roots`` Named tuple with entries t and y and ydot + ``tstop`` Named tuple with entries t and y and ydot + ``message`` String with message in case of an error + =========== ========================================== + + old_api is True : tuple + tuple with the following elements in order + + =========== ========================================== + Field Meaning + =========== ========================================== + ``flag`` status of the computation (successful or error occurred) + ``t_out`` time, where the solver stopped (when no error occurred, t_out == t) + =========== ========================================== + + """ + return self._integrator.init_step(t0, y0, yp0, y_ic0_retn, yp_ic0_retn)
+ + +
+[docs] + def step(self, t, y_retn=None, yp_retn=None): + """ + Method for calling successive next step of the IDA solver to allow + more precise control over the IDA solver. The 'init_step' method has to + be called before the 'step' method. + + A step is done towards time t, and output at t returned. This time can + be higher or lower than the previous time. If option + 'one_step_compute'==True, and the solver supports it, only one internal + solver step is done in the direction of t starting at the current step. + + If old_api=True, the old behavior is used: if t>0.0 then integration is + performed until this time and results at this time are returned in + y_retn; else if if t<0.0 only one internal step is performed towards time + abs(t) and results after this one time step are returned. + + Parameters + ---------- + t : number + y_retn : numpy array (ndim = 1) or None. + (Needs to be preallocated) If not None, will be filled with y at + time t. If None y_retn is not used. + yp_retn : numpy array (ndim = 1) or None. + (Needs to be preallocated) If not None, will be filled with + derivatives of y at time t. If None yp_retn is not used. + + Returns + ------- + old_api is False : namedtuple + namedtuple with the following attributes + + =========== ========================================== + Field Meaning + =========== ========================================== + ``flag`` An integer flag (StatusEnumXXX) + ``values`` Named tuple with entries t and y and ydot. y will correspond to y_retn value and ydot to yp_retn! + ``errors`` Named tuple with entries t and y and ydot + ``roots`` Named tuple with entries t and y and ydot + ``tstop`` Named tuple with entries t and y and ydot + ``message`` String with message in case of an error + =========== ========================================== + + old_api is True : tuple + tuple with the following elements in order + + =========== ========================================== + Field Meaning + =========== ========================================== + ``flag`` status of the computation (successful or error occurred) + ``t_out`` time, where the solver stopped (when no error occurred, t_out == t) + =========== ========================================== + + """ + return self._integrator.step(t, y_retn, yp_retn)
+ + + def __del__(self): + """ + Clean up what is needed + """ + if hasattr(self, '_integrator'): + del self._integrator
+ + +#------------------------------------------------------------------------------ +# DAE integrators +#------------------------------------------------------------------------------ + +def find_dae_integrator(name): + if not dae.LOADED: + ## ida + try: + from scikits_odes_sundials import ida + DaeBase.integrator_classes.append(ida.IDA) + except ValueError as msg: + print('Could not load IDA solver', msg) + except ImportError: + print(sys.exc_info()[1]) + + ## idas + try: + from scikits_odes_sundials import idas + DaeBase.integrator_classes.append(idas.IDAS) + except ValueError as msg: + print('Could not load IDAS solver', msg) + except ImportError: + print(sys.exc_info()[1]) + + ## ddaspk + try: + from scikits_odes_daepack.ddaspkint import ddaspk + except ImportError: + print(sys.exc_info()[1]) + + ## lsodi + try: + from scikits_odes_daepack.lsodiint import lsodi + except ImportError: + print(sys.exc_info()[1]) + + dae.LOADED = True + + for cl in DaeBase.integrator_classes: + if re.match(name, cl.__name__, re.I): + return cl + elif hasattr(cl, name) and re.match(name, cl.name, re.I): + return cl + raise ValueError('Integrator name %s does not exsist' % name) +
+ +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/v3.0.0a3/_modules/scikits_odes/dopri5.html b/v3.0.0a3/_modules/scikits_odes/dopri5.html new file mode 100644 index 0000000..4dbafd1 --- /dev/null +++ b/v3.0.0a3/_modules/scikits_odes/dopri5.html @@ -0,0 +1,499 @@ + + + + + + + scikits_odes.dopri5 — Odes 3.0.0a3 documentation + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +

Source code for scikits_odes.dopri5

+# -*- coding: utf-8 -*-
+# Created on Thu Jan 28 14:59:25 2016
+# @author: benny
+"""
+Making scipy ode solvers available via the ode API
+==================================================
+
+dopri5
+------
+
+This is an explicit runge-kutta method of order (4)5 due to Dormand & Prince
+(with stepsize control and dense output).
+The API of this solver is as the other scikit.odes ODE solvers
+
+Authors:
+
+    E. Hairer and G. Wanner Universite de Geneve, Dept. de Mathematiques CH-1211 Geneve 24, Switzerland e-mail: ernst.hairer@math.unige.ch, gerhard.wanner@math.unige.ch
+
+This code is described in [HNW93].
+
+This integrator accepts the following options:
+
+    atol : float or sequence absolute tolerance for solution, default 1e-12
+    rtol : float or sequence relative tolerance for solution, default 1e-6
+    nsteps : int Maximum number of (internally defined) steps allowed during one call to the solver. Default=500
+    first_step : float
+    max_step : float
+    safety : float Safety factor on new step selection (default 0.9)
+    ifactor : float
+    dfactor : float Maximum factor to increase/decrease step size by in one step
+    beta : float Beta parameter for stabilised step size control.
+    verbosity : int Switch for printing messages (< 0 for no messages).
+
+References
+[HNW93]	(1, 2) E. Hairer, S.P. Norsett and G. Wanner, Solving Ordinary Differential Equations i. Nonstiff Problems. 2nd edition. Springer Series in Computational Mathematics, Springer-Verlag (1993)
+
+dop853
+------
+
+This is an explicit runge-kutta method of order 8(5,3) due to Dormand & Prince
+(with stepsize control and dense output).
+Options and references the same as “dopri5”.
+
+"""
+from collections import namedtuple
+from enum import IntEnum
+from warnings import warn
+import sys
+
+import numpy as np
+from scipy.integrate import ode as _runner
+
+from scikits_odes_core import OdeBase
+
+SolverReturn = namedtuple(
+    "SolverReturn", [
+        "flag", "values", "errors", "roots",
+        "tstop", "message"
+    ]
+)
+
+SolverVariables = namedtuple("SolverVariables", ["t", "y"])
+
+
+
+[docs] +class StatusEnumDOP(IntEnum): + SUCCESS = 1 + SOLOUT = 2 + + INPUT_FAIL = -1 + NMAX_FAIL = -2 + STEPSIZE_FAIL = -3 + STIFFNESS_FAIL = -4 + + UNEXPECTED_IDID = -10
+ + +STATUS_MESSAGE = { + StatusEnumDOP.SUCCESS: 'computation successful', + StatusEnumDOP.SOLOUT: 'comput. successful (interrupted by solout)', + StatusEnumDOP.INPUT_FAIL: 'input is not consistent', + StatusEnumDOP.NMAX_FAIL: 'larger nmax is needed', + StatusEnumDOP.STEPSIZE_FAIL: 'step size becomes too small', + StatusEnumDOP.STIFFNESS_FAIL: 'problem is probably stiff (interrupted)', + StatusEnumDOP.UNEXPECTED_IDID: 'Unexpected idid, check warnings for info', +} + +
+[docs] +class DOPSolveException(Exception): + """Base class for exceptions raised by `DOP.validate_flags`.""" + def __init__(self, soln): + self.soln = soln + self.args = (self._message.format(soln),)
+ + +
+[docs] +class DOPSolveFailed(DOPSolveException): + """`DOP.solve` failed to reach endpoint""" + _message = ( + "Solver failed with flag {0.flag} and finished at {0.errors.t}" + "with values {0.errors.y}." + )
+ + +
+[docs] +class dopri5(OdeBase): + name = 'dopri5' + _runner = _runner + default_values = { + 'rtol': 1e-6, + 'atol': 1e-12, + 'nsteps': 500, + 'max_step': 0.0, + 'first_step': 0.0, # determined by solver + 'safety': 0.9, + 'ifactor': 10.0, + 'dfactor': 0.2, + 'beta': 0.0, + 'verbosity': -1, # no messages if negative + } + + def __init__(self, Rfn, **options): + """ + Initialize the ODE Solver and it's default values + + Parameters + ---------- + Rfn - right-hand-side function + options - additional options for initialization + """ + self.options = self.default_values + self.set_options(rfn=Rfn, **options) + self._validate_flags = None + self.solver = None + self.initialized = False + +
+[docs] + def set_options(self, **options): + """ + Set specific options for the solver. + + Calling set_options a second time, normally resets the solver. + """ + for (key, value) in options.items(): + self.options[key.lower()] = value + self.initialized = False
+ + + def _init_data(self): + self.rfn = self.options['rfn'] + self.N = len(self.y0) + + def _wrap_Rfn(self, t, y): + yout = np.empty(self.N, float) + self.rfn(t, y, yout) + return yout + +
+[docs] + def init_step(self, t0, y0): + """ + Initializes the solver and allocates memory. + + Parameters + ---------- + t0 - initial time + y0 - initial condition for y (can be list or numpy array) + + Returns + ------- + if old_api: + not supported + + if old_api False: + A named tuple, with entries: + flag = An integer flag (StatusEnumDop) + values = Named tuple with entries t and y and ydot. y will correspond to y_retn value and ydot to yp_retn! + errors = Named tuple with entries t_err and y_err + roots = Named tuple with entries t_roots and y_roots + tstop = Named tuple with entries t_stop and y_tstop + message= String with message in case of an error + + """ + self.y0 = y0 + self.t = t0 + self._init_data() + + self.solver = self._runner(self._wrap_Rfn)\ + .set_integrator(self.name, + rtol = self.options['rtol'], + atol = self.options['atol'], + nsteps = self.options['nsteps'], + max_step = self.options['max_step'], + first_step = self.options['first_step'], # determined by solver + safety = self.options['safety'], + ifactor = self.options['ifactor'], + dfactor = self.options['dfactor'], + beta = self.options['beta'], + verbosity = self.options['verbosity'])\ + .set_initial_value(y0, t0) + self.initialized = True + y_retn = np.empty(len(y0), float) + y_retn[:] = y0[:] + soln = SolverReturn( + flag=StatusEnumDOP.SUCCESS, + values=SolverVariables(t=t0, y=y_retn), + errors=SolverVariables(t=None, y=None), + roots=SolverVariables(t=None, y=None), + tstop=SolverVariables(t=None, y=None), + message=STATUS_MESSAGE[StatusEnumDOP.SUCCESS] + ) + if self._validate_flags: + return self.validate_flags(soln) + return soln
+ + +
+[docs] + def step(self, t, y_retn=None): + """ + Method for calling successive next step of the ODE solver to allow + more precise control over the solver. The 'init_step' method has to + be called before the 'step' method. + + Parameters + ---------- + t - A step is done towards time t, and output at t returned. + This time can be higher or lower than the previous time. + If option 'one_step_compute'==True, and the solver supports + it, only one internal solver step is done in the direction + of t starting at the current step. + + If old_api=True, the old behavior is used: + if t>0.0 then integration is performed until this time and results at this time are returned in y_retn + if t<0.0 only one internal step is perfomed towards time abs(t) and results after this one time step are returned + y_retn - numpy vector (ndim = 1) in which the computed + value will be stored (needs to be preallocated). If + None y_retn is not used. + Returns + ------- + if old_api: + not supported + + if old_api False: + A named tuple, with entries: + flag = An integer flag (StatusEnumDOP) + values = Named tuple with entries t and y. y will correspond to y_retn value + errors = Named tuple with entries t_err and y_err + roots = Named tuple with entries t_roots and y_roots + tstop = Named tuple with entries t_stop and y_tstop + message= String with message in case of an error + + """ + if not self.initialized == False: + raise ValueError("DOPRI:step: init_step must be run before running the step method.") + if t <= self.t: + raise ValueError("Integration must be forward! t must be > previous timestep") + y = self.solver.integrate(t) + y_err = None + t_err = None + if not self.solver.successful(): + flag = StatusEnumDOP.UNEXPECTED_IDID + y_err = y + t_err = t + else: + flag = StatusEnumDOP.SUCCESS + self.y = y + self.t = self.solver.t + + return SolverReturn( + flag=flag, + values=SolverVariables(t=self.t, y=y), + errors=SolverVariables(t=t_err, y=y_err), + roots=SolverVariables(t=None, y=None), + tstop=SolverVariables(t=None, y=None), + message=STATUS_MESSAGE[flag] + )
+ + +
+[docs] + def solve(self, tspan, y0): + """ + Runs the solver. + + Parameters + ---------- + tspan - an list/array of times at which the computed value will be + returned. Must contain the start time as first entry.. + y0 - list/numpy array of initial values + + Returns + ------- + if old_api + Not supported + if old_api False: + A named tuple, with entries: + flag = An integer flag + values = Named tuple with entries t and y + errors = Named tuple with entries t and y + roots = Named tuple with entries t and y + tstop = Named tuple with entries t and y + message= String with message in case of an error + """ + self.initialized = False + soln = self.init_step(tspan[0], y0) + nrt = len(tspan) + t_retn = np.empty(np.shape(tspan), float) + y_retn = np.empty([len(tspan), len(y0)], float) + + t_retn[0] = tspan[0] + y_retn[0, :] = y0 + + idx = 1 + while self.solver.successful() and idx<nrt: + time = tspan[idx] + y = self.solver.integrate(time) + t_retn[idx] = time + y_retn[idx, :] = y + idx += 1 + + y_err = None + t_err = None + if not self.solver.successful(): + flag = StatusEnumDOP.UNEXPECTED_IDID + y_err = y_retn[idx-1] + t_err = t_retn[idx-1] + # return values computed so far + t_retn = t_retn[0:idx-1] + y_retn = y_retn[0:idx-1, :] + else: + flag = StatusEnumDOP.SUCCESS + + soln = SolverReturn( + flag=flag, + values=SolverVariables(t=t_retn, y=y_retn), + errors=SolverVariables(t=t_err, y=y_err), + roots=SolverVariables(t=None, y=None), + tstop=SolverVariables(t=None, y=None), + message=STATUS_MESSAGE[flag] + ) + if self._validate_flags: + return self.validate_flags(soln) + return soln
+ + +
+[docs] + def validate_flags(self, soln): + """ + Validates the flag returned by `dopri.solve`. + + Validation happens using the following scheme: + * failures (`flag` < 0) raise `DOPSolveFailed` or a subclass of it; + * otherwise, return an instance of `SolverReturn`. + + """ + if soln.flag == StatusEnumDOP.SUCCESS: + return soln + if soln.flag < 0: + raise DOPSolveFailed(soln) + warn(WARNING_STR.format(soln.flag, *soln.err_values)) + return soln
+
+ + + +
+[docs] +class dop853(dopri5): + name = 'dop853' + default_values = { + 'rtol': 1e-6, + 'atol': 1e-12, + 'nsteps': 500, + 'max_step': 0.0, + 'first_step': 0.0, # determined by solver + 'safety': 0.9, + 'ifactor': 6.0, + 'dfactor': 0.3, + 'beta': 0.0, + 'verbosity': -1, # no messages if negative + }
+ + + +OdeBase.integrator_classes.append(dopri5) +OdeBase.integrator_classes.append(dop853) +
+ +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/v3.0.0a3/_modules/scikits_odes/ode.html b/v3.0.0a3/_modules/scikits_odes/ode.html new file mode 100644 index 0000000..4c3a2f2 --- /dev/null +++ b/v3.0.0a3/_modules/scikits_odes/ode.html @@ -0,0 +1,472 @@ + + + + + + + scikits_odes.ode — Odes 3.0.0a3 documentation + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +

Source code for scikits_odes.ode

+# -*- coding: utf-8 -*-
+# Authors: B. Malengier based on ode.py
+r"""
+First-order ODE solver
+======================
+
+User-friendly interface to various numerical integrators for solving a
+system of first order ODEs with prescribed initial conditions:
+
+.. math::
+
+    \frac{dy(t)}{dt} = f(t, y(t)), \quad y(t_0)=y_0
+
+    y(t_0)[i] = y_0[i], i = 0, ..., \mathrm{len}(y_0) - 1
+
+:math:`f(t,y)` is the right hand side function and returns a vector of size
+:math:`\mathrm{len}(y_0)`.
+
+"""
+__all__ = ['ode']
+__docformat__ = "restructuredtext en"
+
+import re
+import sys
+
+
+from scikits_odes_core import OdeBase
+
+#------------------------------------------------------------------------------
+# User interface
+#------------------------------------------------------------------------------
+
+
+[docs] +class ode(object): + """ + A generic interface class to differential equation solvers. + + + Parameters + ---------- + + integrator_name : ``'cvode'``, ``'dopri5'`` or ``'dop853'`` + The solver to use. + + ``'cvode'`` selects the CVODE solver from the SUNDIALS package. + See py:class:`scikits.odes.sundials.cvode.CVODE` for solver specific + options. + + ``'dopri5'`` selects the Dormand & Prince Runge-Kutta order (4)5 + solver from scipy. + + eqsrhs : right-hand-side function + Right-hand-side of a first order ode. + Generally, you can assume the following signature to work: + + eqsrhs(x, y, return_rhs) + + with + + x: independent variable, eg the time, float + + y: array of n unknowns in x + + return_rhs : array that must be updated with the value of the + right-hand-side, so f(t,y). The dimension is equal to + dim(y) + + return value: An integer, 0 for success, 1 for failure. + It is not guaranteed that a solver takes this status into account + + Some solvers will allow userdata to be passed to eqsrhs, or optional + formats that are more performant. + + options : additional options of the solver + See set_options method of the `integrator_name` you selected for + details. + Set option `old_api=False` to use the new API. In the future, this + will become the default! + + See Also + -------- + scikits.odes.odeint.odeint : an ODE integrator with a simpler interface + scipy.integrate : Methods in scipy for ODE integration + + Examples + -------- + ODE arise in many applications of dynamical systems, as well as in + discritisations of PDE (eg moving mesh combined with method of + lines). + As an easy example, consider the simple oscillator, + + >>> from __future__ import print_function + >>> from numpy import cos, sin, sqrt + >>> k = 4.0 + >>> m = 1.0 + >>> initx = [1, 0.1] + >>> def rhseqn(t, x, xdot): + # we create rhs equations for the problem + xdot[0] = x[1] + xdot[1] = - k/m * x[0] + + >>> from scikits.odes import ode + >>> solver = ode('cvode', rhseqn, old_api=False) + >>> result = solver.solve([0., 1., 2.], initx) + >>> print(' t Solution Exact') + >>> print('------------------------------------') + >>> for t, u in zip(result.values.t, result.values.y): + print('%4.2f %15.6g %15.6g' % (t, u[0], initx[0]*cos(sqrt(k/m)*t)+initx[1]*sin(sqrt(k/m)*t)/sqrt(k/m))) + + More examples in the Examples_ directory and IPython_ worksheets. + + .. _Examples: https://github.com/bmcage/odes/tree/master/docs/src/examples + .. _IPython: https://github.com/bmcage/odes/tree/master/docs/ipython + """ + LOADED = False + + def __init__(self, integrator_name, eqsrhs, **options): + integrator = find_ode_integrator(integrator_name) + if integrator is None: + raise ValueError('No integrator name match with %s or is not available.'\ + %(repr(integrator_name))) + else: + self._integrator = integrator(eqsrhs, **options) + +
+[docs] + def set_options(self, **options): + """ + Set specific options for the solver. + See the solver documentation for details. + + Calling set_options a second time, is only possible for options that + can change during runtime. + """ + return self._integrator.set_options(**options)
+ + +
+[docs] + def solve(self, tspan, y0): + """ + Runs the solver. + + Parameters + ---------- + tspan : array (or similar) + a list of times at which the computed value will be returned. Must + contain the start time as first entry. + + y0 : array (or similar) + a list of initial values + + Returns + ------- + old_api is False : namedtuple + namedtuple with the following attributes + + =========== ========================================== + Field Meaning + =========== ========================================== + ``flag`` An integer flag (StatusEnum) + ``values`` Named tuple with entries t and y + ``errors`` Named tuple with entries t and y + ``roots`` Named tuple with entries t and y + ``tstop`` Named tuple with entries t and y + ``message`` String with message in case of an error + =========== ========================================== + + old_api is True : tuple + tuple with the following elements in order + + ========== ========================================== + Field Meaning + ========== ========================================== + ``flag`` indicating return status of the solver + ``t`` numpy array of times at which the computations were successful + ``y`` numpy array of values corresponding to times t (values of y[i, :] ~ t[i]) + ``t_err`` float or None - if recoverable error occured (for example reached maximum number of allowed iterations), this is the time at which it happened + ``y_err`` numpy array of values corresponding to time t_err + ========== ========================================== + + """ + return self._integrator.solve(tspan, y0)
+ + +
+[docs] + def init_step(self, t0, y0): + """ + Initializes the solver and allocates memory. It is not needed to + call this method if solve is used to compute the solution. In the case + step is used, init_step must be called first. + + Parameters + ---------- + t0 : number + initial time + y0 : array + initial condition for y (can be list or numpy array) + + Returns + ------- + old_api is False : namedtuple + namedtuple with the following attributes + + =========== ========================================== + Field Meaning + =========== ========================================== + ``flag`` An integer flag (StatusEnum) + ``values`` Named tuple with entries t and y + ``errors`` Named tuple with entries t and y + ``roots`` Named tuple with entries t and y + ``tstop`` Named tuple with entries t and y + ``message`` String with message in case of an error + =========== ========================================== + + old_api is True : tuple + tuple with the following elements in order + + ========== ========================================== + Field Meaning + ========== ========================================== + ``flag`` boolean status of the computation (successful or error occured) + ``t_out`` inititial time + ========== ========================================== + + """ + return self._integrator.init_step(t0, y0)
+ + +
+[docs] + def step(self, t, y_retn=None): + """ + Method for calling successive next step of the ODE solver to allow + more precise control over the solver. The 'init_step' method has to + be called before the 'step' method. + + A step is done towards time t, and output at t returned. This time can + be higher or lower than the previous time. If option + 'one_step_compute'==True, and the solver supports it, only one internal + solver step is done in the direction of t starting at the current step. + + If old_api=True, the old behavior is used: if t>0.0 then integration is + performed until this time and results at this time are returned in + y_retn if t<0.0 only one internal step is perfomed towards time abs(t) + and results after this one time step are returned + + Parameters + ---------- + t : number + + y_retn : numpy vector (ndim = 1) + in which the computed value will be stored (needs to be + preallocated). If None y_retn is not used. + + Returns + ------- + old_api is False : namedtuple + namedtuple with the following attributes + + =========== ========================================== + Field Meaning + =========== ========================================== + ``flag`` An integer flag (StatusEnum) + ``values`` Named tuple with entries t and y + ``errors`` Named tuple with entries t and y + ``roots`` Named tuple with entries t and y + ``tstop`` Named tuple with entries t and y + ``message`` String with message in case of an error + =========== ========================================== + + old_api is True : tuple + tuple with the following elements in order + + ========== ========================================== + Field Meaning + ========== ========================================== + ``flag`` status of the computation (successful or error occured) + ``t_out`` time, where the solver stopped (when no error occured, t_out == t) + ========== ========================================== + + """ + return self._integrator.step(t, y_retn)
+ + +
+[docs] + def set_tstop(self, tstop): + """ + Add a stop time to the integrator past which he is not allowed to + integrate. + + Parameters + ---------- + tstop : float time + Time point in the future where the integration must stop. You can + indicate like this that integration past this point is not allowed, + in order to avoid undefined behavior. + You can achieve the same result with a call to + `set_options(tstop=tstop)` + """ + if hasattr(self._integrator, 'set_tstop'): + self._integrator.set_tstop(tcrit) + else: + self._integrator.set_options(tstop=tstop)
+ + +
+[docs] + def get_info(self): + """ + Return additional information about the state of the integrator. + + Returns + ------- + + A dictionary filled with internal data as exposed by the integrator. + See the `get_info` method of your chosen integrator for details. + + """ + if hasattr(self._integrator, 'get_info'): + return self._integrator.get_info() + else: + return {}
+
+ + +#------------------------------------------------------------------------------ +# ODE integrators +#------------------------------------------------------------------------------ + +def find_ode_integrator(name): + if not ode.LOADED: + ## cvode + try: + from scikits_odes_sundials import cvode + OdeBase.integrator_classes.append(cvode.CVODE) + except ValueError as msg: + print('Could not load CVODE solver', msg) + except ImportError: + print(sys.exc_info()[1]) + ## cvodes + try: + from scikits_odes_sundials import cvodes + OdeBase.integrator_classes.append(cvodes.CVODES) + except ValueError as msg: + print('Could not load CVODES solver', msg) + except ImportError: + print(sys.exc_info()[1]) + + ## dopri5 and dop853 + try: + from .dopri5 import dopri5, dop853 + except ImportError: + print(sys.exc_info()[1]) + + ode.LOADED = True + + for cl in OdeBase.integrator_classes: + if re.match(name, cl.__name__, re.I): + return cl + elif hasattr(cl, name) and re.match(name, cl.name, re.I): + return cl + raise ValueError('Integrator name %s does not exist' % name) +
+ +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/v3.0.0a3/_modules/scikits_odes/odeint.html b/v3.0.0a3/_modules/scikits_odes/odeint.html new file mode 100644 index 0000000..7e25967 --- /dev/null +++ b/v3.0.0a3/_modules/scikits_odes/odeint.html @@ -0,0 +1,323 @@ + + + + + + + scikits_odes.odeint — Odes 3.0.0a3 documentation + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +

Source code for scikits_odes.odeint

+# -*- coding: utf-8 -*-
+"""
+Created on Mon Feb  1 13:38:24 2016
+
+@author: benny
+"""
+from copy import copy
+from .ode import ode
+
+
+
+[docs] +def odeint(rhsfun, tout, y0, method='bdf', **options): + """ + Integrate a system of ordinary differential equations. + *odeint* is a wrapper around the ode class, as a convenience function to + quickly integrate a system of ode. + Solves the initial value problem for stiff or non-stiff systems + of first order ode's: + + rhs = dy/dt = fun(t, y) + + where y can be a vector, then rhsfun must be a function computing rhs with + signature: + + rhsfun(t, y, rhs) + + storing the computed dy/dt in the rhs array passed to the function + + Parameters + ---------- + rhsfun : callable(t, y, out) + Computes the derivative at dy/dt in terms of t and y, and stores in out + y0 : array + Initial condition on y (can be a vector). + t : array + A sequence of time points for which to solve for y. The initial + value point should be the first element of this sequence. + method : string, solution method to use. + Available are all the ode class solvers as well as some convenience + shorthands: + + ======= ============================================================== + Method Meaning + ======= ============================================================== + bdf This uses the 'cvode' solver in default from, which is a + variable step, variable coefficient Backward Differentiation + Formula solver, good for stiff ODE. Newton iterations are + used to solve the nonlinear system. + admo This uses the 'cvode' solver with option lmm_type='ADAMS', + which is a variable step Adams-Moulton method (linear + multistep method), good for non-stiff ODE. Functional + iterations are used to solve the nonlinear system. + rk5 This uses the 'dopri5' solver, which is a variable step + Runge-Kutta method of order (4)5 (use for non-stiff ODE) + rk8 This uses the 'dop853' solver, which is a variable step + Runge-Kutta method of order 8(5,3) + ======= ============================================================== + + For educational purposes, you can also access following methods: + + ======= ============================================================== + Method Meaning + ======= ============================================================== + beuler This is the Implicit Euler (backward Euler) method (order 1), + which is obtained via the 'bdf' method, setting the order + option to 1, setting large tolerances, and fixing the + stepsize. + Use option 'step' to change stepsize, default: step=0.05. + Use option 'rtol' and 'atol' to use more strict tolerances + Note: this is not completely the backward Euler method, as + the cvode solver has added control options! + trapz This is the Trapezoidal Rule method (order 2), which is + obtained via the 'admo' method, setting option order to 2, + setting large tolerances and fixing the stepsize. + Use option 'step' to change stepsize, default: step=0.05. + Use option 'rtol' and 'atol' to use more strict tolerances + Note: The cvode solver might change the order to 1 internally + in which case this becomes beuler method. Set atol, rtol + options as strict as possible. + ======= ============================================================== + + You can also access the solvers of ode via their names: + + ======= ============================================================== + Method Meaning + ======= ============================================================== + cvode This uses the 'cvode' solver + dopri5 This uses the 'dopri5' solver + dop853 This uses the 'dop853' solver + ======= ============================================================== + + options : extra solver options, optional + Every solver has it's own extra options, see the ode class and the + details of the solvers available there to know the options possible per + solver + + Returns + ------- + solution : named tuple + A single named tuple is returned containing the result of the + integration. + + ======== ========================================== + Field Meaning + ======== ========================================== + flag An integer flag + values Named tuple with fields t and y + errors Named tuple with fields t and y + roots Named tuple with fields t and y + tstop Named tuple with fields t and y + message String with message in case of an error + ======== ========================================== + + See Also + -------- + scikits.odes.ode.ode : a more object-oriented integrator + scikits.odes.dae.dae : a solver for differential-algebraic equations + scipy.integrate.quad : for finding the area under a curve + + Examples + -------- + The second order differential equation for the angle `theta` of a + pendulum acted on by gravity with friction can be written: + + .. math:: \\theta''(t) + b \\theta'(t) + c \\sin(\\theta(t)) = 0 + + where `b` and `c` are positive constants, and a prime (') denotes a + derivative. To solve this equation with `odeint`, we must first convert + it to a system of first order equations. By defining the angular + velocity ``omega(t) = theta'(t)``, we obtain the system: + + .. math:: \\theta'(t) = \\omega(t) + \\omega'(t) = -b \\omega(t) - c \\sin(\\theta(t)) + + We assume the constants are `b` = 0.25 and `c` = 5.0: + + >>> b = 0.25 + >>> c = 5.0 + + Let `y` be the vector [`theta`, `omega`]. We implement this system + in python as: + + >>> def pend(t, y, out): + ... theta, omega = y + ... out[:] = [omega, -b*omega - c*np.sin(theta)] + ... + + In case you want b and c easily changable, make pend a class method, and + consider attributes b and c accessible via `self.b` and `self.c`. + For initial conditions, we assume the pendulum is nearly vertical + with `theta(0)` = `pi` - 0.1, and it initially at rest, so + `omega(0)` = 0. Then the vector of initial conditions is + + >>> y0 = [np.pi - 0.1, 0.0] + + We generate a solution 101 evenly spaced samples in the interval + 0 <= `t` <= 10. So our array of times is + + >>> t = np.linspace(0, 10, 101) + + Call `odeint` to generate the solution. + + >>> from scikits.odes.odeint import odeint + >>> sol = odeint(pend, t, y0) + + The solution is a named tuple `sol`. sol.values.y is an array with shape (101, 2). + The first column is `theta(t)`, and the second is `omega(t)`. + The following code plots both components. + + >>> import matplotlib.pyplot as plt + >>> plt.plot(sol.values.t, sol.values.y[:, 0], 'b', label='theta(t)') + >>> plt.plot(sol.values.t, sol.values.y[:, 1], 'g', label='omega(t)') + >>> plt.legend(loc='best') + >>> plt.xlabel('t') + >>> plt.grid() + >>> plt.show() + """ + t = copy(tout) + y0 = copy(y0) + + int_name = 'cvode' + #always use old api + options['old_api'] = False + if (method == 'bdf'): + int_name = 'cvode' + elif (method == 'admo'): + options['lmm_type'] = 'ADAMS' + options['nonlinsolver'] = 'fixedpoint' + int_name = 'cvode' + elif (method == 'rk5'): + int_name = 'dopri5' + elif (method == 'rk8'): + int_name = 'dop853' + elif (method == 'beuler' or method == 'trapz'): + int_name = 'cvode' + options['order'] = 1 + if not options.has_key('step'): + options['step'] = 0.05 + options['min_step_size'] = options['step'] + options['max_step_size'] = options['step'] + #no error control possible, try to disable it: + if not options.has_key('atol'): + options['atol'] = 1e3 + if not options.has_key('rtol'): + options['rtol'] = 1e3 + del options['step'] + if (method == 'trapz'): + options['lmm_type'] = 'ADAMS' + options['nonlinsolver'] = 'fixedpoint' + options['order'] = 2 + else: + int_name = method + + solver = ode(int_name, rhsfun, **options) + return solver.solve(t, y0)
+ +
+ +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/v3.0.0a3/_modules/scikits_odes_core.html b/v3.0.0a3/_modules/scikits_odes_core.html new file mode 100644 index 0000000..170a130 --- /dev/null +++ b/v3.0.0a3/_modules/scikits_odes_core.html @@ -0,0 +1,478 @@ + + + + + + + scikits_odes_core — Odes 3.0.0a3 documentation + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +

Source code for scikits_odes_core

+from . import _version
+__version__ = _version.get_versions()['version']
+
+
+
+[docs] +class DaeBase: + """ + The interface which DAE solvers must implement. + + Parameters + ---------- + Rfn : function + residual function + options : mapping + Additional options for initialization, solver dependent + """ + + integrator_classes = [] + + def __init__(self, Rfn, **options): + raise NotImplementedError('all DAE solvers must implement this') + +
+[docs] + def set_options(self, **options): + """ + Set specific options for the solver. + + Calling set_options a second time, normally resets the solver. + """ + raise NotImplementedError('all DAE solvers must implement this')
+ + +
+[docs] + def solve(self, tspan, y0, yp0): + """ + Runs the solver. + + Parameters + ---------- + tspan : list/array + A list of times at which the computed value will be returned. + Must contain the start time as first entry. + y0 : list/array + List of initial values + yp0 : list/array + List of initial values of derivatives + + Returns + ------- + old_api is False : namedtuple + namedtuple with the following attributes + + =========== ========================================== + Field Meaning + =========== ========================================== + ``flag`` An integer flag (StatusEnumXXX) + ``values`` Named tuple with entries array t and array y and array ydot. y will correspond to y_retn value and ydot to yp_retn! + ``errors`` Named tuple with entries t and y and ydot of error + ``roots`` Named tuple with entries array t and array y and array ydot + ``tstop`` Named tuple with entries array t and array y and array ydot + ``message`` String with message in case of an error + =========== ========================================== + + old_api is True : tuple + tuple with the following elements in order + + ========== ========================================== + Field Meaning + ========== ========================================== + ``flag`` indicating return status of the solver + ``t`` numpy array of times at which the computations were successful + ``y`` numpy array of values corresponding to times t (values of y[i, :] ~ t[i]) + ``yp`` numpy array of derivatives corresponding to times t (values of yp[i, :] ~ t[i]) + ``t_err`` float or None - if recoverable error occurred (for example reached maximum number of allowed iterations), this is the time at which it happened + ``y_err`` numpy array of values corresponding to time t_err + ``yp_err`` numpy array of derivatives corresponding to time t_err + ========== ========================================== + + """ + raise NotImplementedError('all DAE solvers must implement this')
+ + +
+[docs] + def init_step(self, t0, y0, yp0, y_ic0_retn = None, yp_ic0_retn = None): + """ + Initializes the solver and allocates memory. + + Parameters + ---------- + t0 : number + initial time + y0 : list/array + initial condition for y + yp0 : list/array + initial condition for yp + y_ic0 : numpy array + (optional) returns the calculated consistent initial condition for y + yp_ic0 : numpy array + (optional) returns the calculated consistent initial condition for y + derivated. + + Returns + ------- + old_api is False : namedtuple + namedtuple with the following attributes + + =========== ========================================== + Field Meaning + =========== ========================================== + ``flag`` An integer flag (StatusEnumXXX) + ``values`` Named tuple with entries t and y and ydot. y will correspond to y_retn value and ydot to yp_retn! + ``errors`` Named tuple with entries t and y and ydot + ``roots`` Named tuple with entries t and y and ydot + ``tstop`` Named tuple with entries t and y and ydot + ``message`` String with message in case of an error + =========== ========================================== + + old_api is True : tuple + tuple with the following elements in order + + =========== ========================================== + Field Meaning + =========== ========================================== + ``flag`` status of the computation (successful or error occurred) + ``t_out`` time, where the solver stopped (when no error occurred, t_out == t) + =========== ========================================== + + """ + raise NotImplementedError('all DAE solvers must implement this')
+ + +
+[docs] + def step(self, t, y_retn=None, yp_retn=None): + """ + Method for calling successive next step of the IDA solver to allow + more precise control over the IDA solver. The 'init_step' method has to + be called before the 'step' method. + + A step is done towards time t, and output at t returned. This time can + be higher or lower than the previous time. If option + 'one_step_compute'==True, and the solver supports it, only one internal + solver step is done in the direction of t starting at the current step. + + If old_api=True, the old behavior is used: if t>0.0 then integration is + performed until this time and results at this time are returned in + y_retn; else if if t<0.0 only one internal step is performed towards + time abs(t) and results after this one time step are returned. + + Parameters + ---------- + t : number + y_retn : numpy array (ndim = 1) or None. + (Needs to be preallocated) If not None, will be filled with y at + time t. If None y_retn is not used. + yp_retn : numpy array (ndim = 1) or None. + (Needs to be preallocated) If not None, will be filled with + derivatives of y at time t. If None yp_retn is not used. + + Returns + ------- + old_api is False : namedtuple + namedtuple with the following attributes + + =========== ========================================== + Field Meaning + =========== ========================================== + ``flag`` An integer flag (StatusEnumXXX) + ``values`` Named tuple with entries t and y and ydot. y will correspond to y_retn value and ydot to yp_retn! + ``errors`` Named tuple with entries t and y and ydot + ``roots`` Named tuple with entries t and y and ydot + ``tstop`` Named tuple with entries t and y and ydot + ``message`` String with message in case of an error + =========== ========================================== + + old_api is True : tuple + tuple with the following elements in order + + =========== ========================================== + Field Meaning + =========== ========================================== + ``flag`` status of the computation (successful or error occurred) + ``t_out`` time, where the solver stopped (when no error occurred, t_out == t) + =========== ========================================== + + """ + raise NotImplementedError('all DAE solvers must implement this')
+
+ + + +
+[docs] +class OdeBase: + """ + The interface which ODE solvers must implement. + + Parameters + ---------- + Rfn : function + A function which computes the required derivatives. The signature + should be ``func(t, y, y_dot, *args, **kwargs)``. Note that ``*args`` + and ``**kwargs`` handling are solver dependent. + + options : mapping + Additional options for initialization, solver dependent + """ + + integrator_classes = [] + + def __init__(self, Rfn, **options): + raise NotImplementedError('all ODE solvers must implement this') + +
+[docs] + def set_options(self, **options): + """ + Set specific options for the solver. + + Calling set_options a second time, normally resets the solver. + """ + raise NotImplementedError('all ODE solvers must implement this')
+ + +
+[docs] + def solve(self, tspan, y0): + """ + Runs the solver. + + Parameters + ---------- + tspan : array (or similar) + a list of times at which the computed value will be returned. Must + contain the start time as first entry. + + y0 : array (or similar) + a list of initial values + + Returns + ------- + old_api is False : namedtuple + namedtuple with the following attributes + + =========== ========================================== + Field Meaning + =========== ========================================== + ``flag`` An integer flag (StatusEnum) + ``values`` Named tuple with entries t and y + ``errors`` Named tuple with entries t and y + ``roots`` Named tuple with entries t and y + ``tstop`` Named tuple with entries t and y + ``message`` String with message in case of an error + =========== ========================================== + + old_api is True : tuple + tuple with the following elements in order + + ========== ========================================== + Field Meaning + ========== ========================================== + ``flag`` indicating return status of the solver + ``t`` numpy array of times at which the computations were successful + ``y`` numpy array of values corresponding to times t (values of y[i, :] ~ t[i]) + ``t_err`` float or None - if recoverable error occurred (for example reached maximum number of allowed iterations), this is the time at which it happened + ``y_err`` numpy array of values corresponding to time t_err + ========== ========================================== + """ + raise NotImplementedError('all ODE solvers must implement this')
+ + +
+[docs] + def init_step(self, t0, y0): + """ + Initializes the solver and allocates memory. + + Parameters + ---------- + t0 : number + initial time + y0 : array + initial condition for y (can be list or numpy array) + + Returns + ------- + old_api is False : namedtuple + namedtuple with the following attributes + + =========== ========================================== + Field Meaning + =========== ========================================== + ``flag`` An integer flag (StatusEnum) + ``values`` Named tuple with entries t and y + ``errors`` Named tuple with entries t and y + ``roots`` Named tuple with entries t and y + ``tstop`` Named tuple with entries t and y + ``message`` String with message in case of an error + =========== ========================================== + + old_api is True : tuple + tuple with the following elements in order + + ========== ========================================== + Field Meaning + ========== ========================================== + ``flag`` boolean status of the computation (successful or error occurred) + ``t_out`` initial time + ========== ========================================== + """ + raise NotImplementedError('all ODE solvers must implement this')
+ + +
+[docs] + def step(self, t, y_retn=None): + """ + Method for calling successive next step of the ODE solver to allow + more precise control over the solver. The 'init_step' method has to + be called before the 'step' method. + + A step is done towards time t, and output at t returned. This time can + be higher or lower than the previous time. If option + 'one_step_compute'==True, and the solver supports it, only one internal + solver step is done in the direction of t starting at the current step. + + If old_api=True, the old behavior is used: if t>0.0 then integration is + performed until this time and results at this time are returned in + y_retn if t<0.0 only one internal step is performed towards time abs(t) + and results after this one time step are returned + + Parameters + ---------- + t : number + + y_retn : numpy vector (ndim = 1) + in which the computed value will be stored (needs to be + preallocated). If None y_retn is not used. + + Returns + ------- + old_api is False : namedtuple + namedtuple with the following attributes + + =========== ========================================== + Field Meaning + =========== ========================================== + ``flag`` An integer flag (StatusEnum) + ``values`` Named tuple with entries t and y + ``errors`` Named tuple with entries t and y + ``roots`` Named tuple with entries t and y + ``tstop`` Named tuple with entries t and y + ``message`` String with message in case of an error + =========== ========================================== + + old_api is True : tuple + tuple with the following elements in order + + ========== ========================================== + Field Meaning + ========== ========================================== + ``flag`` status of the computation (successful or error occurred) + ``t_out`` time, where the solver stopped (when no error occurred, t_out == t) + ========== ========================================== + """ + raise NotImplementedError('all ODE solvers must implement this')
+
+ +
+ +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/v3.0.0a3/_modules/scikits_odes_sundials.html b/v3.0.0a3/_modules/scikits_odes_sundials.html new file mode 100644 index 0000000..a0e6dea --- /dev/null +++ b/v3.0.0a3/_modules/scikits_odes_sundials.html @@ -0,0 +1,195 @@ + + + + + + + scikits_odes_sundials — Odes 3.0.0a3 documentation + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +

Source code for scikits_odes_sundials

+"""
+SUNDIALS wrapper
+"""
+
+import inspect
+from . import _version
+__version__ = _version.get_versions()['version']
+
+
+
+[docs] +class CVODESolveException(Exception): + """Base class for exceptions raised by ``CVODE.validate_flags``.""" + def __init__(self, soln): + self.soln = soln + self.args = (self._message.format(soln),)
+ + +
+[docs] +class CVODESolveFailed(CVODESolveException): + """``CVODE.solve`` failed to reach endpoint""" + _message = ( + "Solver failed with flag {0.flag} and finished at {0.errors.t}" + "with values {0.errors.y}." + )
+ + +
+[docs] +class CVODESolveFoundRoot(CVODESolveException): + """``CVODE.solve`` found a root""" + _message = "Solver found a root at {0.roots.t[0]}."
+ + +
+[docs] +class CVODESolveReachedTSTOP(CVODESolveException): + """``CVODE.solve`` reached the endpoint specified by tstop.""" + _message = "Solver reached tstop at {0.tstop.t[0]}."
+ + +
+[docs] +class IDASolveException(Exception): + """Base class for exceptions raised by ``IDA.validate_flags``.""" + def __init__(self, soln): + self.soln = soln + self.args = (self._message.format(soln),)
+ + +
+[docs] +class IDASolveFailed(IDASolveException): + """``IDA.solve`` failed to reach endpoint""" + _message = ( + "Solver failed with flag {0.flag} and finished at {0.errors.t}" + "with values {0.errors.y} and derivatives {0.errors.ydot}." + )
+ + +
+[docs] +class IDASolveFoundRoot(IDASolveException): + """``IDA.solve`` found a root""" + _message = "Solver found a root at {0.roots.t[0]}."
+ + +
+[docs] +class IDASolveReachedTSTOP(IDASolveException): + """``IDA.solve`` reached the endpoint specified by tstop.""" + _message = "Solver reached tstop at {0.tstop.t[0]}."
+ + + +def _get_num_args(func): + """ + Python 2/3 compatible method of getting number of args that `func` accepts + """ + if hasattr(inspect, "getfullargspec"): + argspec = inspect.getfullargspec(func) + else: + argspec = inspect.getargspec(func) + arg_cnt = 0 + for arg in argspec.args: + if arg not in ("self", "cls"): + arg_cnt += 1 + return arg_cnt +
+ +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/v3.0.0a3/_sources/api/compat.rst.txt b/v3.0.0a3/_sources/api/compat.rst.txt new file mode 100644 index 0000000..fdc5db1 --- /dev/null +++ b/v3.0.0a3/_sources/api/compat.rst.txt @@ -0,0 +1,47 @@ +scikits.odes +============ + +scikits.odes +------------ +.. automodule:: scikits.odes + :members: + +scikits.odes.ode +---------------- +.. automodule:: scikits.odes.ode + :members: + +scikits.odes.dae +---------------- +.. automodule:: scikits.odes.dae + :members: + +scikits.odes.dopri5 +-------------------- +.. automodule:: scikits.odes.dopri5 + :members: + +scikits.odes.ddaspkint +---------------------- +.. automodule:: scikits.odes.ddaspkint + :members: + +scikits.odes.lsodiint +--------------------- +.. automodule:: scikits.odes.lsodiint + :members: + +scikits.odes.sundials +--------------------- +.. automodule:: scikits.odes.sundials + :members: + +scikits.odes.sundials.cvode +--------------------------- +.. automodule:: scikits.odes.sundials.cvode + :members: + +scikits.odes.sundials.ida +------------------------- +.. automodule:: scikits.odes.sundials.ida + :members: diff --git a/v3.0.0a3/_sources/api/core.rst.txt b/v3.0.0a3/_sources/api/core.rst.txt new file mode 100644 index 0000000..294563d --- /dev/null +++ b/v3.0.0a3/_sources/api/core.rst.txt @@ -0,0 +1,5 @@ +scikits-odes-core +----------------- + +.. automodule:: scikits_odes_core + :members: diff --git a/v3.0.0a3/_sources/api/daepack.rst.txt b/v3.0.0a3/_sources/api/daepack.rst.txt new file mode 100644 index 0000000..24b3b14 --- /dev/null +++ b/v3.0.0a3/_sources/api/daepack.rst.txt @@ -0,0 +1,12 @@ +scikits-odes-daepack +==================== + +.. scikits_odes_daepack.ddaspkint +.. ------------------------------ +.. .. automodule:: scikits_odes_daepack.ddaspkint +.. :members: +.. +.. scikits_odes_daepack.lsodiint +.. ----------------------------- +.. .. automodule:: scikits_odes_daepack.lsodiint +.. :members: diff --git a/v3.0.0a3/_sources/api/index.rst.txt b/v3.0.0a3/_sources/api/index.rst.txt new file mode 100644 index 0000000..4ca2274 --- /dev/null +++ b/v3.0.0a3/_sources/api/index.rst.txt @@ -0,0 +1,11 @@ +Lower Level API +=============== + +.. toctree:: + :maxdepth: 2 + + core + daepack + sundials + main + compat diff --git a/v3.0.0a3/_sources/api/main.rst.txt b/v3.0.0a3/_sources/api/main.rst.txt new file mode 100644 index 0000000..f4f699e --- /dev/null +++ b/v3.0.0a3/_sources/api/main.rst.txt @@ -0,0 +1,23 @@ +scikits-odes +============ + +scikits_odes +------------ +.. automodule:: scikits_odes + :members: + +scikits_odes.ode +---------------- +.. automodule:: scikits_odes.ode + :members: + +scikits_odes.dae +---------------- +.. automodule:: scikits_odes.dae + :members: + +scikits_odes.dopri5 +-------------------- +.. automodule:: scikits_odes.dopri5 + :members: + diff --git a/v3.0.0a3/_sources/api/sundials.rst.txt b/v3.0.0a3/_sources/api/sundials.rst.txt new file mode 100644 index 0000000..d2a186d --- /dev/null +++ b/v3.0.0a3/_sources/api/sundials.rst.txt @@ -0,0 +1,17 @@ +scikits-odes-sundials +===================== + +scikits_odes_sundials +--------------------- +.. automodule:: scikits_odes_sundials + :members: + +scikits_odes_sundials.cvode +--------------------------- +.. automodule:: scikits_odes_sundials.cvode + :members: + +scikits_odes_sundials.ida +------------------------- +.. automodule:: scikits_odes_sundials.ida + :members: diff --git a/v3.0.0a3/_sources/dae.rst.txt b/v3.0.0a3/_sources/dae.rst.txt new file mode 100644 index 0000000..bf4609a --- /dev/null +++ b/v3.0.0a3/_sources/dae.rst.txt @@ -0,0 +1,5 @@ +DAE Solvers +----------------------------- + +.. autoclass:: scikits.odes.dae.dae + :members: diff --git a/v3.0.0a3/_sources/index.rst.txt b/v3.0.0a3/_sources/index.rst.txt new file mode 100644 index 0000000..8930452 --- /dev/null +++ b/v3.0.0a3/_sources/index.rst.txt @@ -0,0 +1,26 @@ +Welcome to the ODES scikit API Documentation +============================================ + +The ODES scikit provides access to Ordinary Differential Equation (ODE) solvers and Differential Algebraic Equation (DAE) solvers. + +This is the generated API documentation for version |version|, see https://scikits-odes.readthedocs.io/en/latest/ for the main documentation and user guide. + +For other versions of the API documentation, see https://bmcage.github.io/odes. + +Contents: + +.. toctree:: + :maxdepth: 4 + + ode + dae + sundials + api/index + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` + diff --git a/v3.0.0a3/_sources/ode.rst.txt b/v3.0.0a3/_sources/ode.rst.txt new file mode 100644 index 0000000..afa8e2d --- /dev/null +++ b/v3.0.0a3/_sources/ode.rst.txt @@ -0,0 +1,12 @@ +ODE Solvers +----------- +:py:mod:`scikits.odes` contains two main routines for solving ODEs: the simpler +:py:func:`scikits.odes.odeint.odeint`, and the more configurable +:py:class:`scikits.odes.ode.ode`. Both these routines allow selection of the +solver and solution method used. Additionally, it is also possible to directly +use the low level interface to individual solvers. + +.. autofunction:: scikits.odes.odeint.odeint + +.. autoclass:: scikits.odes.ode.ode + :members: diff --git a/v3.0.0a3/_sources/sundials.rst.txt b/v3.0.0a3/_sources/sundials.rst.txt new file mode 100644 index 0000000..acf899d --- /dev/null +++ b/v3.0.0a3/_sources/sundials.rst.txt @@ -0,0 +1,32 @@ +Sundials Solver Options +####################### + +Selecting Precision +------------------- +Sundials can be built with different precisions (currently `'single'` which maps +to C `'float'`; `'double'` (the default) which maps to C `'double'`; and +`'extended'` which maps to C `'long double'`), and scikits-odes-sundials +supports using whichever precision Sundials is built with. To take advantage of +this, you must first have sundials built and installed with the desired +precision setting. + +Once you have done this, build scikits-odes-sundials against this particular +version of sundials (see the main documentation for how to do this). +scikits-odes-sundials will automatically detect the precision, and store this in +a variable called +:py:const:`DTYPE`. :py:const:`DTYPE` should be accessed from +:py:mod:`scikits_odes_sundials` (other modules may have :py:const:`DTYPE` +defined, but :py:mod:`scikits_odes_sundials` should be preferred). Additionally +:py:const:`scikits_odes_sundials.precision` contains the precision setting found +by scikits.odes. + +To use :py:const:`DTYPE`, treat it as a numpy dtype; use it whenever you need to +create an array:: + + np.array([1,2,3], dtype=DTYPE) + +or when using scalars:: + + DTYPE(0.1) * DTYPE(0.1) + + diff --git a/v3.0.0a3/_static/_sphinx_javascript_frameworks_compat.js b/v3.0.0a3/_static/_sphinx_javascript_frameworks_compat.js new file mode 100644 index 0000000..8141580 --- /dev/null +++ b/v3.0.0a3/_static/_sphinx_javascript_frameworks_compat.js @@ -0,0 +1,123 @@ +/* Compatability shim for jQuery and underscores.js. + * + * Copyright Sphinx contributors + * Released under the two clause BSD licence + */ + +/** + * small helper function to urldecode strings + * + * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL + */ +jQuery.urldecode = function(x) { + if (!x) { + return x + } + return decodeURIComponent(x.replace(/\+/g, ' ')); +}; + +/** + * small helper function to urlencode strings + */ +jQuery.urlencode = encodeURIComponent; + +/** + * This function returns the parsed url parameters of the + * current request. Multiple values per key are supported, + * it will always return arrays of strings for the value parts. + */ +jQuery.getQueryParameters = function(s) { + if (typeof s === 'undefined') + s = document.location.search; + var parts = s.substr(s.indexOf('?') + 1).split('&'); + var result = {}; + for (var i = 0; i < parts.length; i++) { + var tmp = parts[i].split('=', 2); + var key = jQuery.urldecode(tmp[0]); + var value = jQuery.urldecode(tmp[1]); + if (key in result) + result[key].push(value); + else + result[key] = [value]; + } + return result; +}; + +/** + * highlight a given string on a jquery object by wrapping it in + * span elements with the given class name. + */ +jQuery.fn.highlightText = function(text, className) { + function highlight(node, addItems) { + if (node.nodeType === 3) { + var val = node.nodeValue; + var pos = val.toLowerCase().indexOf(text); + if (pos >= 0 && + !jQuery(node.parentNode).hasClass(className) && + !jQuery(node.parentNode).hasClass("nohighlight")) { + var span; + var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg"); + if (isInSVG) { + span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + } else { + span = document.createElement("span"); + span.className = className; + } + span.appendChild(document.createTextNode(val.substr(pos, text.length))); + node.parentNode.insertBefore(span, node.parentNode.insertBefore( + document.createTextNode(val.substr(pos + text.length)), + node.nextSibling)); + node.nodeValue = val.substr(0, pos); + if (isInSVG) { + var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); + var bbox = node.parentElement.getBBox(); + rect.x.baseVal.value = bbox.x; + rect.y.baseVal.value = bbox.y; + rect.width.baseVal.value = bbox.width; + rect.height.baseVal.value = bbox.height; + rect.setAttribute('class', className); + addItems.push({ + "parent": node.parentNode, + "target": rect}); + } + } + } + else if (!jQuery(node).is("button, select, textarea")) { + jQuery.each(node.childNodes, function() { + highlight(this, addItems); + }); + } + } + var addItems = []; + var result = this.each(function() { + highlight(this, addItems); + }); + for (var i = 0; i < addItems.length; ++i) { + jQuery(addItems[i].parent).before(addItems[i].target); + } + return result; +}; + +/* + * backward compatibility for jQuery.browser + * This will be supported until firefox bug is fixed. + */ +if (!jQuery.browser) { + jQuery.uaMatch = function(ua) { + ua = ua.toLowerCase(); + + var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || + /(webkit)[ \/]([\w.]+)/.exec(ua) || + /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || + /(msie) ([\w.]+)/.exec(ua) || + ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || + []; + + return { + browser: match[ 1 ] || "", + version: match[ 2 ] || "0" + }; + }; + jQuery.browser = {}; + jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; +} diff --git a/v3.0.0a3/_static/alabaster.css b/v3.0.0a3/_static/alabaster.css new file mode 100644 index 0000000..e3174bf --- /dev/null +++ b/v3.0.0a3/_static/alabaster.css @@ -0,0 +1,708 @@ +@import url("basic.css"); + +/* -- page layout ----------------------------------------------------------- */ + +body { + font-family: Georgia, serif; + font-size: 17px; + background-color: #fff; + color: #000; + margin: 0; + padding: 0; +} + + +div.document { + width: 940px; + margin: 30px auto 0 auto; +} + +div.documentwrapper { + float: left; + width: 100%; +} + +div.bodywrapper { + margin: 0 0 0 220px; +} + +div.sphinxsidebar { + width: 220px; + font-size: 14px; + line-height: 1.5; +} + +hr { + border: 1px solid #B1B4B6; +} + +div.body { + background-color: #fff; + color: #3E4349; + padding: 0 30px 0 30px; +} + +div.body > .section { + text-align: left; +} + +div.footer { + width: 940px; + margin: 20px auto 30px auto; + font-size: 14px; + color: #888; + text-align: right; +} + +div.footer a { + color: #888; +} + +p.caption { + font-family: inherit; + font-size: inherit; +} + + +div.relations { + display: none; +} + + +div.sphinxsidebar { + max-height: 100%; + overflow-y: auto; +} + +div.sphinxsidebar a { + color: #444; + text-decoration: none; + border-bottom: 1px dotted #999; +} + +div.sphinxsidebar a:hover { + border-bottom: 1px solid #999; +} + +div.sphinxsidebarwrapper { + padding: 18px 10px; +} + +div.sphinxsidebarwrapper p.logo { + padding: 0; + margin: -10px 0 0 0px; + text-align: center; +} + +div.sphinxsidebarwrapper h1.logo { + margin-top: -10px; + text-align: center; + margin-bottom: 5px; + text-align: left; +} + +div.sphinxsidebarwrapper h1.logo-name { + margin-top: 0px; +} + +div.sphinxsidebarwrapper p.blurb { + margin-top: 0; + font-style: normal; +} + +div.sphinxsidebar h3, +div.sphinxsidebar h4 { + font-family: Georgia, serif; + color: #444; + font-size: 24px; + font-weight: normal; + margin: 0 0 5px 0; + padding: 0; +} + +div.sphinxsidebar h4 { + font-size: 20px; +} + +div.sphinxsidebar h3 a { + color: #444; +} + +div.sphinxsidebar p.logo a, +div.sphinxsidebar h3 a, +div.sphinxsidebar p.logo a:hover, +div.sphinxsidebar h3 a:hover { + border: none; +} + +div.sphinxsidebar p { + color: #555; + margin: 10px 0; +} + +div.sphinxsidebar ul { + margin: 10px 0; + padding: 0; + color: #000; +} + +div.sphinxsidebar ul li.toctree-l1 > a { + font-size: 120%; +} + +div.sphinxsidebar ul li.toctree-l2 > a { + font-size: 110%; +} + +div.sphinxsidebar input { + border: 1px solid #CCC; + font-family: Georgia, serif; + font-size: 1em; +} + +div.sphinxsidebar #searchbox input[type="text"] { + width: 160px; +} + +div.sphinxsidebar .search > div { + display: table-cell; +} + +div.sphinxsidebar hr { + border: none; + height: 1px; + color: #AAA; + background: #AAA; + + text-align: left; + margin-left: 0; + width: 50%; +} + +div.sphinxsidebar .badge { + border-bottom: none; +} + +div.sphinxsidebar .badge:hover { + border-bottom: none; +} + +/* To address an issue with donation coming after search */ +div.sphinxsidebar h3.donation { + margin-top: 10px; +} + +/* -- body styles ----------------------------------------------------------- */ + +a { + color: #004B6B; + text-decoration: underline; +} + +a:hover { + color: #6D4100; + text-decoration: underline; +} + +div.body h1, +div.body h2, +div.body h3, +div.body h4, +div.body h5, +div.body h6 { + font-family: Georgia, serif; + font-weight: normal; + margin: 30px 0px 10px 0px; + padding: 0; +} + +div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; } +div.body h2 { font-size: 180%; } +div.body h3 { font-size: 150%; } +div.body h4 { font-size: 130%; } +div.body h5 { font-size: 100%; } +div.body h6 { font-size: 100%; } + +a.headerlink { + color: #DDD; + padding: 0 4px; + text-decoration: none; +} + +a.headerlink:hover { + color: #444; + background: #EAEAEA; +} + +div.body p, div.body dd, div.body li { + line-height: 1.4em; +} + +div.admonition { + margin: 20px 0px; + padding: 10px 30px; + background-color: #EEE; + border: 1px solid #CCC; +} + +div.admonition tt.xref, div.admonition code.xref, div.admonition a tt { + background-color: #FBFBFB; + border-bottom: 1px solid #fafafa; +} + +div.admonition p.admonition-title { + font-family: Georgia, serif; + font-weight: normal; + font-size: 24px; + margin: 0 0 10px 0; + padding: 0; + line-height: 1; +} + +div.admonition p.last { + margin-bottom: 0; +} + +div.highlight { + background-color: #fff; +} + +dt:target, .highlight { + background: #FAF3E8; +} + +div.warning { + background-color: #FCC; + border: 1px solid #FAA; +} + +div.danger { + background-color: #FCC; + border: 1px solid #FAA; + -moz-box-shadow: 2px 2px 4px #D52C2C; + -webkit-box-shadow: 2px 2px 4px #D52C2C; + box-shadow: 2px 2px 4px #D52C2C; +} + +div.error { + background-color: #FCC; + border: 1px solid #FAA; + -moz-box-shadow: 2px 2px 4px #D52C2C; + -webkit-box-shadow: 2px 2px 4px #D52C2C; + box-shadow: 2px 2px 4px #D52C2C; +} + +div.caution { + background-color: #FCC; + border: 1px solid #FAA; +} + +div.attention { + background-color: #FCC; + border: 1px solid #FAA; +} + +div.important { + background-color: #EEE; + border: 1px solid #CCC; +} + +div.note { + background-color: #EEE; + border: 1px solid #CCC; +} + +div.tip { + background-color: #EEE; + border: 1px solid #CCC; +} + +div.hint { + background-color: #EEE; + border: 1px solid #CCC; +} + +div.seealso { + background-color: #EEE; + border: 1px solid #CCC; +} + +div.topic { + background-color: #EEE; +} + +p.admonition-title { + display: inline; +} + +p.admonition-title:after { + content: ":"; +} + +pre, tt, code { + font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; + font-size: 0.9em; +} + +.hll { + background-color: #FFC; + margin: 0 -12px; + padding: 0 12px; + display: block; +} + +img.screenshot { +} + +tt.descname, tt.descclassname, code.descname, code.descclassname { + font-size: 0.95em; +} + +tt.descname, code.descname { + padding-right: 0.08em; +} + +img.screenshot { + -moz-box-shadow: 2px 2px 4px #EEE; + -webkit-box-shadow: 2px 2px 4px #EEE; + box-shadow: 2px 2px 4px #EEE; +} + +table.docutils { + border: 1px solid #888; + -moz-box-shadow: 2px 2px 4px #EEE; + -webkit-box-shadow: 2px 2px 4px #EEE; + box-shadow: 2px 2px 4px #EEE; +} + +table.docutils td, table.docutils th { + border: 1px solid #888; + padding: 0.25em 0.7em; +} + +table.field-list, table.footnote { + border: none; + -moz-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; +} + +table.footnote { + margin: 15px 0; + width: 100%; + border: 1px solid #EEE; + background: #FDFDFD; + font-size: 0.9em; +} + +table.footnote + table.footnote { + margin-top: -15px; + border-top: none; +} + +table.field-list th { + padding: 0 0.8em 0 0; +} + +table.field-list td { + padding: 0; +} + +table.field-list p { + margin-bottom: 0.8em; +} + +/* Cloned from + * https://github.com/sphinx-doc/sphinx/commit/ef60dbfce09286b20b7385333d63a60321784e68 + */ +.field-name { + -moz-hyphens: manual; + -ms-hyphens: manual; + -webkit-hyphens: manual; + hyphens: manual; +} + +table.footnote td.label { + width: .1px; + padding: 0.3em 0 0.3em 0.5em; +} + +table.footnote td { + padding: 0.3em 0.5em; +} + +dl { + margin-left: 0; + margin-right: 0; + margin-top: 0; + padding: 0; +} + +dl dd { + margin-left: 30px; +} + +blockquote { + margin: 0 0 0 30px; + padding: 0; +} + +ul, ol { + /* Matches the 30px from the narrow-screen "li > ul" selector below */ + margin: 10px 0 10px 30px; + padding: 0; +} + +pre { + background: #EEE; + padding: 7px 30px; + margin: 15px 0px; + line-height: 1.3em; +} + +div.viewcode-block:target { + background: #ffd; +} + +dl pre, blockquote pre, li pre { + margin-left: 0; + padding-left: 30px; +} + +tt, code { + background-color: #ecf0f3; + color: #222; + /* padding: 1px 2px; */ +} + +tt.xref, code.xref, a tt { + background-color: #FBFBFB; + border-bottom: 1px solid #fff; +} + +a.reference { + text-decoration: none; + border-bottom: 1px dotted #004B6B; +} + +/* Don't put an underline on images */ +a.image-reference, a.image-reference:hover { + border-bottom: none; +} + +a.reference:hover { + border-bottom: 1px solid #6D4100; +} + +a.footnote-reference { + text-decoration: none; + font-size: 0.7em; + vertical-align: top; + border-bottom: 1px dotted #004B6B; +} + +a.footnote-reference:hover { + border-bottom: 1px solid #6D4100; +} + +a:hover tt, a:hover code { + background: #EEE; +} + + +@media screen and (max-width: 870px) { + + div.sphinxsidebar { + display: none; + } + + div.document { + width: 100%; + + } + + div.documentwrapper { + margin-left: 0; + margin-top: 0; + margin-right: 0; + margin-bottom: 0; + } + + div.bodywrapper { + margin-top: 0; + margin-right: 0; + margin-bottom: 0; + margin-left: 0; + } + + ul { + margin-left: 0; + } + + li > ul { + /* Matches the 30px from the "ul, ol" selector above */ + margin-left: 30px; + } + + .document { + width: auto; + } + + .footer { + width: auto; + } + + .bodywrapper { + margin: 0; + } + + .footer { + width: auto; + } + + .github { + display: none; + } + + + +} + + + +@media screen and (max-width: 875px) { + + body { + margin: 0; + padding: 20px 30px; + } + + div.documentwrapper { + float: none; + background: #fff; + } + + div.sphinxsidebar { + display: block; + float: none; + width: 102.5%; + margin: 50px -30px -20px -30px; + padding: 10px 20px; + background: #333; + color: #FFF; + } + + div.sphinxsidebar h3, div.sphinxsidebar h4, div.sphinxsidebar p, + div.sphinxsidebar h3 a { + color: #fff; + } + + div.sphinxsidebar a { + color: #AAA; + } + + div.sphinxsidebar p.logo { + display: none; + } + + div.document { + width: 100%; + margin: 0; + } + + div.footer { + display: none; + } + + div.bodywrapper { + margin: 0; + } + + div.body { + min-height: 0; + padding: 0; + } + + .rtd_doc_footer { + display: none; + } + + .document { + width: auto; + } + + .footer { + width: auto; + } + + .footer { + width: auto; + } + + .github { + display: none; + } +} + + +/* misc. */ + +.revsys-inline { + display: none!important; +} + +/* Hide ugly table cell borders in ..bibliography:: directive output */ +table.docutils.citation, table.docutils.citation td, table.docutils.citation th { + border: none; + /* Below needed in some edge cases; if not applied, bottom shadows appear */ + -moz-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; +} + + +/* relbar */ + +.related { + line-height: 30px; + width: 100%; + font-size: 0.9rem; +} + +.related.top { + border-bottom: 1px solid #EEE; + margin-bottom: 20px; +} + +.related.bottom { + border-top: 1px solid #EEE; +} + +.related ul { + padding: 0; + margin: 0; + list-style: none; +} + +.related li { + display: inline; +} + +nav#rellinks { + float: right; +} + +nav#rellinks li+li:before { + content: "|"; +} + +nav#breadcrumbs li+li:before { + content: "\00BB"; +} + +/* Hide certain items when printing */ +@media print { + div.related { + display: none; + } +} \ No newline at end of file diff --git a/v3.0.0a3/_static/badge_only.css b/v3.0.0a3/_static/badge_only.css new file mode 100644 index 0000000..a10bb0d --- /dev/null +++ b/v3.0.0a3/_static/badge_only.css @@ -0,0 +1,269 @@ +.rst-content .line-block { + margin-bottom: 24px +} + +nav.wy-nav-side { + padding-bottom: 3em; +} + +.fa:before { + -webkit-font-smoothing: antialiased +} + +.clearfix { + * zoom: 1 +} + +.clearfix:before, .clearfix:after { + display: table; + content: "" +} + +.clearfix:after { + clear: both +} + +@font-face { + font-family: FontAwesome; + font-weight: normal; + font-style: normal; + src: url("./fontawesome-webfont.eot"); + src: url("./fontawesome-webfont.eot?#iefix") format("embedded-opentype"), url("./fontawesome-webfont.woff") format("woff"), url("./fontawesome-webfont.ttf") format("truetype"), url("./fontawesome-webfont.svg#FontAwesome") format("svg") +} + +.fa:before { + display: inline-block; + font-family: FontAwesome; + font-style: normal; + font-weight: normal; + line-height: 1; + text-decoration: inherit +} + +a .fa { + display: inline-block; + text-decoration: inherit +} + +li .fa { + display: inline-block +} + +li .fa-large:before, li .fa-large:before { + width: 1.875em +} + +ul.fas { + list-style-type: none; + margin-left: 2em; + text-indent: -0.8em +} + +ul.fas li .fa { + width: .8em +} + +ul.fas li .fa-large:before, ul.fas li .fa-large:before { + vertical-align: baseline +} + +.fa-book:before { + content: "" +} + +.icon-book:before { + content: "" +} + +.fa-caret-down:before { + content: "" +} + +.icon-caret-down:before { + content: "" +} + +.fa-caret-up:before { + content: "" +} + +.icon-caret-up:before { + content: "" +} + +.fa-caret-left:before { + content: "" +} + +.icon-caret-left:before { + content: "" +} + +.fa-caret-right:before { + content: "" +} + +.icon-caret-right:before { + content: "" +} + +.rst-versions { + position: fixed; + bottom: 0; + left: 0; + width: 300px; + max-width: 300px; + color: #fcfcfc; + background: #1f1d1d; + font-family: "Lato", "proxima-nova", "Helvetica Neue", Arial, sans-serif; + z-index: 400 +} + +.rst-versions a { + color: #2980B9; + text-decoration: none +} + +.rst-versions .rst-badge-small { + display: none +} + +.rst-versions .rst-current-version { + padding: 12px; + background-color: #272525; + display: block; + text-align: right; + font-size: 90%; + cursor: pointer; + color: #27AE60; + * zoom: 1 +} + +.rst-versions .rst-current-version:before, .rst-versions .rst-current-version:after { + display: table; + content: "" +} + +.rst-versions .rst-current-version:after { + clear: both +} + +.rst-versions .rst-current-version .fa { + color: #fcfcfc +} + +.rst-versions .rst-current-version .fa-book.shift-up { + float: left +} + +.rst-versions .rst-current-version .icon-book { + float: left +} + +.rst-versions .rst-current-version.rst-out-of-date { + background-color: #E74C3C; + color: #fff +} + +.rst-versions .rst-current-version.rst-active-old-version { + background-color: #F1C40F; + color: #000 +} + +.rst-versions.shift-up { + height: auto; + max-height: 100% +} + +.rst-other-versions { + text-align: left; +} +.rst-other-versions a { + border: 0; +} +.rst-other-versions dl { + margin: 0; +} + +.rst-versions.shift-up .rst-other-versions { + display: block +} + +.rst-versions .rst-other-versions { + font-size: 90%; + padding: 12px; + color: gray; + display: none +} + +.rst-versions .rst-other-versions hr { + display: block; + height: 1px; + border: 0; + margin: 20px 0; + padding: 0; + border-top: solid 1px #413d3d +} + +.rst-versions .rst-other-versions dd { + display: inline-block; + margin: 0 +} + +.rst-versions .rst-other-versions dd a { + display: inline-block; + padding: 6px; + color: #fcfcfc +} + +.rst-versions.rst-badge { + display: block; + width: auto; + bottom: 20px; + right: 20px; + left: auto; + border: none; + max-width: 300px + height: auto; +} + +.rst-versions.rst-badge .icon-book { + float: none +} + +.rst-versions.rst-badge .fa-book { + float: none +} + +.rst-versions.rst-badge.shift-up .rst-current-version { + text-align: right +} + +.rst-versions.rst-badge.shift-up .rst-current-version .fa-book { + float: left +} + +.rst-versions.rst-badge.shift-up .rst-current-version .icon-book { + float: left +} + +.rst-versions.rst-badge .rst-current-version { + height: 30px; + line-height: 30px; + padding: 0 6px; + display: block; +} + +@media screen and (max-width: 768px) { + .rst-versions { + width: 85%; + display: none + } + + .rst-versions.shift { + display: block + } +} + + + diff --git a/v3.0.0a3/_static/basic.css b/v3.0.0a3/_static/basic.css new file mode 100644 index 0000000..e5179b7 --- /dev/null +++ b/v3.0.0a3/_static/basic.css @@ -0,0 +1,925 @@ +/* + * basic.css + * ~~~~~~~~~ + * + * Sphinx stylesheet -- basic theme. + * + * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +/* -- main layout ----------------------------------------------------------- */ + +div.clearer { + clear: both; +} + +div.section::after { + display: block; + content: ''; + clear: left; +} + +/* -- relbar ---------------------------------------------------------------- */ + +div.related { + width: 100%; + font-size: 90%; +} + +div.related h3 { + display: none; +} + +div.related ul { + margin: 0; + padding: 0 0 0 10px; + list-style: none; +} + +div.related li { + display: inline; +} + +div.related li.right { + float: right; + margin-right: 5px; +} + +/* -- sidebar --------------------------------------------------------------- */ + +div.sphinxsidebarwrapper { + padding: 10px 5px 0 10px; +} + +div.sphinxsidebar { + float: left; + width: 230px; + margin-left: -100%; + font-size: 90%; + word-wrap: break-word; + overflow-wrap : break-word; +} + +div.sphinxsidebar ul { + list-style: none; +} + +div.sphinxsidebar ul ul, +div.sphinxsidebar ul.want-points { + margin-left: 20px; + list-style: square; +} + +div.sphinxsidebar ul ul { + margin-top: 0; + margin-bottom: 0; +} + +div.sphinxsidebar form { + margin-top: 10px; +} + +div.sphinxsidebar input { + border: 1px solid #98dbcc; + font-family: sans-serif; + font-size: 1em; +} + +div.sphinxsidebar #searchbox form.search { + overflow: hidden; +} + +div.sphinxsidebar #searchbox input[type="text"] { + float: left; + width: 80%; + padding: 0.25em; + box-sizing: border-box; +} + +div.sphinxsidebar #searchbox input[type="submit"] { + float: left; + width: 20%; + border-left: none; + padding: 0.25em; + box-sizing: border-box; +} + + +img { + border: 0; + max-width: 100%; +} + +/* -- search page ----------------------------------------------------------- */ + +ul.search { + margin: 10px 0 0 20px; + padding: 0; +} + +ul.search li { + padding: 5px 0 5px 20px; + background-image: url(file.png); + background-repeat: no-repeat; + background-position: 0 7px; +} + +ul.search li a { + font-weight: bold; +} + +ul.search li p.context { + color: #888; + margin: 2px 0 0 30px; + text-align: left; +} + +ul.keywordmatches li.goodmatch a { + font-weight: bold; +} + +/* -- index page ------------------------------------------------------------ */ + +table.contentstable { + width: 90%; + margin-left: auto; + margin-right: auto; +} + +table.contentstable p.biglink { + line-height: 150%; +} + +a.biglink { + font-size: 1.3em; +} + +span.linkdescr { + font-style: italic; + padding-top: 5px; + font-size: 90%; +} + +/* -- general index --------------------------------------------------------- */ + +table.indextable { + width: 100%; +} + +table.indextable td { + text-align: left; + vertical-align: top; +} + +table.indextable ul { + margin-top: 0; + margin-bottom: 0; + list-style-type: none; +} + +table.indextable > tbody > tr > td > ul { + padding-left: 0em; +} + +table.indextable tr.pcap { + height: 10px; +} + +table.indextable tr.cap { + margin-top: 10px; + background-color: #f2f2f2; +} + +img.toggler { + margin-right: 3px; + margin-top: 3px; + cursor: pointer; +} + +div.modindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +div.genindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +/* -- domain module index --------------------------------------------------- */ + +table.modindextable td { + padding: 2px; + border-collapse: collapse; +} + +/* -- general body styles --------------------------------------------------- */ + +div.body { + min-width: inherit; + max-width: 800px; +} + +div.body p, div.body dd, div.body li, div.body blockquote { + -moz-hyphens: auto; + -ms-hyphens: auto; + -webkit-hyphens: auto; + hyphens: auto; +} + +a.headerlink { + visibility: hidden; +} + +a:visited { + color: #551A8B; +} + +h1:hover > a.headerlink, +h2:hover > a.headerlink, +h3:hover > a.headerlink, +h4:hover > a.headerlink, +h5:hover > a.headerlink, +h6:hover > a.headerlink, +dt:hover > a.headerlink, +caption:hover > a.headerlink, +p.caption:hover > a.headerlink, +div.code-block-caption:hover > a.headerlink { + visibility: visible; +} + +div.body p.caption { + text-align: inherit; +} + +div.body td { + text-align: left; +} + +.first { + margin-top: 0 !important; +} + +p.rubric { + margin-top: 30px; + font-weight: bold; +} + +img.align-left, figure.align-left, .figure.align-left, object.align-left { + clear: left; + float: left; + margin-right: 1em; +} + +img.align-right, figure.align-right, .figure.align-right, object.align-right { + clear: right; + float: right; + margin-left: 1em; +} + +img.align-center, figure.align-center, .figure.align-center, object.align-center { + display: block; + margin-left: auto; + margin-right: auto; +} + +img.align-default, figure.align-default, .figure.align-default { + display: block; + margin-left: auto; + margin-right: auto; +} + +.align-left { + text-align: left; +} + +.align-center { + text-align: center; +} + +.align-default { + text-align: center; +} + +.align-right { + text-align: right; +} + +/* -- sidebars -------------------------------------------------------------- */ + +div.sidebar, +aside.sidebar { + margin: 0 0 0.5em 1em; + border: 1px solid #ddb; + padding: 7px; + background-color: #ffe; + width: 40%; + float: right; + clear: right; + overflow-x: auto; +} + +p.sidebar-title { + font-weight: bold; +} + +nav.contents, +aside.topic, +div.admonition, div.topic, blockquote { + clear: left; +} + +/* -- topics ---------------------------------------------------------------- */ + +nav.contents, +aside.topic, +div.topic { + border: 1px solid #ccc; + padding: 7px; + margin: 10px 0 10px 0; +} + +p.topic-title { + font-size: 1.1em; + font-weight: bold; + margin-top: 10px; +} + +/* -- admonitions ----------------------------------------------------------- */ + +div.admonition { + margin-top: 10px; + margin-bottom: 10px; + padding: 7px; +} + +div.admonition dt { + font-weight: bold; +} + +p.admonition-title { + margin: 0px 10px 5px 0px; + font-weight: bold; +} + +div.body p.centered { + text-align: center; + margin-top: 25px; +} + +/* -- content of sidebars/topics/admonitions -------------------------------- */ + +div.sidebar > :last-child, +aside.sidebar > :last-child, +nav.contents > :last-child, +aside.topic > :last-child, +div.topic > :last-child, +div.admonition > :last-child { + margin-bottom: 0; +} + +div.sidebar::after, +aside.sidebar::after, +nav.contents::after, +aside.topic::after, +div.topic::after, +div.admonition::after, +blockquote::after { + display: block; + content: ''; + clear: both; +} + +/* -- tables ---------------------------------------------------------------- */ + +table.docutils { + margin-top: 10px; + margin-bottom: 10px; + border: 0; + border-collapse: collapse; +} + +table.align-center { + margin-left: auto; + margin-right: auto; +} + +table.align-default { + margin-left: auto; + margin-right: auto; +} + +table caption span.caption-number { + font-style: italic; +} + +table caption span.caption-text { +} + +table.docutils td, table.docutils th { + padding: 1px 8px 1px 5px; + border-top: 0; + border-left: 0; + border-right: 0; + border-bottom: 1px solid #aaa; +} + +th { + text-align: left; + padding-right: 5px; +} + +table.citation { + border-left: solid 1px gray; + margin-left: 1px; +} + +table.citation td { + border-bottom: none; +} + +th > :first-child, +td > :first-child { + margin-top: 0px; +} + +th > :last-child, +td > :last-child { + margin-bottom: 0px; +} + +/* -- figures --------------------------------------------------------------- */ + +div.figure, figure { + margin: 0.5em; + padding: 0.5em; +} + +div.figure p.caption, figcaption { + padding: 0.3em; +} + +div.figure p.caption span.caption-number, +figcaption span.caption-number { + font-style: italic; +} + +div.figure p.caption span.caption-text, +figcaption span.caption-text { +} + +/* -- field list styles ----------------------------------------------------- */ + +table.field-list td, table.field-list th { + border: 0 !important; +} + +.field-list ul { + margin: 0; + padding-left: 1em; +} + +.field-list p { + margin: 0; +} + +.field-name { + -moz-hyphens: manual; + -ms-hyphens: manual; + -webkit-hyphens: manual; + hyphens: manual; +} + +/* -- hlist styles ---------------------------------------------------------- */ + +table.hlist { + margin: 1em 0; +} + +table.hlist td { + vertical-align: top; +} + +/* -- object description styles --------------------------------------------- */ + +.sig { + font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; +} + +.sig-name, code.descname { + background-color: transparent; + font-weight: bold; +} + +.sig-name { + font-size: 1.1em; +} + +code.descname { + font-size: 1.2em; +} + +.sig-prename, code.descclassname { + background-color: transparent; +} + +.optional { + font-size: 1.3em; +} + +.sig-paren { + font-size: larger; +} + +.sig-param.n { + font-style: italic; +} + +/* C++ specific styling */ + +.sig-inline.c-texpr, +.sig-inline.cpp-texpr { + font-family: unset; +} + +.sig.c .k, .sig.c .kt, +.sig.cpp .k, .sig.cpp .kt { + color: #0033B3; +} + +.sig.c .m, +.sig.cpp .m { + color: #1750EB; +} + +.sig.c .s, .sig.c .sc, +.sig.cpp .s, .sig.cpp .sc { + color: #067D17; +} + + +/* -- other body styles ----------------------------------------------------- */ + +ol.arabic { + list-style: decimal; +} + +ol.loweralpha { + list-style: lower-alpha; +} + +ol.upperalpha { + list-style: upper-alpha; +} + +ol.lowerroman { + list-style: lower-roman; +} + +ol.upperroman { + list-style: upper-roman; +} + +:not(li) > ol > li:first-child > :first-child, +:not(li) > ul > li:first-child > :first-child { + margin-top: 0px; +} + +:not(li) > ol > li:last-child > :last-child, +:not(li) > ul > li:last-child > :last-child { + margin-bottom: 0px; +} + +ol.simple ol p, +ol.simple ul p, +ul.simple ol p, +ul.simple ul p { + margin-top: 0; +} + +ol.simple > li:not(:first-child) > p, +ul.simple > li:not(:first-child) > p { + margin-top: 0; +} + +ol.simple p, +ul.simple p { + margin-bottom: 0; +} + +aside.footnote > span, +div.citation > span { + float: left; +} +aside.footnote > span:last-of-type, +div.citation > span:last-of-type { + padding-right: 0.5em; +} +aside.footnote > p { + margin-left: 2em; +} +div.citation > p { + margin-left: 4em; +} +aside.footnote > p:last-of-type, +div.citation > p:last-of-type { + margin-bottom: 0em; +} +aside.footnote > p:last-of-type:after, +div.citation > p:last-of-type:after { + content: ""; + clear: both; +} + +dl.field-list { + display: grid; + grid-template-columns: fit-content(30%) auto; +} + +dl.field-list > dt { + font-weight: bold; + word-break: break-word; + padding-left: 0.5em; + padding-right: 5px; +} + +dl.field-list > dd { + padding-left: 0.5em; + margin-top: 0em; + margin-left: 0em; + margin-bottom: 0em; +} + +dl { + margin-bottom: 15px; +} + +dd > :first-child { + margin-top: 0px; +} + +dd ul, dd table { + margin-bottom: 10px; +} + +dd { + margin-top: 3px; + margin-bottom: 10px; + margin-left: 30px; +} + +.sig dd { + margin-top: 0px; + margin-bottom: 0px; +} + +.sig dl { + margin-top: 0px; + margin-bottom: 0px; +} + +dl > dd:last-child, +dl > dd:last-child > :last-child { + margin-bottom: 0; +} + +dt:target, span.highlighted { + background-color: #fbe54e; +} + +rect.highlighted { + fill: #fbe54e; +} + +dl.glossary dt { + font-weight: bold; + font-size: 1.1em; +} + +.versionmodified { + font-style: italic; +} + +.system-message { + background-color: #fda; + padding: 5px; + border: 3px solid red; +} + +.footnote:target { + background-color: #ffa; +} + +.line-block { + display: block; + margin-top: 1em; + margin-bottom: 1em; +} + +.line-block .line-block { + margin-top: 0; + margin-bottom: 0; + margin-left: 1.5em; +} + +.guilabel, .menuselection { + font-family: sans-serif; +} + +.accelerator { + text-decoration: underline; +} + +.classifier { + font-style: oblique; +} + +.classifier:before { + font-style: normal; + margin: 0 0.5em; + content: ":"; + display: inline-block; +} + +abbr, acronym { + border-bottom: dotted 1px; + cursor: help; +} + +.translated { + background-color: rgba(207, 255, 207, 0.2) +} + +.untranslated { + background-color: rgba(255, 207, 207, 0.2) +} + +/* -- code displays --------------------------------------------------------- */ + +pre { + overflow: auto; + overflow-y: hidden; /* fixes display issues on Chrome browsers */ +} + +pre, div[class*="highlight-"] { + clear: both; +} + +span.pre { + -moz-hyphens: none; + -ms-hyphens: none; + -webkit-hyphens: none; + hyphens: none; + white-space: nowrap; +} + +div[class*="highlight-"] { + margin: 1em 0; +} + +td.linenos pre { + border: 0; + background-color: transparent; + color: #aaa; +} + +table.highlighttable { + display: block; +} + +table.highlighttable tbody { + display: block; +} + +table.highlighttable tr { + display: flex; +} + +table.highlighttable td { + margin: 0; + padding: 0; +} + +table.highlighttable td.linenos { + padding-right: 0.5em; +} + +table.highlighttable td.code { + flex: 1; + overflow: hidden; +} + +.highlight .hll { + display: block; +} + +div.highlight pre, +table.highlighttable pre { + margin: 0; +} + +div.code-block-caption + div { + margin-top: 0; +} + +div.code-block-caption { + margin-top: 1em; + padding: 2px 5px; + font-size: small; +} + +div.code-block-caption code { + background-color: transparent; +} + +table.highlighttable td.linenos, +span.linenos, +div.highlight span.gp { /* gp: Generic.Prompt */ + user-select: none; + -webkit-user-select: text; /* Safari fallback only */ + -webkit-user-select: none; /* Chrome/Safari */ + -moz-user-select: none; /* Firefox */ + -ms-user-select: none; /* IE10+ */ +} + +div.code-block-caption span.caption-number { + padding: 0.1em 0.3em; + font-style: italic; +} + +div.code-block-caption span.caption-text { +} + +div.literal-block-wrapper { + margin: 1em 0; +} + +code.xref, a code { + background-color: transparent; + font-weight: bold; +} + +h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { + background-color: transparent; +} + +.viewcode-link { + float: right; +} + +.viewcode-back { + float: right; + font-family: sans-serif; +} + +div.viewcode-block:target { + margin: -1px -10px; + padding: 0 10px; +} + +/* -- math display ---------------------------------------------------------- */ + +img.math { + vertical-align: middle; +} + +div.body div.math p { + text-align: center; +} + +span.eqno { + float: right; +} + +span.eqno a.headerlink { + position: absolute; + z-index: 1; +} + +div.math:hover a.headerlink { + visibility: visible; +} + +/* -- printout stylesheet --------------------------------------------------- */ + +@media print { + div.document, + div.documentwrapper, + div.bodywrapper { + margin: 0 !important; + width: 100%; + } + + div.sphinxsidebar, + div.related, + div.footer, + #top-link { + display: none; + } +} \ No newline at end of file diff --git a/v3.0.0a3/_static/custom.css b/v3.0.0a3/_static/custom.css new file mode 100644 index 0000000..2a924f1 --- /dev/null +++ b/v3.0.0a3/_static/custom.css @@ -0,0 +1 @@ +/* This file intentionally left blank. */ diff --git a/v3.0.0a3/_static/docs-versions-menu.js b/v3.0.0a3/_static/docs-versions-menu.js new file mode 100644 index 0000000..8d1b253 --- /dev/null +++ b/v3.0.0a3/_static/docs-versions-menu.js @@ -0,0 +1,153 @@ +"use strict"; + +function getGhPagesCurrentFolder() { + // Extract version folder under the assumpgion that the URL is of the form + // https://.github.io///... + if (window.location.hostname.includes("github.io")){ + return window.location.pathname.split('/')[2]; + } +} + +function getRootUrl() { + // Return the "root" URL, i.e. everything before the current folder + // (getGhPagesCurrentFolder). On gh-pages, this includes the project name. + var root_url = window.location.origin; + if (window.location.hostname.includes("github.io")){ + root_url = root_url + '/' + window.location.pathname.split('/')[1]; + } + return root_url; +} + +function getGithubProjectUrl(){ + // Return the project url on Github, under the assumption that the current + // page is hosted on github-pages (https://.github.io//) + var root_url = getRootUrl(); + var match = root_url.match(/([\w\d-]+)\.github\.io\/([\w\d-]+)/) + if (match !== null){ + var username = match[1]; + var projectname = match[2]; + return "https://github.com/" + username + "/" + projectname; + } else { + return null + } +} + +function _addVersionsMenu(version_data) { + // The menu was reverse-engineered from the RTD websites, so it's very + // specific to the sphinx_rtd_theme + var folders = version_data["versions"]; + var root_url = getRootUrl(); + var current_url = document.URL; + var current_folder = getGhPagesCurrentFolder(); + if (current_folder === undefined) return; + var current_version = version_data["labels"][current_folder]; + var menu = document.createElement('div'); + menu.setAttribute('class', 'rst-versions rst-badge'); + menu.setAttribute('data-toggle', 'rst-versions'); + menu.setAttribute('role', 'note'); + menu.setAttribute('aria-label', 'versions'); + var inner_html = + "" + + " " + + "" + current_version + " " + + "" + + "" + + "
" + + "
" + + "
" + + "
Versions
"; + var i; + for (i in folders) { + var folder = folders[i]; + if (folder == current_folder){ + var inner_html = inner_html + "
" + current_version + "
"; + } else { + var inner_html = inner_html + "
" + version_data["labels"][folder] + "
"; + } + } + var downloads = version_data["downloads"][current_folder]; + if (downloads.length > 0){ + var inner_html = inner_html + + "
Downloads
"; + for (i in downloads) { + var download_label = downloads[i][0]; + var download_url = downloads[i][1]; + if (!(/^(https?|ftp):/.test(download_url))){ + if (!download_url.startsWith('/')){ + var download_url = '/' + download_url; + } + var download_url = root_url + download_url; + } + var inner_html = inner_html + "
" + + download_label + "
"; + } + } + var github_project_url = getGithubProjectUrl(); + if (github_project_url !== null && github_project_url.length > 0){ + var inner_html = inner_html + + "
On Github
" + + "
Project Home
" + + "
Issues
"; + } + var inner_html = inner_html + + "
" + + "
" + + "Generated by Docs Versions Menu" + + "" + + "
" + + "
"; + menu.innerHTML = inner_html; + var parent = document.body; + parent.insertBefore(menu, parent.lastChild); + + // Add a warning banner for dev/outdated versions + var warning; + var msg; + if (version_data["warnings"][current_folder].indexOf("outdated") >=0){ + warning = document.createElement('div'); + warning.setAttribute('class', 'admonition danger'); + msg = "This document is for an outdated version."; + } else if (version_data["warnings"][current_folder].indexOf("unreleased") >=0){ + warning = document.createElement('div'); + warning.setAttribute('class', 'admonition danger'); + msg = "This document is for an unreleased development version."; + } else if (version_data["warnings"][current_folder].indexOf("prereleased") >=0){ + warning = document.createElement('div'); + warning.setAttribute('class', 'admonition danger'); + msg = "This document is for a pre-release development version."; + } + if (warning !== undefined){ + if (version_data["latest"] !== null){ + msg = msg + " Documentation is available for the " + "latest public release." + } + warning.innerHTML = "

Note

" + + "

" + msg + "

"; + var parent = document.querySelector('div.body') + || document.querySelector('div.document') + || document.body; + parent.insertBefore(warning, parent.firstChild); + } + + +} + +function addVersionsMenu() { + // We assume that we can load versions.json from + // https://.github.io//versions.json + // That is, there's a path between the hostname and versions.json + var json_file = "/" + window.location.pathname.split("/")[1] + "/versions.json"; + $.getJSON(json_file, _addVersionsMenu); + + $( "body" ).on('click', "div.rst-versions.rst-badge", function() { + $('.rst-other-versions').toggle(); + $('.rst-versions .rst-current-version .fa-book').toggleClass('shift-up'); + }); +} + +document.addEventListener('DOMContentLoaded', addVersionsMenu); \ No newline at end of file diff --git a/v3.0.0a3/_static/doctools.js b/v3.0.0a3/_static/doctools.js new file mode 100644 index 0000000..4d67807 --- /dev/null +++ b/v3.0.0a3/_static/doctools.js @@ -0,0 +1,156 @@ +/* + * doctools.js + * ~~~~~~~~~~~ + * + * Base JavaScript utilities for all Sphinx HTML documentation. + * + * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ +"use strict"; + +const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([ + "TEXTAREA", + "INPUT", + "SELECT", + "BUTTON", +]); + +const _ready = (callback) => { + if (document.readyState !== "loading") { + callback(); + } else { + document.addEventListener("DOMContentLoaded", callback); + } +}; + +/** + * Small JavaScript module for the documentation. + */ +const Documentation = { + init: () => { + Documentation.initDomainIndexTable(); + Documentation.initOnKeyListeners(); + }, + + /** + * i18n support + */ + TRANSLATIONS: {}, + PLURAL_EXPR: (n) => (n === 1 ? 0 : 1), + LOCALE: "unknown", + + // gettext and ngettext don't access this so that the functions + // can safely bound to a different name (_ = Documentation.gettext) + gettext: (string) => { + const translated = Documentation.TRANSLATIONS[string]; + switch (typeof translated) { + case "undefined": + return string; // no translation + case "string": + return translated; // translation exists + default: + return translated[0]; // (singular, plural) translation tuple exists + } + }, + + ngettext: (singular, plural, n) => { + const translated = Documentation.TRANSLATIONS[singular]; + if (typeof translated !== "undefined") + return translated[Documentation.PLURAL_EXPR(n)]; + return n === 1 ? singular : plural; + }, + + addTranslations: (catalog) => { + Object.assign(Documentation.TRANSLATIONS, catalog.messages); + Documentation.PLURAL_EXPR = new Function( + "n", + `return (${catalog.plural_expr})` + ); + Documentation.LOCALE = catalog.locale; + }, + + /** + * helper function to focus on search bar + */ + focusSearchBar: () => { + document.querySelectorAll("input[name=q]")[0]?.focus(); + }, + + /** + * Initialise the domain index toggle buttons + */ + initDomainIndexTable: () => { + const toggler = (el) => { + const idNumber = el.id.substr(7); + const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`); + if (el.src.substr(-9) === "minus.png") { + el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`; + toggledRows.forEach((el) => (el.style.display = "none")); + } else { + el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`; + toggledRows.forEach((el) => (el.style.display = "")); + } + }; + + const togglerElements = document.querySelectorAll("img.toggler"); + togglerElements.forEach((el) => + el.addEventListener("click", (event) => toggler(event.currentTarget)) + ); + togglerElements.forEach((el) => (el.style.display = "")); + if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler); + }, + + initOnKeyListeners: () => { + // only install a listener if it is really needed + if ( + !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS && + !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS + ) + return; + + document.addEventListener("keydown", (event) => { + // bail for input elements + if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; + // bail with special keys + if (event.altKey || event.ctrlKey || event.metaKey) return; + + if (!event.shiftKey) { + switch (event.key) { + case "ArrowLeft": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const prevLink = document.querySelector('link[rel="prev"]'); + if (prevLink && prevLink.href) { + window.location.href = prevLink.href; + event.preventDefault(); + } + break; + case "ArrowRight": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const nextLink = document.querySelector('link[rel="next"]'); + if (nextLink && nextLink.href) { + window.location.href = nextLink.href; + event.preventDefault(); + } + break; + } + } + + // some keyboard layouts may need Shift to get / + switch (event.key) { + case "/": + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; + Documentation.focusSearchBar(); + event.preventDefault(); + } + }); + }, +}; + +// quick alias for translations +const _ = Documentation.gettext; + +_ready(Documentation.init); diff --git a/v3.0.0a3/_static/documentation_options.js b/v3.0.0a3/_static/documentation_options.js new file mode 100644 index 0000000..e4be351 --- /dev/null +++ b/v3.0.0a3/_static/documentation_options.js @@ -0,0 +1,13 @@ +const DOCUMENTATION_OPTIONS = { + VERSION: '3.0.0a3', + LANGUAGE: 'en', + COLLAPSE_INDEX: false, + BUILDER: 'html', + FILE_SUFFIX: '.html', + LINK_SUFFIX: '.html', + HAS_SOURCE: true, + SOURCELINK_SUFFIX: '.txt', + NAVIGATION_WITH_KEYS: false, + SHOW_SEARCH_SUMMARY: true, + ENABLE_SEARCH_SHORTCUTS: true, +}; \ No newline at end of file diff --git a/v3.0.0a3/_static/file.png b/v3.0.0a3/_static/file.png new file mode 100644 index 0000000..a858a41 Binary files /dev/null and b/v3.0.0a3/_static/file.png differ diff --git a/v3.0.0a3/_static/fontawesome-webfont.eot b/v3.0.0a3/_static/fontawesome-webfont.eot new file mode 100644 index 0000000..e9f60ca Binary files /dev/null and b/v3.0.0a3/_static/fontawesome-webfont.eot differ diff --git a/v3.0.0a3/_static/fontawesome-webfont.svg b/v3.0.0a3/_static/fontawesome-webfont.svg new file mode 100644 index 0000000..855c845 --- /dev/null +++ b/v3.0.0a3/_static/fontawesome-webfont.svg @@ -0,0 +1,2671 @@ + + + + +Created by FontForge 20120731 at Mon Oct 24 17:37:40 2016 + By ,,, +Copyright Dave Gandy 2016. All rights reserved. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/v3.0.0a3/_static/fontawesome-webfont.ttf b/v3.0.0a3/_static/fontawesome-webfont.ttf new file mode 100644 index 0000000..35acda2 Binary files /dev/null and b/v3.0.0a3/_static/fontawesome-webfont.ttf differ diff --git a/v3.0.0a3/_static/fontawesome-webfont.woff b/v3.0.0a3/_static/fontawesome-webfont.woff new file mode 100644 index 0000000..400014a Binary files /dev/null and b/v3.0.0a3/_static/fontawesome-webfont.woff differ diff --git a/v3.0.0a3/_static/fontawesome-webfont.woff2 b/v3.0.0a3/_static/fontawesome-webfont.woff2 new file mode 100644 index 0000000..4d13fc6 Binary files /dev/null and b/v3.0.0a3/_static/fontawesome-webfont.woff2 differ diff --git a/v3.0.0a3/_static/jquery.js b/v3.0.0a3/_static/jquery.js new file mode 100644 index 0000000..c4c6022 --- /dev/null +++ b/v3.0.0a3/_static/jquery.js @@ -0,0 +1,2 @@ +/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="
",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 00 + var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 + var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 + var s_v = "^(" + C + ")?" + v; // vowel in stem + + this.stemWord = function (w) { + var stem; + var suffix; + var firstch; + var origword = w; + + if (w.length < 3) + return w; + + var re; + var re2; + var re3; + var re4; + + firstch = w.substr(0,1); + if (firstch == "y") + w = firstch.toUpperCase() + w.substr(1); + + // Step 1a + re = /^(.+?)(ss|i)es$/; + re2 = /^(.+?)([^s])s$/; + + if (re.test(w)) + w = w.replace(re,"$1$2"); + else if (re2.test(w)) + w = w.replace(re2,"$1$2"); + + // Step 1b + re = /^(.+?)eed$/; + re2 = /^(.+?)(ed|ing)$/; + if (re.test(w)) { + var fp = re.exec(w); + re = new RegExp(mgr0); + if (re.test(fp[1])) { + re = /.$/; + w = w.replace(re,""); + } + } + else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1]; + re2 = new RegExp(s_v); + if (re2.test(stem)) { + w = stem; + re2 = /(at|bl|iz)$/; + re3 = new RegExp("([^aeiouylsz])\\1$"); + re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + if (re2.test(w)) + w = w + "e"; + else if (re3.test(w)) { + re = /.$/; + w = w.replace(re,""); + } + else if (re4.test(w)) + w = w + "e"; + } + } + + // Step 1c + re = /^(.+?)y$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(s_v); + if (re.test(stem)) + w = stem + "i"; + } + + // Step 2 + re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = new RegExp(mgr0); + if (re.test(stem)) + w = stem + step2list[suffix]; + } + + // Step 3 + re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = new RegExp(mgr0); + if (re.test(stem)) + w = stem + step3list[suffix]; + } + + // Step 4 + re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; + re2 = /^(.+?)(s|t)(ion)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(mgr1); + if (re.test(stem)) + w = stem; + } + else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1] + fp[2]; + re2 = new RegExp(mgr1); + if (re2.test(stem)) + w = stem; + } + + // Step 5 + re = /^(.+?)e$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(mgr1); + re2 = new RegExp(meq1); + re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) + w = stem; + } + re = /ll$/; + re2 = new RegExp(mgr1); + if (re.test(w) && re2.test(w)) { + re = /.$/; + w = w.replace(re,""); + } + + // and turn initial Y back to y + if (firstch == "y") + w = firstch.toLowerCase() + w.substr(1); + return w; + } +} + diff --git a/v3.0.0a3/_static/minus.png b/v3.0.0a3/_static/minus.png new file mode 100644 index 0000000..d96755f Binary files /dev/null and b/v3.0.0a3/_static/minus.png differ diff --git a/v3.0.0a3/_static/plus.png b/v3.0.0a3/_static/plus.png new file mode 100644 index 0000000..7107cec Binary files /dev/null and b/v3.0.0a3/_static/plus.png differ diff --git a/v3.0.0a3/_static/pygments.css b/v3.0.0a3/_static/pygments.css new file mode 100644 index 0000000..0d49244 --- /dev/null +++ b/v3.0.0a3/_static/pygments.css @@ -0,0 +1,75 @@ +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #eeffcc; } +.highlight .c { color: #408090; font-style: italic } /* Comment */ +.highlight .err { border: 1px solid #FF0000 } /* Error */ +.highlight .k { color: #007020; font-weight: bold } /* Keyword */ +.highlight .o { color: #666666 } /* Operator */ +.highlight .ch { color: #408090; font-style: italic } /* Comment.Hashbang */ +.highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #007020 } /* Comment.Preproc */ +.highlight .cpf { color: #408090; font-style: italic } /* Comment.PreprocFile */ +.highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #333333 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #007020 } /* Keyword.Pseudo */ +.highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #902000 } /* Keyword.Type */ +.highlight .m { color: #208050 } /* Literal.Number */ +.highlight .s { color: #4070a0 } /* Literal.String */ +.highlight .na { color: #4070a0 } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */ +.highlight .no { color: #60add5 } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #007020 } /* Name.Exception */ +.highlight .nf { color: #06287e } /* Name.Function */ +.highlight .nl { color: #002070; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */ +.highlight .nv { color: #bb60d5 } /* Name.Variable */ +.highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #208050 } /* Literal.Number.Bin */ +.highlight .mf { color: #208050 } /* Literal.Number.Float */ +.highlight .mh { color: #208050 } /* Literal.Number.Hex */ +.highlight .mi { color: #208050 } /* Literal.Number.Integer */ +.highlight .mo { color: #208050 } /* Literal.Number.Oct */ +.highlight .sa { color: #4070a0 } /* Literal.String.Affix */ +.highlight .sb { color: #4070a0 } /* Literal.String.Backtick */ +.highlight .sc { color: #4070a0 } /* Literal.String.Char */ +.highlight .dl { color: #4070a0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ +.highlight .s2 { color: #4070a0 } /* Literal.String.Double */ +.highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ +.highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */ +.highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ +.highlight .sx { color: #c65d09 } /* Literal.String.Other */ +.highlight .sr { color: #235388 } /* Literal.String.Regex */ +.highlight .s1 { color: #4070a0 } /* Literal.String.Single */ +.highlight .ss { color: #517918 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #06287e } /* Name.Function.Magic */ +.highlight .vc { color: #bb60d5 } /* Name.Variable.Class */ +.highlight .vg { color: #bb60d5 } /* Name.Variable.Global */ +.highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */ +.highlight .vm { color: #bb60d5 } /* Name.Variable.Magic */ +.highlight .il { color: #208050 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/v3.0.0a3/_static/searchtools.js b/v3.0.0a3/_static/searchtools.js new file mode 100644 index 0000000..92da3f8 --- /dev/null +++ b/v3.0.0a3/_static/searchtools.js @@ -0,0 +1,619 @@ +/* + * searchtools.js + * ~~~~~~~~~~~~~~~~ + * + * Sphinx JavaScript utilities for the full-text search. + * + * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ +"use strict"; + +/** + * Simple result scoring code. + */ +if (typeof Scorer === "undefined") { + var Scorer = { + // Implement the following function to further tweak the score for each result + // The function takes a result array [docname, title, anchor, descr, score, filename] + // and returns the new score. + /* + score: result => { + const [docname, title, anchor, descr, score, filename] = result + return score + }, + */ + + // query matches the full name of an object + objNameMatch: 11, + // or matches in the last dotted part of the object name + objPartialMatch: 6, + // Additive scores depending on the priority of the object + objPrio: { + 0: 15, // used to be importantResults + 1: 5, // used to be objectResults + 2: -5, // used to be unimportantResults + }, + // Used when the priority is not in the mapping. + objPrioDefault: 0, + + // query found in title + title: 15, + partialTitle: 7, + // query found in terms + term: 5, + partialTerm: 2, + }; +} + +const _removeChildren = (element) => { + while (element && element.lastChild) element.removeChild(element.lastChild); +}; + +/** + * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping + */ +const _escapeRegExp = (string) => + string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string + +const _displayItem = (item, searchTerms, highlightTerms) => { + const docBuilder = DOCUMENTATION_OPTIONS.BUILDER; + const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX; + const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX; + const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY; + const contentRoot = document.documentElement.dataset.content_root; + + const [docName, title, anchor, descr, score, _filename] = item; + + let listItem = document.createElement("li"); + let requestUrl; + let linkUrl; + if (docBuilder === "dirhtml") { + // dirhtml builder + let dirname = docName + "/"; + if (dirname.match(/\/index\/$/)) + dirname = dirname.substring(0, dirname.length - 6); + else if (dirname === "index/") dirname = ""; + requestUrl = contentRoot + dirname; + linkUrl = requestUrl; + } else { + // normal html builders + requestUrl = contentRoot + docName + docFileSuffix; + linkUrl = docName + docLinkSuffix; + } + let linkEl = listItem.appendChild(document.createElement("a")); + linkEl.href = linkUrl + anchor; + linkEl.dataset.score = score; + linkEl.innerHTML = title; + if (descr) { + listItem.appendChild(document.createElement("span")).innerHTML = + " (" + descr + ")"; + // highlight search terms in the description + if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js + highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted")); + } + else if (showSearchSummary) + fetch(requestUrl) + .then((responseData) => responseData.text()) + .then((data) => { + if (data) + listItem.appendChild( + Search.makeSearchSummary(data, searchTerms, anchor) + ); + // highlight search terms in the summary + if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js + highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted")); + }); + Search.output.appendChild(listItem); +}; +const _finishSearch = (resultCount) => { + Search.stopPulse(); + Search.title.innerText = _("Search Results"); + if (!resultCount) + Search.status.innerText = Documentation.gettext( + "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories." + ); + else + Search.status.innerText = _( + "Search finished, found ${resultCount} page(s) matching the search query." + ).replace('${resultCount}', resultCount); +}; +const _displayNextItem = ( + results, + resultCount, + searchTerms, + highlightTerms, +) => { + // results left, load the summary and display it + // this is intended to be dynamic (don't sub resultsCount) + if (results.length) { + _displayItem(results.pop(), searchTerms, highlightTerms); + setTimeout( + () => _displayNextItem(results, resultCount, searchTerms, highlightTerms), + 5 + ); + } + // search finished, update title and status message + else _finishSearch(resultCount); +}; +// Helper function used by query() to order search results. +// Each input is an array of [docname, title, anchor, descr, score, filename]. +// Order the results by score (in opposite order of appearance, since the +// `_displayNextItem` function uses pop() to retrieve items) and then alphabetically. +const _orderResultsByScoreThenName = (a, b) => { + const leftScore = a[4]; + const rightScore = b[4]; + if (leftScore === rightScore) { + // same score: sort alphabetically + const leftTitle = a[1].toLowerCase(); + const rightTitle = b[1].toLowerCase(); + if (leftTitle === rightTitle) return 0; + return leftTitle > rightTitle ? -1 : 1; // inverted is intentional + } + return leftScore > rightScore ? 1 : -1; +}; + +/** + * Default splitQuery function. Can be overridden in ``sphinx.search`` with a + * custom function per language. + * + * The regular expression works by splitting the string on consecutive characters + * that are not Unicode letters, numbers, underscores, or emoji characters. + * This is the same as ``\W+`` in Python, preserving the surrogate pair area. + */ +if (typeof splitQuery === "undefined") { + var splitQuery = (query) => query + .split(/[^\p{Letter}\p{Number}_\p{Emoji_Presentation}]+/gu) + .filter(term => term) // remove remaining empty strings +} + +/** + * Search Module + */ +const Search = { + _index: null, + _queued_query: null, + _pulse_status: -1, + + htmlToText: (htmlString, anchor) => { + const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html'); + for (const removalQuery of [".headerlinks", "script", "style"]) { + htmlElement.querySelectorAll(removalQuery).forEach((el) => { el.remove() }); + } + if (anchor) { + const anchorContent = htmlElement.querySelector(`[role="main"] ${anchor}`); + if (anchorContent) return anchorContent.textContent; + + console.warn( + `Anchored content block not found. Sphinx search tries to obtain it via DOM query '[role=main] ${anchor}'. Check your theme or template.` + ); + } + + // if anchor not specified or not found, fall back to main content + const docContent = htmlElement.querySelector('[role="main"]'); + if (docContent) return docContent.textContent; + + console.warn( + "Content block not found. Sphinx search tries to obtain it via DOM query '[role=main]'. Check your theme or template." + ); + return ""; + }, + + init: () => { + const query = new URLSearchParams(window.location.search).get("q"); + document + .querySelectorAll('input[name="q"]') + .forEach((el) => (el.value = query)); + if (query) Search.performSearch(query); + }, + + loadIndex: (url) => + (document.body.appendChild(document.createElement("script")).src = url), + + setIndex: (index) => { + Search._index = index; + if (Search._queued_query !== null) { + const query = Search._queued_query; + Search._queued_query = null; + Search.query(query); + } + }, + + hasIndex: () => Search._index !== null, + + deferQuery: (query) => (Search._queued_query = query), + + stopPulse: () => (Search._pulse_status = -1), + + startPulse: () => { + if (Search._pulse_status >= 0) return; + + const pulse = () => { + Search._pulse_status = (Search._pulse_status + 1) % 4; + Search.dots.innerText = ".".repeat(Search._pulse_status); + if (Search._pulse_status >= 0) window.setTimeout(pulse, 500); + }; + pulse(); + }, + + /** + * perform a search for something (or wait until index is loaded) + */ + performSearch: (query) => { + // create the required interface elements + const searchText = document.createElement("h2"); + searchText.textContent = _("Searching"); + const searchSummary = document.createElement("p"); + searchSummary.classList.add("search-summary"); + searchSummary.innerText = ""; + const searchList = document.createElement("ul"); + searchList.classList.add("search"); + + const out = document.getElementById("search-results"); + Search.title = out.appendChild(searchText); + Search.dots = Search.title.appendChild(document.createElement("span")); + Search.status = out.appendChild(searchSummary); + Search.output = out.appendChild(searchList); + + const searchProgress = document.getElementById("search-progress"); + // Some themes don't use the search progress node + if (searchProgress) { + searchProgress.innerText = _("Preparing search..."); + } + Search.startPulse(); + + // index already loaded, the browser was quick! + if (Search.hasIndex()) Search.query(query); + else Search.deferQuery(query); + }, + + _parseQuery: (query) => { + // stem the search terms and add them to the correct list + const stemmer = new Stemmer(); + const searchTerms = new Set(); + const excludedTerms = new Set(); + const highlightTerms = new Set(); + const objectTerms = new Set(splitQuery(query.toLowerCase().trim())); + splitQuery(query.trim()).forEach((queryTerm) => { + const queryTermLower = queryTerm.toLowerCase(); + + // maybe skip this "word" + // stopwords array is from language_data.js + if ( + stopwords.indexOf(queryTermLower) !== -1 || + queryTerm.match(/^\d+$/) + ) + return; + + // stem the word + let word = stemmer.stemWord(queryTermLower); + // select the correct list + if (word[0] === "-") excludedTerms.add(word.substr(1)); + else { + searchTerms.add(word); + highlightTerms.add(queryTermLower); + } + }); + + if (SPHINX_HIGHLIGHT_ENABLED) { // set in sphinx_highlight.js + localStorage.setItem("sphinx_highlight_terms", [...highlightTerms].join(" ")) + } + + // console.debug("SEARCH: searching for:"); + // console.info("required: ", [...searchTerms]); + // console.info("excluded: ", [...excludedTerms]); + + return [query, searchTerms, excludedTerms, highlightTerms, objectTerms]; + }, + + /** + * execute search (requires search index to be loaded) + */ + _performSearch: (query, searchTerms, excludedTerms, highlightTerms, objectTerms) => { + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const titles = Search._index.titles; + const allTitles = Search._index.alltitles; + const indexEntries = Search._index.indexentries; + + // Collect multiple result groups to be sorted separately and then ordered. + // Each is an array of [docname, title, anchor, descr, score, filename]. + const normalResults = []; + const nonMainIndexResults = []; + + _removeChildren(document.getElementById("search-progress")); + + const queryLower = query.toLowerCase().trim(); + for (const [title, foundTitles] of Object.entries(allTitles)) { + if (title.toLowerCase().trim().includes(queryLower) && (queryLower.length >= title.length/2)) { + for (const [file, id] of foundTitles) { + let score = Math.round(100 * queryLower.length / title.length) + normalResults.push([ + docNames[file], + titles[file] !== title ? `${titles[file]} > ${title}` : title, + id !== null ? "#" + id : "", + null, + score, + filenames[file], + ]); + } + } + } + + // search for explicit entries in index directives + for (const [entry, foundEntries] of Object.entries(indexEntries)) { + if (entry.includes(queryLower) && (queryLower.length >= entry.length/2)) { + for (const [file, id, isMain] of foundEntries) { + const score = Math.round(100 * queryLower.length / entry.length); + const result = [ + docNames[file], + titles[file], + id ? "#" + id : "", + null, + score, + filenames[file], + ]; + if (isMain) { + normalResults.push(result); + } else { + nonMainIndexResults.push(result); + } + } + } + } + + // lookup as object + objectTerms.forEach((term) => + normalResults.push(...Search.performObjectSearch(term, objectTerms)) + ); + + // lookup as search terms in fulltext + normalResults.push(...Search.performTermsSearch(searchTerms, excludedTerms)); + + // let the scorer override scores with a custom scoring function + if (Scorer.score) { + normalResults.forEach((item) => (item[4] = Scorer.score(item))); + nonMainIndexResults.forEach((item) => (item[4] = Scorer.score(item))); + } + + // Sort each group of results by score and then alphabetically by name. + normalResults.sort(_orderResultsByScoreThenName); + nonMainIndexResults.sort(_orderResultsByScoreThenName); + + // Combine the result groups in (reverse) order. + // Non-main index entries are typically arbitrary cross-references, + // so display them after other results. + let results = [...nonMainIndexResults, ...normalResults]; + + // remove duplicate search results + // note the reversing of results, so that in the case of duplicates, the highest-scoring entry is kept + let seen = new Set(); + results = results.reverse().reduce((acc, result) => { + let resultStr = result.slice(0, 4).concat([result[5]]).map(v => String(v)).join(','); + if (!seen.has(resultStr)) { + acc.push(result); + seen.add(resultStr); + } + return acc; + }, []); + + return results.reverse(); + }, + + query: (query) => { + const [searchQuery, searchTerms, excludedTerms, highlightTerms, objectTerms] = Search._parseQuery(query); + const results = Search._performSearch(searchQuery, searchTerms, excludedTerms, highlightTerms, objectTerms); + + // for debugging + //Search.lastresults = results.slice(); // a copy + // console.info("search results:", Search.lastresults); + + // print the results + _displayNextItem(results, results.length, searchTerms, highlightTerms); + }, + + /** + * search for object names + */ + performObjectSearch: (object, objectTerms) => { + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const objects = Search._index.objects; + const objNames = Search._index.objnames; + const titles = Search._index.titles; + + const results = []; + + const objectSearchCallback = (prefix, match) => { + const name = match[4] + const fullname = (prefix ? prefix + "." : "") + name; + const fullnameLower = fullname.toLowerCase(); + if (fullnameLower.indexOf(object) < 0) return; + + let score = 0; + const parts = fullnameLower.split("."); + + // check for different match types: exact matches of full name or + // "last name" (i.e. last dotted part) + if (fullnameLower === object || parts.slice(-1)[0] === object) + score += Scorer.objNameMatch; + else if (parts.slice(-1)[0].indexOf(object) > -1) + score += Scorer.objPartialMatch; // matches in last name + + const objName = objNames[match[1]][2]; + const title = titles[match[0]]; + + // If more than one term searched for, we require other words to be + // found in the name/title/description + const otherTerms = new Set(objectTerms); + otherTerms.delete(object); + if (otherTerms.size > 0) { + const haystack = `${prefix} ${name} ${objName} ${title}`.toLowerCase(); + if ( + [...otherTerms].some((otherTerm) => haystack.indexOf(otherTerm) < 0) + ) + return; + } + + let anchor = match[3]; + if (anchor === "") anchor = fullname; + else if (anchor === "-") anchor = objNames[match[1]][1] + "-" + fullname; + + const descr = objName + _(", in ") + title; + + // add custom score for some objects according to scorer + if (Scorer.objPrio.hasOwnProperty(match[2])) + score += Scorer.objPrio[match[2]]; + else score += Scorer.objPrioDefault; + + results.push([ + docNames[match[0]], + fullname, + "#" + anchor, + descr, + score, + filenames[match[0]], + ]); + }; + Object.keys(objects).forEach((prefix) => + objects[prefix].forEach((array) => + objectSearchCallback(prefix, array) + ) + ); + return results; + }, + + /** + * search for full-text terms in the index + */ + performTermsSearch: (searchTerms, excludedTerms) => { + // prepare search + const terms = Search._index.terms; + const titleTerms = Search._index.titleterms; + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const titles = Search._index.titles; + + const scoreMap = new Map(); + const fileMap = new Map(); + + // perform the search on the required terms + searchTerms.forEach((word) => { + const files = []; + const arr = [ + { files: terms[word], score: Scorer.term }, + { files: titleTerms[word], score: Scorer.title }, + ]; + // add support for partial matches + if (word.length > 2) { + const escapedWord = _escapeRegExp(word); + if (!terms.hasOwnProperty(word)) { + Object.keys(terms).forEach((term) => { + if (term.match(escapedWord)) + arr.push({ files: terms[term], score: Scorer.partialTerm }); + }); + } + if (!titleTerms.hasOwnProperty(word)) { + Object.keys(titleTerms).forEach((term) => { + if (term.match(escapedWord)) + arr.push({ files: titleTerms[term], score: Scorer.partialTitle }); + }); + } + } + + // no match but word was a required one + if (arr.every((record) => record.files === undefined)) return; + + // found search word in contents + arr.forEach((record) => { + if (record.files === undefined) return; + + let recordFiles = record.files; + if (recordFiles.length === undefined) recordFiles = [recordFiles]; + files.push(...recordFiles); + + // set score for the word in each file + recordFiles.forEach((file) => { + if (!scoreMap.has(file)) scoreMap.set(file, {}); + scoreMap.get(file)[word] = record.score; + }); + }); + + // create the mapping + files.forEach((file) => { + if (!fileMap.has(file)) fileMap.set(file, [word]); + else if (fileMap.get(file).indexOf(word) === -1) fileMap.get(file).push(word); + }); + }); + + // now check if the files don't contain excluded terms + const results = []; + for (const [file, wordList] of fileMap) { + // check if all requirements are matched + + // as search terms with length < 3 are discarded + const filteredTermCount = [...searchTerms].filter( + (term) => term.length > 2 + ).length; + if ( + wordList.length !== searchTerms.size && + wordList.length !== filteredTermCount + ) + continue; + + // ensure that none of the excluded terms is in the search result + if ( + [...excludedTerms].some( + (term) => + terms[term] === file || + titleTerms[term] === file || + (terms[term] || []).includes(file) || + (titleTerms[term] || []).includes(file) + ) + ) + break; + + // select one (max) score for the file. + const score = Math.max(...wordList.map((w) => scoreMap.get(file)[w])); + // add result to the result list + results.push([ + docNames[file], + titles[file], + "", + null, + score, + filenames[file], + ]); + } + return results; + }, + + /** + * helper function to return a node containing the + * search summary for a given text. keywords is a list + * of stemmed words. + */ + makeSearchSummary: (htmlText, keywords, anchor) => { + const text = Search.htmlToText(htmlText, anchor); + if (text === "") return null; + + const textLower = text.toLowerCase(); + const actualStartPosition = [...keywords] + .map((k) => textLower.indexOf(k.toLowerCase())) + .filter((i) => i > -1) + .slice(-1)[0]; + const startWithContext = Math.max(actualStartPosition - 120, 0); + + const top = startWithContext === 0 ? "" : "..."; + const tail = startWithContext + 240 < text.length ? "..." : ""; + + let summary = document.createElement("p"); + summary.classList.add("context"); + summary.textContent = top + text.substr(startWithContext, 240).trim() + tail; + + return summary; + }, +}; + +_ready(Search.init); diff --git a/v3.0.0a3/_static/sphinx_highlight.js b/v3.0.0a3/_static/sphinx_highlight.js new file mode 100644 index 0000000..8a96c69 --- /dev/null +++ b/v3.0.0a3/_static/sphinx_highlight.js @@ -0,0 +1,154 @@ +/* Highlighting utilities for Sphinx HTML documentation. */ +"use strict"; + +const SPHINX_HIGHLIGHT_ENABLED = true + +/** + * highlight a given string on a node by wrapping it in + * span elements with the given class name. + */ +const _highlight = (node, addItems, text, className) => { + if (node.nodeType === Node.TEXT_NODE) { + const val = node.nodeValue; + const parent = node.parentNode; + const pos = val.toLowerCase().indexOf(text); + if ( + pos >= 0 && + !parent.classList.contains(className) && + !parent.classList.contains("nohighlight") + ) { + let span; + + const closestNode = parent.closest("body, svg, foreignObject"); + const isInSVG = closestNode && closestNode.matches("svg"); + if (isInSVG) { + span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + } else { + span = document.createElement("span"); + span.classList.add(className); + } + + span.appendChild(document.createTextNode(val.substr(pos, text.length))); + const rest = document.createTextNode(val.substr(pos + text.length)); + parent.insertBefore( + span, + parent.insertBefore( + rest, + node.nextSibling + ) + ); + node.nodeValue = val.substr(0, pos); + /* There may be more occurrences of search term in this node. So call this + * function recursively on the remaining fragment. + */ + _highlight(rest, addItems, text, className); + + if (isInSVG) { + const rect = document.createElementNS( + "http://www.w3.org/2000/svg", + "rect" + ); + const bbox = parent.getBBox(); + rect.x.baseVal.value = bbox.x; + rect.y.baseVal.value = bbox.y; + rect.width.baseVal.value = bbox.width; + rect.height.baseVal.value = bbox.height; + rect.setAttribute("class", className); + addItems.push({ parent: parent, target: rect }); + } + } + } else if (node.matches && !node.matches("button, select, textarea")) { + node.childNodes.forEach((el) => _highlight(el, addItems, text, className)); + } +}; +const _highlightText = (thisNode, text, className) => { + let addItems = []; + _highlight(thisNode, addItems, text, className); + addItems.forEach((obj) => + obj.parent.insertAdjacentElement("beforebegin", obj.target) + ); +}; + +/** + * Small JavaScript module for the documentation. + */ +const SphinxHighlight = { + + /** + * highlight the search words provided in localstorage in the text + */ + highlightSearchWords: () => { + if (!SPHINX_HIGHLIGHT_ENABLED) return; // bail if no highlight + + // get and clear terms from localstorage + const url = new URL(window.location); + const highlight = + localStorage.getItem("sphinx_highlight_terms") + || url.searchParams.get("highlight") + || ""; + localStorage.removeItem("sphinx_highlight_terms") + url.searchParams.delete("highlight"); + window.history.replaceState({}, "", url); + + // get individual terms from highlight string + const terms = highlight.toLowerCase().split(/\s+/).filter(x => x); + if (terms.length === 0) return; // nothing to do + + // There should never be more than one element matching "div.body" + const divBody = document.querySelectorAll("div.body"); + const body = divBody.length ? divBody[0] : document.querySelector("body"); + window.setTimeout(() => { + terms.forEach((term) => _highlightText(body, term, "highlighted")); + }, 10); + + const searchBox = document.getElementById("searchbox"); + if (searchBox === null) return; + searchBox.appendChild( + document + .createRange() + .createContextualFragment( + '" + ) + ); + }, + + /** + * helper function to hide the search marks again + */ + hideSearchWords: () => { + document + .querySelectorAll("#searchbox .highlight-link") + .forEach((el) => el.remove()); + document + .querySelectorAll("span.highlighted") + .forEach((el) => el.classList.remove("highlighted")); + localStorage.removeItem("sphinx_highlight_terms") + }, + + initEscapeListener: () => { + // only install a listener if it is really needed + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return; + + document.addEventListener("keydown", (event) => { + // bail for input elements + if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; + // bail with special keys + if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return; + if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) { + SphinxHighlight.hideSearchWords(); + event.preventDefault(); + } + }); + }, +}; + +_ready(() => { + /* Do not call highlightSearchWords() when we are on the search page. + * It will highlight words from the *previous* search query. + */ + if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords(); + SphinxHighlight.initEscapeListener(); +}); diff --git a/v3.0.0a3/_static/theme_overrides.css b/v3.0.0a3/_static/theme_overrides.css new file mode 100644 index 0000000..eb66180 --- /dev/null +++ b/v3.0.0a3/_static/theme_overrides.css @@ -0,0 +1,14 @@ +/* from https://rackerlabs.github.io/docs-rackspace/tools/rtd-tables.html */ +/* override table width restrictions */ +@media screen and (min-width: 767px) { + + .wy-table-responsive table td { + /* !important prevents the common CSS stylesheets from overriding + this as on RTD they are loaded after this stylesheet */ + white-space: normal !important; + } + + .wy-table-responsive { + overflow: visible !important; + } +} diff --git a/v3.0.0a3/api/compat.html b/v3.0.0a3/api/compat.html new file mode 100644 index 0000000..5c45a6b --- /dev/null +++ b/v3.0.0a3/api/compat.html @@ -0,0 +1,173 @@ + + + + + + + + scikits.odes — Odes 3.0.0a3 documentation + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

scikits.odes

+
+

scikits.odes

+

scikits.odes is a scikit offering a cython wrapper around some extra ode/dae +solvers, so they can mature outside of scipy.

+
+
It offers wrappers around the following solvers from SUNDIALS
    +
  • CVODE

  • +
  • IDA

  • +
+
+
It additionally offers wrappers around
    +
  • ddaspk <http://www.netlib.org/ode/ddaspk.f> (included)

  • +
  • lsodi <http://www.netlib.org/ode/lsodi.f> (included)

  • +
+
+
+
+
+

scikits.odes.ode

+
+
+

scikits.odes.dae

+
+
+

scikits.odes.dopri5

+
+
+

scikits.odes.ddaspkint

+
+
+

scikits.odes.lsodiint

+
+
+

scikits.odes.sundials

+
+
+

scikits.odes.sundials.cvode

+
+
+

scikits.odes.sundials.ida

+
+
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/v3.0.0a3/api/core.html b/v3.0.0a3/api/core.html new file mode 100644 index 0000000..ba95a45 --- /dev/null +++ b/v3.0.0a3/api/core.html @@ -0,0 +1,628 @@ + + + + + + + + scikits-odes-core — Odes 3.0.0a3 documentation + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

scikits-odes-core

+
+
+class scikits_odes_core.DaeBase(Rfn, **options)[source]
+

The interface which DAE solvers must implement.

+
+
Parameters:
+
    +
  • Rfn (function) – residual function

  • +
  • options (mapping) – Additional options for initialization, solver dependent

  • +
+
+
+
+
+init_step(t0, y0, yp0, y_ic0_retn=None, yp_ic0_retn=None)[source]
+

Initializes the solver and allocates memory.

+
+
Parameters:
+
    +
  • t0 (number) – initial time

  • +
  • y0 (list/array) – initial condition for y

  • +
  • yp0 (list/array) – initial condition for yp

  • +
  • y_ic0 (numpy array) – (optional) returns the calculated consistent initial condition for y

  • +
  • yp_ic0 (numpy array) – (optional) returns the calculated consistent initial condition for y +derivated.

  • +
+
+
Returns:
+

    +
  • old_api is False (namedtuple) – namedtuple with the following attributes

    + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Field

    Meaning

    flag

    An integer flag (StatusEnumXXX)

    values

    Named tuple with entries t and y and ydot. y will correspond to y_retn value and ydot to yp_retn!

    errors

    Named tuple with entries t and y and ydot

    roots

    Named tuple with entries t and y and ydot

    tstop

    Named tuple with entries t and y and ydot

    message

    String with message in case of an error

    +
  • +
  • old_api is True (tuple) – tuple with the following elements in order

    + + + + + + + + + + + + + + +

    Field

    Meaning

    flag

    status of the computation (successful or error occurred)

    t_out

    time, where the solver stopped (when no error occurred, t_out == t)

    +
  • +
+

+
+
+
+ +
+
+set_options(**options)[source]
+

Set specific options for the solver.

+

Calling set_options a second time, normally resets the solver.

+
+ +
+
+solve(tspan, y0, yp0)[source]
+

Runs the solver.

+
+
Parameters:
+
    +
  • tspan (list/array) – A list of times at which the computed value will be returned. +Must contain the start time as first entry.

  • +
  • y0 (list/array) – List of initial values

  • +
  • yp0 (list/array) – List of initial values of derivatives

  • +
+
+
Returns:
+

    +
  • old_api is False (namedtuple) – namedtuple with the following attributes

    + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Field

    Meaning

    flag

    An integer flag (StatusEnumXXX)

    values

    Named tuple with entries array t and array y and array ydot. y will correspond to y_retn value and ydot to yp_retn!

    errors

    Named tuple with entries t and y and ydot of error

    roots

    Named tuple with entries array t and array y and array ydot

    tstop

    Named tuple with entries array t and array y and array ydot

    message

    String with message in case of an error

    +
  • +
  • old_api is True (tuple) – tuple with the following elements in order

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Field

    Meaning

    flag

    indicating return status of the solver

    t

    numpy array of times at which the computations were successful

    y

    numpy array of values corresponding to times t (values of y[i, :] ~ t[i])

    yp

    numpy array of derivatives corresponding to times t (values of yp[i, :] ~ t[i])

    t_err

    float or None - if recoverable error occurred (for example reached maximum number of allowed iterations), this is the time at which it happened

    y_err

    numpy array of values corresponding to time t_err

    yp_err

    numpy array of derivatives corresponding to time t_err

    +
  • +
+

+
+
+
+ +
+
+step(t, y_retn=None, yp_retn=None)[source]
+

Method for calling successive next step of the IDA solver to allow +more precise control over the IDA solver. The ‘init_step’ method has to +be called before the ‘step’ method.

+

A step is done towards time t, and output at t returned. This time can +be higher or lower than the previous time. If option +‘one_step_compute’==True, and the solver supports it, only one internal +solver step is done in the direction of t starting at the current step.

+

If old_api=True, the old behavior is used: if t>0.0 then integration is +performed until this time and results at this time are returned in +y_retn; else if if t<0.0 only one internal step is performed towards +time abs(t) and results after this one time step are returned.

+
+
Parameters:
+
    +
  • t (number)

  • +
  • y_retn (numpy array (ndim = 1) or None.) – (Needs to be preallocated) If not None, will be filled with y at +time t. If None y_retn is not used.

  • +
  • yp_retn (numpy array (ndim = 1) or None.) – (Needs to be preallocated) If not None, will be filled with +derivatives of y at time t. If None yp_retn is not used.

  • +
+
+
Returns:
+

    +
  • old_api is False (namedtuple) – namedtuple with the following attributes

    + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Field

    Meaning

    flag

    An integer flag (StatusEnumXXX)

    values

    Named tuple with entries t and y and ydot. y will correspond to y_retn value and ydot to yp_retn!

    errors

    Named tuple with entries t and y and ydot

    roots

    Named tuple with entries t and y and ydot

    tstop

    Named tuple with entries t and y and ydot

    message

    String with message in case of an error

    +
  • +
  • old_api is True (tuple) – tuple with the following elements in order

    + + + + + + + + + + + + + + +

    Field

    Meaning

    flag

    status of the computation (successful or error occurred)

    t_out

    time, where the solver stopped (when no error occurred, t_out == t)

    +
  • +
+

+
+
+
+ +
+ +
+
+class scikits_odes_core.OdeBase(Rfn, **options)[source]
+

The interface which ODE solvers must implement.

+
+
Parameters:
+
    +
  • Rfn (function) – A function which computes the required derivatives. The signature +should be func(t, y, y_dot, *args, **kwargs). Note that *args +and **kwargs handling are solver dependent.

  • +
  • options (mapping) – Additional options for initialization, solver dependent

  • +
+
+
+
+
+init_step(t0, y0)[source]
+

Initializes the solver and allocates memory.

+
+
Parameters:
+
    +
  • t0 (number) – initial time

  • +
  • y0 (array) – initial condition for y (can be list or numpy array)

  • +
+
+
Returns:
+

    +
  • old_api is False (namedtuple) – namedtuple with the following attributes

    + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Field

    Meaning

    flag

    An integer flag (StatusEnum)

    values

    Named tuple with entries t and y

    errors

    Named tuple with entries t and y

    roots

    Named tuple with entries t and y

    tstop

    Named tuple with entries t and y

    message

    String with message in case of an error

    +
  • +
  • old_api is True (tuple) – tuple with the following elements in order

    + + + + + + + + + + + + + + +

    Field

    Meaning

    flag

    boolean status of the computation (successful or error occurred)

    t_out

    initial time

    +
  • +
+

+
+
+
+ +
+
+set_options(**options)[source]
+

Set specific options for the solver.

+

Calling set_options a second time, normally resets the solver.

+
+ +
+
+solve(tspan, y0)[source]
+

Runs the solver.

+
+
Parameters:
+
    +
  • tspan (array (or similar)) – a list of times at which the computed value will be returned. Must +contain the start time as first entry.

  • +
  • y0 (array (or similar)) – a list of initial values

  • +
+
+
Returns:
+

    +
  • old_api is False (namedtuple) – namedtuple with the following attributes

    + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Field

    Meaning

    flag

    An integer flag (StatusEnum)

    values

    Named tuple with entries t and y

    errors

    Named tuple with entries t and y

    roots

    Named tuple with entries t and y

    tstop

    Named tuple with entries t and y

    message

    String with message in case of an error

    +
  • +
  • old_api is True (tuple) – tuple with the following elements in order

    + + + + + + + + + + + + + + + + + + + + + + + +

    Field

    Meaning

    flag

    indicating return status of the solver

    t

    numpy array of times at which the computations were successful

    y

    numpy array of values corresponding to times t (values of y[i, :] ~ t[i])

    t_err

    float or None - if recoverable error occurred (for example reached maximum number of allowed iterations), this is the time at which it happened

    y_err

    numpy array of values corresponding to time t_err

    +
  • +
+

+
+
+
+ +
+
+step(t, y_retn=None)[source]
+

Method for calling successive next step of the ODE solver to allow +more precise control over the solver. The ‘init_step’ method has to +be called before the ‘step’ method.

+

A step is done towards time t, and output at t returned. This time can +be higher or lower than the previous time. If option +‘one_step_compute’==True, and the solver supports it, only one internal +solver step is done in the direction of t starting at the current step.

+

If old_api=True, the old behavior is used: if t>0.0 then integration is +performed until this time and results at this time are returned in +y_retn if t<0.0 only one internal step is performed towards time abs(t) +and results after this one time step are returned

+
+
Parameters:
+
    +
  • t (number)

  • +
  • y_retn (numpy vector (ndim = 1)) – in which the computed value will be stored (needs to be +preallocated). If None y_retn is not used.

  • +
+
+
Returns:
+

    +
  • old_api is False (namedtuple) – namedtuple with the following attributes

    + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Field

    Meaning

    flag

    An integer flag (StatusEnum)

    values

    Named tuple with entries t and y

    errors

    Named tuple with entries t and y

    roots

    Named tuple with entries t and y

    tstop

    Named tuple with entries t and y

    message

    String with message in case of an error

    +
  • +
  • old_api is True (tuple) – tuple with the following elements in order

    + + + + + + + + + + + + + + +

    Field

    Meaning

    flag

    status of the computation (successful or error occurred)

    t_out

    time, where the solver stopped (when no error occurred, t_out == t)

    +
  • +
+

+
+
+
+ +
+ +
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/v3.0.0a3/api/daepack.html b/v3.0.0a3/api/daepack.html new file mode 100644 index 0000000..d11c27d --- /dev/null +++ b/v3.0.0a3/api/daepack.html @@ -0,0 +1,123 @@ + + + + + + + + scikits-odes-daepack — Odes 3.0.0a3 documentation + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

scikits-odes-daepack

+
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/v3.0.0a3/api/index.html b/v3.0.0a3/api/index.html new file mode 100644 index 0000000..08fa7cd --- /dev/null +++ b/v3.0.0a3/api/index.html @@ -0,0 +1,157 @@ + + + + + + + + Lower Level API — Odes 3.0.0a3 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/v3.0.0a3/api/main.html b/v3.0.0a3/api/main.html new file mode 100644 index 0000000..c347d6a --- /dev/null +++ b/v3.0.0a3/api/main.html @@ -0,0 +1,1097 @@ + + + + + + + + scikits-odes — Odes 3.0.0a3 documentation + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

scikits-odes

+
+

scikits_odes

+

scikits-odes is a scikit offering a cython wrapper around some extra ode/dae +solvers, so they can mature outside of scipy.

+
+
It offers wrappers around the following solvers from SUNDIALS
    +
  • CVODE

  • +
  • IDA

  • +
+
+
It additionally offers wrappers around
    +
  • ddaspk <http://www.netlib.org/ode/ddaspk.f> (included)

  • +
  • lsodi <http://www.netlib.org/ode/lsodi.f> (included)

  • +
+
+
+
+
+

scikits_odes.ode

+
+

First-order ODE solver

+

User-friendly interface to various numerical integrators for solving a +system of first order ODEs with prescribed initial conditions:

+
+\[ \begin{align}\begin{aligned}\frac{dy(t)}{dt} = f(t, y(t)), \quad y(t_0)=y_0\\y(t_0)[i] = y_0[i], i = 0, ..., \mathrm{len}(y_0) - 1\end{aligned}\end{align} \]
+

\(f(t,y)\) is the right hand side function and returns a vector of size +\(\mathrm{len}(y_0)\).

+
+
+
+class scikits_odes.ode.ode(integrator_name, eqsrhs, **options)[source]
+

A generic interface class to differential equation solvers.

+
+
Parameters:
+
    +
  • integrator_name ('cvode', 'dopri5' or 'dop853') –

    The solver to use.

    +

    'cvode' selects the CVODE solver from the SUNDIALS package. +See py:class:scikits.odes.sundials.cvode.CVODE for solver specific +options.

    +

    'dopri5' selects the Dormand & Prince Runge-Kutta order (4)5 +solver from scipy.

    +

  • +
  • eqsrhs (right-hand-side function) –

    Right-hand-side of a first order ode. +Generally, you can assume the following signature to work:

    +
    +

    eqsrhs(x, y, return_rhs)

    +
    +

    with

    +
    +

    x: independent variable, eg the time, float

    +

    y: array of n unknowns in x

    +

    return_rhs : array that must be updated with the value of the +right-hand-side, so f(t,y). The dimension is equal to +dim(y)

    +
    +
    +
    return value: An integer, 0 for success, 1 for failure.

    It is not guaranteed that a solver takes this status into account

    +
    +
    +

    Some solvers will allow userdata to be passed to eqsrhs, or optional +formats that are more performant.

    +

  • +
  • options (additional options of the solver) – See set_options method of the integrator_name you selected for +details. +Set option old_api=False to use the new API. In the future, this +will become the default!

  • +
+
+
+
+

See also

+
+
scikits.odes.odeint.odeint

an ODE integrator with a simpler interface

+
+
scipy.integrate

Methods in scipy for ODE integration

+
+
+
+

Examples

+

ODE arise in many applications of dynamical systems, as well as in +discritisations of PDE (eg moving mesh combined with method of +lines). +As an easy example, consider the simple oscillator,

+
>>> from __future__ import print_function
+>>> from numpy import cos, sin, sqrt
+>>> k = 4.0
+>>> m = 1.0
+>>> initx = [1, 0.1]
+>>> def rhseqn(t, x, xdot):
+        # we create rhs equations for the problem
+        xdot[0] = x[1]
+        xdot[1] = - k/m * x[0]
+
+
+
>>> from scikits.odes import ode
+>>> solver = ode('cvode', rhseqn, old_api=False)
+>>> result = solver.solve([0., 1., 2.], initx)
+>>> print('   t        Solution          Exact')
+>>> print('------------------------------------')
+>>> for t, u in zip(result.values.t, result.values.y):
+        print('%4.2f %15.6g %15.6g' % (t, u[0], initx[0]*cos(sqrt(k/m)*t)+initx[1]*sin(sqrt(k/m)*t)/sqrt(k/m)))
+
+
+

More examples in the Examples directory and IPython worksheets.

+
+
+get_info()[source]
+

Return additional information about the state of the integrator.

+
+
Returns:
+

    +
  • A dictionary filled with internal data as exposed by the integrator.

  • +
  • See the get_info method of your chosen integrator for details.

  • +
+

+
+
+
+ +
+
+init_step(t0, y0)[source]
+

Initializes the solver and allocates memory. It is not needed to +call this method if solve is used to compute the solution. In the case +step is used, init_step must be called first.

+
+
Parameters:
+
    +
  • t0 (number) – initial time

  • +
  • y0 (array) – initial condition for y (can be list or numpy array)

  • +
+
+
Returns:
+

    +
  • old_api is False (namedtuple) – namedtuple with the following attributes

    + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Field

    Meaning

    flag

    An integer flag (StatusEnum)

    values

    Named tuple with entries t and y

    errors

    Named tuple with entries t and y

    roots

    Named tuple with entries t and y

    tstop

    Named tuple with entries t and y

    message

    String with message in case of an error

    +
  • +
  • old_api is True (tuple) – tuple with the following elements in order

    + + + + + + + + + + + + + + +

    Field

    Meaning

    flag

    boolean status of the computation (successful or error occured)

    t_out

    inititial time

    +
  • +
+

+
+
+
+ +
+
+set_options(**options)[source]
+

Set specific options for the solver. +See the solver documentation for details.

+

Calling set_options a second time, is only possible for options that +can change during runtime.

+
+ +
+
+set_tstop(tstop)[source]
+

Add a stop time to the integrator past which he is not allowed to +integrate.

+
+
Parameters:
+

tstop (float time) – Time point in the future where the integration must stop. You can +indicate like this that integration past this point is not allowed, +in order to avoid undefined behavior. +You can achieve the same result with a call to +set_options(tstop=tstop)

+
+
+
+ +
+
+solve(tspan, y0)[source]
+

Runs the solver.

+
+
Parameters:
+
    +
  • tspan (array (or similar)) – a list of times at which the computed value will be returned. Must +contain the start time as first entry.

  • +
  • y0 (array (or similar)) – a list of initial values

  • +
+
+
Returns:
+

    +
  • old_api is False (namedtuple) – namedtuple with the following attributes

    + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Field

    Meaning

    flag

    An integer flag (StatusEnum)

    values

    Named tuple with entries t and y

    errors

    Named tuple with entries t and y

    roots

    Named tuple with entries t and y

    tstop

    Named tuple with entries t and y

    message

    String with message in case of an error

    +
  • +
  • old_api is True (tuple) – tuple with the following elements in order

    + + + + + + + + + + + + + + + + + + + + + + + +

    Field

    Meaning

    flag

    indicating return status of the solver

    t

    numpy array of times at which the computations were successful

    y

    numpy array of values corresponding to times t (values of y[i, :] ~ t[i])

    t_err

    float or None - if recoverable error occured (for example reached maximum number of allowed iterations), this is the time at which it happened

    y_err

    numpy array of values corresponding to time t_err

    +
  • +
+

+
+
+
+ +
+
+step(t, y_retn=None)[source]
+

Method for calling successive next step of the ODE solver to allow +more precise control over the solver. The ‘init_step’ method has to +be called before the ‘step’ method.

+

A step is done towards time t, and output at t returned. This time can +be higher or lower than the previous time. If option +‘one_step_compute’==True, and the solver supports it, only one internal +solver step is done in the direction of t starting at the current step.

+

If old_api=True, the old behavior is used: if t>0.0 then integration is +performed until this time and results at this time are returned in +y_retn if t<0.0 only one internal step is perfomed towards time abs(t) +and results after this one time step are returned

+
+
Parameters:
+
    +
  • t (number)

  • +
  • y_retn (numpy vector (ndim = 1)) – in which the computed value will be stored (needs to be +preallocated). If None y_retn is not used.

  • +
+
+
Returns:
+

    +
  • old_api is False (namedtuple) – namedtuple with the following attributes

    + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Field

    Meaning

    flag

    An integer flag (StatusEnum)

    values

    Named tuple with entries t and y

    errors

    Named tuple with entries t and y

    roots

    Named tuple with entries t and y

    tstop

    Named tuple with entries t and y

    message

    String with message in case of an error

    +
  • +
  • old_api is True (tuple) – tuple with the following elements in order

    + + + + + + + + + + + + + + +

    Field

    Meaning

    flag

    status of the computation (successful or error occured)

    t_out

    time, where the solver stopped (when no error occured, t_out == t)

    +
  • +
+

+
+
+
+ +
+ +
+
+

scikits_odes.dae

+
+

First-order DAE solver

+

User-friendly interface to various numerical integrators for solving an +algebraic system of first order ODEs with prescribed initial conditions:

+
+\[ \begin{align}\begin{aligned}A \frac{dy(t)}{dt} = f(t,y(t)),\\y(t=0)[i] = y0[i],\\\frac{d y(t=0)}{dt}[i] = yprime0[i],\end{aligned}\end{align} \]
+

where \(i = 0, ..., len(y0) - 1\); \(A\) is a (possibly singular) matrix +of size \(i × i\); and \(f(t,y)\) is a vector of size \(i\) or more generally, equations of the form

+
+\[G(t,y,y') = 0\]
+
+
+
+class scikits_odes.dae.dae(integrator_name, eqsres, **options)[source]
+

A generic interface class to differential algebraic equations.

+

Define equation res = G(t,y,y’) which can eg be G = f(y,t) - A y’ when +solving A y’ = f(y,t), and where (optional) jac is the jacobian matrix of +the nonlinear system see fortran source code), so d res/dy + scaling * d +res/dy’ or d res/dy depending on the backend.

+
+
Parameters:
+
    +
  • integrator_name ('ida', 'ddaspk' or 'lsodi') – The integrator solver to use.

  • +
  • eqsres (residual function) –

    Residual of the DAE. The signature of this function depends on the +solver used, see the solver documentation for details. +Generally however, you can assume the following signature to work:

    +
    +

    eqsres(x, y, yprime, return_residual)

    +
    +

    with +x : independent variable, eg the time, float +y : array of n unknowns in x +yprime : dy/dx array of n unknowns in x, dimension = dim(y) +return_residual: array that must be updated with the value of the residuals, so G(t,y,y’). The dimension is equal to dim(y) +return value: integer, 0 for success. It is not guaranteed that a solver takes this status into account

    +

    Some solvers will allow userdata to be passed to eqsres, or optional +formats that are more performant.

    +

  • +
  • options (mapping) – Additional options for initialization, solver dependent +See set_options method of the integrator_name you selected for +details.

  • +
+
+
+
+

See also

+
+
odeint

an ODE integrator with a simpler interface based on lsoda from ODEPACK

+
+
ode

class around vode ODE integrator

+
+
+
+

Notes

+

Possible future solvers

+

ddaskr: Not included, starting hints: +http://osdir.com/ml/python.f2py.user/2005-07/msg00014.html +Modified Extended Backward Differentiation Formulae (MEBDF): Not included. +Fortran codes: http://www.ma.ic.ac.uk/~jcash/IVP_software/readme.html

+

Examples

+

DAE arise in many applications of dynamical systems, as well as in +discritisations of PDE (eg moving mesh combined with method of +lines). +As an easy example, consider the simple oscillator, which we write as +G(y,y’,t) = 0 instead of the normal ode, and solve as a DAE.

+
>>> from __future__ import print_function
+>>> from numpy import cos, sin, sqrt
+>>> k = 4.0
+>>> m = 1.0
+>>> initx = [1, 0.1]
+>>> initxp = [initx[1], -k/m*initx[0]]
+>>> def reseqn(t, x, xdot, result):
+    ... # we create residual equations for the problem
+    ... result[0] = m*xdot[1] + k*x[0]
+    ... result[1] = xdot[0] - x[1]
+>>> from scikits.odes import dae
+>>> solver = dae('ida', reseqn)
+>>> result = solver.solve([0., 1., 2.], initx, initxp)
+
+
+
+
+init_step(t0, y0, yp0, y_ic0_retn=None, yp_ic0_retn=None)[source]
+

Initializes the solver and allocates memory. It is not needed to +call this method if solve is used to compute the solution. In the case +step is used, init_step must be called first.

+
+
Parameters:
+
    +
  • t0 (number) – initial time

  • +
  • y0 (list/array) – initial condition for y

  • +
  • yp0 (list/array) – initial condition for yp

  • +
  • y_ic0 (numpy array) – (optional) returns the calculated consistent initial condition for y

  • +
  • yp_ic0 (numpy array) – (optional) returns the calculated consistent initial condition for y +derivated.

  • +
+
+
Returns:
+

    +
  • old_api is False (namedtuple) – namedtuple with the following attributes

    + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Field

    Meaning

    flag

    An integer flag (StatusEnumXXX)

    values

    Named tuple with entries t and y and ydot. y will correspond to y_retn value and ydot to yp_retn!

    errors

    Named tuple with entries t and y and ydot

    roots

    Named tuple with entries t and y and ydot

    tstop

    Named tuple with entries t and y and ydot

    message

    String with message in case of an error

    +
  • +
  • old_api is True (tuple) – tuple with the following elements in order

    + + + + + + + + + + + + + + +

    Field

    Meaning

    flag

    status of the computation (successful or error occurred)

    t_out

    time, where the solver stopped (when no error occurred, t_out == t)

    +
  • +
+

+
+
+
+ +
+
+set_options(**options)[source]
+

Set specific options for the solver. +See the solver documentation for details.

+

Calling set_options a second time, normally resets the solver.

+
+ +
+
+solve(tspan, y0, yp0)[source]
+

Runs the solver.

+
+
Parameters:
+
    +
  • tspan (list/array) – A list of times at which the computed value will be returned. Must +contain the start time as first entry.

  • +
  • y0 (list/array) – list array of initial values

  • +
  • yp0 (list/array) – list array of initial values of derivatives

  • +
+
+
Returns:
+

    +
  • old_api is False (namedtuple) – namedtuple with the following attributes

    + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Field

    Meaning

    flag

    An integer flag (StatusEnumXXX)

    values

    Named tuple with entries array t and array y and array ydot. y will correspond to y_retn value and ydot to yp_retn!

    errors

    Named tuple with entries t and y and ydot of error

    roots

    Named tuple with entries array t and array y and array ydot

    tstop

    Named tuple with entries array t and array y and array ydot

    message

    String with message in case of an error

    +
  • +
  • old_api is True (tuple) – tuple with the following elements in order

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Field

    Meaning

    flag

    indicating return status of the solver

    t

    numpy array of times at which the computations were successful

    y

    numpy array of values corresponding to times t (values of y[i, :] ~ t[i])

    yp

    numpy array of derivatives corresponding to times t (values of yp[i, :] ~ t[i])

    t_err

    float or None - if recoverable error occurred (for example reached maximum number of allowed iterations), this is the time at which it happened

    y_err

    numpy array of values corresponding to time t_err

    yp_err

    numpy array of derivatives corresponding to time t_err

    +
  • +
+

+
+
+
+ +
+
+step(t, y_retn=None, yp_retn=None)[source]
+

Method for calling successive next step of the IDA solver to allow +more precise control over the IDA solver. The ‘init_step’ method has to +be called before the ‘step’ method.

+

A step is done towards time t, and output at t returned. This time can +be higher or lower than the previous time. If option +‘one_step_compute’==True, and the solver supports it, only one internal +solver step is done in the direction of t starting at the current step.

+

If old_api=True, the old behavior is used: if t>0.0 then integration is +performed until this time and results at this time are returned in +y_retn; else if if t<0.0 only one internal step is performed towards time +abs(t) and results after this one time step are returned.

+
+
Parameters:
+
    +
  • t (number)

  • +
  • y_retn (numpy array (ndim = 1) or None.) – (Needs to be preallocated) If not None, will be filled with y at +time t. If None y_retn is not used.

  • +
  • yp_retn (numpy array (ndim = 1) or None.) – (Needs to be preallocated) If not None, will be filled with +derivatives of y at time t. If None yp_retn is not used.

  • +
+
+
Returns:
+

    +
  • old_api is False (namedtuple) – namedtuple with the following attributes

    + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Field

    Meaning

    flag

    An integer flag (StatusEnumXXX)

    values

    Named tuple with entries t and y and ydot. y will correspond to y_retn value and ydot to yp_retn!

    errors

    Named tuple with entries t and y and ydot

    roots

    Named tuple with entries t and y and ydot

    tstop

    Named tuple with entries t and y and ydot

    message

    String with message in case of an error

    +
  • +
  • old_api is True (tuple) – tuple with the following elements in order

    + + + + + + + + + + + + + + +

    Field

    Meaning

    flag

    status of the computation (successful or error occurred)

    t_out

    time, where the solver stopped (when no error occurred, t_out == t)

    +
  • +
+

+
+
+
+ +
+ +
+
+

scikits_odes.dopri5

+
+

Making scipy ode solvers available via the ode API

+
+

dopri5

+

This is an explicit runge-kutta method of order (4)5 due to Dormand & Prince +(with stepsize control and dense output). +The API of this solver is as the other scikit.odes ODE solvers

+

Authors:

+
+
    +
  1. Hairer and G. Wanner Universite de Geneve, Dept. de Mathematiques CH-1211 Geneve 24, Switzerland e-mail: ernst.hairer@math.unige.ch, gerhard.wanner@math.unige.ch

  2. +
+
+

This code is described in [HNW93].

+

This integrator accepts the following options:

+
+

atol : float or sequence absolute tolerance for solution, default 1e-12 +rtol : float or sequence relative tolerance for solution, default 1e-6 +nsteps : int Maximum number of (internally defined) steps allowed during one call to the solver. Default=500 +first_step : float +max_step : float +safety : float Safety factor on new step selection (default 0.9) +ifactor : float +dfactor : float Maximum factor to increase/decrease step size by in one step +beta : float Beta parameter for stabilised step size control. +verbosity : int Switch for printing messages (< 0 for no messages).

+
+

References +[HNW93] (1, 2) E. Hairer, S.P. Norsett and G. Wanner, Solving Ordinary Differential Equations i. Nonstiff Problems. 2nd edition. Springer Series in Computational Mathematics, Springer-Verlag (1993)

+
+
+

dop853

+

This is an explicit runge-kutta method of order 8(5,3) due to Dormand & Prince +(with stepsize control and dense output). +Options and references the same as “dopri5”.

+
+
+
+
+exception scikits_odes.dopri5.DOPSolveException(soln)[source]
+

Base class for exceptions raised by DOP.validate_flags.

+
+ +
+
+exception scikits_odes.dopri5.DOPSolveFailed(soln)[source]
+

DOP.solve failed to reach endpoint

+
+ +
+
+class scikits_odes.dopri5.SolverReturn(flag, values, errors, roots, tstop, message)
+
+
+errors
+

Alias for field number 2

+
+ +
+
+flag
+

Alias for field number 0

+
+ +
+
+message
+

Alias for field number 5

+
+ +
+
+roots
+

Alias for field number 3

+
+ +
+
+tstop
+

Alias for field number 4

+
+ +
+
+values
+

Alias for field number 1

+
+ +
+ +
+
+class scikits_odes.dopri5.SolverVariables(t, y)
+
+
+t
+

Alias for field number 0

+
+ +
+
+y
+

Alias for field number 1

+
+ +
+ +
+
+class scikits_odes.dopri5.StatusEnumDOP(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]
+
+ +
+
+class scikits_odes.dopri5.dop853(Rfn, **options)[source]
+
+ +
+
+class scikits_odes.dopri5.dopri5(Rfn, **options)[source]
+
+
+init_step(t0, y0)[source]
+

Initializes the solver and allocates memory.

+
+
Parameters:
+
    +
  • time (t0 - initial)

  • +
  • array) (y0 - initial condition for y (can be list or numpy)

  • +
+
+
Returns:
+

    +
  • if old_api – not supported

  • +
  • if old_api False

    +
    +
    A named tuple, with entries:

    flag = An integer flag (StatusEnumDop) +values = Named tuple with entries t and y and ydot. y will correspond to y_retn value and ydot to yp_retn! +errors = Named tuple with entries t_err and y_err +roots = Named tuple with entries t_roots and y_roots +tstop = Named tuple with entries t_stop and y_tstop +message= String with message in case of an error

    +
    +
    +
  • +
+

+
+
+
+ +
+
+set_options(**options)[source]
+

Set specific options for the solver.

+

Calling set_options a second time, normally resets the solver.

+
+ +
+
+solve(tspan, y0)[source]
+

Runs the solver.

+
+
Parameters:
+
    +
  • be (tspan - an list/array of times at which the computed value will) – returned. Must contain the start time as first entry..

  • +
  • values (y0 - list/numpy array of initial)

  • +
+
+
Returns:
+

    +
  • if old_api – Not supported

  • +
  • if old_api False

    +
    +
    A named tuple, with entries:

    flag = An integer flag +values = Named tuple with entries t and y +errors = Named tuple with entries t and y +roots = Named tuple with entries t and y +tstop = Named tuple with entries t and y +message= String with message in case of an error

    +
    +
    +
  • +
+

+
+
+
+ +
+
+step(t, y_retn=None)[source]
+

Method for calling successive next step of the ODE solver to allow +more precise control over the solver. The ‘init_step’ method has to +be called before the ‘step’ method.

+
+
Parameters:
+
    +
  • t (t - A step is done towards time) –

    This time can be higher or lower than the previous time. +If option ‘one_step_compute’==True, and the solver supports +it, only one internal solver step is done in the direction +of t starting at the current step.

    +
    +
    If old_api=True, the old behavior is used:

    if t>0.0 then integration is performed until this time and results at this time are returned in y_retn +if t<0.0 only one internal step is perfomed towards time abs(t) and results after this one time step are returned

    +
    +
    +

  • +
  • returned. (and output at t) –

    This time can be higher or lower than the previous time. +If option ‘one_step_compute’==True, and the solver supports +it, only one internal solver step is done in the direction +of t starting at the current step.

    +
    +
    If old_api=True, the old behavior is used:

    if t>0.0 then integration is performed until this time and results at this time are returned in y_retn +if t<0.0 only one internal step is perfomed towards time abs(t) and results after this one time step are returned

    +
    +
    +

  • +
  • computed (y_retn - numpy vector (ndim = 1) in which the) – value will be stored (needs to be preallocated). If +None y_retn is not used.

  • +
+
+
Returns:
+

    +
  • if old_api – not supported

  • +
  • if old_api False

    +
    +
    A named tuple, with entries:

    flag = An integer flag (StatusEnumDOP) +values = Named tuple with entries t and y. y will correspond to y_retn value +errors = Named tuple with entries t_err and y_err +roots = Named tuple with entries t_roots and y_roots +tstop = Named tuple with entries t_stop and y_tstop +message= String with message in case of an error

    +
    +
    +
  • +
+

+
+
+
+ +
+
+validate_flags(soln)[source]
+

Validates the flag returned by dopri.solve.

+
+
Validation happens using the following scheme:
    +
  • failures (flag < 0) raise DOPSolveFailed or a subclass of it;

  • +
  • otherwise, return an instance of SolverReturn.

  • +
+
+
+
+ +
+ +
+
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/v3.0.0a3/api/sundials.html b/v3.0.0a3/api/sundials.html new file mode 100644 index 0000000..4998286 --- /dev/null +++ b/v3.0.0a3/api/sundials.html @@ -0,0 +1,769 @@ + + + + + + + + scikits-odes-sundials — Odes 3.0.0a3 documentation + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

scikits-odes-sundials

+
+

scikits_odes_sundials

+

SUNDIALS wrapper

+
+
+exception scikits_odes_sundials.CVODESolveException(soln)[source]
+

Base class for exceptions raised by CVODE.validate_flags.

+
+ +
+
+exception scikits_odes_sundials.CVODESolveFailed(soln)[source]
+

CVODE.solve failed to reach endpoint

+
+ +
+
+exception scikits_odes_sundials.CVODESolveFoundRoot(soln)[source]
+

CVODE.solve found a root

+
+ +
+
+exception scikits_odes_sundials.CVODESolveReachedTSTOP(soln)[source]
+

CVODE.solve reached the endpoint specified by tstop.

+
+ +
+
+exception scikits_odes_sundials.IDASolveException(soln)[source]
+

Base class for exceptions raised by IDA.validate_flags.

+
+ +
+
+exception scikits_odes_sundials.IDASolveFailed(soln)[source]
+

IDA.solve failed to reach endpoint

+
+ +
+
+exception scikits_odes_sundials.IDASolveFoundRoot(soln)[source]
+

IDA.solve found a root

+
+ +
+
+exception scikits_odes_sundials.IDASolveReachedTSTOP(soln)[source]
+

IDA.solve reached the endpoint specified by tstop.

+
+ +
+
+

scikits_odes_sundials.cvode

+
+
+class scikits_odes_sundials.cvode.CV_ContinuationFunction
+

Simple wrapper for functions called when ROOT or TSTOP are returned.

+
+
+evaluate(self, DTYPE_t t, ndarray y, CVODE solver) int
+
+ +
+ +
+
+class scikits_odes_sundials.cvode.CV_JacRhsFunction
+

Prototype for jacobian function.

+

Note that evaluate must return a integer, 0 for success, positive for +recoverable failure, negative for unrecoverable failure (as per CVODE +documentation).

+
+
+evaluate(self, DTYPE_t t, ndarray y, ndarray fy, ndarray J) int
+

Returns the Jacobi matrix of the right hand side function, as:

+
+

d(rhs)/d y

+
+

(for dense the full matrix, for band only bands). Result has to be +stored in the variable J, which is preallocated to the corresponding +size.

+

This is a generic class, you should subclass is for the problem specific +purposes.

+
+ +
+ +
+
+class scikits_odes_sundials.cvode.CV_JacTimesSetupFunction
+

Prototype for jacobian times setup function.

+

Note that evaluate must return a integer, 0 for success, non-zero for error +(as per CVODE documentation), with >0 a recoverable error (step is retried).

+
+
+evaluate(self, DTYPE_t t, ndarray y, ndarray fy, userdata=None) int
+

This function calculates the product of the Jacobian with a given vector v. +Use the userdata object to expose Jacobian related data to the solve function.

+

This is a generic class, you should subclass it for the problem specific +purposes.

+
+ +
+ +
+
+class scikits_odes_sundials.cvode.CV_JacTimesVecFunction
+

Prototype for jacobian times vector function.

+

Note that evaluate must return a integer, 0 for success, non-zero for error +(as per CVODE documentation).

+
+
+evaluate(self, ndarray v, ndarray Jv, DTYPE_t t, ndarray y, userdata=None) int
+

This function calculates the product of the Jacobian with a given vector v. +Use the userdata object to expose Jacobian related data to the solve function.

+

This is a generic class, you should subclass it for the problem specific +purposes.

+
+ +
+ +
+
+class scikits_odes_sundials.cvode.CV_PrecSetupFunction
+

Prototype for preconditioning setup function.

+

Note that evaluate must return a integer, 0 for success, positive for +recoverable failure, negative for unrecoverable failure (as per CVODE +documentation).

+
+
+evaluate(self, DTYPE_t t, ndarray y, bool jok, jcurPtr, DTYPE_t gamma, userdata=None) int
+

This function preprocesses and/or evaluates Jacobian-related data +needed by the preconditioner. Use the userdata object to expose +the preprocessed data to the solve function.

+

This is a generic class, you should subclass it for the problem specific +purposes.

+
+ +
+ +
+
+class scikits_odes_sundials.cvode.CV_PrecSolveFunction
+

Prototype for precondititioning solution function.

+

Note that evaluate must return a integer, 0 for success, positive for +recoverable failure, negative for unrecoverable failure (as per CVODE +documentation).

+
+
+evaluate(self, DTYPE_t t, ndarray y, ndarray r, ndarray z, DTYPE_t gamma, DTYPE_t delta, int lr, userdata=None) int
+

This function solves the preconditioned system P*z = r, where P may be +either a left or right preconditioner matrix. Here P should approximate +(at least crudely) the Newton matrix M = I − gamma*J, where J is the +Jacobian of the system. If preconditioning is done on both sides, +the product of the two preconditioner matrices should approximate M.

+

This is a generic class, you should subclass it for the problem specific +purposes.

+
+ +
+ +
+
+class scikits_odes_sundials.cvode.CV_RhsFunction
+

Prototype for rhs function.

+

Note that evaluate must return a integer, 0 for success, positive for +recoverable failure, negative for unrecoverable failure (as per CVODE +documentation).

+
+
+evaluate(self, DTYPE_t t, ndarray y, ndarray ydot, userdata=None) int
+
+ +
+ +
+
+class scikits_odes_sundials.cvode.CV_RootFunction
+

Prototype for root function.

+

Note that evaluate must return a integer, 0 for success, non-zero if error +(as per CVODE documentation).

+
+
+evaluate(self, DTYPE_t t, ndarray y, ndarray g, userdata=None) int
+
+ +
+ +
+
+class scikits_odes_sundials.cvode.CV_WrapJacRhsFunction
+
+
+evaluate(self, DTYPE_t t, ndarray y, ndarray fy, ndarray J) int
+

Returns the Jacobi matrix (for dense the full matrix, for band only +bands. Result has to be stored in the variable J, which is preallocated +to the corresponding size.

+
+ +
+
+set_jacfn(self, jacfn)
+

Set some jacobian equations as a JacRhsFunction executable class.

+
+ +
+ +
+
+class scikits_odes_sundials.cvode.CV_WrapJacTimesSetupFunction
+
+
+evaluate(self, DTYPE_t t, ndarray y, ndarray fy, userdata=None) int
+
+ +
+
+set_jac_times_setupfn(self, jac_times_setupfn)
+

Set some CV_JacTimesSetupFn executable class.

+
+ +
+ +
+
+class scikits_odes_sundials.cvode.CV_WrapJacTimesVecFunction
+
+
+evaluate(self, ndarray v, ndarray Jv, DTYPE_t t, ndarray y, userdata=None) int
+
+ +
+
+set_jac_times_vecfn(self, jac_times_vecfn)
+

Set some CV_JacTimesVecFn executable class.

+
+ +
+ +
+
+class scikits_odes_sundials.cvode.CV_WrapPrecSetupFunction
+
+
+evaluate(self, DTYPE_t t, ndarray y, bool jok, jcurPtr, DTYPE_t gamma, userdata=None) int
+
+ +
+
+set_prec_setupfn(self, prec_setupfn)
+

set a precondititioning setup method as a CV_PrecSetupFunction +executable class

+
+ +
+ +
+
+class scikits_odes_sundials.cvode.CV_WrapPrecSolveFunction
+
+
+evaluate(self, DTYPE_t t, ndarray y, ndarray r, ndarray z, DTYPE_t gamma, DTYPE_t delta, int lr, userdata=None) int
+
+ +
+
+set_prec_solvefn(self, prec_solvefn)
+

set a precondititioning solve method as a CV_PrecSolveFunction +executable class

+
+ +
+ +
+
+class scikits_odes_sundials.cvode.CV_WrapRhsFunction
+
+
+evaluate(self, DTYPE_t t, ndarray y, ndarray ydot, userdata=None) int
+
+ +
+
+set_rhsfn(self, rhsfn)
+

set some rhs equations as a RhsFunction executable class

+
+ +
+
+with_userdata
+

‘int’

+
+
Type:
+

with_userdata

+
+
+
+ +
+ +
+
+class scikits_odes_sundials.cvode.CV_WrapRootFunction
+
+
+evaluate(self, DTYPE_t t, ndarray y, ndarray g, userdata=None) int
+
+ +
+
+set_rootfn(self, rootfn)
+

set root-ing condition(equations) as a RootFunction executable class

+
+ +
+ +
+
+class scikits_odes_sundials.cvode.StatusEnum(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
+
+ +
+
+scikits_odes_sundials.cvode.no_continue_fn(t, y, solver)
+
+ +
+
+

scikits_odes_sundials.ida

+
+
+class scikits_odes_sundials.ida.IDA_ContinuationFunction
+

Simple wrapper for functions called when ROOT or TSTOP are returned.

+
+
+evaluate(self, DTYPE_t t, ndarray y, ndarray yp, IDA solver) int
+
+ +
+ +
+
+class scikits_odes_sundials.ida.IDA_JacRhsFunction
+

Prototype for jacobian function.

+

Note that evaluate must return a integer, 0 for success, positive for +recoverable failure, negative for unrecoverable failure (as per IDA +documentation).

+
+
+evaluate(self, DTYPE_t t, ndarray y, ndarray ydot, ndarray residual, DTYPE_t cj, ndarray J, userdata=None) int
+

Returns the Jacobi matrix of the residual function, as:

+
+

d(res)/d y + cj d(res)/d ydot

+
+

(for dense the full matrix, for band only bands). Result has to be +stored in the variable J, which is preallocated to the corresponding +size.

+

This is a generic class, you should subclass is for the problem specific +purposes.”

+
+ +
+ +
+
+class scikits_odes_sundials.ida.IDA_JacTimesSetupFunction
+

Prototype for jacobian times setup function.

+

Note that evaluate must return a integer, 0 for success, non-zero for error +(as per CVODE documentation), with >0 a recoverable error (step is retried).

+
+
+evaluate(self, DTYPE_t tt, ndarray yy, ndarray yp, ndarray rr, DTYPE_t cj, userdata=None) int
+

This function calculates the product of the Jacobian with a given vector v. +Use the userdata object to expose Jacobian related data to the solve function.

+

This is a generic class, you should subclass it for the problem specific +purposes.

+
+ +
+ +
+
+class scikits_odes_sundials.ida.IDA_JacTimesVecFunction
+

Prototype for jacobian times vector function.

+

Note that evaluate must return a integer, 0 for success, non-zero for error +(as per IDA documentation).

+
+
+evaluate(self, DTYPE_t t, ndarray yy, ndarray yp, ndarray rr, ndarray v, ndarray Jv, DTYPE_t cj, userdata=None) int
+

This function calculates the product of the Jacobian with a given vector v. +Use the userdata object to expose Jacobian related data to the solve function.

+

This is a generic class, you should subclass it for the problem specific +purposes.

+
+ +
+ +
+
+class scikits_odes_sundials.ida.IDA_PrecSetupFunction
+

Prototype for preconditioning setup function.

+

Note that evaluate must return a integer, 0 for success, positive for +recoverable failure, negative for unrecoverable failure (as per CVODE +documentation).

+
+
+evaluate(self, DTYPE_t t, ndarray y, ndarray yp, ndarray rr, DTYPE_t cj, userdata=None) int
+

This function preprocesses and/or evaluates Jacobian-related data +needed by the preconditioner. Use the userdata object to expose +the preprocessed data to the solve function.

+

This is a generic class, you should subclass it for the problem specific +purposes.

+
+ +
+ +
+
+class scikits_odes_sundials.ida.IDA_PrecSolveFunction
+

Prototype for precondititioning solution function.

+

Note that evaluate must return a integer, 0 for success, positive for +recoverable failure, negative for unrecoverable failure (as per CVODE +documentation).

+
+
+evaluate(self, DTYPE_t t, ndarray y, ndarray yp, ndarray r, ndarray rvec, ndarray z, DTYPE_t cj, DTYPE_t delta, userdata=None) int
+

This function solves the preconditioned system P*z = r, where P may be +either a left or right preconditioner matrix. Here P should approximate +(at least crudely) the Newton matrix M = I − gamma*J, where J is the +Jacobian of the system. If preconditioning is done on both sides, +the product of the two preconditioner matrices should approximate M.

+

This is a generic class, you should subclass it for the problem specific +purposes.

+
+ +
+ +
+
+class scikits_odes_sundials.ida.IDA_RhsFunction
+

Prototype for rhs function.

+

Note that evaluate must return a integer, 0 for success, positive for +recoverable failure, negative for unrecoverable failure (as per IDA +documentation).

+
+
+evaluate(self, DTYPE_t t, ndarray y, ndarray ydot, ndarray result, userdata=None) int
+
+ +
+ +
+
+class scikits_odes_sundials.ida.IDA_RootFunction
+

Prototype for root function.

+

Note that evaluate must return a integer, 0 for success, non-zero for error +(as per IDA documentation).

+
+
+evaluate(self, DTYPE_t t, ndarray y, ndarray ydot, ndarray g, userdata=None) int
+
+ +
+ +
+
+class scikits_odes_sundials.ida.IDA_WrapJacRhsFunction
+
+
+evaluate(self, DTYPE_t t, ndarray y, ndarray ydot, ndarray residual, DTYPE_t cj, ndarray J, userdata=None) int
+

Returns the Jacobi matrix (for dense the full matrix, for band only +bands. Result has to be stored in the variable J, which is preallocated +to the corresponding size.

+
+ +
+
+set_jacfn(self, jacfn)
+

Set some jacobian equations as a JacResFunction executable class.

+
+ +
+ +
+
+class scikits_odes_sundials.ida.IDA_WrapJacTimesSetupFunction
+
+
+evaluate(self, DTYPE_t tt, ndarray yy, ndarray yp, ndarray rr, DTYPE_t cj, userdata=None) int
+
+ +
+
+set_jac_times_setupfn(self, jac_times_setupfn)
+

Set some IDA_JacTimesSetupFn executable class.

+
+ +
+ +
+
+class scikits_odes_sundials.ida.IDA_WrapJacTimesVecFunction
+
+
+evaluate(self, DTYPE_t t, ndarray yy, ndarray yp, ndarray rr, ndarray v, ndarray Jv, DTYPE_t cj, userdata=None) int
+
+ +
+
+set_jac_times_vecfn(self, jac_times_vecfn)
+

Set some IDA_JacTimesVecFn executable class.

+
+ +
+ +
+
+class scikits_odes_sundials.ida.IDA_WrapPrecSetupFunction
+
+
+evaluate(self, DTYPE_t t, ndarray y, ndarray yp, ndarray rr, DTYPE_t cj, userdata=None) int
+
+ +
+
+set_prec_setupfn(self, prec_setupfn)
+

set a precondititioning setup method as a IDA_PrecSetupFunction +executable class

+
+ +
+ +
+
+class scikits_odes_sundials.ida.IDA_WrapPrecSolveFunction
+
+
+evaluate(self, DTYPE_t t, ndarray y, ndarray yp, ndarray r, ndarray rvec, ndarray z, DTYPE_t cj, DTYPE_t delta, userdata=None) int
+
+ +
+
+set_prec_solvefn(self, prec_solvefn)
+

set a precondititioning solve method as a IDA_PrecSolveFunction +executable class

+
+ +
+ +
+
+class scikits_odes_sundials.ida.IDA_WrapRhsFunction
+
+
+evaluate(self, DTYPE_t t, ndarray y, ndarray ydot, ndarray result, userdata=None) int
+
+ +
+
+set_resfn(self, resfn)
+

set some residual equations as a ResFunction executable class

+
+ +
+ +
+
+class scikits_odes_sundials.ida.IDA_WrapRootFunction
+
+
+evaluate(self, DTYPE_t t, ndarray y, ndarray ydot, ndarray g, userdata=None) int
+
+ +
+
+set_rootfn(self, rootfn)
+

set root-ing condition(equations) as a RootFunction executable class

+
+ +
+ +
+
+class scikits_odes_sundials.ida.StatusEnumIDA(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
+
+ +
+
+scikits_odes_sundials.ida.no_continue_fn(t, y, yp, solver)
+
+ +
+
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/v3.0.0a3/dae.html b/v3.0.0a3/dae.html new file mode 100644 index 0000000..40fef16 --- /dev/null +++ b/v3.0.0a3/dae.html @@ -0,0 +1,433 @@ + + + + + + + + DAE Solvers — Odes 3.0.0a3 documentation + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

DAE Solvers

+
+
+class scikits.odes.dae.dae(integrator_name, eqsres, **options)[source]
+

A generic interface class to differential algebraic equations.

+

Define equation res = G(t,y,y’) which can eg be G = f(y,t) - A y’ when +solving A y’ = f(y,t), and where (optional) jac is the jacobian matrix of +the nonlinear system see fortran source code), so d res/dy + scaling * d +res/dy’ or d res/dy depending on the backend.

+
+
Parameters:
+
    +
  • integrator_name ('ida', 'ddaspk' or 'lsodi') – The integrator solver to use.

  • +
  • eqsres (residual function) –

    Residual of the DAE. The signature of this function depends on the +solver used, see the solver documentation for details. +Generally however, you can assume the following signature to work:

    +
    +

    eqsres(x, y, yprime, return_residual)

    +
    +

    with +x : independent variable, eg the time, float +y : array of n unknowns in x +yprime : dy/dx array of n unknowns in x, dimension = dim(y) +return_residual: array that must be updated with the value of the residuals, so G(t,y,y’). The dimension is equal to dim(y) +return value: integer, 0 for success. It is not guaranteed that a solver takes this status into account

    +

    Some solvers will allow userdata to be passed to eqsres, or optional +formats that are more performant.

    +

  • +
  • options (mapping) – Additional options for initialization, solver dependent +See set_options method of the integrator_name you selected for +details.

  • +
+
+
+
+

See also

+
+
odeint

an ODE integrator with a simpler interface based on lsoda from ODEPACK

+
+
ode

class around vode ODE integrator

+
+
+
+

Notes

+

Possible future solvers

+

ddaskr: Not included, starting hints: +http://osdir.com/ml/python.f2py.user/2005-07/msg00014.html +Modified Extended Backward Differentiation Formulae (MEBDF): Not included. +Fortran codes: http://www.ma.ic.ac.uk/~jcash/IVP_software/readme.html

+

Examples

+

DAE arise in many applications of dynamical systems, as well as in +discritisations of PDE (eg moving mesh combined with method of +lines). +As an easy example, consider the simple oscillator, which we write as +G(y,y’,t) = 0 instead of the normal ode, and solve as a DAE.

+
>>> from __future__ import print_function
+>>> from numpy import cos, sin, sqrt
+>>> k = 4.0
+>>> m = 1.0
+>>> initx = [1, 0.1]
+>>> initxp = [initx[1], -k/m*initx[0]]
+>>> def reseqn(t, x, xdot, result):
+    ... # we create residual equations for the problem
+    ... result[0] = m*xdot[1] + k*x[0]
+    ... result[1] = xdot[0] - x[1]
+>>> from scikits.odes import dae
+>>> solver = dae('ida', reseqn)
+>>> result = solver.solve([0., 1., 2.], initx, initxp)
+
+
+
+
+init_step(t0, y0, yp0, y_ic0_retn=None, yp_ic0_retn=None)[source]
+

Initializes the solver and allocates memory. It is not needed to +call this method if solve is used to compute the solution. In the case +step is used, init_step must be called first.

+
+
Parameters:
+
    +
  • t0 (number) – initial time

  • +
  • y0 (list/array) – initial condition for y

  • +
  • yp0 (list/array) – initial condition for yp

  • +
  • y_ic0 (numpy array) – (optional) returns the calculated consistent initial condition for y

  • +
  • yp_ic0 (numpy array) – (optional) returns the calculated consistent initial condition for y +derivated.

  • +
+
+
Returns:
+

    +
  • old_api is False (namedtuple) – namedtuple with the following attributes

    + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Field

    Meaning

    flag

    An integer flag (StatusEnumXXX)

    values

    Named tuple with entries t and y and ydot. y will correspond to y_retn value and ydot to yp_retn!

    errors

    Named tuple with entries t and y and ydot

    roots

    Named tuple with entries t and y and ydot

    tstop

    Named tuple with entries t and y and ydot

    message

    String with message in case of an error

    +
  • +
  • old_api is True (tuple) – tuple with the following elements in order

    + + + + + + + + + + + + + + +

    Field

    Meaning

    flag

    status of the computation (successful or error occurred)

    t_out

    time, where the solver stopped (when no error occurred, t_out == t)

    +
  • +
+

+
+
+
+ +
+
+set_options(**options)[source]
+

Set specific options for the solver. +See the solver documentation for details.

+

Calling set_options a second time, normally resets the solver.

+
+ +
+
+solve(tspan, y0, yp0)[source]
+

Runs the solver.

+
+
Parameters:
+
    +
  • tspan (list/array) – A list of times at which the computed value will be returned. Must +contain the start time as first entry.

  • +
  • y0 (list/array) – list array of initial values

  • +
  • yp0 (list/array) – list array of initial values of derivatives

  • +
+
+
Returns:
+

    +
  • old_api is False (namedtuple) – namedtuple with the following attributes

    + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Field

    Meaning

    flag

    An integer flag (StatusEnumXXX)

    values

    Named tuple with entries array t and array y and array ydot. y will correspond to y_retn value and ydot to yp_retn!

    errors

    Named tuple with entries t and y and ydot of error

    roots

    Named tuple with entries array t and array y and array ydot

    tstop

    Named tuple with entries array t and array y and array ydot

    message

    String with message in case of an error

    +
  • +
  • old_api is True (tuple) – tuple with the following elements in order

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Field

    Meaning

    flag

    indicating return status of the solver

    t

    numpy array of times at which the computations were successful

    y

    numpy array of values corresponding to times t (values of y[i, :] ~ t[i])

    yp

    numpy array of derivatives corresponding to times t (values of yp[i, :] ~ t[i])

    t_err

    float or None - if recoverable error occurred (for example reached maximum number of allowed iterations), this is the time at which it happened

    y_err

    numpy array of values corresponding to time t_err

    yp_err

    numpy array of derivatives corresponding to time t_err

    +
  • +
+

+
+
+
+ +
+
+step(t, y_retn=None, yp_retn=None)[source]
+

Method for calling successive next step of the IDA solver to allow +more precise control over the IDA solver. The ‘init_step’ method has to +be called before the ‘step’ method.

+

A step is done towards time t, and output at t returned. This time can +be higher or lower than the previous time. If option +‘one_step_compute’==True, and the solver supports it, only one internal +solver step is done in the direction of t starting at the current step.

+

If old_api=True, the old behavior is used: if t>0.0 then integration is +performed until this time and results at this time are returned in +y_retn; else if if t<0.0 only one internal step is performed towards time +abs(t) and results after this one time step are returned.

+
+
Parameters:
+
    +
  • t (number)

  • +
  • y_retn (numpy array (ndim = 1) or None.) – (Needs to be preallocated) If not None, will be filled with y at +time t. If None y_retn is not used.

  • +
  • yp_retn (numpy array (ndim = 1) or None.) – (Needs to be preallocated) If not None, will be filled with +derivatives of y at time t. If None yp_retn is not used.

  • +
+
+
Returns:
+

    +
  • old_api is False (namedtuple) – namedtuple with the following attributes

    + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Field

    Meaning

    flag

    An integer flag (StatusEnumXXX)

    values

    Named tuple with entries t and y and ydot. y will correspond to y_retn value and ydot to yp_retn!

    errors

    Named tuple with entries t and y and ydot

    roots

    Named tuple with entries t and y and ydot

    tstop

    Named tuple with entries t and y and ydot

    message

    String with message in case of an error

    +
  • +
  • old_api is True (tuple) – tuple with the following elements in order

    + + + + + + + + + + + + + + +

    Field

    Meaning

    flag

    status of the computation (successful or error occurred)

    t_out

    time, where the solver stopped (when no error occurred, t_out == t)

    +
  • +
+

+
+
+
+ +
+ +
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/v3.0.0a3/genindex.html b/v3.0.0a3/genindex.html new file mode 100644 index 0000000..8c2c517 --- /dev/null +++ b/v3.0.0a3/genindex.html @@ -0,0 +1,702 @@ + + + + + + + Index — Odes 3.0.0a3 documentation + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ + +

Index

+ +
+ C + | D + | E + | F + | G + | I + | M + | N + | O + | R + | S + | T + | V + | W + | Y + +
+

C

+ + + +
+ +

D

+ + + +
+ +

E

+ + +
+ +

F

+ + +
+ +

G

+ + +
+ +

I

+ + + +
+ +

M

+ + +
+ +

N

+ + +
+ +

O

+ + + +
+ +

R

+ + +
+ +

S

+ + + +
+ +

T

+ + + +
+ +

V

+ + + +
+ +

W

+ + +
+ +

Y

+ + +
+ + + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/v3.0.0a3/index.html b/v3.0.0a3/index.html new file mode 100644 index 0000000..3c318df --- /dev/null +++ b/v3.0.0a3/index.html @@ -0,0 +1,268 @@ + + + + + + + + Welcome to the ODES scikit API Documentation — Odes 3.0.0a3 documentation + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

Welcome to the ODES scikit API Documentation

+

The ODES scikit provides access to Ordinary Differential Equation (ODE) solvers and Differential Algebraic Equation (DAE) solvers.

+

This is the generated API documentation for version 3.0.0a3, see https://scikits-odes.readthedocs.io/en/latest/ for the main documentation and user guide.

+

For other versions of the API documentation, see https://bmcage.github.io/odes.

+

Contents:

+
+ +
+
+
+

Indices and tables

+ +
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/v3.0.0a3/objects.inv b/v3.0.0a3/objects.inv new file mode 100644 index 0000000..1d2329c Binary files /dev/null and b/v3.0.0a3/objects.inv differ diff --git a/v3.0.0a3/ode.html b/v3.0.0a3/ode.html new file mode 100644 index 0000000..0734530 --- /dev/null +++ b/v3.0.0a3/ode.html @@ -0,0 +1,682 @@ + + + + + + + + ODE Solvers — Odes 3.0.0a3 documentation + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

ODE Solvers

+

scikits.odes contains two main routines for solving ODEs: the simpler +scikits.odes.odeint.odeint(), and the more configurable +scikits.odes.ode.ode. Both these routines allow selection of the +solver and solution method used. Additionally, it is also possible to directly +use the low level interface to individual solvers.

+
+
+scikits.odes.odeint.odeint(rhsfun, tout, y0, method='bdf', **options)[source]
+

Integrate a system of ordinary differential equations. +odeint is a wrapper around the ode class, as a convenience function to +quickly integrate a system of ode. +Solves the initial value problem for stiff or non-stiff systems +of first order ode’s:

+
+

rhs = dy/dt = fun(t, y)

+
+

where y can be a vector, then rhsfun must be a function computing rhs with +signature:

+
+

rhsfun(t, y, rhs)

+
+

storing the computed dy/dt in the rhs array passed to the function

+
+
Parameters:
+
    +
  • rhsfun (callable(t, y, out)) – Computes the derivative at dy/dt in terms of t and y, and stores in out

  • +
  • y0 (array) – Initial condition on y (can be a vector).

  • +
  • t (array) – A sequence of time points for which to solve for y. The initial +value point should be the first element of this sequence.

  • +
  • method (string, solution method to use.) –

    Available are all the ode class solvers as well as some convenience +shorthands:

    + + + + + + + + + + + + + + + + + + + + +

    Method

    Meaning

    bdf

    This uses the ‘cvode’ solver in default from, which is a +variable step, variable coefficient Backward Differentiation +Formula solver, good for stiff ODE. Newton iterations are +used to solve the nonlinear system.

    admo

    This uses the ‘cvode’ solver with option lmm_type=’ADAMS’, +which is a variable step Adams-Moulton method (linear +multistep method), good for non-stiff ODE. Functional +iterations are used to solve the nonlinear system.

    rk5

    This uses the ‘dopri5’ solver, which is a variable step +Runge-Kutta method of order (4)5 (use for non-stiff ODE)

    rk8

    This uses the ‘dop853’ solver, which is a variable step +Runge-Kutta method of order 8(5,3)

    +

    For educational purposes, you can also access following methods:

    + + + + + + + + + + + + + + +

    Method

    Meaning

    beuler

    This is the Implicit Euler (backward Euler) method (order 1), +which is obtained via the ‘bdf’ method, setting the order +option to 1, setting large tolerances, and fixing the +stepsize. +Use option ‘step’ to change stepsize, default: step=0.05. +Use option ‘rtol’ and ‘atol’ to use more strict tolerances +Note: this is not completely the backward Euler method, as +the cvode solver has added control options!

    trapz

    This is the Trapezoidal Rule method (order 2), which is +obtained via the ‘admo’ method, setting option order to 2, +setting large tolerances and fixing the stepsize. +Use option ‘step’ to change stepsize, default: step=0.05. +Use option ‘rtol’ and ‘atol’ to use more strict tolerances +Note: The cvode solver might change the order to 1 internally +in which case this becomes beuler method. Set atol, rtol +options as strict as possible.

    +

    You can also access the solvers of ode via their names:

    + + + + + + + + + + + + + + + + + +

    Method

    Meaning

    cvode

    This uses the ‘cvode’ solver

    dopri5

    This uses the ‘dopri5’ solver

    dop853

    This uses the ‘dop853’ solver

    +

  • +
  • options (extra solver options, optional) – Every solver has it’s own extra options, see the ode class and the +details of the solvers available there to know the options possible per +solver

  • +
+
+
Returns:
+

solution – A single named tuple is returned containing the result of the +integration.

+ + + + + + + + + + + + + + + + + + + + + + + + + + +

Field

Meaning

flag

An integer flag

values

Named tuple with fields t and y

errors

Named tuple with fields t and y

roots

Named tuple with fields t and y

tstop

Named tuple with fields t and y

message

String with message in case of an error

+

+
+
Return type:
+

named tuple

+
+
+
+

See also

+
+
scikits.odes.ode.ode

a more object-oriented integrator

+
+
scikits.odes.dae.dae

a solver for differential-algebraic equations

+
+
scipy.integrate.quad

for finding the area under a curve

+
+
+
+

Examples

+

The second order differential equation for the angle theta of a +pendulum acted on by gravity with friction can be written:

+
+\[\theta''(t) + b \theta'(t) + c \sin(\theta(t)) = 0\]
+

where b and c are positive constants, and a prime (’) denotes a +derivative. To solve this equation with odeint, we must first convert +it to a system of first order equations. By defining the angular +velocity omega(t) = theta'(t), we obtain the system:

+
+\[\theta'(t) = \omega(t) +\omega'(t) = -b \omega(t) - c \sin(\theta(t))\]
+

We assume the constants are b = 0.25 and c = 5.0:

+
>>> b = 0.25
+>>> c = 5.0
+
+
+

Let y be the vector [theta, omega]. We implement this system +in python as:

+
>>> def pend(t, y, out):
+ ...     theta, omega = y
+ ...     out[:] = [omega, -b*omega - c*np.sin(theta)]
+ ...
+
+
+

In case you want b and c easily changable, make pend a class method, and +consider attributes b and c accessible via self.b and self.c. +For initial conditions, we assume the pendulum is nearly vertical +with theta(0) = pi - 0.1, and it initially at rest, so +omega(0) = 0. Then the vector of initial conditions is

+
>>> y0 = [np.pi - 0.1, 0.0]
+
+
+

We generate a solution 101 evenly spaced samples in the interval +0 <= t <= 10. So our array of times is

+
>>> t = np.linspace(0, 10, 101)
+
+
+

Call odeint to generate the solution.

+
>>> from scikits.odes.odeint import odeint
+>>> sol = odeint(pend, t, y0)
+
+
+

The solution is a named tuple sol. sol.values.y is an array with shape (101, 2). +The first column is theta(t), and the second is omega(t). +The following code plots both components.

+
>>> import matplotlib.pyplot as plt
+>>> plt.plot(sol.values.t, sol.values.y[:, 0], 'b', label='theta(t)')
+>>> plt.plot(sol.values.t, sol.values.y[:, 1], 'g', label='omega(t)')
+>>> plt.legend(loc='best')
+>>> plt.xlabel('t')
+>>> plt.grid()
+>>> plt.show()
+
+
+
+ +
+
+class scikits.odes.ode.ode(integrator_name, eqsrhs, **options)[source]
+

A generic interface class to differential equation solvers.

+
+
Parameters:
+
    +
  • integrator_name ('cvode', 'dopri5' or 'dop853') –

    The solver to use.

    +

    'cvode' selects the CVODE solver from the SUNDIALS package. +See py:class:scikits.odes.sundials.cvode.CVODE for solver specific +options.

    +

    'dopri5' selects the Dormand & Prince Runge-Kutta order (4)5 +solver from scipy.

    +

  • +
  • eqsrhs (right-hand-side function) –

    Right-hand-side of a first order ode. +Generally, you can assume the following signature to work:

    +
    +

    eqsrhs(x, y, return_rhs)

    +
    +

    with

    +
    +

    x: independent variable, eg the time, float

    +

    y: array of n unknowns in x

    +

    return_rhs : array that must be updated with the value of the +right-hand-side, so f(t,y). The dimension is equal to +dim(y)

    +
    +
    +
    return value: An integer, 0 for success, 1 for failure.

    It is not guaranteed that a solver takes this status into account

    +
    +
    +

    Some solvers will allow userdata to be passed to eqsrhs, or optional +formats that are more performant.

    +

  • +
  • options (additional options of the solver) – See set_options method of the integrator_name you selected for +details. +Set option old_api=False to use the new API. In the future, this +will become the default!

  • +
+
+
+
+

See also

+
+
scikits.odes.odeint.odeint

an ODE integrator with a simpler interface

+
+
scipy.integrate

Methods in scipy for ODE integration

+
+
+
+

Examples

+

ODE arise in many applications of dynamical systems, as well as in +discritisations of PDE (eg moving mesh combined with method of +lines). +As an easy example, consider the simple oscillator,

+
>>> from __future__ import print_function
+>>> from numpy import cos, sin, sqrt
+>>> k = 4.0
+>>> m = 1.0
+>>> initx = [1, 0.1]
+>>> def rhseqn(t, x, xdot):
+        # we create rhs equations for the problem
+        xdot[0] = x[1]
+        xdot[1] = - k/m * x[0]
+
+
+
>>> from scikits.odes import ode
+>>> solver = ode('cvode', rhseqn, old_api=False)
+>>> result = solver.solve([0., 1., 2.], initx)
+>>> print('   t        Solution          Exact')
+>>> print('------------------------------------')
+>>> for t, u in zip(result.values.t, result.values.y):
+        print('%4.2f %15.6g %15.6g' % (t, u[0], initx[0]*cos(sqrt(k/m)*t)+initx[1]*sin(sqrt(k/m)*t)/sqrt(k/m)))
+
+
+

More examples in the Examples directory and IPython worksheets.

+
+
+get_info()[source]
+

Return additional information about the state of the integrator.

+
+
Returns:
+

    +
  • A dictionary filled with internal data as exposed by the integrator.

  • +
  • See the get_info method of your chosen integrator for details.

  • +
+

+
+
+
+ +
+
+init_step(t0, y0)[source]
+

Initializes the solver and allocates memory. It is not needed to +call this method if solve is used to compute the solution. In the case +step is used, init_step must be called first.

+
+
Parameters:
+
    +
  • t0 (number) – initial time

  • +
  • y0 (array) – initial condition for y (can be list or numpy array)

  • +
+
+
Returns:
+

    +
  • old_api is False (namedtuple) – namedtuple with the following attributes

    + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Field

    Meaning

    flag

    An integer flag (StatusEnum)

    values

    Named tuple with entries t and y

    errors

    Named tuple with entries t and y

    roots

    Named tuple with entries t and y

    tstop

    Named tuple with entries t and y

    message

    String with message in case of an error

    +
  • +
  • old_api is True (tuple) – tuple with the following elements in order

    + + + + + + + + + + + + + + +

    Field

    Meaning

    flag

    boolean status of the computation (successful or error occured)

    t_out

    inititial time

    +
  • +
+

+
+
+
+ +
+
+set_options(**options)[source]
+

Set specific options for the solver. +See the solver documentation for details.

+

Calling set_options a second time, is only possible for options that +can change during runtime.

+
+ +
+
+set_tstop(tstop)[source]
+

Add a stop time to the integrator past which he is not allowed to +integrate.

+
+
Parameters:
+

tstop (float time) – Time point in the future where the integration must stop. You can +indicate like this that integration past this point is not allowed, +in order to avoid undefined behavior. +You can achieve the same result with a call to +set_options(tstop=tstop)

+
+
+
+ +
+
+solve(tspan, y0)[source]
+

Runs the solver.

+
+
Parameters:
+
    +
  • tspan (array (or similar)) – a list of times at which the computed value will be returned. Must +contain the start time as first entry.

  • +
  • y0 (array (or similar)) – a list of initial values

  • +
+
+
Returns:
+

    +
  • old_api is False (namedtuple) – namedtuple with the following attributes

    + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Field

    Meaning

    flag

    An integer flag (StatusEnum)

    values

    Named tuple with entries t and y

    errors

    Named tuple with entries t and y

    roots

    Named tuple with entries t and y

    tstop

    Named tuple with entries t and y

    message

    String with message in case of an error

    +
  • +
  • old_api is True (tuple) – tuple with the following elements in order

    + + + + + + + + + + + + + + + + + + + + + + + +

    Field

    Meaning

    flag

    indicating return status of the solver

    t

    numpy array of times at which the computations were successful

    y

    numpy array of values corresponding to times t (values of y[i, :] ~ t[i])

    t_err

    float or None - if recoverable error occured (for example reached maximum number of allowed iterations), this is the time at which it happened

    y_err

    numpy array of values corresponding to time t_err

    +
  • +
+

+
+
+
+ +
+
+step(t, y_retn=None)[source]
+

Method for calling successive next step of the ODE solver to allow +more precise control over the solver. The ‘init_step’ method has to +be called before the ‘step’ method.

+

A step is done towards time t, and output at t returned. This time can +be higher or lower than the previous time. If option +‘one_step_compute’==True, and the solver supports it, only one internal +solver step is done in the direction of t starting at the current step.

+

If old_api=True, the old behavior is used: if t>0.0 then integration is +performed until this time and results at this time are returned in +y_retn if t<0.0 only one internal step is perfomed towards time abs(t) +and results after this one time step are returned

+
+
Parameters:
+
    +
  • t (number)

  • +
  • y_retn (numpy vector (ndim = 1)) – in which the computed value will be stored (needs to be +preallocated). If None y_retn is not used.

  • +
+
+
Returns:
+

    +
  • old_api is False (namedtuple) – namedtuple with the following attributes

    + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Field

    Meaning

    flag

    An integer flag (StatusEnum)

    values

    Named tuple with entries t and y

    errors

    Named tuple with entries t and y

    roots

    Named tuple with entries t and y

    tstop

    Named tuple with entries t and y

    message

    String with message in case of an error

    +
  • +
  • old_api is True (tuple) – tuple with the following elements in order

    + + + + + + + + + + + + + + +

    Field

    Meaning

    flag

    status of the computation (successful or error occured)

    t_out

    time, where the solver stopped (when no error occured, t_out == t)

    +
  • +
+

+
+
+
+ +
+ +
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/v3.0.0a3/py-modindex.html b/v3.0.0a3/py-modindex.html new file mode 100644 index 0000000..c40cb65 --- /dev/null +++ b/v3.0.0a3/py-modindex.html @@ -0,0 +1,211 @@ + + + + + + + Python Module Index — Odes 3.0.0a3 documentation + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ + +

Python Module Index

+ +
+ s +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 
+ s
+ scikits +
    + scikits.odes +
    + scikits.odes.dae +
    + scikits.odes.ddaspkint +
    + scikits.odes.dopri5 +
    + scikits.odes.lsodiint +
    + scikits.odes.ode +
    + scikits.odes.sundials +
    + scikits.odes.sundials.cvode +
    + scikits.odes.sundials.ida +
+ scikits_odes +
    + scikits_odes.dae +
    + scikits_odes.dopri5 +
    + scikits_odes.ode +
+ scikits_odes_core +
+ scikits_odes_sundials +
    + scikits_odes_sundials.cvode +
    + scikits_odes_sundials.ida +
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/v3.0.0a3/search.html b/v3.0.0a3/search.html new file mode 100644 index 0000000..a235242 --- /dev/null +++ b/v3.0.0a3/search.html @@ -0,0 +1,126 @@ + + + + + + + Search — Odes 3.0.0a3 documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +

Search

+ + + + +

+ Searching for multiple words only shows matches that contain + all words. +

+ + +
+ + + +
+ + +
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/v3.0.0a3/searchindex.js b/v3.0.0a3/searchindex.js new file mode 100644 index 0000000..52569cf --- /dev/null +++ b/v3.0.0a3/searchindex.js @@ -0,0 +1 @@ +Search.setIndex({"alltitles": {"DAE Solvers": [[6, "dae-solvers"]], "First-order DAE solver": [[4, "first-order-dae-solver"]], "First-order ODE solver": [[4, "first-order-ode-solver"]], "Indices and tables": [[7, "indices-and-tables"]], "Lower Level API": [[3, "lower-level-api"]], "Making scipy ode solvers available via the ode API": [[4, "making-scipy-ode-solvers-available-via-the-ode-api"]], "ODE Solvers": [[8, "ode-solvers"]], "Selecting Precision": [[9, "selecting-precision"]], "Sundials Solver Options": [[9, "sundials-solver-options"]], "Welcome to the ODES scikit API Documentation": [[7, "welcome-to-the-odes-scikit-api-documentation"]], "dop853": [[4, "dop853"]], "dopri5": [[4, "dopri5"]], "scikits-odes": [[4, "scikits-odes"]], "scikits-odes-core": [[1, "module-scikits_odes_core"]], "scikits-odes-daepack": [[2, "scikits-odes-daepack"]], "scikits-odes-sundials": [[5, "scikits-odes-sundials"]], "scikits.odes": [[0, "scikits-odes"], [0, "id1"]], "scikits.odes.dae": [[0, "module-scikits.odes.dae"]], "scikits.odes.ddaspkint": [[0, "module-scikits.odes.ddaspkint"]], "scikits.odes.dopri5": [[0, "module-scikits.odes.dopri5"]], "scikits.odes.lsodiint": [[0, "module-scikits.odes.lsodiint"]], "scikits.odes.ode": [[0, "module-scikits.odes.ode"]], "scikits.odes.sundials": [[0, "module-scikits.odes.sundials"]], "scikits.odes.sundials.cvode": [[0, "module-scikits.odes.sundials.cvode"]], "scikits.odes.sundials.ida": [[0, "module-scikits.odes.sundials.ida"]], "scikits_odes": [[4, "module-scikits_odes"]], "scikits_odes.dae": [[4, "module-scikits_odes.dae"]], "scikits_odes.dopri5": [[4, "module-scikits_odes.dopri5"]], "scikits_odes.ode": [[4, "module-scikits_odes.ode"]], "scikits_odes_sundials": [[5, "module-scikits_odes_sundials"]], "scikits_odes_sundials.cvode": [[5, "module-scikits_odes_sundials.cvode"]], "scikits_odes_sundials.ida": [[5, "module-scikits_odes_sundials.ida"]]}, "docnames": ["api/compat", "api/core", "api/daepack", "api/index", "api/main", "api/sundials", "dae", "index", "ode", "sundials"], "envversion": {"sphinx": 61, "sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.intersphinx": 1, "sphinx.ext.viewcode": 1}, "filenames": ["api/compat.rst", "api/core.rst", "api/daepack.rst", "api/index.rst", "api/main.rst", "api/sundials.rst", "dae.rst", "index.rst", "ode.rst", "sundials.rst"], "indexentries": {"cv_continuationfunction (class in scikits_odes_sundials.cvode)": [[5, "scikits_odes_sundials.cvode.CV_ContinuationFunction", false]], "cv_jacrhsfunction (class in scikits_odes_sundials.cvode)": [[5, "scikits_odes_sundials.cvode.CV_JacRhsFunction", false]], "cv_jactimessetupfunction (class in scikits_odes_sundials.cvode)": [[5, "scikits_odes_sundials.cvode.CV_JacTimesSetupFunction", false]], "cv_jactimesvecfunction (class in scikits_odes_sundials.cvode)": [[5, "scikits_odes_sundials.cvode.CV_JacTimesVecFunction", false]], "cv_precsetupfunction (class in scikits_odes_sundials.cvode)": [[5, "scikits_odes_sundials.cvode.CV_PrecSetupFunction", false]], "cv_precsolvefunction (class in scikits_odes_sundials.cvode)": [[5, "scikits_odes_sundials.cvode.CV_PrecSolveFunction", false]], "cv_rhsfunction (class in scikits_odes_sundials.cvode)": [[5, "scikits_odes_sundials.cvode.CV_RhsFunction", false]], "cv_rootfunction (class in scikits_odes_sundials.cvode)": [[5, "scikits_odes_sundials.cvode.CV_RootFunction", false]], "cv_wrapjacrhsfunction (class in scikits_odes_sundials.cvode)": [[5, "scikits_odes_sundials.cvode.CV_WrapJacRhsFunction", false]], "cv_wrapjactimessetupfunction (class in scikits_odes_sundials.cvode)": [[5, "scikits_odes_sundials.cvode.CV_WrapJacTimesSetupFunction", false]], "cv_wrapjactimesvecfunction (class in scikits_odes_sundials.cvode)": [[5, "scikits_odes_sundials.cvode.CV_WrapJacTimesVecFunction", false]], "cv_wrapprecsetupfunction (class in scikits_odes_sundials.cvode)": [[5, "scikits_odes_sundials.cvode.CV_WrapPrecSetupFunction", false]], "cv_wrapprecsolvefunction (class in scikits_odes_sundials.cvode)": [[5, "scikits_odes_sundials.cvode.CV_WrapPrecSolveFunction", false]], "cv_wraprhsfunction (class in scikits_odes_sundials.cvode)": [[5, "scikits_odes_sundials.cvode.CV_WrapRhsFunction", false]], "cv_wraprootfunction (class in scikits_odes_sundials.cvode)": [[5, "scikits_odes_sundials.cvode.CV_WrapRootFunction", false]], "cvodesolveexception": [[5, "scikits_odes_sundials.CVODESolveException", false]], "cvodesolvefailed": [[5, "scikits_odes_sundials.CVODESolveFailed", false]], "cvodesolvefoundroot": [[5, "scikits_odes_sundials.CVODESolveFoundRoot", false]], "cvodesolvereachedtstop": [[5, "scikits_odes_sundials.CVODESolveReachedTSTOP", false]], "dae (class in scikits.odes.dae)": [[6, "scikits.odes.dae.dae", false]], "dae (class in scikits_odes.dae)": [[4, "scikits_odes.dae.dae", false]], "daebase (class in scikits_odes_core)": [[1, "scikits_odes_core.DaeBase", false]], "dop853 (class in scikits_odes.dopri5)": [[4, "scikits_odes.dopri5.dop853", false]], "dopri5 (class in scikits_odes.dopri5)": [[4, "scikits_odes.dopri5.dopri5", false]], "dopsolveexception": [[4, "scikits_odes.dopri5.DOPSolveException", false]], "dopsolvefailed": [[4, "scikits_odes.dopri5.DOPSolveFailed", false]], "errors (scikits_odes.dopri5.solverreturn attribute)": [[4, "scikits_odes.dopri5.SolverReturn.errors", false]], "evaluate() (scikits_odes_sundials.cvode.cv_continuationfunction method)": [[5, "scikits_odes_sundials.cvode.CV_ContinuationFunction.evaluate", false]], "evaluate() (scikits_odes_sundials.cvode.cv_jacrhsfunction method)": [[5, "scikits_odes_sundials.cvode.CV_JacRhsFunction.evaluate", false]], "evaluate() (scikits_odes_sundials.cvode.cv_jactimessetupfunction method)": [[5, "scikits_odes_sundials.cvode.CV_JacTimesSetupFunction.evaluate", false]], "evaluate() (scikits_odes_sundials.cvode.cv_jactimesvecfunction method)": [[5, "scikits_odes_sundials.cvode.CV_JacTimesVecFunction.evaluate", false]], "evaluate() (scikits_odes_sundials.cvode.cv_precsetupfunction method)": [[5, "scikits_odes_sundials.cvode.CV_PrecSetupFunction.evaluate", false]], "evaluate() (scikits_odes_sundials.cvode.cv_precsolvefunction method)": [[5, "scikits_odes_sundials.cvode.CV_PrecSolveFunction.evaluate", false]], "evaluate() (scikits_odes_sundials.cvode.cv_rhsfunction method)": [[5, "scikits_odes_sundials.cvode.CV_RhsFunction.evaluate", false]], "evaluate() (scikits_odes_sundials.cvode.cv_rootfunction method)": [[5, "scikits_odes_sundials.cvode.CV_RootFunction.evaluate", false]], "evaluate() (scikits_odes_sundials.cvode.cv_wrapjacrhsfunction method)": [[5, "scikits_odes_sundials.cvode.CV_WrapJacRhsFunction.evaluate", false]], "evaluate() (scikits_odes_sundials.cvode.cv_wrapjactimessetupfunction method)": [[5, "scikits_odes_sundials.cvode.CV_WrapJacTimesSetupFunction.evaluate", false]], "evaluate() (scikits_odes_sundials.cvode.cv_wrapjactimesvecfunction method)": [[5, "scikits_odes_sundials.cvode.CV_WrapJacTimesVecFunction.evaluate", false]], "evaluate() (scikits_odes_sundials.cvode.cv_wrapprecsetupfunction method)": [[5, "scikits_odes_sundials.cvode.CV_WrapPrecSetupFunction.evaluate", false]], "evaluate() (scikits_odes_sundials.cvode.cv_wrapprecsolvefunction method)": [[5, "scikits_odes_sundials.cvode.CV_WrapPrecSolveFunction.evaluate", false]], "evaluate() (scikits_odes_sundials.cvode.cv_wraprhsfunction method)": [[5, "scikits_odes_sundials.cvode.CV_WrapRhsFunction.evaluate", false]], "evaluate() (scikits_odes_sundials.cvode.cv_wraprootfunction method)": [[5, "scikits_odes_sundials.cvode.CV_WrapRootFunction.evaluate", false]], "evaluate() (scikits_odes_sundials.ida.ida_continuationfunction method)": [[5, "scikits_odes_sundials.ida.IDA_ContinuationFunction.evaluate", false]], "evaluate() (scikits_odes_sundials.ida.ida_jacrhsfunction method)": [[5, "scikits_odes_sundials.ida.IDA_JacRhsFunction.evaluate", false]], "evaluate() (scikits_odes_sundials.ida.ida_jactimessetupfunction method)": [[5, "scikits_odes_sundials.ida.IDA_JacTimesSetupFunction.evaluate", false]], "evaluate() (scikits_odes_sundials.ida.ida_jactimesvecfunction method)": [[5, "scikits_odes_sundials.ida.IDA_JacTimesVecFunction.evaluate", false]], "evaluate() (scikits_odes_sundials.ida.ida_precsetupfunction method)": [[5, "scikits_odes_sundials.ida.IDA_PrecSetupFunction.evaluate", false]], "evaluate() (scikits_odes_sundials.ida.ida_precsolvefunction method)": [[5, "scikits_odes_sundials.ida.IDA_PrecSolveFunction.evaluate", false]], "evaluate() (scikits_odes_sundials.ida.ida_rhsfunction method)": [[5, "scikits_odes_sundials.ida.IDA_RhsFunction.evaluate", false]], "evaluate() (scikits_odes_sundials.ida.ida_rootfunction method)": [[5, "scikits_odes_sundials.ida.IDA_RootFunction.evaluate", false]], "evaluate() (scikits_odes_sundials.ida.ida_wrapjacrhsfunction method)": [[5, "scikits_odes_sundials.ida.IDA_WrapJacRhsFunction.evaluate", false]], "evaluate() (scikits_odes_sundials.ida.ida_wrapjactimessetupfunction method)": [[5, "scikits_odes_sundials.ida.IDA_WrapJacTimesSetupFunction.evaluate", false]], "evaluate() (scikits_odes_sundials.ida.ida_wrapjactimesvecfunction method)": [[5, "scikits_odes_sundials.ida.IDA_WrapJacTimesVecFunction.evaluate", false]], "evaluate() (scikits_odes_sundials.ida.ida_wrapprecsetupfunction method)": [[5, "scikits_odes_sundials.ida.IDA_WrapPrecSetupFunction.evaluate", false]], "evaluate() (scikits_odes_sundials.ida.ida_wrapprecsolvefunction method)": [[5, "scikits_odes_sundials.ida.IDA_WrapPrecSolveFunction.evaluate", false]], "evaluate() (scikits_odes_sundials.ida.ida_wraprhsfunction method)": [[5, "scikits_odes_sundials.ida.IDA_WrapRhsFunction.evaluate", false]], "evaluate() (scikits_odes_sundials.ida.ida_wraprootfunction method)": [[5, "scikits_odes_sundials.ida.IDA_WrapRootFunction.evaluate", false]], "flag (scikits_odes.dopri5.solverreturn attribute)": [[4, "scikits_odes.dopri5.SolverReturn.flag", false]], "get_info() (scikits.odes.ode.ode method)": [[8, "scikits.odes.ode.ode.get_info", false]], "get_info() (scikits_odes.ode.ode method)": [[4, "scikits_odes.ode.ode.get_info", false]], "ida_continuationfunction (class in scikits_odes_sundials.ida)": [[5, "scikits_odes_sundials.ida.IDA_ContinuationFunction", false]], "ida_jacrhsfunction (class in scikits_odes_sundials.ida)": [[5, "scikits_odes_sundials.ida.IDA_JacRhsFunction", false]], "ida_jactimessetupfunction (class in scikits_odes_sundials.ida)": [[5, "scikits_odes_sundials.ida.IDA_JacTimesSetupFunction", false]], "ida_jactimesvecfunction (class in scikits_odes_sundials.ida)": [[5, "scikits_odes_sundials.ida.IDA_JacTimesVecFunction", false]], "ida_precsetupfunction (class in scikits_odes_sundials.ida)": [[5, "scikits_odes_sundials.ida.IDA_PrecSetupFunction", false]], "ida_precsolvefunction (class in scikits_odes_sundials.ida)": [[5, "scikits_odes_sundials.ida.IDA_PrecSolveFunction", false]], "ida_rhsfunction (class in scikits_odes_sundials.ida)": [[5, "scikits_odes_sundials.ida.IDA_RhsFunction", false]], "ida_rootfunction (class in scikits_odes_sundials.ida)": [[5, "scikits_odes_sundials.ida.IDA_RootFunction", false]], "ida_wrapjacrhsfunction (class in scikits_odes_sundials.ida)": [[5, "scikits_odes_sundials.ida.IDA_WrapJacRhsFunction", false]], "ida_wrapjactimessetupfunction (class in scikits_odes_sundials.ida)": [[5, "scikits_odes_sundials.ida.IDA_WrapJacTimesSetupFunction", false]], "ida_wrapjactimesvecfunction (class in scikits_odes_sundials.ida)": [[5, "scikits_odes_sundials.ida.IDA_WrapJacTimesVecFunction", false]], "ida_wrapprecsetupfunction (class in scikits_odes_sundials.ida)": [[5, "scikits_odes_sundials.ida.IDA_WrapPrecSetupFunction", false]], "ida_wrapprecsolvefunction (class in scikits_odes_sundials.ida)": [[5, "scikits_odes_sundials.ida.IDA_WrapPrecSolveFunction", false]], "ida_wraprhsfunction (class in scikits_odes_sundials.ida)": [[5, "scikits_odes_sundials.ida.IDA_WrapRhsFunction", false]], "ida_wraprootfunction (class in scikits_odes_sundials.ida)": [[5, "scikits_odes_sundials.ida.IDA_WrapRootFunction", false]], "idasolveexception": [[5, "scikits_odes_sundials.IDASolveException", false]], "idasolvefailed": [[5, "scikits_odes_sundials.IDASolveFailed", false]], "idasolvefoundroot": [[5, "scikits_odes_sundials.IDASolveFoundRoot", false]], "idasolvereachedtstop": [[5, "scikits_odes_sundials.IDASolveReachedTSTOP", false]], "init_step() (scikits.odes.dae.dae method)": [[6, "scikits.odes.dae.dae.init_step", false]], "init_step() (scikits.odes.ode.ode method)": [[8, "scikits.odes.ode.ode.init_step", false]], "init_step() (scikits_odes.dae.dae method)": [[4, "scikits_odes.dae.dae.init_step", false]], "init_step() (scikits_odes.dopri5.dopri5 method)": [[4, "scikits_odes.dopri5.dopri5.init_step", false]], "init_step() (scikits_odes.ode.ode method)": [[4, "scikits_odes.ode.ode.init_step", false]], "init_step() (scikits_odes_core.daebase method)": [[1, "scikits_odes_core.DaeBase.init_step", false]], "init_step() (scikits_odes_core.odebase method)": [[1, "scikits_odes_core.OdeBase.init_step", false]], "message (scikits_odes.dopri5.solverreturn attribute)": [[4, "scikits_odes.dopri5.SolverReturn.message", false]], "module": [[0, "module-scikits.odes", false], [0, "module-scikits.odes.dae", false], [0, "module-scikits.odes.ddaspkint", false], [0, "module-scikits.odes.dopri5", false], [0, "module-scikits.odes.lsodiint", false], [0, "module-scikits.odes.ode", false], [0, "module-scikits.odes.sundials", false], [0, "module-scikits.odes.sundials.cvode", false], [0, "module-scikits.odes.sundials.ida", false], [1, "module-scikits_odes_core", false], [4, "module-scikits_odes", false], [4, "module-scikits_odes.dae", false], [4, "module-scikits_odes.dopri5", false], [4, "module-scikits_odes.ode", false], [5, "module-scikits_odes_sundials", false], [5, "module-scikits_odes_sundials.cvode", false], [5, "module-scikits_odes_sundials.ida", false]], "no_continue_fn() (in module scikits_odes_sundials.cvode)": [[5, "scikits_odes_sundials.cvode.no_continue_fn", false]], "no_continue_fn() (in module scikits_odes_sundials.ida)": [[5, "scikits_odes_sundials.ida.no_continue_fn", false]], "ode (class in scikits.odes.ode)": [[8, "scikits.odes.ode.ode", false]], "ode (class in scikits_odes.ode)": [[4, "scikits_odes.ode.ode", false]], "odebase (class in scikits_odes_core)": [[1, "scikits_odes_core.OdeBase", false]], "odeint() (in module scikits.odes.odeint)": [[8, "scikits.odes.odeint.odeint", false]], "roots (scikits_odes.dopri5.solverreturn attribute)": [[4, "scikits_odes.dopri5.SolverReturn.roots", false]], "scikits.odes": [[0, "module-scikits.odes", false]], "scikits.odes.dae": [[0, "module-scikits.odes.dae", false]], "scikits.odes.ddaspkint": [[0, "module-scikits.odes.ddaspkint", false]], "scikits.odes.dopri5": [[0, "module-scikits.odes.dopri5", false]], "scikits.odes.lsodiint": [[0, "module-scikits.odes.lsodiint", false]], "scikits.odes.ode": [[0, "module-scikits.odes.ode", false]], "scikits.odes.sundials": [[0, "module-scikits.odes.sundials", false]], "scikits.odes.sundials.cvode": [[0, "module-scikits.odes.sundials.cvode", false]], "scikits.odes.sundials.ida": [[0, "module-scikits.odes.sundials.ida", false]], "scikits_odes": [[4, "module-scikits_odes", false]], "scikits_odes.dae": [[4, "module-scikits_odes.dae", false]], "scikits_odes.dopri5": [[4, "module-scikits_odes.dopri5", false]], "scikits_odes.ode": [[4, "module-scikits_odes.ode", false]], "scikits_odes_core": [[1, "module-scikits_odes_core", false]], "scikits_odes_sundials": [[5, "module-scikits_odes_sundials", false]], "scikits_odes_sundials.cvode": [[5, "module-scikits_odes_sundials.cvode", false]], "scikits_odes_sundials.ida": [[5, "module-scikits_odes_sundials.ida", false]], "set_jac_times_setupfn() (scikits_odes_sundials.cvode.cv_wrapjactimessetupfunction method)": [[5, "scikits_odes_sundials.cvode.CV_WrapJacTimesSetupFunction.set_jac_times_setupfn", false]], "set_jac_times_setupfn() (scikits_odes_sundials.ida.ida_wrapjactimessetupfunction method)": [[5, "scikits_odes_sundials.ida.IDA_WrapJacTimesSetupFunction.set_jac_times_setupfn", false]], "set_jac_times_vecfn() (scikits_odes_sundials.cvode.cv_wrapjactimesvecfunction method)": [[5, "scikits_odes_sundials.cvode.CV_WrapJacTimesVecFunction.set_jac_times_vecfn", false]], "set_jac_times_vecfn() (scikits_odes_sundials.ida.ida_wrapjactimesvecfunction method)": [[5, "scikits_odes_sundials.ida.IDA_WrapJacTimesVecFunction.set_jac_times_vecfn", false]], "set_jacfn() (scikits_odes_sundials.cvode.cv_wrapjacrhsfunction method)": [[5, "scikits_odes_sundials.cvode.CV_WrapJacRhsFunction.set_jacfn", false]], "set_jacfn() (scikits_odes_sundials.ida.ida_wrapjacrhsfunction method)": [[5, "scikits_odes_sundials.ida.IDA_WrapJacRhsFunction.set_jacfn", false]], "set_options() (scikits.odes.dae.dae method)": [[6, "scikits.odes.dae.dae.set_options", false]], "set_options() (scikits.odes.ode.ode method)": [[8, "scikits.odes.ode.ode.set_options", false]], "set_options() (scikits_odes.dae.dae method)": [[4, "scikits_odes.dae.dae.set_options", false]], "set_options() (scikits_odes.dopri5.dopri5 method)": [[4, "scikits_odes.dopri5.dopri5.set_options", false]], "set_options() (scikits_odes.ode.ode method)": [[4, "scikits_odes.ode.ode.set_options", false]], "set_options() (scikits_odes_core.daebase method)": [[1, "scikits_odes_core.DaeBase.set_options", false]], "set_options() (scikits_odes_core.odebase method)": [[1, "scikits_odes_core.OdeBase.set_options", false]], "set_prec_setupfn() (scikits_odes_sundials.cvode.cv_wrapprecsetupfunction method)": [[5, "scikits_odes_sundials.cvode.CV_WrapPrecSetupFunction.set_prec_setupfn", false]], "set_prec_setupfn() (scikits_odes_sundials.ida.ida_wrapprecsetupfunction method)": [[5, "scikits_odes_sundials.ida.IDA_WrapPrecSetupFunction.set_prec_setupfn", false]], "set_prec_solvefn() (scikits_odes_sundials.cvode.cv_wrapprecsolvefunction method)": [[5, "scikits_odes_sundials.cvode.CV_WrapPrecSolveFunction.set_prec_solvefn", false]], "set_prec_solvefn() (scikits_odes_sundials.ida.ida_wrapprecsolvefunction method)": [[5, "scikits_odes_sundials.ida.IDA_WrapPrecSolveFunction.set_prec_solvefn", false]], "set_resfn() (scikits_odes_sundials.ida.ida_wraprhsfunction method)": [[5, "scikits_odes_sundials.ida.IDA_WrapRhsFunction.set_resfn", false]], "set_rhsfn() (scikits_odes_sundials.cvode.cv_wraprhsfunction method)": [[5, "scikits_odes_sundials.cvode.CV_WrapRhsFunction.set_rhsfn", false]], "set_rootfn() (scikits_odes_sundials.cvode.cv_wraprootfunction method)": [[5, "scikits_odes_sundials.cvode.CV_WrapRootFunction.set_rootfn", false]], "set_rootfn() (scikits_odes_sundials.ida.ida_wraprootfunction method)": [[5, "scikits_odes_sundials.ida.IDA_WrapRootFunction.set_rootfn", false]], "set_tstop() (scikits.odes.ode.ode method)": [[8, "scikits.odes.ode.ode.set_tstop", false]], "set_tstop() (scikits_odes.ode.ode method)": [[4, "scikits_odes.ode.ode.set_tstop", false]], "solve() (scikits.odes.dae.dae method)": [[6, "scikits.odes.dae.dae.solve", false]], "solve() (scikits.odes.ode.ode method)": [[8, "scikits.odes.ode.ode.solve", false]], "solve() (scikits_odes.dae.dae method)": [[4, "scikits_odes.dae.dae.solve", false]], "solve() (scikits_odes.dopri5.dopri5 method)": [[4, "scikits_odes.dopri5.dopri5.solve", false]], "solve() (scikits_odes.ode.ode method)": [[4, "scikits_odes.ode.ode.solve", false]], "solve() (scikits_odes_core.daebase method)": [[1, "scikits_odes_core.DaeBase.solve", false]], "solve() (scikits_odes_core.odebase method)": [[1, "scikits_odes_core.OdeBase.solve", false]], "solverreturn (class in scikits_odes.dopri5)": [[4, "scikits_odes.dopri5.SolverReturn", false]], "solvervariables (class in scikits_odes.dopri5)": [[4, "scikits_odes.dopri5.SolverVariables", false]], "statusenum (class in scikits_odes_sundials.cvode)": [[5, "scikits_odes_sundials.cvode.StatusEnum", false]], "statusenumdop (class in scikits_odes.dopri5)": [[4, "scikits_odes.dopri5.StatusEnumDOP", false]], "statusenumida (class in scikits_odes_sundials.ida)": [[5, "scikits_odes_sundials.ida.StatusEnumIDA", false]], "step() (scikits.odes.dae.dae method)": [[6, "scikits.odes.dae.dae.step", false]], "step() (scikits.odes.ode.ode method)": [[8, "scikits.odes.ode.ode.step", false]], "step() (scikits_odes.dae.dae method)": [[4, "scikits_odes.dae.dae.step", false]], "step() (scikits_odes.dopri5.dopri5 method)": [[4, "scikits_odes.dopri5.dopri5.step", false]], "step() (scikits_odes.ode.ode method)": [[4, "scikits_odes.ode.ode.step", false]], "step() (scikits_odes_core.daebase method)": [[1, "scikits_odes_core.DaeBase.step", false]], "step() (scikits_odes_core.odebase method)": [[1, "scikits_odes_core.OdeBase.step", false]], "t (scikits_odes.dopri5.solvervariables attribute)": [[4, "scikits_odes.dopri5.SolverVariables.t", false]], "tstop (scikits_odes.dopri5.solverreturn attribute)": [[4, "scikits_odes.dopri5.SolverReturn.tstop", false]], "validate_flags() (scikits_odes.dopri5.dopri5 method)": [[4, "scikits_odes.dopri5.dopri5.validate_flags", false]], "values (scikits_odes.dopri5.solverreturn attribute)": [[4, "scikits_odes.dopri5.SolverReturn.values", false]], "with_userdata (scikits_odes_sundials.cvode.cv_wraprhsfunction attribute)": [[5, "scikits_odes_sundials.cvode.CV_WrapRhsFunction.with_userdata", false]], "y (scikits_odes.dopri5.solvervariables attribute)": [[4, "scikits_odes.dopri5.SolverVariables.y", false]]}, "objects": {"": [[4, 0, 0, "-", "scikits_odes"], [1, 0, 0, "-", "scikits_odes_core"], [5, 0, 0, "-", "scikits_odes_sundials"]], "scikits": [[0, 0, 0, "-", "odes"]], "scikits.odes": [[0, 0, 0, "-", "dae"], [0, 0, 0, "-", "ddaspkint"], [0, 0, 0, "-", "dopri5"], [0, 0, 0, "-", "lsodiint"], [0, 0, 0, "-", "ode"], [0, 0, 0, "-", "sundials"]], "scikits.odes.dae": [[6, 1, 1, "", "dae"]], "scikits.odes.dae.dae": [[6, 2, 1, "", "init_step"], [6, 2, 1, "", "set_options"], [6, 2, 1, "", "solve"], [6, 2, 1, "", "step"]], "scikits.odes.ode": [[8, 1, 1, "", "ode"]], "scikits.odes.ode.ode": [[8, 2, 1, "", "get_info"], [8, 2, 1, "", "init_step"], [8, 2, 1, "", "set_options"], [8, 2, 1, "", "set_tstop"], [8, 2, 1, "", "solve"], [8, 2, 1, "", "step"]], "scikits.odes.odeint": [[8, 3, 1, "", "odeint"]], "scikits.odes.sundials": [[0, 0, 0, "-", "cvode"], [0, 0, 0, "-", "ida"]], "scikits_odes": [[4, 0, 0, "-", "dae"], [4, 0, 0, "-", "dopri5"], [4, 0, 0, "-", "ode"]], "scikits_odes.dae": [[4, 1, 1, "", "dae"]], "scikits_odes.dae.dae": [[4, 2, 1, "", "init_step"], [4, 2, 1, "", "set_options"], [4, 2, 1, "", "solve"], [4, 2, 1, "", "step"]], "scikits_odes.dopri5": [[4, 4, 1, "", "DOPSolveException"], [4, 4, 1, "", "DOPSolveFailed"], [4, 1, 1, "", "SolverReturn"], [4, 1, 1, "", "SolverVariables"], [4, 1, 1, "", "StatusEnumDOP"], [4, 1, 1, "", "dop853"], [4, 1, 1, "", "dopri5"]], "scikits_odes.dopri5.SolverReturn": [[4, 5, 1, "", "errors"], [4, 5, 1, "", "flag"], [4, 5, 1, "", "message"], [4, 5, 1, "", "roots"], [4, 5, 1, "", "tstop"], [4, 5, 1, "", "values"]], "scikits_odes.dopri5.SolverVariables": [[4, 5, 1, "", "t"], [4, 5, 1, "", "y"]], "scikits_odes.dopri5.dopri5": [[4, 2, 1, "", "init_step"], [4, 2, 1, "", "set_options"], [4, 2, 1, "", "solve"], [4, 2, 1, "", "step"], [4, 2, 1, "", "validate_flags"]], "scikits_odes.ode": [[4, 1, 1, "", "ode"]], "scikits_odes.ode.ode": [[4, 2, 1, "", "get_info"], [4, 2, 1, "", "init_step"], [4, 2, 1, "", "set_options"], [4, 2, 1, "", "set_tstop"], [4, 2, 1, "", "solve"], [4, 2, 1, "", "step"]], "scikits_odes_core": [[1, 1, 1, "", "DaeBase"], [1, 1, 1, "", "OdeBase"]], "scikits_odes_core.DaeBase": [[1, 2, 1, "", "init_step"], [1, 2, 1, "", "set_options"], [1, 2, 1, "", "solve"], [1, 2, 1, "", "step"]], "scikits_odes_core.OdeBase": [[1, 2, 1, "", "init_step"], [1, 2, 1, "", "set_options"], [1, 2, 1, "", "solve"], [1, 2, 1, "", "step"]], "scikits_odes_sundials": [[5, 4, 1, "", "CVODESolveException"], [5, 4, 1, "", "CVODESolveFailed"], [5, 4, 1, "", "CVODESolveFoundRoot"], [5, 4, 1, "", "CVODESolveReachedTSTOP"], [5, 4, 1, "", "IDASolveException"], [5, 4, 1, "", "IDASolveFailed"], [5, 4, 1, "", "IDASolveFoundRoot"], [5, 4, 1, "", "IDASolveReachedTSTOP"], [5, 0, 0, "-", "cvode"], [5, 0, 0, "-", "ida"]], "scikits_odes_sundials.cvode": [[5, 1, 1, "", "CV_ContinuationFunction"], [5, 1, 1, "", "CV_JacRhsFunction"], [5, 1, 1, "", "CV_JacTimesSetupFunction"], [5, 1, 1, "", "CV_JacTimesVecFunction"], [5, 1, 1, "", "CV_PrecSetupFunction"], [5, 1, 1, "", "CV_PrecSolveFunction"], [5, 1, 1, "", "CV_RhsFunction"], [5, 1, 1, "", "CV_RootFunction"], [5, 1, 1, "", "CV_WrapJacRhsFunction"], [5, 1, 1, "", "CV_WrapJacTimesSetupFunction"], [5, 1, 1, "", "CV_WrapJacTimesVecFunction"], [5, 1, 1, "", "CV_WrapPrecSetupFunction"], [5, 1, 1, "", "CV_WrapPrecSolveFunction"], [5, 1, 1, "", "CV_WrapRhsFunction"], [5, 1, 1, "", "CV_WrapRootFunction"], [5, 1, 1, "", "StatusEnum"], [5, 3, 1, "", "no_continue_fn"]], "scikits_odes_sundials.cvode.CV_ContinuationFunction": [[5, 2, 1, "", "evaluate"]], "scikits_odes_sundials.cvode.CV_JacRhsFunction": [[5, 2, 1, "", "evaluate"]], "scikits_odes_sundials.cvode.CV_JacTimesSetupFunction": [[5, 2, 1, "", "evaluate"]], "scikits_odes_sundials.cvode.CV_JacTimesVecFunction": [[5, 2, 1, "", "evaluate"]], "scikits_odes_sundials.cvode.CV_PrecSetupFunction": [[5, 2, 1, "", "evaluate"]], "scikits_odes_sundials.cvode.CV_PrecSolveFunction": [[5, 2, 1, "", "evaluate"]], "scikits_odes_sundials.cvode.CV_RhsFunction": [[5, 2, 1, "", "evaluate"]], "scikits_odes_sundials.cvode.CV_RootFunction": [[5, 2, 1, "", "evaluate"]], "scikits_odes_sundials.cvode.CV_WrapJacRhsFunction": [[5, 2, 1, "", "evaluate"], [5, 2, 1, "", "set_jacfn"]], "scikits_odes_sundials.cvode.CV_WrapJacTimesSetupFunction": [[5, 2, 1, "", "evaluate"], [5, 2, 1, "", "set_jac_times_setupfn"]], "scikits_odes_sundials.cvode.CV_WrapJacTimesVecFunction": [[5, 2, 1, "", "evaluate"], [5, 2, 1, "", "set_jac_times_vecfn"]], "scikits_odes_sundials.cvode.CV_WrapPrecSetupFunction": [[5, 2, 1, "", "evaluate"], [5, 2, 1, "", "set_prec_setupfn"]], "scikits_odes_sundials.cvode.CV_WrapPrecSolveFunction": [[5, 2, 1, "", "evaluate"], [5, 2, 1, "", "set_prec_solvefn"]], "scikits_odes_sundials.cvode.CV_WrapRhsFunction": [[5, 2, 1, "", "evaluate"], [5, 2, 1, "", "set_rhsfn"], [5, 5, 1, "", "with_userdata"]], "scikits_odes_sundials.cvode.CV_WrapRootFunction": [[5, 2, 1, "", "evaluate"], [5, 2, 1, "", "set_rootfn"]], "scikits_odes_sundials.ida": [[5, 1, 1, "", "IDA_ContinuationFunction"], [5, 1, 1, "", "IDA_JacRhsFunction"], [5, 1, 1, "", "IDA_JacTimesSetupFunction"], [5, 1, 1, "", "IDA_JacTimesVecFunction"], [5, 1, 1, "", "IDA_PrecSetupFunction"], [5, 1, 1, "", "IDA_PrecSolveFunction"], [5, 1, 1, "", "IDA_RhsFunction"], [5, 1, 1, "", "IDA_RootFunction"], [5, 1, 1, "", "IDA_WrapJacRhsFunction"], [5, 1, 1, "", "IDA_WrapJacTimesSetupFunction"], [5, 1, 1, "", "IDA_WrapJacTimesVecFunction"], [5, 1, 1, "", "IDA_WrapPrecSetupFunction"], [5, 1, 1, "", "IDA_WrapPrecSolveFunction"], [5, 1, 1, "", "IDA_WrapRhsFunction"], [5, 1, 1, "", "IDA_WrapRootFunction"], [5, 1, 1, "", "StatusEnumIDA"], [5, 3, 1, "", "no_continue_fn"]], "scikits_odes_sundials.ida.IDA_ContinuationFunction": [[5, 2, 1, "", "evaluate"]], "scikits_odes_sundials.ida.IDA_JacRhsFunction": [[5, 2, 1, "", "evaluate"]], "scikits_odes_sundials.ida.IDA_JacTimesSetupFunction": [[5, 2, 1, "", "evaluate"]], "scikits_odes_sundials.ida.IDA_JacTimesVecFunction": [[5, 2, 1, "", "evaluate"]], "scikits_odes_sundials.ida.IDA_PrecSetupFunction": [[5, 2, 1, "", "evaluate"]], "scikits_odes_sundials.ida.IDA_PrecSolveFunction": [[5, 2, 1, "", "evaluate"]], "scikits_odes_sundials.ida.IDA_RhsFunction": [[5, 2, 1, "", "evaluate"]], "scikits_odes_sundials.ida.IDA_RootFunction": [[5, 2, 1, "", "evaluate"]], "scikits_odes_sundials.ida.IDA_WrapJacRhsFunction": [[5, 2, 1, "", "evaluate"], [5, 2, 1, "", "set_jacfn"]], "scikits_odes_sundials.ida.IDA_WrapJacTimesSetupFunction": [[5, 2, 1, "", "evaluate"], [5, 2, 1, "", "set_jac_times_setupfn"]], "scikits_odes_sundials.ida.IDA_WrapJacTimesVecFunction": [[5, 2, 1, "", "evaluate"], [5, 2, 1, "", "set_jac_times_vecfn"]], "scikits_odes_sundials.ida.IDA_WrapPrecSetupFunction": [[5, 2, 1, "", "evaluate"], [5, 2, 1, "", "set_prec_setupfn"]], "scikits_odes_sundials.ida.IDA_WrapPrecSolveFunction": [[5, 2, 1, "", "evaluate"], [5, 2, 1, "", "set_prec_solvefn"]], "scikits_odes_sundials.ida.IDA_WrapRhsFunction": [[5, 2, 1, "", "evaluate"], [5, 2, 1, "", "set_resfn"]], "scikits_odes_sundials.ida.IDA_WrapRootFunction": [[5, 2, 1, "", "evaluate"], [5, 2, 1, "", "set_rootfn"]]}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "method", "Python method"], "3": ["py", "function", "Python function"], "4": ["py", "exception", "Python exception"], "5": ["py", "attribute", "Python attribute"]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:method", "3": "py:function", "4": "py:exception", "5": "py:attribute"}, "terms": {"": [4, 8], "0": [1, 4, 5, 6, 7, 8, 9], "05": 8, "07": [4, 6], "0a3": 7, "1": [1, 4, 5, 6, 8, 9], "10": 8, "101": 8, "12": 4, "1211": 4, "15": [4, 8], "1993": 4, "1e": 4, "2": [4, 6, 8, 9], "2005": [4, 6], "24": 4, "25": 8, "2f": [4, 8], "2nd": 4, "3": [4, 7, 8, 9], "4": [4, 6, 8], "5": [4, 8], "500": 4, "6": 4, "6g": [4, 8], "8": [4, 8], "9": 4, "A": [1, 4, 6, 8], "As": [4, 6, 8], "By": 8, "For": [7, 8], "If": [1, 4, 5, 6, 8], "In": [4, 6, 8], "It": [0, 4, 6, 8], "Not": [4, 6], "The": [1, 4, 6, 7, 8], "Then": 8, "To": [8, 9], "__future__": [4, 6, 8], "ab": [1, 4, 6, 8], "about": [4, 8], "absolut": 4, "ac": [4, 6], "accept": 4, "access": [7, 8, 9], "account": [4, 6, 8], "achiev": [4, 8], "act": 8, "ad": 8, "adam": 8, "add": [4, 8], "addit": [1, 4, 6, 8], "addition": [0, 4, 8, 9], "admo": 8, "advantag": 9, "after": [1, 4, 6, 8], "against": 9, "algebra": [4, 6, 7, 8], "alia": 4, "all": 8, "alloc": [1, 4, 6, 8], "allow": [1, 4, 6, 8], "also": 8, "an": [1, 4, 6, 8, 9], "angl": 8, "angular": 8, "api": 8, "applic": [4, 6, 8], "approxim": 5, "ar": [1, 4, 5, 6, 8], "area": 8, "arg": 1, "aris": [4, 6, 8], "around": [0, 4, 6, 8], "arrai": [1, 4, 6, 8, 9], "assum": [4, 6, 8], "atol": [4, 8], "attribut": [1, 4, 6, 8], "author": 4, "automat": 9, "avail": [7, 8], "avoid": [4, 8], "b": 8, "backend": [4, 6], "backward": [4, 6, 8], "band": 5, "base": [4, 5, 6], "bdf": 8, "becom": [4, 8], "befor": [1, 4, 6, 8], "behavior": [1, 4, 6, 8], "best": 8, "beta": 4, "beuler": 8, "bmcage": 7, "bool": 5, "boolean": [1, 4, 8], "both": [5, 8], "boundari": [4, 5], "build": 9, "built": 9, "c": [8, 9], "calcul": [1, 4, 5, 6], "call": [1, 4, 5, 6, 8, 9], "callabl": 8, "can": [0, 1, 4, 6, 8, 9], "case": [1, 4, 6, 8], "ch": 4, "chang": [4, 8], "changabl": 8, "chosen": [4, 8], "cj": 5, "class": [1, 4, 5, 6, 8], "co": [4, 6, 8], "code": [4, 6, 8], "coeffici": 8, "column": 8, "com": [4, 6], "combin": [4, 6, 8], "complet": 8, "compon": 8, "comput": [1, 4, 6, 8], "condit": [1, 4, 5, 6, 8], "configur": 8, "consid": [4, 6, 8], "consist": [1, 4, 6], "constant": 8, "contain": [1, 4, 6, 8, 9], "content": 7, "control": [1, 4, 6, 8], "conveni": 8, "convert": 8, "core": [3, 7], "correspond": [1, 4, 5, 6, 8], "creat": [4, 6, 8, 9], "crude": 5, "current": [1, 4, 6, 8, 9], "curv": 8, "cv_continuationfunct": [5, 7], "cv_jacrhsfunct": [5, 7], "cv_jactimessetupfn": 5, "cv_jactimessetupfunct": [5, 7], "cv_jactimesvecfn": 5, "cv_jactimesvecfunct": [5, 7], "cv_precsetupfunct": [5, 7], "cv_precsolvefunct": [5, 7], "cv_rhsfunction": [5, 7], "cv_rootfunct": [5, 7], "cv_wrapjacrhsfunct": [5, 7], "cv_wrapjactimessetupfunct": [5, 7], "cv_wrapjactimesvecfunct": [5, 7], "cv_wrapprecsetupfunct": [5, 7], "cv_wrapprecsolvefunct": [5, 7], "cv_wraprhsfunct": [5, 7], "cv_wraprootfunct": [5, 7], "cvode": [3, 4, 7, 8], "cvodesolveexcept": [5, 7], "cvodesolvefail": [5, 7], "cvodesolvefoundroot": [5, 7], "cvodesolvereachedtstop": [5, 7], "cython": [0, 4], "d": [4, 5, 6], "dae": [1, 3, 7, 8], "daebas": [1, 3, 7], "daepack": [3, 7], "data": [4, 5, 8], "ddaskr": [4, 6], "ddaspk": [0, 4, 6], "ddaspkint": [3, 7], "de": 4, "decreas": 4, "def": [4, 6, 8], "default": [4, 8, 9], "defin": [4, 6, 8, 9], "delta": 5, "denot": 8, "dens": [4, 5], "depend": [1, 4, 6], "dept": 4, "deriv": [1, 4, 6, 8], "describ": 4, "desir": 9, "detail": [4, 6, 8], "detect": 9, "dfactor": 4, "dictionari": [4, 8], "differ": 9, "differenti": [4, 6, 7, 8], "dim": [4, 6, 8], "dimens": [4, 6, 8], "direct": [1, 4, 6, 8], "directli": 8, "directori": [4, 8], "discritis": [4, 6, 8], "do": 9, "document": [4, 5, 6, 8, 9], "done": [1, 4, 5, 6, 8, 9], "dop": 4, "dop853": [7, 8], "dopri": 4, "dopri5": [3, 7, 8], "dopsolveexcept": [4, 7], "dopsolvefail": [4, 7], "dormand": [4, 8], "doubl": 9, "dt": [4, 8], "dtype": 9, "dtype_t": 5, "due": 4, "dure": [4, 8], "dx": [4, 6], "dy": [4, 6, 8], "dynam": [4, 6, 8], "e": 4, "easi": [4, 6, 8], "easili": 8, "edit": 4, "educ": 8, "eg": [4, 6, 8], "either": 5, "element": [1, 4, 6, 8], "els": [1, 4, 6], "en": 7, "endpoint": [4, 5], "entri": [1, 4, 6, 8], "eqsr": [4, 6], "eqsrh": [4, 8], "equal": [4, 6, 8], "equat": [4, 5, 6, 7, 8], "ernst": 4, "error": [1, 4, 5, 6, 8], "euler": 8, "evalu": 5, "evenli": 8, "everi": 8, "exact": [4, 8], "exampl": [1, 4, 6, 8], "except": [4, 5], "execut": 5, "explicit": 4, "expos": [4, 5, 8], "extend": [4, 6, 9], "extra": [0, 4, 8], "f": [0, 4, 6, 8], "f2py": [4, 6], "factor": 4, "fail": [4, 5], "failur": [4, 5, 8], "fals": [1, 4, 6, 8], "field": [1, 4, 6, 8], "fill": [1, 4, 6, 8], "find": 8, "first": [1, 6, 7, 8, 9], "first_step": 4, "fix": 8, "flag": [1, 4, 6, 8], "float": [1, 4, 6, 8, 9], "follow": [0, 1, 4, 6, 8], "form": 4, "format": [4, 6, 8], "formula": [4, 6, 8], "fortran": [4, 6], "found": [5, 9], "frac": 4, "friction": 8, "friendli": 4, "from": [0, 4, 6, 8, 9], "full": 5, "fun": 8, "func": 1, "function": [1, 4, 5, 6, 8], "futur": [4, 6, 8], "fy": 5, "g": [4, 5, 6, 8], "gamma": 5, "gener": [4, 5, 6, 7, 8], "genev": 4, "gerhard": 4, "get_info": [4, 7, 8], "github": 7, "given": 5, "good": 8, "graviti": 8, "grid": 8, "guarante": [4, 6, 8], "guid": 7, "ha": [1, 4, 5, 6, 8], "hairer": 4, "hand": [4, 5, 8], "handl": 1, "happen": [1, 4, 6, 8], "have": 9, "he": [4, 8], "here": 5, "higher": [1, 4, 6, 8], "hint": [4, 6], "hnw93": 4, "how": 9, "howev": [4, 6], "html": [4, 6], "http": [0, 4, 6, 7], "i": [0, 1, 4, 5, 6, 7, 8, 9], "ic": [4, 6], "ida": [1, 3, 4, 6, 7], "ida_continuationfunct": [5, 7], "ida_jacrhsfunct": [5, 7], "ida_jactimessetupfn": 5, "ida_jactimessetupfunct": [5, 7], "ida_jactimesvecfn": 5, "ida_jactimesvecfunct": [5, 7], "ida_precsetupfunct": [5, 7], "ida_precsolvefunct": [5, 7], "ida_rhsfunct": [5, 7], "ida_rootfunct": [5, 7], "ida_wrapjacrhsfunct": [5, 7], "ida_wrapjactimessetupfunct": [5, 7], "ida_wrapjactimesvecfunct": [5, 7], "ida_wrapprecsetupfunct": [5, 7], "ida_wrapprecsolvefunct": [5, 7], "ida_wraprhsfunct": [5, 7], "ida_wraprootfunct": [5, 7], "idasolveexcept": [5, 7], "idasolvefail": [5, 7], "idasolvefoundroot": [5, 7], "idasolvereachedtstop": [5, 7], "ifactor": 4, "implement": [1, 8], "implicit": 8, "import": [4, 6, 8], "includ": [0, 4, 6], "increas": 4, "independ": [4, 6, 8], "index": 7, "indic": [1, 4, 6, 8], "individu": 8, "inform": [4, 8], "ing": 5, "init_step": [1, 4, 6, 7, 8], "initi": [1, 4, 6, 8], "inititi": [4, 8], "initx": [4, 6, 8], "initxp": [4, 6], "instal": 9, "instanc": 4, "instead": [4, 6], "int": [4, 5], "integ": [1, 4, 5, 6, 8], "integr": [1, 4, 6, 8], "integrator_nam": [4, 6, 8], "interfac": [1, 4, 6, 8], "intern": [1, 4, 6, 8], "interv": 8, "io": 7, "ipython": [4, 8], "iter": [1, 4, 6, 8], "ivp_softwar": [4, 6], "j": 5, "jac": [4, 6], "jac_times_setupfn": 5, "jac_times_vecfn": 5, "jacfn": 5, "jacobi": 5, "jacobian": [4, 5, 6], "jacresfunct": 5, "jacrhsfunct": 5, "jcash": [4, 6], "jcurptr": 5, "jok": 5, "jv": 5, "k": [4, 6, 8], "know": 8, "kutta": [4, 8], "kwarg": 1, "label": 8, "larg": 8, "latest": 7, "least": 5, "left": 5, "legend": 8, "len": 4, "let": 8, "level": [7, 8], "like": [4, 8], "line": [4, 6, 8], "linear": 8, "linspac": 8, "list": [1, 4, 6, 8], "lmm_type": 8, "loc": 8, "long": 9, "low": 8, "lower": [1, 4, 6, 7, 8], "lr": 5, "lsoda": [4, 6], "lsodi": [0, 4, 6], "lsodiint": [3, 7], "m": [4, 5, 6, 8], "ma": [4, 6], "mai": [5, 9], "mail": 4, "main": [7, 8, 9], "make": [7, 8], "mani": [4, 6, 8], "map": [1, 4, 6, 9], "math": 4, "mathemat": 4, "mathematiqu": 4, "mathrm": 4, "matplotlib": 8, "matric": 5, "matrix": [4, 5, 6], "matur": [0, 4], "max_step": 4, "maximum": [1, 4, 6, 8], "mean": [1, 4, 6, 8], "mebdf": [4, 6], "memori": [1, 4, 6, 8], "mesh": [4, 6, 8], "messag": [1, 4, 6, 8], "method": [1, 4, 5, 6, 8], "might": 8, "ml": [4, 6], "modifi": [4, 6], "modul": [4, 5, 7, 9], "more": [1, 4, 6, 8], "moulton": 8, "move": [4, 6, 8], "msg00014": [4, 6], "multistep": 8, "must": [1, 4, 5, 6, 8, 9], "n": [4, 6, 8], "name": [1, 4, 5, 6, 8], "namedtupl": [1, 4, 6, 8], "ndarrai": 5, "ndim": [1, 4, 6, 8], "nearli": 8, "need": [1, 4, 5, 6, 8, 9], "neg": 5, "netlib": [0, 4], "new": [4, 8], "newton": [5, 8], "next": [1, 4, 6, 8], "no_continue_fn": [5, 7], "non": [5, 8], "none": [1, 4, 5, 6, 8], "nonlinear": [4, 6, 8], "nonstiff": 4, "normal": [1, 4, 6], "norsett": 4, "note": [1, 4, 5, 6, 8], "np": [8, 9], "nstep": 4, "number": [1, 4, 6, 8], "numer": 4, "numpi": [1, 4, 6, 8, 9], "object": [5, 8], "obtain": 8, "occur": [1, 4, 6, 8], "od": [3, 6, 9], "odebas": [1, 3, 7], "odeint": [4, 6, 7, 8], "odepack": [4, 6], "offer": [0, 4], "old": [1, 4, 6, 8], "old_api": [1, 4, 6, 8], "omega": 8, "onc": 9, "one": [1, 4, 6, 8], "one_step_comput": [1, 4, 6, 8], "onli": [1, 4, 5, 6, 8], "option": [1, 4, 6, 7, 8], "order": [1, 6, 7, 8], "ordinari": [4, 7, 8], "org": [0, 4], "orient": 8, "oscil": [4, 6, 8], "osdir": [4, 6], "other": [4, 7, 9], "otherwis": 4, "our": 8, "out": 8, "output": [1, 4, 6, 8], "outsid": [0, 4], "over": [1, 4, 6, 8], "own": 8, "p": [4, 5], "packag": [4, 8], "page": 7, "paramet": [1, 4, 6, 8], "particular": 9, "pass": [4, 6, 8], "past": [4, 8], "pde": [4, 6, 8], "pend": 8, "pendulum": 8, "per": [5, 8], "perfom": [4, 8], "perform": [1, 4, 6, 8], "pi": 8, "plot": 8, "plt": 8, "point": [4, 8], "posit": [5, 8], "possibl": [4, 6, 8], "possibli": 4, "prealloc": [1, 4, 5, 6, 8], "prec_setupfn": 5, "prec_solvefn": 5, "precis": [1, 4, 6, 7, 8], "precondit": 5, "precondition": 5, "preconditit": 5, "prefer": 9, "preprocess": 5, "prescrib": 4, "previou": [1, 4, 6, 8], "prime": 8, "princ": [4, 8], "print": [4, 8], "print_funct": [4, 6, 8], "problem": [4, 5, 6, 8], "product": 5, "prototyp": 5, "provid": 7, "purpos": [5, 8], "py": [4, 8], "pyplot": 8, "python": [4, 6, 8], "quad": [4, 8], "qualnam": [4, 5], "quickli": 8, "r": 5, "rais": [4, 5], "re": [4, 5, 6], "reach": [1, 4, 5, 6, 8], "readm": [4, 6], "readthedoc": 7, "recover": [1, 4, 5, 6, 8], "refer": 4, "rel": 4, "relat": 5, "requir": 1, "reseqn": [4, 6], "reset": [1, 4, 6], "resfn": 5, "resfunct": 5, "residu": [1, 4, 5, 6], "rest": 8, "result": [1, 4, 5, 6, 8], "retri": 5, "return": [1, 4, 5, 6, 8], "return_residu": [4, 6], "return_rh": [4, 8], "rfn": [1, 4], "rh": [4, 5, 8], "rhseqn": [4, 8], "rhsfn": 5, "rhsfun": 8, "rhsfunction": 5, "right": [4, 5, 8], "rk5": 8, "rk8": 8, "root": [1, 4, 5, 6, 8], "rootfn": 5, "rootfunct": 5, "routin": 8, "rr": 5, "rtol": [4, 8], "rule": 8, "run": [1, 4, 6, 8], "rung": [4, 8], "runtim": [4, 8], "rvec": 5, "safeti": 4, "same": [4, 8], "sampl": 8, "scalar": 9, "scale": [4, 6], "scheme": 4, "scikit": [3, 6, 8, 9], "scikits_od": [3, 7], "scikits_odes_cor": 1, "scikits_odes_sundi": [3, 7, 9], "scipi": [0, 7, 8], "search": 7, "second": [1, 4, 6, 8], "see": [4, 6, 7, 8, 9], "select": [4, 6, 7, 8], "self": [5, 8], "sequenc": [4, 8], "seri": 4, "set": [1, 4, 5, 6, 8, 9], "set_jac_times_setupfn": 5, "set_jac_times_vecfn": 5, "set_jacfn": 5, "set_opt": [1, 4, 6, 7, 8], "set_prec_setupfn": 5, "set_prec_solvefn": 5, "set_resfn": 5, "set_rhsfn": 5, "set_rootfn": 5, "set_tstop": [4, 7, 8], "setup": 5, "shape": 8, "shorthand": 8, "should": [1, 5, 8, 9], "show": 8, "side": [4, 5, 8], "signatur": [1, 4, 6, 8], "similar": [1, 4, 8], "simpl": [4, 5, 6, 8], "simpler": [4, 6, 8], "sin": [4, 6, 8], "singl": [8, 9], "singular": 4, "size": [4, 5], "so": [0, 4, 6, 8], "sol": 8, "soln": [4, 5], "solut": [4, 5, 6, 8], "solv": [1, 4, 5, 6, 7, 8], "solver": [0, 1, 5, 7], "solverreturn": [4, 7], "solvervari": [4, 7], "some": [0, 4, 5, 6, 8], "sourc": [1, 4, 5, 6, 8], "space": 8, "specif": [1, 4, 5, 6, 8], "specifi": 5, "springer": 4, "sqrt": [4, 6, 8], "stabilis": 4, "start": [1, 4, 5, 6, 8], "state": [4, 8], "statu": [1, 4, 6, 8], "statusenum": [1, 4, 5, 7, 8], "statusenumdop": [4, 7], "statusenumida": [5, 7], "statusenumxxx": [1, 4, 6], "step": [1, 4, 5, 6, 7, 8], "stepsiz": [4, 8], "stiff": 8, "stop": [1, 4, 6, 8], "store": [1, 4, 5, 8, 9], "strict": 8, "string": [1, 4, 6, 8], "subclass": [4, 5], "success": [1, 4, 5, 6, 8], "sundial": [3, 4, 7, 8], "support": [1, 4, 6, 8, 9], "switch": 4, "switzerland": 4, "system": [4, 5, 6, 8], "t": [1, 4, 5, 6, 8], "t0": [1, 4, 6, 8], "t_0": 4, "t_err": [1, 4, 6, 8], "t_out": [1, 4, 6, 8], "t_root": 4, "t_stop": 4, "take": [4, 6, 8, 9], "term": 8, "than": [1, 4, 6, 8], "thei": [0, 4], "theta": 8, "thi": [1, 4, 5, 6, 7, 8, 9], "time": [1, 4, 5, 6, 8], "toler": [4, 8], "tout": 8, "toward": [1, 4, 6, 8], "trapezoid": 8, "trapz": 8, "treat": 9, "true": [1, 4, 6, 8], "tspan": [1, 4, 6, 8], "tstop": [1, 4, 5, 6, 8], "tt": 5, "tupl": [1, 4, 6, 8], "two": [5, 8], "type": [4, 5, 8], "u": [4, 8], "uk": [4, 6], "undefin": [4, 8], "under": 8, "unig": 4, "universit": 4, "unknown": [4, 6, 8], "unrecover": 5, "until": [1, 4, 6, 8], "updat": [4, 6, 8], "us": [1, 4, 5, 6, 8, 9], "user": [4, 6, 7], "userdata": [4, 5, 6, 8], "v": 5, "valid": 4, "validate_flag": [4, 5], "valu": [1, 4, 5, 6, 8], "variabl": [4, 5, 6, 8, 9], "variou": 4, "vector": [1, 4, 5, 8], "veloc": 8, "verbos": 4, "verlag": 4, "version": [7, 9], "vertic": 8, "via": [7, 8], "vode": [4, 6], "wanner": 4, "want": 8, "we": [4, 6, 8], "well": [4, 6, 8], "were": [1, 4, 6, 8], "when": [1, 4, 5, 6, 8, 9], "whenev": 9, "where": [1, 4, 5, 6, 8], "which": [1, 4, 5, 6, 8, 9], "whichev": 9, "with_userdata": 5, "work": [4, 6, 8], "worksheet": [4, 8], "wrapper": [0, 4, 5, 8], "write": [4, 6], "written": 8, "www": [0, 4, 6], "x": [4, 6, 8], "xdot": [4, 6, 8], "xlabel": 8, "y": [1, 4, 5, 6, 8], "y0": [1, 4, 6, 8], "y_0": 4, "y_dot": 1, "y_err": [1, 4, 6, 8], "y_ic0": [1, 4, 6], "y_ic0_retn": [1, 4, 6], "y_retn": [1, 4, 6, 8], "y_root": 4, "y_tstop": 4, "ydot": [1, 4, 5, 6], "you": [4, 5, 6, 8, 9], "your": [4, 8], "yp": [1, 4, 5, 6], "yp0": [1, 4, 6], "yp_err": [1, 4, 6], "yp_ic0": [1, 4, 6], "yp_ic0_retn": [1, 4, 6], "yp_retn": [1, 4, 6], "yprime": [4, 6], "yprime0": 4, "yy": 5, "z": 5, "zero": 5, "zip": [4, 8]}, "titles": ["scikits.odes", "scikits-odes-core", "scikits-odes-daepack", "Lower Level API", "scikits-odes", "scikits-odes-sundials", "DAE Solvers", "Welcome to the ODES scikit API Documentation", "ODE Solvers", "Sundials Solver Options"], "titleterms": {"api": [3, 4, 7], "avail": 4, "core": 1, "cvode": [0, 5], "dae": [0, 4, 6], "daepack": 2, "ddaspkint": 0, "document": 7, "dop853": 4, "dopri5": [0, 4], "first": 4, "ida": [0, 5], "indic": 7, "level": 3, "lower": 3, "lsodiint": 0, "make": 4, "od": [0, 1, 2, 4, 5, 7, 8], "option": 9, "order": 4, "precis": 9, "scikit": [0, 1, 2, 4, 5, 7], "scikits_od": 4, "scikits_odes_sundi": 5, "scipi": 4, "select": 9, "solver": [4, 6, 8, 9], "sundial": [0, 5, 9], "tabl": 7, "via": 4, "welcom": 7}}) \ No newline at end of file diff --git a/v3.0.0a3/sundials.html b/v3.0.0a3/sundials.html new file mode 100644 index 0000000..06a9d6d --- /dev/null +++ b/v3.0.0a3/sundials.html @@ -0,0 +1,144 @@ + + + + + + + + Sundials Solver Options — Odes 3.0.0a3 documentation + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+ +
+

Sundials Solver Options

+
+

Selecting Precision

+

Sundials can be built with different precisions (currently ‘single’ which maps +to C ‘float’; ‘double’ (the default) which maps to C ‘double’; and +‘extended’ which maps to C ‘long double’), and scikits-odes-sundials +supports using whichever precision Sundials is built with. To take advantage of +this, you must first have sundials built and installed with the desired +precision setting.

+

Once you have done this, build scikits-odes-sundials against this particular +version of sundials (see the main documentation for how to do this). +scikits-odes-sundials will automatically detect the precision, and store this in +a variable called +DTYPE. DTYPE should be accessed from +scikits_odes_sundials (other modules may have DTYPE +defined, but scikits_odes_sundials should be preferred). Additionally +scikits_odes_sundials.precision contains the precision setting found +by scikits.odes.

+

To use DTYPE, treat it as a numpy dtype; use it whenever you need to +create an array:

+
np.array([1,2,3], dtype=DTYPE)
+
+
+

or when using scalars:

+
DTYPE(0.1) * DTYPE(0.1)
+
+
+
+
+ + +
+ +
+
+ +
+
+ + + + + + + \ No newline at end of file diff --git a/versions.json b/versions.json index 3e3dba6..c76058d 100644 --- a/versions.json +++ b/versions.json @@ -1 +1 @@ -{"folders": ["dev", "master", "v3.0.0a2", "version-v2.3.2", "version-v2.3.2b", "version-v2.4.0", "version-v2.4.1", "version-v2.5.0", "version-v2.6.0", "version-v2.6.1"], "default-branch": "master", "labels": {"dev": "dev", "master": "master (latest)", "v3.0.0a2": "v3.0.0a2", "version-v2.3.2": "version-v2.3.2", "version-v2.3.2b": "version-v2.3.2b", "version-v2.4.0": "version-v2.4.0", "version-v2.4.1": "version-v2.4.1", "version-v2.5.0": "version-v2.5.0", "version-v2.6.0": "version-v2.6.0", "version-v2.6.1": "version-v2.6.1"}, "versions": ["master", "v3.0.0a2", "version-v2.6.1", "version-v2.6.0", "version-v2.5.0", "version-v2.4.1", "version-v2.4.0", "version-v2.3.2b", "version-v2.3.2", "dev"], "warnings": {"dev": ["unreleased"], "master": ["unreleased"], "v3.0.0a2": ["prereleased"], "version-v2.3.2": ["unreleased"], "version-v2.3.2b": ["unreleased"], "version-v2.4.0": ["unreleased"], "version-v2.4.1": ["unreleased"], "version-v2.5.0": ["unreleased"], "version-v2.6.0": ["unreleased"], "version-v2.6.1": ["unreleased"]}, "latest": "master", "downloads": {"dev": [], "master": [], "v3.0.0a2": [], "version-v2.3.2": [], "version-v2.3.2b": [], "version-v2.4.0": [], "version-v2.4.1": [], "version-v2.5.0": [], "version-v2.6.0": [], "version-v2.6.1": []}} \ No newline at end of file +{"folders": ["dev", "master", "v3.0.0a2", "v3.0.0a3", "version-v2.3.2", "version-v2.3.2b", "version-v2.4.0", "version-v2.4.1", "version-v2.5.0", "version-v2.6.0", "version-v2.6.1"], "default-branch": "master", "labels": {"dev": "dev", "master": "master (latest)", "v3.0.0a2": "v3.0.0a2", "v3.0.0a3": "v3.0.0a3", "version-v2.3.2": "version-v2.3.2", "version-v2.3.2b": "version-v2.3.2b", "version-v2.4.0": "version-v2.4.0", "version-v2.4.1": "version-v2.4.1", "version-v2.5.0": "version-v2.5.0", "version-v2.6.0": "version-v2.6.0", "version-v2.6.1": "version-v2.6.1"}, "versions": ["master", "v3.0.0a3", "v3.0.0a2", "version-v2.6.1", "version-v2.6.0", "version-v2.5.0", "version-v2.4.1", "version-v2.4.0", "version-v2.3.2b", "version-v2.3.2", "dev"], "warnings": {"dev": ["unreleased"], "master": ["unreleased"], "v3.0.0a2": ["prereleased"], "v3.0.0a3": ["prereleased"], "version-v2.3.2": ["unreleased"], "version-v2.3.2b": ["unreleased"], "version-v2.4.0": ["unreleased"], "version-v2.4.1": ["unreleased"], "version-v2.5.0": ["unreleased"], "version-v2.6.0": ["unreleased"], "version-v2.6.1": ["unreleased"]}, "latest": "master", "downloads": {"dev": [], "master": [], "v3.0.0a2": [], "v3.0.0a3": [], "version-v2.3.2": [], "version-v2.3.2b": [], "version-v2.4.0": [], "version-v2.4.1": [], "version-v2.5.0": [], "version-v2.6.0": [], "version-v2.6.1": []}} \ No newline at end of file