Skip to content

Commit 2c5ee22

Browse files
committed
test: better testing of jacobian of Poincare functional
1 parent f6d1828 commit 2c5ee22

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/periodic_orbits_function_sh3/stuartLandauSH.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -271,12 +271,12 @@ normals = [[-1., 0.], [1, 0]]
271271
centers = [zeros(2), zeros(2)]
272272
initpo_bar = [0.2, -0.2]
273273

274-
probPsh = PoincareShootingProblem(prob, ODE.KenCarp4(), normals, centers; abstol=1e-10, reltol=1e-9, lens = (@optic _.r), jacobian = BK.AutoDiffDenseAnalytical())
274+
probPsh = PoincareShootingProblem(prob, ODE.KenCarp4(), normals, centers; abstol=1e-11, reltol=1e-9, lens = (@optic _.r), jacobian = BK.AutoDiffDenseAnalytical())
275275
# version with analytical jacobian
276-
probPsh2 = PoincareShootingProblem(prob, ODE.KenCarp4(), normals, centers; abstol=1e-10, reltol=1e-9, δ = 0, lens = (@optic _.r), jacobian = BK.AutoDiffDenseAnalytical())
276+
probPsh2 = PoincareShootingProblem(prob, ODE.KenCarp4(), normals, centers; abstol=1e-11, reltol=1e-9, δ = 0, lens = (@optic _.r), jacobian = BK.AutoDiffDenseAnalytical())
277277

278-
# test of the analytical formula for jacobian of the functional
279-
_Jad = BK.finite_differences( x-> probPsh(x, par_hopf), initpo_bar)
278+
# test of the analytical formula for jacobian of the functional
279+
_Jad = ForwardDiff.jacobian( x-> probPsh(x, par_hopf), initpo_bar)
280280
# _Jphifd = BK.finiteDifferences(x->probPsh.flow(x, par_hopf, Inf64), [0,0.4]; δ=1e-8)
281281
_Jana = probPsh(Val(:JacobianMatrix), initpo_bar, par_hopf)
282282
@test norm(_Jad - _Jana, Inf) < 1e-5

0 commit comments

Comments
 (0)