Skip to content

Commit

Permalink
Merge pull request #682 from oscardssmith/os/revert-auto-specialize-N…
Browse files Browse the repository at this point in the history
…onlinearFunctions

revert #681 (comment)
  • Loading branch information
ChrisRackauckas authored May 1, 2024
2 parents 2558e62 + b4fbb85 commit b8e95a9
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/problems/basic_problems.jl
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ struct IntervalNonlinearProblem{isinplace, tType, P, F, K, PT} <:
This is determined automatically, but not inferred.
"""
function IntervalNonlinearProblem{iip}(f, tspan, p = NullParameters()) where {iip}
IntervalNonlinearProblem{iip}(IntervalNonlinearFunction{iip, DEFAULT_SPECIALIZATION}(f), tspan, p)
IntervalNonlinearProblem{iip}(IntervalNonlinearFunction{iip}(f), tspan, p)
end
end

Expand All @@ -180,8 +180,7 @@ function IntervalNonlinearProblem(f::AbstractIntervalNonlinearFunction, tspan,
end

function IntervalNonlinearProblem(f, tspan, p = NullParameters(); kwargs...)
iip = isinplace(f, 3)
IntervalNonlinearProblem(IntervalNonlinearFunction{iip, DEFAULT_SPECIALIZATION}(f), tspan, p; kwargs...)
IntervalNonlinearProblem(IntervalNonlinearFunction(f), tspan, p; kwargs...)
end

@doc doc"""
Expand Down Expand Up @@ -263,7 +262,7 @@ struct NonlinearProblem{uType, isinplace, P, F, K, PT} <:
This is determined automatically, but not inferred.
"""
function NonlinearProblem{iip}(f, u0, p = NullParameters(); kwargs...) where {iip}
NonlinearProblem{iip}(NonlinearFunction{iip, DEFAULT_SPECIALIZATION}(f), u0, p; kwargs...)
NonlinearProblem{iip}(NonlinearFunction{iip}(f), u0, p; kwargs...)
end
end

Expand All @@ -278,8 +277,7 @@ function NonlinearProblem(f::AbstractNonlinearFunction, u0, p = NullParameters()
end

function NonlinearProblem(f, u0, p = NullParameters(); kwargs...)
iip = isinplace(f, 3)
NonlinearProblem(NonlinearFunction{iip, DEFAULT_SPECIALIZATION}(f), u0, p; kwargs...)
NonlinearProblem(NonlinearFunction(f), u0, p; kwargs...)
end

"""
Expand Down Expand Up @@ -374,7 +372,7 @@ struct NonlinearLeastSquaresProblem{uType, isinplace, P, F, K} <:
end

function NonlinearLeastSquaresProblem{iip}(f, u0, p = NullParameters()) where {iip}
return NonlinearLeastSquaresProblem{iip}(NonlinearFunction{iip, DEFAULT_SPECIALIZATION}(f), u0, p)
return NonlinearLeastSquaresProblem{iip}(NonlinearFunction{iip}(f), u0, p)
end
end

Expand All @@ -390,8 +388,7 @@ function NonlinearLeastSquaresProblem(f::AbstractNonlinearFunction, u0,
end

function NonlinearLeastSquaresProblem(f, u0, p = NullParameters(); kwargs...)
iip = isinplace(f, 3)
return NonlinearLeastSquaresProblem(NonlinearFunction{iip, DEFAULT_SPECIALIZATION}(f), u0, p; kwargs...)
return NonlinearLeastSquaresProblem(NonlinearFunction(f), u0, p; kwargs...)
end

@doc doc"""
Expand Down

0 comments on commit b8e95a9

Please sign in to comment.