Skip to content

Commit

Permalink
remake bvp correctly for nlls
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Dec 21, 2023
1 parent b34fd2e commit 5ceb8cc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/remake.jl
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,9 @@ end
Remake the given `BVProblem`.
"""
function remake(prob::BVProblem; f = missing, bc = missing, u0 = missing, tspan = missing,
p = missing, kwargs = missing, problem_type = missing, _kwargs...)
function remake(prob::BVProblem{uType, tType, iip, nlls}; f = missing, bc = missing,
u0 = missing, tspan = missing, p = missing, kwargs = missing, problem_type = missing,
_kwargs...) where {uType, tType, iip, nlls}
if tspan === missing
tspan = prob.tspan
end
Expand All @@ -143,8 +144,6 @@ function remake(prob::BVProblem; f = missing, bc = missing, u0 = missing, tspan
end
end

iip = isinplace(prob)

if problem_type === missing
problem_type = prob.problem_type
end
Expand Down Expand Up @@ -175,9 +174,10 @@ function remake(prob::BVProblem; f = missing, bc = missing, u0 = missing, tspan
end

if kwargs === missing
BVProblem{iip}(_f, bc, u0, tspan, p; problem_type, prob.kwargs..., _kwargs...)
BVProblem{iip}(_f, bc, u0, tspan, p; problem_type, nlls=Val(nlls), prob.kwargs...,
_kwargs...)
else
BVProblem{iip}(_f, bc, u0, tspan, p; problem_type, kwargs...)
BVProblem{iip}(_f, bc, u0, tspan, p; problem_type, nlls=Val(nlls), kwargs...)
end
end

Expand Down

0 comments on commit 5ceb8cc

Please sign in to comment.