minor corrections

main
Francesco Minnocci 10 months ago
parent 40e27cf29b
commit 320c43e923
No known key found for this signature in database
GPG Key ID: 76DA3AF9BAED1A32

@ -8,11 +8,12 @@ module EulerNewton
function en_step(H, x, t, step_size)
# Predictor step
vars = variables(H(t))
vars = variables(H(1))
# Jacobian of H evaluated at (x,t)
JH = [jh(vars=>x) for jh in differentiate(H(t), vars)]
# ∂H/∂t is the same as γG-F=H(1)-H(0) for our choice of homotopy
Δx = JH \ -[gg(vars=>x) for gg in H(1)-H(0)]
# ∂H/∂t = γG-F = H(1)-H(0) for our homotopy; it doesn't depend on t
δH_δt = [dh(vars=>x) for dh in H(1)-H(0)]
Δx = JH \ -δH_δt
xh = x + Δx * step_size
# Corrector step

Binary file not shown.

@ -66,7 +66,7 @@ end
# F = [x*y - 1, x^2 + y^2 - 4]
# T = [x*y - 1, x^2 + y^2 - 2]
R = random_system(5, 5)
R = random_system(3, 5)
println("System: ", R)
(G, roots)=start_system(R)
println("Number of roots: ", length(roots))

Loading…
Cancel
Save