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

Class LeapFrog

source code

        object --+    
                 |    
AbstractIntegrator --+
                     |
                    LeapFrog
Known Subclasses:

Leap Frog integration scheme implementation that calculates position and momenta at equal times. Slower than FastLeapFrog, but intermediate points in trajectories obtained using LeapFrog.integrate(init_state, length, return_trajectoy=True) are physical.

Nested Classes

Inherited from AbstractIntegrator: __metaclass__

Instance Methods
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 AbstractIntegrator: __init__, integrate

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

Class Variables
  __abstractmethods__ = frozenset([])
Properties

Inherited from object: __class__

Method Details

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 which to evolve one integration step
  • current_step - Current integration step
  • mass_matrix - mass matrix
Returns: State
the altered state
Overrides: AbstractIntegrator.integrate_once
(inherited documentation)