RungeKutta3

scalation.dynamics.RungeKutta3
See theRungeKutta3 companion object
class RungeKutta3(val name: String, a: MatrixD, b: VectorD, b_: VectorD, c: VectorD) extends Integrator

The RungeKutta3 class provides implementations of several Runge-Kutta numerical ODE solvers. Given an unknown, time-dependent function y(t) governed by an Ordinary Differential Equation (ODE) of the form: d/dt y(t) = y'(t) = f(t, y) y(t0) = y0 Note: the integrateV method for a system of separable ODEs is mixed in from the Integrator trait. The ODE method is defined by its Extended Butcher Tablaeu (a, b, b_, c).

Value parameters

a

the lower triangular matrix of constants multiplying the stage derivatives

b

the vector of constants for computing the weighted average of stage derivatives

b_

same for the embedded solver

c

the vector of constants for shifting time

name

the name the ODE solver

Attributes

Companion
object
Graph
Supertypes
trait Integrator
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def integrate(f: Derivative, y0: Double, t: Double, t0: Double, step: Double): Double

Compute y(t) governed by a differential equation using numerical integration of the derivative function f(t, y) using a 4th-order Runge-Kutta method to return the value of y(t) at time t.

Compute y(t) governed by a differential equation using numerical integration of the derivative function f(t, y) using a 4th-order Runge-Kutta method to return the value of y(t) at time t.

Value parameters

f

the derivative function f(t, y) where y is a scalar

step

the step size

t

the time value at which to compute y(t)

t0

the initial time

y0

the value of the y-function at time t0, y0 = y(t0)

Attributes

def integrate2(f: Derivative, y0: Double, t: Double, hmin: Double, hmax: Double, t0: Double, tol: Double, maxSteps: Int): Double

Compute y(t) governed by a differential equation using numerical integration of the derivative function f(t, y) using a (4,5)-order Dormand-Prince method to return the value of y(t) at time t. The method provides more customization options.

Compute y(t) governed by a differential equation using numerical integration of the derivative function f(t, y) using a (4,5)-order Dormand-Prince method to return the value of y(t) at time t. The method provides more customization options.

Value parameters

f

the derivative function f(t, y)

hmax

the maximum step size

hmin

the minimum step size

maxSteps

the maximum number of steps

t

the time value at which to compute y(t)

t0

the initial time

tol

the tolerance

y0

value of the y-function at time t0, y0 = y(t0)

Attributes

def integrateVV(f: Array[DerivativeV], y0: VectorD, t: Double, t0: Double, step: Double): VectorD

Compute y(t), a vector, governed by a system of differential equations using numerical integration of the derivative function f(t, y) using a 4th-order Runge-Kutta method to return the value of y(t) at time t.

Compute y(t), a vector, governed by a system of differential equations using numerical integration of the derivative function f(t, y) using a 4th-order Runge-Kutta method to return the value of y(t) at time t.

Value parameters

f

the array of derivative functions [f(t, y)] where y is a vector

step

the step size

t

the time value at which to compute y(t)

t0

the initial time

y0

the value of the y-function at time t0, y0 = y(t0)

Attributes

Inherited methods

def getError: Double

Get the error estimate.

Get the error estimate.

Attributes

Inherited from:
Integrator
def integrateV(f: Array[Derivative], y0: VectorD, t: Double, t0: Double, step: Double): VectorD

Apply the integrate method to each derivative to compute the trajectory of a time-dependent vector function y(t) governed by a separable system of Ordinary Differential Equations (ODE's) where [f_j(t, y_j)] is an array of derivative functions. Each derivative function takes a scalar t and a scalar y_j = y(j).

Apply the integrate method to each derivative to compute the trajectory of a time-dependent vector function y(t) governed by a separable system of Ordinary Differential Equations (ODE's) where [f_j(t, y_j)] is an array of derivative functions. Each derivative function takes a scalar t and a scalar y_j = y(j).

Value parameters

f

the array of derivative functions [f_j(t, y_j)]

step

the step size

t

the time value at which to compute y(t)

t0

the initial time

y0

the initial value vector, y0 = y(t0)

Attributes

Inherited from:
Integrator

Concrete fields

val name: String

Inherited fields

protected val defaultStepSize: Double

The default step size for the t dimension

The default step size for the t dimension

Attributes

Inherited from:
Integrator
protected var error: Double

Estimate of the error in calculating y

Estimate of the error in calculating y

Attributes

Inherited from:
Integrator