Skip to content

Commit 01fd853

Browse files
Merge pull request #1094 from SciML/ap/nmpc
fix: `anydualtype` for NonlinearProblem and NLLS types
2 parents 9c8386f + 4f943d3 commit 01fd853

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "DiffEqBase"
22
uuid = "2b5f629d-d688-5b77-993f-72d75c75574e"
33
authors = ["Chris Rackauckas <[email protected]>"]
4-
version = "6.158.1"
4+
version = "6.158.2"
55

66
[deps]
77
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"

src/forwarddiff.jl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,22 @@ function anyeltypedual(::Type{<:AbstractTimeseriesSolution{T, N}},
196196
anyeltypedual(T)
197197
end
198198

199+
function anyeltypedual(
200+
::Type{T},
201+
::Type{Val{counter}} = Val{0}) where {counter} where {T <:
202+
NonlinearProblem{
203+
uType, iip, pType}} where {uType, iip, pType}
204+
return anyeltypedual((uType, pType), Val{counter})
205+
end
206+
207+
function anyeltypedual(
208+
::Type{T},
209+
::Type{Val{counter}} = Val{0}) where {counter} where {T <:
210+
NonlinearLeastSquaresProblem{
211+
uType, iip, pType}} where {uType, iip, pType}
212+
return anyeltypedual((uType, pType), Val{counter})
213+
end
214+
199215
function anyeltypedual(x::ForwardDiff.DiffResults.DiffResult,
200216
::Type{Val{counter}} = Val{0}) where {counter}
201217
Any

0 commit comments

Comments
 (0)