From 124626a411b48d12c799095725a26a77ba1e6771 Mon Sep 17 00:00:00 2001 From: Jonas Koziorek Date: Thu, 3 Oct 2024 12:04:54 +0200 Subject: [PATCH 1/2] don't create extra igs --- src/algorithms/discrete_time/schmelcher_diakonos.jl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/algorithms/discrete_time/schmelcher_diakonos.jl b/src/algorithms/discrete_time/schmelcher_diakonos.jl index b8ebddb..b8b1241 100644 --- a/src/algorithms/discrete_time/schmelcher_diakonos.jl +++ b/src/algorithms/discrete_time/schmelcher_diakonos.jl @@ -63,10 +63,9 @@ end function _periodic_orbits!(POs, ds, alg, igs, Λ) - igs = [ig.u0 for ig in igs] for ig in igs - reinit!(ds, ig) - previg = ig + reinit!(ds, ig.u0) + previg = ig.u0 for _ in 1:alg.maxiters previg, ig = Sk(ds, previg, alg.o, Λ) norm(ig) > alg.inftol && break From 4b1f0410273b6e48493552f5021e17727ec69234 Mon Sep 17 00:00:00 2001 From: Jonas Koziorek Date: Thu, 3 Oct 2024 12:09:27 +0200 Subject: [PATCH 2/2] better name --- src/algorithms/discrete_time/schmelcher_diakonos.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/algorithms/discrete_time/schmelcher_diakonos.jl b/src/algorithms/discrete_time/schmelcher_diakonos.jl index b8b1241..4848a55 100644 --- a/src/algorithms/discrete_time/schmelcher_diakonos.jl +++ b/src/algorithms/discrete_time/schmelcher_diakonos.jl @@ -55,14 +55,14 @@ function periodic_orbits(ds::DiscreteTimeDynamicalSystem, alg::SchmelcherDiakono POs = type[] for λ in alg.λs, inds in alg.indss, sings in alg.signss Λ = lambdamatrix(λ, inds, sings) - _periodic_orbits!(POs, ds, alg, igs, Λ) + _periodic_orbits_sd!(POs, ds, alg, igs, Λ) end po = PeriodicOrbit[PeriodicOrbit(ds, fp, alg.o) for fp in POs] return po end -function _periodic_orbits!(POs, ds, alg, igs, Λ) +function _periodic_orbits_sd!(POs, ds, alg, igs, Λ) for ig in igs reinit!(ds, ig.u0) previg = ig.u0