Skip to content

Commit

Permalink
Update solve.jl
Browse files Browse the repository at this point in the history
Fix dispatch when using with DifferentialEquations.jl
  • Loading branch information
avik-pal authored Sep 27, 2023
1 parent 186339d commit bbc6c36
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/solve.jl
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
function SciMLBase.__solve(prob::BVProblem, alg; kwargs...)
function SciMLBase.__solve(prob::BVProblem, alg, args...; kwargs...)
# If dispatch not directly defined
cache = init(prob, alg; kwargs...)
cache = init(prob, alg, args...; kwargs...)
return solve!(cache)
end

# Shooting Methods

function SciMLBase.__solve(prob::BVProblem, alg::Shooting; kwargs...)
function SciMLBase.__solve(prob::BVProblem, alg::Shooting, args...; kwargs...)
iip = isinplace(prob)
bc = prob.bc
u0 = deepcopy(prob.u0)
Expand All @@ -26,7 +26,7 @@ end

# MIRK Methods

function SciMLBase.__init(prob::BVProblem, alg::AbstractMIRK; dt = 0.0, abstol = 1e-3,
function SciMLBase.__init(prob::BVProblem, alg::AbstractMIRK, args...; dt = 0.0, abstol = 1e-3,
adaptive = true, kwargs...)
has_initial_guess = prob.u0 isa AbstractVector{<:AbstractArray}
(T, M, n) = if has_initial_guess
Expand Down

0 comments on commit bbc6c36

Please sign in to comment.