Skip to content

Commit

Permalink
Merge branch 'main' into DoubleFloats
Browse files Browse the repository at this point in the history
  • Loading branch information
sloede authored Nov 30, 2024
2 parents 83cdbb3 + 824f7a8 commit 6791e74
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 18 deletions.
14 changes: 8 additions & 6 deletions src/time_integration/methods_2N.jl
Original file line number Diff line number Diff line change
Expand Up @@ -189,13 +189,15 @@ function step!(integrator::SimpleIntegrator2N)
integrator.iter += 1
integrator.t += integrator.dt

# handle callbacks
if callbacks isa CallbackSet
foreach(callbacks.discrete_callbacks) do cb
if cb.condition(integrator.u, integrator.t, integrator)
cb.affect!(integrator)
@trixi_timeit timer() "Step-Callbacks" begin
# handle callbacks
if callbacks isa CallbackSet
foreach(callbacks.discrete_callbacks) do cb
if cb.condition(integrator.u, integrator.t, integrator)
cb.affect!(integrator)
end
return nothing
end
return nothing
end
end

Expand Down
14 changes: 8 additions & 6 deletions src/time_integration/methods_3Sstar.jl
Original file line number Diff line number Diff line change
Expand Up @@ -265,13 +265,15 @@ function step!(integrator::SimpleIntegrator3Sstar)
integrator.iter += 1
integrator.t += integrator.dt

# handle callbacks
if callbacks isa CallbackSet
foreach(callbacks.discrete_callbacks) do cb
if cb.condition(integrator.u, integrator.t, integrator)
cb.affect!(integrator)
@trixi_timeit timer() "Step-Callbacks" begin
# handle callbacks
if callbacks isa CallbackSet
foreach(callbacks.discrete_callbacks) do cb
if cb.condition(integrator.u, integrator.t, integrator)
cb.affect!(integrator)
end
return nothing
end
return nothing
end
end

Expand Down
15 changes: 9 additions & 6 deletions src/time_integration/methods_SSP.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ struct SimpleSSPRK33{StageCallbacks} <: SimpleAlgorithmSSP
c = SVector(0.0, 1.0, 1 / 2)

# Butcher tableau
# c | a
# c | A
# 0 |
# 1 | 1
# 1/2 | 1/4 1/4
Expand Down Expand Up @@ -208,11 +208,14 @@ function solve!(integrator::SimpleIntegratorSSP)
integrator.iter += 1
integrator.t += integrator.dt

# handle callbacks
if callbacks isa CallbackSet
foreach(callbacks.discrete_callbacks) do cb
if cb.condition(integrator.u, integrator.t, integrator)
cb.affect!(integrator)
@trixi_timeit timer() "Step-Callbacks" begin
# handle callbacks
if callbacks isa CallbackSet
foreach(callbacks.discrete_callbacks) do cb
if cb.condition(integrator.u, integrator.t, integrator)
cb.affect!(integrator)
end
return nothing
end
end
end
Expand Down

0 comments on commit 6791e74

Please sign in to comment.