Skip to content

Commit

Permalink
Merge pull request #1094 from SciML/ap/nmpc
Browse files Browse the repository at this point in the history
fix: `anydualtype` for NonlinearProblem and NLLS types
  • Loading branch information
ChrisRackauckas authored Oct 10, 2024
2 parents 9c8386f + 4f943d3 commit 01fd853
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "DiffEqBase"
uuid = "2b5f629d-d688-5b77-993f-72d75c75574e"
authors = ["Chris Rackauckas <[email protected]>"]
version = "6.158.1"
version = "6.158.2"

[deps]
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
Expand Down
16 changes: 16 additions & 0 deletions src/forwarddiff.jl
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,22 @@ function anyeltypedual(::Type{<:AbstractTimeseriesSolution{T, N}},
anyeltypedual(T)
end

function anyeltypedual(
::Type{T},
::Type{Val{counter}} = Val{0}) where {counter} where {T <:
NonlinearProblem{
uType, iip, pType}} where {uType, iip, pType}
return anyeltypedual((uType, pType), Val{counter})
end

function anyeltypedual(
::Type{T},
::Type{Val{counter}} = Val{0}) where {counter} where {T <:
NonlinearLeastSquaresProblem{
uType, iip, pType}} where {uType, iip, pType}
return anyeltypedual((uType, pType), Val{counter})
end

function anyeltypedual(x::ForwardDiff.DiffResults.DiffResult,
::Type{Val{counter}} = Val{0}) where {counter}
Any
Expand Down

0 comments on commit 01fd853

Please sign in to comment.