Skip to content

Commit

Permalink
Add get_proposed_dt to custom integrators
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielDoehring committed Dec 15, 2023
1 parent 40e1af4 commit abd5560
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/time_integration/methods_2N.jl
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,11 @@ function set_proposed_dt!(integrator::SimpleIntegrator2N, dt)
integrator.dt = dt
end

# Required e.g. for `glm_speed_callback`
function get_proposed_dt(integrator::SimpleIntegrator2N)
return integrator.dt
end

# stop the time integration
function terminate!(integrator::SimpleIntegrator2N)
integrator.finalstep = true
Expand Down
5 changes: 5 additions & 0 deletions src/time_integration/methods_3Sstar.jl
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,11 @@ function set_proposed_dt!(integrator::SimpleIntegrator3Sstar, dt)
integrator.dt = dt
end

# Required e.g. for `glm_speed_callback`
function get_proposed_dt(integrator::SimpleIntegrator3Sstar)
return integrator.dt
end

# stop the time integration
function terminate!(integrator::SimpleIntegrator3Sstar)
integrator.finalstep = true
Expand Down

0 comments on commit abd5560

Please sign in to comment.