Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
bennibolm committed Dec 11, 2024
1 parent e1770ae commit 85588e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/callbacks_step/alive.jl
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ end

# this method is called when the callback is activated
function (alive_callback::AliveCallback)(integrator)

println("Start of alive callback")
# Checking for floating point equality is OK here as `DifferentialEquations.jl`
# sets the time exactly to the final time in the last iteration
if isfinished(integrator) && mpi_isroot()
Expand All @@ -98,6 +100,8 @@ function (alive_callback::AliveCallback)(integrator)

# avoid re-evaluating possible FSAL stages
u_modified!(integrator, false)

println("End of alive callback")
return nothing
end
end # @muladd
2 changes: 2 additions & 0 deletions src/callbacks_step/stepsize.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ end

# This method is called as callback during the time integration.
@inline function (stepsize_callback::StepsizeCallback)(integrator)
println("Start of stepsize_callback")
# TODO: Taal decide, shall we set the time step even if the integrator is adaptive?
if !integrator.opts.adaptive
t = integrator.t
Expand All @@ -77,6 +78,7 @@ end

# avoid re-evaluating possible FSAL stages
u_modified!(integrator, false)
println("End of stepsize_callback")
return nothing
end

Expand Down

0 comments on commit 85588e2

Please sign in to comment.