Skip to content

Commit c998358

Browse files
committed
fix method issue with single domain adjoint_sensitivities
1 parent dc3a1b2 commit c998358

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/Simulation.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,10 @@ function getadjointsensitivities(bsol::Q,target::String,solver::W;sensalg::W2=In
153153
dy = similar(p,length(y))
154154
return dydtreactor!(dy,y,t,bsol.domain,[],p=p)[ind]
155155
end
156+
function g(y::Array{X,1},p::Array{Y,1},t::Z) where {Q,V,X<:Float64,Y<:Float64,Z}
157+
dy = zeros(length(y))
158+
return dydtreactor!(dy,y,t,bsol.domain,[],p=p)[ind]
159+
end
156160
function g(y::Array{X,1},p::Array{Y,1},t::Z) where {Q,V,X<:ForwardDiff.Dual,Y<:ForwardDiff.Dual,Z}
157161
dy = similar(y,length(y))
158162
return dydtreactor!(dy,y,t,bsol.domain,[],p=p)[ind]

0 commit comments

Comments
 (0)