class GSL::ODE::Driver

Overview

High-level ODE solver driver with adaptive step control.

Defined in:

gsl/maths/analysis/ode.cr

Constructors

Instance Method Summary

Instance methods inherited from class GSL::Object

finalize finalize, free free, pointer pointer, to_unsafe to_unsafe

Constructor Detail

def self.new(system : GSL::ODE::System, initial_step : Float64, epsabs : Float64 = 0.0, epsrel : Float64 = 0.0, algorithm : Algorithm | Nil = nil, a_y : Float64 = 0.0, a_dydt : Float64 = 1.0, scale_abs : Array(Float64) | Nil = nil) #

Initializes driver with #system, #initial_step, tolerances (epsabs and epsrel), algorithm, and scaling.


[View source]

Instance Method Detail

def apply(t0 : Float64, t1 : Float64, y : Array(Float64) | Slice(Float64)) #

Integrates ODE from t0 to t1 using adaptive step.


[View source]
def evolve(y_initial, t0 : Float64, t1 : Float64, dt : Float64, &) #

Evolves system from t0 to t1 in fixed steps of dt; yields state and time.


[View source]
def evolve(y_initial, t0 : Float64, t1 : Float64, &) #

Evolves system using natural (adaptive) steps; yields state and time.


[View source]
def evolve(y_initial, time_points, &) #

Evolves system over given time points; yields state and time at each point.


[View source]
def evolve(y_initial, t0, t1, step) #

Returns tuple of {states, times} evolved with fixed step size.


[View source]
def evolve(y_initial, t0, t1) #

Returns tuple of {states, times} evolved from t0 to t1 with adaptive steps.


[View source]
def evolve(y_initial, time_points) #

Returns array of states at each time point.


[View source]
def hmax(*args, **options) #

[View source]
def hmax(*args, **options, &) #

[View source]
def hmax=(value) #

Sets maximum step size.


[View source]
def hmin(*args, **options) #

[View source]
def hmin(*args, **options, &) #

[View source]
def hmin=(value) #

Sets minimum step size.


[View source]
def initial_step : Float64 #

Initial step size used in integration.


[View source]
def initial_step=(initial_step : Float64) #

Initial step size used in integration.


[View source]
def lib_free #

Frees underlying GSL driver struct.


[View source]
def nmax(*args, **options) #

[View source]
def nmax(*args, **options, &) #

[View source]
def nmax=(value) #

Sets maximum number of steps.


[View source]
def reset(initial_step) #

Resets driver with new initial step size.


[View source]
def reset #

Resets driver state (sets step to default initial_step).


[View source]
def system : System #

[View source]