Skip to content

Commit

Permalink
change error message in ssp integrator
Browse files Browse the repository at this point in the history
  • Loading branch information
warisa-r committed Aug 10, 2024
1 parent 3bf7b9d commit 1518654
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/time_integration/methods_SSP.jl
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ of type `SimpleAlgorithmSSP`.
This is an experimental feature and may change in future releases.
"""
function solve(ode::ODEProblem, alg = SimpleSSPRK33()::SimpleAlgorithmSSP;
dt, callback = nothing, kwargs...)
dt, callback::Union{CallbackSet, Nothing} = nothing, kwargs...)
u = copy(ode.u0)
du = similar(u)
r0 = similar(u)
Expand All @@ -157,13 +157,11 @@ function solve(ode::ODEProblem, alg = SimpleSSPRK33()::SimpleAlgorithmSSP;
# initialize callbacks
if callback isa CallbackSet
foreach(callback.continuous_callbacks) do cb
error("unsupported")
throw(ArgumentError("Continuous callbacks are unsupported with the SSP storage time integration methods."))
end
foreach(callback.discrete_callbacks) do cb
cb.initialize(cb, integrator.u, integrator.t, integrator)
end
elseif !isnothing(callback)
error("unsupported")
end

for stage_callback in alg.stage_callbacks
Expand Down

0 comments on commit 1518654

Please sign in to comment.