Skip to content

Commit

Permalink
fix fg! to give f out
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas committed Nov 21, 2017
1 parent 9fc8937 commit f287c9a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/jacobian.jl
Expand Up @@ -14,6 +14,7 @@ function ConstructSparseJacobian(f!::BVPJacobianWrapper, S::BVPSystem, y)
similar(y),similar(y),similar(y))
function fg!(x::Vector, fx::Vector, gx)
DiffEqDiffTools.finite_difference_jacobian!(gx, f!, x, jac_cache)
f!(fx,x)
end
g!(x::Vector, gx::Array) = (fx = similar(x); fg!(x, fx, gx))
J = bzeros(eltype(S.y[1]), S.M*S.N, S.M*S.N, S.M-1, S.M-1)
Expand All @@ -26,6 +27,7 @@ function ConstructJacobian(f!::BVPJacobianWrapper, S::BVPSystem, y)
similar(y),similar(y),similar(y))
function fg!(x::Vector, fx::Vector, gx)
DiffEqDiffTools.finite_difference_jacobian!(gx, f!, x, jac_cache)
f!(fx,x)
end
g!(x::Vector, gx::Array) = (fx = similar(x); fg!(x, fx, gx))
NLsolve.DifferentiableMultivariateFunction(f!.loss, g!, fg!)
Expand Down

0 comments on commit f287c9a

Please sign in to comment.