public class LeapFrogging extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
LeapFrogging.DynamicsState
Contains the entire state (both the position and the momentum) at a given point in time.
|
| Constructor and Description |
|---|
LeapFrogging(RealVectorFunction dU,
Vector m,
Vector x,
Vector p,
double dt)
Constructs a new instance with the given parameters.
|
| Modifier and Type | Method and Description |
|---|---|
Vector |
p()
Gets the current momentum.
|
LeapFrogging.DynamicsState |
state()
Gets the current system configuration.
|
void |
step()
Performs one step of the leap-frogging algorithm.
|
void |
steps(int n)
Performs n steps of the leap-frogging algorithm.
|
Vector |
x()
Gets the current position.
|
public LeapFrogging(RealVectorFunction dU, Vector m, Vector x, Vector p, double dt)
dU - the derivative of the potential energy of the system, w.r.t. the position of
its componentsm - the mass of the componentsx - the initial positionp - the initial momentumdt - the size of each time steppublic void steps(int n)
n - the number of steps to performpublic void step()
public Vector x()
public Vector p()
public LeapFrogging.DynamicsState state()
Copyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.