further experimentations

main
Francesco Minnocci 1 year ago
parent 0284de9d28
commit 40e27cf29b
No known key found for this signature in database
GPG Key ID: 76DA3AF9BAED1A32

@ -7,12 +7,12 @@ module AdaptStep
# Adaptive step size # Adaptive step size
function adapt_step(H, x, t, step, m) function adapt_step(H, x, t, step, m)
Δ = norm([h(variables(H(t))=>x) for h in H(t-step)]) Δ = norm([h(variables(H(t))=>x) for h in H(t-step)])
if Δ > 1e-8 if Δ > 1e-10
step = 0.5 * step step = 0.5 * step
m = 0 m = 0
else else
m+=1 m+=1
if (m == 5) && (step < 0.05) if (m == 4)
step = 2 * step step = 2 * step
m = 0 m = 0
end end

Binary file not shown.

@ -221,7 +221,8 @@ For sake of visualization, a set of smaller tests was run, in addition to the pa
macro from the \textit{Threads.jl} package on the root tracking \texttt{for} loop in the file \hyperref[sec:listing]{solve.jl}); however the multi-threaded runs didn't improve the macro from the \textit{Threads.jl} package on the root tracking \texttt{for} loop in the file \hyperref[sec:listing]{solve.jl}); however the multi-threaded runs didn't improve the
performance on these smaller systems, as the overhead of the multi-threading was too big compared to the actual computation time. performance on these smaller systems, as the overhead of the multi-threading was too big compared to the actual computation time.
% TODO: introduce conclusions about parallelization \ldots
perhaps because of our choice of predictor-corrector which could be unsuitable for larger systems.
The Julia implementation for the tests described above can be found in Appendix \hyperref[sec:listing]{B}. The Julia implementation for the tests described above can be found in Appendix \hyperref[sec:listing]{B}.

@ -24,9 +24,9 @@ end
using .AdaptStep using .AdaptStep
end end
@everywhere function compute_root(H, r, maxsteps=1000) @everywhere function compute_root(H, r, maxsteps=200)
t = 1.0 t = 1.0
step_size = 0.01 step_size = 0.001
x0 = r x0 = r
m = 0 m = 0
steps = 0 steps = 0

Loading…
Cancel
Save