GearsBDF Type

Gears BDF ODE solver.

Constructors

Constructor Description

GearsBDF()

Full Usage: GearsBDF()

Instance members

Instance member Description

this.CurrentDegree

Full Usage: this.CurrentDegree

Returns: int

Gets the current degree of the interpolating polynomial.

Returns: int

this.CurrentNordsieckMatrix

Full Usage: this.CurrentNordsieckMatrix

Returns: DoubleMatrix

Gets the current nordsieck matrix. Rows corresponds to the state variables y0..yn, colums are the variable y, then y'dt, y''dt²/2, y'''dt³/6, and so on. Can be used to get the coefficients of the interpolating polynomial(s) between GearsBDF.CurrentTime-GearsBDF.CurrentTimeStep to GearsBDF.CurrentTime.

Returns: DoubleMatrix

this.CurrentTime

Full Usage: this.CurrentTime

Returns: float

Gets the time until which the ODE is already evaluated.

Returns: float

this.CurrentTimeStep

Full Usage: this.CurrentTimeStep

Returns: float

Gets the current time step. This is the step which was carried out from the previous time to the current time.

Returns: float

this.Evaluate

Full Usage: this.Evaluate

Parameters:
    t_result : byref<float>
    result : float[]

t_result : byref<float>
result : float[]

this.Evaluate

Full Usage: this.Evaluate

Parameters:
    t_sol : float
    result : float[]

t_sol : float
result : float[]

this.Initialize

Full Usage: this.Initialize

Parameters:
    t0 : float - Initial time point
    y0 : float[] - Initial values (at time t0).
    dydt : Action<float, float[], float[]> - Evaluation function for the derivatives. First argument is the time, second argument are the current y values. The third argument is an array where the derivatives are expected to be placed into.

Initialize Gear's BDF method with dynamically changed step size and order.

t0 : float

Initial time point

y0 : float[]

Initial values (at time t0).

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

Evaluation function for the derivatives. First argument is the time, second argument are the current y values. The third argument is an array where the derivatives are expected to be placed into.

this.Initialize

Full Usage: this.Initialize

Parameters:
    t0 : float - Initial time point
    y0 : float[] - Initial values (at time t0).
    dydt : Action<float, float[], float[]> - Evaluation function for the derivatives. First argument is the time, second argument are the current y values. The third argument is an array where the derivatives are expected to be placed into.
    opts : GearsBDFOptions - Options for the ODE method (can be null).

Initialize Gear's BDF method with dynamically changed step size and order.

t0 : float

Initial time point

y0 : float[]

Initial values (at time t0).

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

Evaluation function for the derivatives. First argument is the time, second argument are the current y values. The third argument is an array where the derivatives are expected to be placed into.

opts : GearsBDFOptions

Options for the ODE method (can be null).

this.Initialize

Full Usage: this.Initialize

Parameters:
    t0 : float - Initial time point
    y0 : float[] - Initial values (at time t0).
    dydt : Action<float, float[], float[]> - Evaluation function for the derivatives. First argument is the time, second argument are the current y values. The third argument is an array where the derivatives are expected to be placed into.
    denseJacobianEvaluator : Func<float, float[], IROMatrix<float>> - Evaluation for the dense jacobian matrix. First argument is the time, second argument are the current y values. If null is passed for this argument, a default evaluator is used.
    opts : GearsBDFOptions - Options for the ODE method (can be null).

Initialize Gear's BDF method with dynamically changed step size and order.

t0 : float

Initial time point

y0 : float[]

Initial values (at time t0).

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

Evaluation function for the derivatives. First argument is the time, second argument are the current y values. The third argument is an array where the derivatives are expected to be placed into.

denseJacobianEvaluator : Func<float, float[], IROMatrix<float>>

Evaluation for the dense jacobian matrix. First argument is the time, second argument are the current y values. If null is passed for this argument, a default evaluator is used.

opts : GearsBDFOptions

Options for the ODE method (can be null).

this.InitializeSparse

Full Usage: this.InitializeSparse

Parameters:
    t0 : float - Initial time point
    y0 : float[] - Initial values (at time t0).
    dydt : Action<float, float[], float[]> - Evaluation function for the derivatives. First argument is the time, second argument are the current y values. The third argument is an array where the derivatives are expected to be placed into.
    sparseJacobianEvaluation : Func<float, float[], SparseDoubleMatrix> - Evaluation for the dense jacobian matrix. First argument is the time, second argument are the current y values. If null is passed for this argument, a default evaluator is used.
    opts : GearsBDFOptions - Options for the ODE method (can be null).

Initialize Gear's BDF method with dynamically changed step size and order.

t0 : float

Initial time point

y0 : float[]

Initial values (at time t0).

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

Evaluation function for the derivatives. First argument is the time, second argument are the current y values. The third argument is an array where the derivatives are expected to be placed into.

sparseJacobianEvaluation : Func<float, float[], SparseDoubleMatrix>

Evaluation for the dense jacobian matrix. First argument is the time, second argument are the current y values. If null is passed for this argument, a default evaluator is used.

opts : GearsBDFOptions

Options for the ODE method (can be null).

this.MarkDiscontinuity

Full Usage: this.MarkDiscontinuity

Marks a discontinuity at the last point that was evaluated.

This function is indended to be used if discontinuous boundary conditions exist. The function evaluates the rate at the last point, and effectively restarts the ODE. See example for details. Example: if a discontinuity exist at t=1000, then then (i) evaluate the ODE until t=1000, then (ii) change the boundary conditions, and then (iii) call this function.

this.MaximumTimeStep

Full Usage: this.MaximumTimeStep

Gets or sets the maximum time step.