Python Version: evaLEs.LE
Python function without Numba
Calculate the Lyapunov exponents for a set of ODEs using the method described in Sandri (1996), through the use of the variational matrix.
- evaLEs.LE.computeLE(func, fjac, x0, t, p=(), ttrans=None, continuous=True)
Computes the global Lyapunov exponents for a set of ODEs.
- Parameters
f (function) – ODE function. Must take arguments like f(t, x, p) where x and t are the state and time now, and p is a tuple of parameters. If there are no model paramters, p should be set to the empty tuple.
fjac (function.) – Jacobian of f.
x0 (numpy array.) – Initial position for calculation. Integration of transients will begin from this point.
t (numpy array.) – Array of times over which to calculate LE.
p (float, numpy array or empty tuple.) – (optional) Tuple of model parameters for f.
ttrans – (optional) Times over which to integrate transient behavior. If not specified, assumes trajectory is on the attractor.
continuos (boolean.) – (optional) If set True the algorithm assumes a continue dynamical system (and integrate with RG4). Else it will assume a discrete dynamical system (map) and just uses the step defined in func. If not specified continuos dynamical system is assumed.
- Returns
Return the Lyapunov Spectrum evaluated at each instant in a numpy array and the solution in time.
- Return type
(numpy array, numpy array).
Python + Numba Version: evaLEs.numbaLE
Python function with Numba
Calculate the Lyapunov exponents for a set of ODEs using the method described in Sandri (1996), through the use of the variational matrix.
- evaLEs.numbaLE.computeLE(func, fjac, x0, t, p=(), ttrans=None, continuous=True)
Computes the global Lyapunov exponents for a set of ODEs.
- Parameters
f (function) – ODE function. Must take arguments like f(t, x, p) where x and t are the state and time now, and p is a tuple of parameters. If there are no model paramters, p should be set to the empty tuple.
fjac (function.) – Jacobian of f.
x0 (numpy array.) – Initial position for calculation. Integration of transients will begin from this point.
t (numpy array.) – Array of times over which to calculate LE.
p (float, numpy array or empty tuple.) – (optional) Tuple of model parameters for f.
ttrans (numpy array.) – (optional) Times over which to integrate transient behavior. If not specified, assumes trajectory is on the attractor.
continuos (boolean.) – (optional) If set True the algorithm assumes a continue dynamical system (and integrate with RG4). Else it will assume a discrete dynamical system (map) and just uses the step defined in func. If not specified continuos dynamical system is assumed.
- Returns
Return the Lyapunov Spectrum evaluated at each instant in a numpy array and the solution in time.
- Return type
(numpy array, numpy array).