summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--collectStokesData.hpp7
-rw-r--r--mixedStokes.cpp6
-rw-r--r--pureStokes.cpp6
3 files changed, 11 insertions, 8 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;
diff --git a/mixedStokes.cpp b/mixedStokes.cpp
index 09a75b2..a437ff3 100644
--- a/mixedStokes.cpp
+++ b/mixedStokes.cpp
@@ -13,7 +13,7 @@ int main(int argc, char* argv[]) {
unsigned N = 10; // number of spins
// simulation parameters
Real ε = 1e-15;
- Real δ = 1;
+ Real δz₀ = 1e-3;
unsigned n = 10;
bool useMinima = false;
@@ -28,7 +28,7 @@ int main(int argc, char* argv[]) {
ε = atof(optarg);
break;
case 'd':
- δ = atof(optarg);
+ δz₀ = atof(optarg);
break;
case 'n':
n = atof(optarg);
@@ -45,7 +45,7 @@ int main(int argc, char* argv[]) {
for (unsigned i = 0; i < n; i++) {
auto tag = std::chrono::high_resolution_clock::now();
- collectStokesData<2, 4>(std::to_string(tag.time_since_epoch().count()), N, r.engine(), ε, δ, useMinima, 1.0, 0.01);
+ collectStokesData<2, 4>(std::to_string(tag.time_since_epoch().count()), N, r.engine(), ε, δz₀, useMinima, 1.0, 0.01);
}
return 0;
diff --git a/pureStokes.cpp b/pureStokes.cpp
index a07dbbc..448d5ef 100644
--- a/pureStokes.cpp
+++ b/pureStokes.cpp
@@ -13,7 +13,7 @@ int main(int argc, char* argv[]) {
unsigned N = 10; // number of spins
// simulation parameters
Real ε = 1e-15;
- Real δ = 1;
+ Real δz₀ = 1e-3;
unsigned n = 10;
bool useMinima = false;
@@ -28,7 +28,7 @@ int main(int argc, char* argv[]) {
ε = atof(optarg);
break;
case 'd':
- δ = atof(optarg);
+ δz₀ = atof(optarg);
break;
case 'n':
n = atof(optarg);
@@ -45,7 +45,7 @@ int main(int argc, char* argv[]) {
for (unsigned i = 0; i < n; i++) {
auto tag = std::chrono::high_resolution_clock::now();
- collectStokesData<3>(std::to_string(tag.time_since_epoch().count()), N, r.engine(), ε, δ, useMinima, 1.0);
+ collectStokesData<3>(std::to_string(tag.time_since_epoch().count()), N, r.engine(), ε, δz₀, useMinima, 1.0);
}
return 0;