Package csb :: Package numeric :: Module integrators :: Class AbstractIntegrator
[frames] | no frames]

Class AbstractIntegrator

source code

object --+
         |
        AbstractIntegrator
Known Subclasses:

Abstract integrator class. Subclasses implement different integration schemes for solving deterministic equations of motion.

Nested Classes
  __metaclass__
Metaclass for defining Abstract Base Classes (ABCs).
Instance Methods
 
__init__(self, timestep, gradient)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
AbstractPropagationResult
integrate(self, init_state, length, mass_matrix=None, return_trajectory=False)
Integrates equations of motion starting from an initial state a certain number of steps.
source code
State
integrate_once(self, state, current_step, mass_matrix=None)
Integrates one step starting from an initial state and an initial time given by the product of the timestep and the current_step parameter.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables
  __abstractmethods__ = frozenset(['integrate_once'])
Properties

Inherited from object: __class__

Method Details

__init__(self, timestep, gradient)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • timestep (float) - Integration timestep
  • gradient (AbstractGradient) - Gradient of potential energy
Overrides: object.__init__
(inherited documentation)

integrate(self, init_state, length, mass_matrix=None, return_trajectory=False)

source code 

Integrates equations of motion starting from an initial state a certain number of steps.

Parameters:
  • init_state (State) - Initial state from which to start integration
  • length (int) - Nubmer of integration steps to be performed
  • mass_matrix (n-dimensional InvertibleMatrix with n being the dimension of the configuration space, that is, the dimension of the position / momentum vectors) - Mass matrix
  • return_trajectory (boolean) - Return complete Trajectory instead of the initial and final states only (PropagationResult). This reduces performance.
Returns: AbstractPropagationResult

integrate_once(self, state, current_step, mass_matrix=None)

source code 

Integrates one step starting from an initial state and an initial time given by the product of the timestep and the current_step parameter. The input state is changed in place.

Parameters:
  • state (State) - State which to evolve one integration step
  • current_step (int) - Current integration step
  • mass_matrix (n-dimensional numpy array with n being the dimension of the configuration space, that is, the dimension of the position / momentum vectors) - mass matrix
Returns: State
the altered state