pyoculus 0.1.1
Loading...
Searching...
No Matches
pyoculus.solvers.lyapunov_exponent.LyapunovExponent Class Reference

Class that used to setup the Lyapunov exponent computation. More...

Inheritance diagram for pyoculus.solvers.lyapunov_exponent.LyapunovExponent:
pyoculus.solvers.base_solver.BaseSolver

Public Member Functions

 __init__ (self, problem, params=dict(), integrator=None, integrator_params=dict())
 Sets up the class that compute the Lyapunov exponent.
 
 compute (self, t0, ic, dic=[1.0, 0.0])
 Compute the maximal Lyapunov exponents.
 
 plot (self, **kwargs)
 
- Public Member Functions inherited from pyoculus.solvers.base_solver.BaseSolver
 is_successful (self)
 Returns True if the computation is successfully completed.
 

Public Attributes

 nPpts = params["nPpts"]
 
 nsave = params["nsave"]
 
 Nfp = problem.Nfp
 
 ile = np.arange(0, self.nPpts + 1, self.nsave, dtype=np.int)
 
 le = np.zeros(self.ile.shape, dtype=np.float64)
 
int dt = 2 * np.pi / self.Nfp
 
 t0 = t0
 
 ic = icnp.copy()
 
 dic = dic_norm.copy()
 
 di = np.ones((self.nPpts), dtype=np.float64)
 
bool successful = True
 
- Public Attributes inherited from pyoculus.solvers.base_solver.BaseSolver
bool successful = False
 flagging if the computation is done and successful
 

Protected Attributes

 _params = params
 
- Protected Attributes inherited from pyoculus.solvers.base_solver.BaseSolver
 _integrator_type = RKIntegrator
 
 _params = dict(params)
 
 _integrator = self._integrator_type(integrator_params)
 
 _problem = problem
 
 _integrator_params = dict(integrator_params)
 

Detailed Description

Class that used to setup the Lyapunov exponent computation.

Constructor & Destructor Documentation

◆ __init__()

pyoculus.solvers.lyapunov_exponent.LyapunovExponent.__init__ ( self,
problem,
params = dict(),
integrator = None,
integrator_params = dict() )

Sets up the class that compute the Lyapunov exponent.

Parameters
problemmust inherit pyoculus.problems.BaseProblem, the problem to solve
paramsdict, the parameters for the solver
integratorthe integrator to use, must inherit \pyoculus.integrators.BaseIntegrator, if set to None by default using RKIntegrator
integrator_paramsdict, the parmaters passed to the integrator

params['nPpts']=2000 – the number of iterations

params['nsave']=100 – save the Lyapunov Exponent each nsave iteration

params['Nfp']=1 – period in zeta direction

Reimplemented from pyoculus.solvers.base_solver.BaseSolver.

Member Function Documentation

◆ compute()

pyoculus.solvers.lyapunov_exponent.LyapunovExponent.compute ( self,
t0,
ic,
dic = [1.0, 0.0] )

Compute the maximal Lyapunov exponents.

Parameters
t0the start time (or angle)
icthe initial conidition
dicthe initial perturbation direction (non-zero, for most of the cases it doesn't matter)
Returns
a class with results

result.le – the computed maximal Lyapunov Exponent (as a function of number of map iterations)

result.ile – the number of iterations

◆ plot()

pyoculus.solvers.lyapunov_exponent.LyapunovExponent.plot ( self,
** kwargs )

Member Data Documentation

◆ _params

pyoculus.solvers.lyapunov_exponent.LyapunovExponent._params = params
protected

◆ di

pyoculus.solvers.lyapunov_exponent.LyapunovExponent.di = np.ones((self.nPpts), dtype=np.float64)

◆ dic

pyoculus.solvers.lyapunov_exponent.LyapunovExponent.dic = dic_norm.copy()

◆ dt

int pyoculus.solvers.lyapunov_exponent.LyapunovExponent.dt = 2 * np.pi / self.Nfp

◆ ic

pyoculus.solvers.lyapunov_exponent.LyapunovExponent.ic = icnp.copy()

◆ ile

pyoculus.solvers.lyapunov_exponent.LyapunovExponent.ile = np.arange(0, self.nPpts + 1, self.nsave, dtype=np.int)

◆ le

pyoculus.solvers.lyapunov_exponent.LyapunovExponent.le = np.zeros(self.ile.shape, dtype=np.float64)

◆ Nfp

pyoculus.solvers.lyapunov_exponent.LyapunovExponent.Nfp = problem.Nfp

◆ nPpts

pyoculus.solvers.lyapunov_exponent.LyapunovExponent.nPpts = params["nPpts"]

◆ nsave

pyoculus.solvers.lyapunov_exponent.LyapunovExponent.nsave = params["nsave"]

◆ successful

pyoculus.solvers.lyapunov_exponent.LyapunovExponent.successful = True

◆ t0

pyoculus.solvers.lyapunov_exponent.LyapunovExponent.t0 = t0

The documentation for this class was generated from the following file: