Skip to content

Commit

Permalink
update to arg flip
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas committed Nov 21, 2017
1 parent f287c9a commit d6b2bca
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/jacobian.jl
Expand Up @@ -9,8 +9,7 @@ end
(p::BVPJacobianWrapper)(u) = (resid = similar(u); p.loss(u,resid); resid)

function ConstructSparseJacobian(f!::BVPJacobianWrapper, S::BVPSystem, y)
RealOrComplex = (eltype(y) <: Complex) ? Val{:Complex} : Val{:Real}
jac_cache = DiffEqDiffTools.JacobianCache(Val{:central},RealOrComplex,
jac_cache = DiffEqDiffTools.JacobianCache(
similar(y),similar(y),similar(y))
function fg!(x::Vector, fx::Vector, gx)
DiffEqDiffTools.finite_difference_jacobian!(gx, f!, x, jac_cache)
Expand All @@ -22,9 +21,8 @@ function ConstructSparseJacobian(f!::BVPJacobianWrapper, S::BVPSystem, y)
end

function ConstructJacobian(f!::BVPJacobianWrapper, S::BVPSystem, y)
RealOrComplex = (eltype(y) <: Complex) ? Val{:Complex} : Val{:Real}
jac_cache = DiffEqDiffTools.JacobianCache(Val{:central},RealOrComplex,
similar(y),similar(y),similar(y))
jac_cache = DiffEqDiffTools.JacobianCache(
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)
Expand Down

0 comments on commit d6b2bca

Please sign in to comment.