Skip to content

Commit

Permalink
changes according to trixi-framework#2026
Browse files Browse the repository at this point in the history
  • Loading branch information
warisa-r committed Oct 20, 2024
1 parent 52a5a0f commit 9ac05a6
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ mutable struct PairedExplicitRK3Integrator{RealT <: Real, uType, Params, Sol, F,
end

function init(ode::ODEProblem, alg::PairedExplicitRK3;
dt, callback = nothing, kwargs...)
dt, callback::Union{CallbackSet, Nothing} = nothing, kwargs...)
u0 = copy(ode.u0)
du = zero(u0)
u_tmp = zero(u0)
Expand All @@ -225,13 +225,12 @@ function init(ode::ODEProblem, alg::PairedExplicitRK3;
# initialize callbacks
if callback isa CallbackSet
for cb in callback.continuous_callbacks
error("Continuous callbacks are unsupported with paired explicit Runge-Kutta methods.")
throw(ArgumentError("Continuous callbacks are unsupported with paired explicit Runge-
Kutta methods."))
end
for cb in callback.discrete_callbacks
cb.initialize(cb, integrator.u, integrator.t, integrator)
end
elseif !isnothing(callback)
error("unsupported")
end

return integrator
Expand Down

0 comments on commit 9ac05a6

Please sign in to comment.