Skip to content

Commit abd5560

Browse files
Add get_proposed_dt to custom integrators
1 parent 40e1af4 commit abd5560

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/time_integration/methods_2N.jl

+5
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,11 @@ function set_proposed_dt!(integrator::SimpleIntegrator2N, dt)
204204
integrator.dt = dt
205205
end
206206

207+
# Required e.g. for `glm_speed_callback`
208+
function get_proposed_dt(integrator::SimpleIntegrator2N)
209+
return integrator.dt
210+
end
211+
207212
# stop the time integration
208213
function terminate!(integrator::SimpleIntegrator2N)
209214
integrator.finalstep = true

src/time_integration/methods_3Sstar.jl

+5
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,11 @@ function set_proposed_dt!(integrator::SimpleIntegrator3Sstar, dt)
282282
integrator.dt = dt
283283
end
284284

285+
# Required e.g. for `glm_speed_callback`
286+
function get_proposed_dt(integrator::SimpleIntegrator3Sstar)
287+
return integrator.dt
288+
end
289+
285290
# stop the time integration
286291
function terminate!(integrator::SimpleIntegrator3Sstar)
287292
integrator.finalstep = true

0 commit comments

Comments
 (0)