aivika-0.7: A multi-paradigm simulation library

Stabilityexperimental
MaintainerDavid Sorokin <david.sorokin@gmail.com>
Safe HaskellSafe-Inferred

Simulation.Aivika.Specs

Contents

Description

Tested with: GHC 7.6.3

It defines the simulation specs and functions for this data type.

Synopsis

Simulation Specs

data Specs Source

It defines the simulation specs.

Constructors

Specs 

Fields

spcStartTime :: Double

the start time

spcStopTime :: Double

the stop time

spcDT :: Double

the integration time step

spcMethod :: Method

the integration method

Instances

data Method Source

It defines the integration method.

Constructors

Euler

Euler's method

RungeKutta2

the 2nd order Runge-Kutta method

RungeKutta4

the 4th order Runge-Kutta method

Instances

Auxiliary Functions

basicTime :: Specs -> Int -> Int -> DoubleSource

Returns a simulation time for the integration point specified by the specs, iteration and phase.

integIterationBnds :: Specs -> (Int, Int)Source

Returns the first and last integration iterations.

integIterationHiBnd :: Specs -> IntSource

Returns the last integration iteration.

integIterationLoBnd :: Specs -> IntSource

Returns the first integration iteration, i.e. zero.

integPhaseBnds :: Specs -> (Int, Int)Source

Returns the first and last integration phases.

integPhaseHiBnd :: Specs -> IntSource

Returns the last integration phase, 0 for Euler's method, 1 for RK2 and 3 for RK4.

integPhaseLoBnd :: Specs -> IntSource

Returns the first integration phase, i.e. zero.

integTimes :: Specs -> [Double]Source

Return the integration time values.