summaryrefslogtreecommitdiff
path: root/langevin.cpp
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2021-02-18 11:18:47 +0100
committerJaron Kent-Dobias <jaron@kent-dobias.com>2021-02-18 11:18:47 +0100
commit1f68ed393f5f5cc9f9fe12271b646f3fdd3865a4 (patch)
treeef68620ab2b208c170e7cf4331f85755453bc813 /langevin.cpp
parent4069a0f073f0de40c2e8b41c2d2d3558bb0d8be1 (diff)
downloadcode-1f68ed393f5f5cc9f9fe12271b646f3fdd3865a4.tar.gz
code-1f68ed393f5f5cc9f9fe12271b646f3fdd3865a4.tar.bz2
code-1f68ed393f5f5cc9f9fe12271b646f3fdd3865a4.zip
Converted variation calculation to be direction-specific.
Diffstat (limited to 'langevin.cpp')
-rw-r--r--langevin.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/langevin.cpp b/langevin.cpp
index e466860..c3f8436 100644
--- a/langevin.cpp
+++ b/langevin.cpp
@@ -167,7 +167,7 @@ int main(int argc, char* argv[]) {
prevdist = abs(imag(H1 - H2));
εJ = 1e4 * prevdist;
- if (abs(imag(H1 - H2)) < 1e-10 && dist > 1e-2) {
+ if (abs(imag(H1 - H2)) < 1e-13 && dist > 1e-2) {
std::cerr << "Found distinct critical points with sufficiently similar Im H." << std::endl;
break;
}
@@ -180,7 +180,7 @@ int main(int argc, char* argv[]) {
}
}
- Rope<Complex> stokes(10, z1, z2);
+ Rope<Complex> stokes(10, z1, z2, Jp);
std::cout << stokes.cost(Jp) << " " << stokes.length() << " " << stokes.error(Jp) << std::endl;
@@ -203,5 +203,10 @@ int main(int argc, char* argv[]) {
std::cout << stokes.cost(Jp) << " " << stokes.length() << " " << stokes.error(Jp) << std::endl;
+ stokes = stokes.interpolate();
+ stokes.relax(Jp, 1e5, 1e-1);
+
+ std::cout << stokes.cost(Jp) << " " << stokes.length() << " " << stokes.error(Jp) << std::endl;
+
return 0;
}