|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gicentre.utils.network.traer.physics.Integrator
org.gicentre.utils.network.traer.physics.RungeKuttaIntegrator
public class RungeKuttaIntegrator
Class capable of performing Runge Kutta integration. Compared to the Euler integrators, this one is slower but is more stable.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.gicentre.utils.network.traer.physics.Integrator |
---|
Integrator.METHOD |
Field Summary |
---|
Fields inherited from class org.gicentre.utils.network.traer.physics.Integrator |
---|
s |
Constructor Summary | |
---|---|
RungeKuttaIntegrator(ParticleSystem s)
Sets up the integrator to be used by the given particle system. |
Method Summary | |
---|---|
protected void |
allocateParticles()
Instantiates the original positions and velocities of the particles. |
protected static Function<Particle,?> |
kApplier(java.util.Map<Particle,Vector3D> kForces,
java.util.Map<Particle,Vector3D> kVelocities,
java.util.Map<Particle,Vector3D> originalPositions,
java.util.Map<Particle,Vector3D> originalVelocities,
float deltaT)
Provides the function that applies the single increment of the particles' positions and velocities. |
protected static Function<Particle,?> |
kFunctor(java.util.Map<Particle,Vector3D> kForces,
java.util.Map<Particle,Vector3D> kVelocities)
Provides the function capable of performing the integration. |
RungeKuttaIntegrator |
step(float deltaT)
Performs the incrementing of the particles' positions and velocities over the given time step. |
protected Function<Particle,?> |
updater(java.util.Map<Particle,Vector3D> k1Forces,
java.util.Map<Particle,Vector3D> k1Velocities,
java.util.Map<Particle,Vector3D> k2Forces,
java.util.Map<Particle,Vector3D> k2Velocities,
java.util.Map<Particle,Vector3D> k3Forces,
java.util.Map<Particle,Vector3D> k3Velocities,
java.util.Map<Particle,Vector3D> k4Forces,
java.util.Map<Particle,Vector3D> k4Velocities,
java.util.Map<Particle,Vector3D> originalPositions,
java.util.Map<Particle,Vector3D> originalVelocities,
float deltaT)
Provides the function that updates the particles in the system. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RungeKuttaIntegrator(ParticleSystem s)
s
- Particle system upon which to perform the integration.Method Detail |
---|
protected static final Function<Particle,?> kFunctor(java.util.Map<Particle,Vector3D> kForces, java.util.Map<Particle,Vector3D> kVelocities)
kForces
- Forces to be applied to particles during integration.kVelocities
- Velocities of particles.
protected static final Function<Particle,?> kApplier(java.util.Map<Particle,Vector3D> kForces, java.util.Map<Particle,Vector3D> kVelocities, java.util.Map<Particle,Vector3D> originalPositions, java.util.Map<Particle,Vector3D> originalVelocities, float deltaT)
kForces
- Forces associated with the particles/kVelocities
- Velocities of the particles.originalPositions
- The original positions of the particles before integration.originalVelocities
- The original velocities of the particles before integration.deltaT
- Time step over which to move the particles.
protected Function<Particle,?> updater(java.util.Map<Particle,Vector3D> k1Forces, java.util.Map<Particle,Vector3D> k1Velocities, java.util.Map<Particle,Vector3D> k2Forces, java.util.Map<Particle,Vector3D> k2Velocities, java.util.Map<Particle,Vector3D> k3Forces, java.util.Map<Particle,Vector3D> k3Velocities, java.util.Map<Particle,Vector3D> k4Forces, java.util.Map<Particle,Vector3D> k4Velocities, java.util.Map<Particle,Vector3D> originalPositions, java.util.Map<Particle,Vector3D> originalVelocities, float deltaT)
k1Forces
- k1Velocities
- k2Forces
- k2Velocities
- k3Forces
- k3Velocities
- k4Forces
- k4Velocities
- originalPositions
- originalVelocities
- deltaT
-
protected final void allocateParticles()
public RungeKuttaIntegrator step(float deltaT)
step
in class Integrator
deltaT
- Time step over which to update the particles.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |