Skip to content

Commit 5741d98

Browse files
committed
Update seed dual
1 parent e6efa5c commit 5741d98

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/problem_types/ODERelaxProb.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ mutable struct ODELocalIntegrator{N}
241241
d.x = zeros(prob.nx, length(prob.support_set.s))
242242
d.dxdp = dxdp
243243
d.p = copy(prob.p)
244-
d.pduals = seed_duals(prob.p)
244+
d.pduals = seed_duals(Val(N),prob.p)
245245
d.x0duals = fill(Dual{Nothing}(0.0,
246246
single_seed(Partials{N, Float64}, Val(1))),
247247
(prob.nx,))

src/utilities.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ end
3737
IntegratorStates() = IntegratorStates(false, true, true, false, false, RELAXATION_NOT_CALLED)
3838

3939

40-
function seed_duals(x::AbstractArray{V}, ::Chunk{N} = Chunk(x)) where {V,N}
40+
function seed_duals(::Val{N}, x::AbstractArray{V}) where {V,N}
4141
seeds = construct_seeds(Partials{N,V})
4242
duals = [Dual{Nothing}(x[i],seeds[i]) for i in eachindex(x)]
4343
end

0 commit comments

Comments
 (0)