Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Hendrik Ranocha <ranocha@users.noreply.github.com>
  • Loading branch information
warisa-r and ranocha authored Jun 18, 2024
1 parent 5cdbbc0 commit b39a753
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/time_integration/methods_2N.jl
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ function Base.getproperty(integrator::SimpleIntegrator2N, field::Symbol)
return getfield(integrator, field)
end

function init(ode::ODEProblem, alg::T;
dt, callback = nothing, kwargs...) where {T <: SimpleAlgorithm2N}
function init(ode::ODEProblem, alg::SimpleAlgorithm2N;
dt, callback = nothing, kwargs...)
u = copy(ode.u0)
du = similar(u)
u_tmp = similar(u)
Expand All @@ -132,8 +132,8 @@ function init(ode::ODEProblem, alg::T;
end

# Fakes `solve`: https://diffeq.sciml.ai/v6.8/basics/overview/#Solving-the-Problems-1
function solve(ode::ODEProblem, alg::T;
dt, callback = nothing, kwargs...) where {T <: SimpleAlgorithm2N}
function solve(ode::ODEProblem, alg:: SimpleAlgorithm2N;
dt, callback = nothing, kwargs...)
integrator = init(ode, alg, dt = dt, callback = callback; kwargs...)

# Start actual solve
Expand Down
8 changes: 4 additions & 4 deletions src/time_integration/methods_3Sstar.jl
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ function Base.getproperty(integrator::SimpleIntegrator3Sstar, field::Symbol)
return getfield(integrator, field)
end

function init(ode::ODEProblem, alg::T;
dt, callback = nothing, kwargs...) where {T <: SimpleAlgorithm3Sstar}
function init(ode::ODEProblem, alg:: SimpleAlgorithm3Sstar;
dt, callback = nothing, kwargs...)
u = copy(ode.u0)
du = similar(u)
u_tmp1 = similar(u)
Expand Down Expand Up @@ -202,8 +202,8 @@ function init(ode::ODEProblem, alg::T;
end

# Fakes `solve`: https://diffeq.sciml.ai/v6.8/basics/overview/#Solving-the-Problems-1
function solve(ode::ODEProblem, alg::T;
dt, callback = nothing, kwargs...) where {T <: SimpleAlgorithm3Sstar}
function solve(ode::ODEProblem, alg:: SimpleAlgorithm3Sstar;
dt, callback = nothing, kwargs...)
integrator = init(ode, alg, dt = dt, callback = callback; kwargs...)

# Start actual solve
Expand Down

0 comments on commit b39a753

Please sign in to comment.