Documentation ¶
Overview ¶
Package verlet implements velocity verlet for stepwise Newtonian mechanics.
Package verlet implements velocity verlet for stepwise Newtonian mechanics.
Index ¶
- func LangevinStep(R, V []r3.Vector, L, M, dt float64, therm Thermostat) ([]r3.Vector, []r3.Vector)
- func NextR(r, v r3.Vector, h float64) (nr r3.Vector)
- func NextV(v, F r3.Vector, therm Thermostat) (nv r3.Vector)
- func VerletNextR(r, v, a r3.Vector, h float64) (nr r3.Vector)
- func VerletNextV(v, a1, a2 r3.Vector, h float64) (nv r3.Vector)
- func VerletStep(R, V []r3.Vector, L, M, dt float64) ([]r3.Vector, []r3.Vector)
- type Thermostat
- type VecReturn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LangevinStep ¶
Implementation of first order langevin dynamics
func NextR ¶
NextR calculates the next position vector based on current position, velocity, and acceleration.
func NextV ¶
func NextV(v, F r3.Vector, therm Thermostat) (nv r3.Vector)
NextV calculates the next velocity vector based on current velocity and acceleration and future acceleration.
func VerletNextR ¶
NextR calculates the next position vector based on current position, velocity, and acceleration.
func VerletNextV ¶
NextV calculates the next velocity vector based on current velocity and acceleration and future acceleration.
Types ¶
type Thermostat ¶
type Thermostat struct {
// contains filtered or unexported fields
}
func PrepareLangevin ¶
func PrepareLangevin(gamma, M, h, T0 float64, verlet bool) Thermostat
Click to show internal directories.
Click to hide internal directories.