integrators

package
v0.0.0-...-65a3d87 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package verlet implements velocity verlet for stepwise Newtonian mechanics.

Package verlet implements velocity verlet for stepwise Newtonian mechanics.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LangevinStep

func LangevinStep(R, V []r3.Vector, L, M, dt float64, therm Thermostat) ([]r3.Vector, []r3.Vector)

Implementation of first order langevin dynamics

func NextR

func NextR(r, v r3.Vector, h float64) (nr r3.Vector)

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

func VerletNextR(r, v, a r3.Vector, h float64) (nr r3.Vector)

NextR calculates the next position vector based on current position, velocity, and acceleration.

func VerletNextV

func VerletNextV(v, a1, a2 r3.Vector, h float64) (nv r3.Vector)

NextV calculates the next velocity vector based on current velocity and acceleration and future acceleration.

func VerletStep

func VerletStep(R, V []r3.Vector, L, M, dt float64) ([]r3.Vector, []r3.Vector)

TimeStep evolves the system by one unit of time using the Velocity Verlet algorithm for molecular dynamics using channels to provide simple parallelisarion.

Types

type Thermostat

type Thermostat struct {
	// contains filtered or unexported fields
}

func PrepareLangevin

func PrepareLangevin(gamma, M, h, T0 float64, verlet bool) Thermostat

type VecReturn

type VecReturn struct {
	Index int
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL