Time steppers

Cthonios.AbstractTimeStepperType
abstract type AbstractTimeStepper{T}

Abstract type for time steppers. Expects a type T to correspond to the type for time values such as Float64 or a time with a unit from for example Unitful.

source
Cthonios.ConstantTimeStepperType
mutable struct ConstantTimeStepper{T<:Number} <: Cthonios.AbstractTimeStepper{T<:Number}
  • start_time::Number

  • end_time::Number

  • current_time::Number

  • current_time_step::Int64

  • Δt::Number

Time stepper type with a constant time step. start_time - the initial time value. end_time - time to end the simulation. current_time - the current time stored by this time stepper. current_time_step - the current index of the time step. Δt - the time step to use for all time steps.

source
Cthonios.ConstantTimeStepperMethod
ConstantTimeStepper(
    start_time::Number,
    end_time::Number,
    Δt::Number
) -> ConstantTimeStepper

Method to construct a ConstantTimeStepper. start_time - the initial time value. end_time - time to end the simulation. Δt - the time step to use for all time steps.

source
Cthonios.step!Method
step!(time::ConstantTimeStepper)

Method to increment time.current_time by Δt.

source