aivika-6.0.0: A multi-method simulation library
CopyrightCopyright (c) 2009-2017 David Sorokin <david.sorokin@gmail.com>
LicenseBSD3
MaintainerDavid Sorokin <david.sorokin@gmail.com>
Stabilityexperimental
Safe HaskellSafe-Inferred
LanguageHaskell2010

Simulation.Aivika.Internal.Specs

Description

Tested with: GHC 8.0.1

It defines the simulation specs and related stuff.

Synopsis

Documentation

data Specs Source #

It defines the simulation specs.

Constructors

Specs 

Fields

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

RungeKutta4b

the 4th order Runge-Kutta 3/8-method

Instances

Instances details
Show Method Source # 
Instance details

Defined in Simulation.Aivika.Internal.Specs

Eq Method Source # 
Instance details

Defined in Simulation.Aivika.Internal.Specs

Methods

(==) :: Method -> Method -> Bool #

(/=) :: Method -> Method -> Bool #

Ord Method Source # 
Instance details

Defined in Simulation.Aivika.Internal.Specs

data Run Source #

It indentifies the simulation run.

Constructors

Run 

Fields

data Point Source #

It defines the simulation point appended with the additional information.

Constructors

Point 

Fields

type EventPriority = Int Source #

The event priority (greater is higher).

data EventQueue Source #

It represents the event queue.

Constructors

EventQueue 

Fields

newEventQueue :: Specs -> IO EventQueue Source #

Create a new event queue by the specified specs.

basicTime :: Specs -> Int -> Int -> Double Source #

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 -> Int Source #

Returns the last integration iteration.

integIterationLoBnd :: Specs -> Int Source #

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

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

Returns the first and last integration phases.

integPhaseHiBnd :: Specs -> Int Source #

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

integPhaseLoBnd :: Specs -> Int Source #

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

integTimes :: Specs -> [Double] Source #

Return the integration time values.

integPoints :: Run -> [Point] Source #

Return the integration time points.

integPointsStartingFrom :: Point -> [Point] Source #

Return the integration time points starting from the specified iteration.

integStartPoint :: Run -> Point Source #

Return the start time point.

integStopPoint :: Run -> Point Source #

Return the integration stop time point.

simulationStopPoint :: Run -> Point Source #

Return the simulation stop time point.

timeGrid :: Specs -> Int -> [(Int, Double)] Source #

Return the indexed time values in the grid by specified size.

pointAt :: Run -> Double -> EventPriority -> Point Source #

Return the point at the specified time given the priority.

delayPoint :: Point -> Int -> Point Source #

Delay the point by the specified positive number of iterations.