summaryrefslogtreecommitdiff
path: root/collectStokesData.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'collectStokesData.hpp')
-rw-r--r--collectStokesData.hpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/collectStokesData.hpp b/collectStokesData.hpp
index b48c6bc..8b85d6b 100644
--- a/collectStokesData.hpp
+++ b/collectStokesData.hpp
@@ -5,7 +5,7 @@
using Complex = std::complex<Real>;
template<int ...ps, class Generator, typename... T>
-void collectStokesData(std::string tag, unsigned N, Generator& r, Real ε, Real δz, bool minimum, T... μs) {
+void collectStokesData(std::string tag, unsigned N, Generator& r, Real ε, Real δz₀, bool minimum, T... μs) {
unsigned nIts = 5;
unsigned nGs = 4;
unsigned coDim = 16;
@@ -38,9 +38,12 @@ void collectStokesData(std::string tag, unsigned N, Generator& r, Real ε, Real
Vector<Complex> zSaddle = zMin;
+ Real δz = δz₀;
+
while ((zSaddle - zMin).norm() < newSaddleThres * N || abs(imag(M.getHamiltonian(zSaddle))) < 1e-10) {
- Vector<Complex> z0 = normalize(zSaddle + N * δz * randomVector<Complex>(N, d, r));
+ Vector<Complex> z0 = normalize(zSaddle + δz * randomVector<Complex>(N, d, r));
zSaddle = findSaddle(M, z0, ε);
+ δz₀ *= 1.01;
}
Complex Hz;