RungeKuttaExplicitBase Type

Base class for explicit Runge-Kutta methods.

References:

[1] Hairer, Ordinary differential equations I, 2nd edition, 1993.

[2] Jimenez et al., Locally Linearized Runge Kutta method of Dormand and Prince, arXiv:1209.1415v2, 22 Dec 2013

Constructors

Constructor Description

RungeKuttaExplicitBase()

Full Usage: RungeKuttaExplicitBase()

Instance members

Instance member Description

this.A

Full Usage: this.A

Returns: float[][]
Modifiers: abstract

Central coefficients of the Runge-Kutta scheme. See [1], page 135.

Returns: float[][]

this.A_Interpolation

Full Usage: this.A_Interpolation

Returns: float[][]
Modifiers: abstract

Gets additional central coefficients of the Runge-Kutta scheme that are used for dense output (interpolation).

Returns: float[][]

this.AbsoluteTolerance

Full Usage: this.AbsoluteTolerance

Gets or sets the absolute tolerance.

ArgumentException Must be >= 0 - AbsoluteTolerance

this.AbsoluteTolerances

Full Usage: this.AbsoluteTolerances

Gets or sets the absolute tolerances. The length of the array must either be 1 (tolerances for all y equal), or of length N.

this.BH

Full Usage: this.BH

Returns: float[]
Modifiers: abstract

High order bottom side coefficients of the Runge-Kutta scheme.

Returns: float[]

this.BHML

Full Usage: this.BHML

Returns: float[]
Modifiers: abstract

Differences between high order and low order bottom side coefficients of the Runge-Kutta scheme.

Returns: float[]

this.C

Full Usage: this.C

Returns: float[]
Modifiers: abstract

Left side coefficients of the Runge-Kutta scheme.

Returns: float[]

this.C_Interpolation

Full Usage: this.C_Interpolation

Returns: float[]
Modifiers: abstract

Gets additional left side coefficients of the Runge-Kutta scheme (x-partitions) that are used for dense output (interpolation).

Returns: float[]

this.GetInitialStepSize

Full Usage: this.GetInitialStepSize

Returns: float The initial step size in the context of the absolute and relative tolerances.

Gets the initial step size. The absolute and relative tolerances must be set before the call to this function.

Returns: float

The initial step size in the context of the absolute and relative tolerances.

InvalidOperationException Either absolute tolerance or relative tolerance is required to be > 0

this.GetInterpolatedSolutionPointVolatile

Full Usage: this.GetInterpolatedSolutionPointVolatile

Parameters:
    x : float - The x value. Must be in the interval [X-StepSize, X].

Returns: float[] The interpolated y values. The elements of the array must not be altered, and are intended for immediate use only.
Modifiers: abstract

Gets you an interpolated volative solution point during the enumeration of the solution points. The returned array must not be modified and has to be immediately consumed, since it is changed in the course of the next ODE evaluation.

x : float

The x value. Must be in the interval [X-StepSize, X].

Returns: float[]

The interpolated y values. The elements of the array must not be altered, and are intended for immediate use only.

this.GetSolutionPoints

Full Usage: this.GetSolutionPoints

Parameters:
Returns: IEnumerable<float * float[]> Tuple of the current x, and y values. The array of y-values is a copy of the solution vector, and is therefore save be to stored permanently.
Modifiers: abstract

Gets a sequence of solution points, using the settings in the argument.

options : OdeMethodOptions

The evaluation options, see OdeMethodOptions.

Returns: IEnumerable<float * float[]>

Tuple of the current x, and y values. The array of y-values is a copy of the solution vector, and is therefore save be to stored permanently.

this.GetSolutionPointsForStepSize

Full Usage: this.GetSolutionPointsForStepSize

Parameters:
    x0 : float - The initial x value.
    y0 : float[] - The initial y values.
    f : Action<float, float[], float[]> - Calculation of the derivatives. First arg is the x variable. 2nd arg are the current y variables. The 3rd argument provides an array, in which the resulting derivatives dyi/dx should be stored.
    stepSize : float - Size of a step.

Returns: IEnumerable<float * float[]> Endless sequence of solution points. It is safe to store the returned y array permanently.
Modifiers: abstract

Gets solution points for constant step size. Returns the same results as RungeKuttaExplicitBase.GetSolutionPointsVolatileForStepSize, but the returned solution point already contains a copy of the y array.

x0 : float

The initial x value.

y0 : float[]

The initial y values.

f : Action<float, float[], float[]>

Calculation of the derivatives. First arg is the x variable. 2nd arg are the current y variables. The 3rd argument provides an array, in which the resulting derivatives dyi/dx should be stored.

stepSize : float

Size of a step.

Returns: IEnumerable<float * float[]>

Endless sequence of solution points. It is safe to store the returned y array permanently.

this.GetSolutionPointsForStepSize

Full Usage: this.GetSolutionPointsForStepSize

Parameters:
    stepSize : float - Size of a step.

Returns: IEnumerable<float * float[]> Endless sequence of solution points. It is safe to store the returned y array permanently.
Modifiers: abstract

Gets solution points for constant step size. Returns the same results as RungeKuttaExplicitBase.GetSolutionPointsVolatileForStepSize, but the returned solution point already contains a copy of the y array.

stepSize : float

Size of a step.

Returns: IEnumerable<float * float[]>

Endless sequence of solution points. It is safe to store the returned y array permanently.

this.Initialize

Full Usage: this.Initialize

Parameters:
    x : float - The initial x value.
    y : float[] - The initial y values.
    f : Action<float, float[], float[]> - Calculation of the derivatives. First argument is x value, 2nd argument are the current y values. The 3rd argument is an array that store the derivatives.

Returns: RungeKuttaExplicitBase This instance (for a convenient way to chain this method with sequence creation).
Modifiers: abstract

Initializes the Runge-Kutta method.

x : float

The initial x value.

y : float[]

The initial y values.

f : Action<float, float[], float[]>

Calculation of the derivatives. First argument is x value, 2nd argument are the current y values. The 3rd argument is an array that store the derivatives.

Returns: RungeKuttaExplicitBase

This instance (for a convenient way to chain this method with sequence creation).

this.InterpolationCoefficients

Full Usage: this.InterpolationCoefficients

Returns: float[][]
Modifiers: abstract

The interpolation coefficients aij. Note that zero to third order interpolation is using y and slope of x_previous and x_current. Thus in this array we only need the coefficients for 4th order (and higher) interpolation.

Returns: float[][]

this.NewCoreNotInitializedException

Full Usage: this.NewCoreNotInitializedException

Returns: InvalidOperationException

Creates a new exception that indicates that the core is not initialized.

Returns: InvalidOperationException

this.NumberOfAdditionalStagesForDenseOutput

Full Usage: this.NumberOfAdditionalStagesForDenseOutput

Returns: int
Modifiers: abstract

Gets the number of stages of additional stages needed for dense output.

Returns: int

this.NumberOfStages

Full Usage: this.NumberOfStages

Returns: int
Modifiers: abstract

Gets the number of stages for the main process (stages needed for dense output not included).

Returns: int

this.Order

Full Usage: this.Order

Returns: int
Modifiers: abstract

Gets the order of the method (the highest of the pair).

Returns: int

this.RelativeTolerance

Full Usage: this.RelativeTolerance

Gets or sets the relative tolerance.

ArgumentException Must be >= 0 - RelativeTolerance

this.RelativeTolerances

Full Usage: this.RelativeTolerances

Gets or sets the relative tolerances. The length of the array must either be 1 (tolerances for all y equal), or of length N.

this.StiffnessDetectionEveryNumberOfSteps

Full Usage: this.StiffnessDetectionEveryNumberOfSteps

Gets or sets the number of successful steps between test for stiffness. Setting this value to 0 disables stiffness detection. The default value is 0.

this.StiffnessDetectionThresholdValue

Full Usage: this.StiffnessDetectionThresholdValue

Returns: float
Modifiers: abstract

Sets the stiffness detection threshold value.

Returns: float

Static members

Static member Description

RungeKuttaExplicitBase.Clone(toClone)

Full Usage: RungeKuttaExplicitBase.Clone(toClone)

Parameters:
    toClone : float[] - The array to clone.

Returns: float[] Cloned array.

Clones an array of Double.

toClone : float[]

The array to clone.

Returns: float[]

Cloned array.

RungeKuttaExplicitBase.Exchange(instance1, instance2)

Full Usage: RungeKuttaExplicitBase.Exchange(instance1, instance2)

Parameters:
    instance1 : byref<'T> - The instance1.
    instance2 : byref<'T> - The instance2.

Exchanges the two instances in the argument.

instance1 : byref<'T>

The instance1.

instance2 : byref<'T>

The instance2.