class
GSL::ODE::Driver
- GSL::ODE::Driver
- GSL::Object
- Reference
- Object
Overview
High-level ODE solver driver with adaptive step control.
Defined in:
gsl/maths/analysis/ode.crConstructors
-
.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 (epsabsandepsrel), algorithm, and scaling.
Instance Method Summary
-
#apply(t0 : Float64, t1 : Float64, y : Array(Float64) | Slice(Float64))
Integrates ODE from t0 to t1 using adaptive step.
-
#evolve(y_initial, t0 : Float64, t1 : Float64, dt : Float64, &)
Evolves system from t0 to t1 in fixed steps of dt; yields state and time.
-
#evolve(y_initial, t0 : Float64, t1 : Float64, &)
Evolves system using natural (adaptive) steps; yields state and time.
-
#evolve(y_initial, time_points, &)
Evolves system over given time points; yields state and time at each point.
-
#evolve(y_initial, t0, t1, step)
Returns tuple of {states, times} evolved with fixed step size.
-
#evolve(y_initial, t0, t1)
Returns tuple of {states, times} evolved from t0 to t1 with adaptive steps.
-
#evolve(y_initial, time_points)
Returns array of states at each time point.
- #hmax(*args, **options)
- #hmax(*args, **options, &)
-
#hmax=(value)
Sets maximum step size.
- #hmin(*args, **options)
- #hmin(*args, **options, &)
-
#hmin=(value)
Sets minimum step size.
-
#initial_step : Float64
Initial step size used in integration.
-
#initial_step=(initial_step : Float64)
Initial step size used in integration.
-
#lib_free
Frees underlying GSL driver struct.
- #nmax(*args, **options)
- #nmax(*args, **options, &)
-
#nmax=(value)
Sets maximum number of steps.
-
#reset(initial_step)
Resets driver with new initial step size.
-
#reset
Resets driver state (sets step to default initial_step).
- #system : System
Instance methods inherited from class GSL::Object
finalize
finalize,
free
free,
pointer
pointer,
to_unsafe
to_unsafe
Constructor Detail
Initializes driver with #system, #initial_step, tolerances (epsabs and epsrel), algorithm, and scaling.
Instance Method Detail
Integrates ODE from t0 to t1 using adaptive step.
Evolves system from t0 to t1 in fixed steps of dt; yields state and time.
Evolves system using natural (adaptive) steps; yields state and time.
Evolves system over given time points; yields state and time at each point.
Returns tuple of {states, times} evolved with fixed step size.
Returns tuple of {states, times} evolved from t0 to t1 with adaptive steps.