Skip to content

Commit

Permalink
Type-stabilize sn_quadratic_coefficient
Browse files Browse the repository at this point in the history
  • Loading branch information
tkf committed Jul 3, 2018
1 parent 228f4d7 commit 61d61ee
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/codim2/analysis.jl
Expand Up @@ -79,10 +79,12 @@ left_eigvec(tkind, J) = right_eigvec(tkind, J') # TODO: optimize

function sn_quadratic_coefficient(tkind, ::ImmutableState, wrapper)
cache = as(wrapper, ContinuationCache)
x0 = ds_state(cache)
J = ds_jacobian(cache)
q = right_eigvec(tkind, J)
p = left_eigvec(tkind, J)
x0 = ds_state(cache)
q = cast_container(typeof(x0), q)
p = cast_container(typeof(x0), p)
second_derivative = ForwardDiff.hessian(
t -> p ds_f((@. t[1] * q + x0), cache),
SVector(zero(x0)),
Expand Down

0 comments on commit 61d61ee

Please sign in to comment.