From 1f68ed393f5f5cc9f9fe12271b646f3fdd3865a4 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Thu, 18 Feb 2021 11:18:47 +0100 Subject: Converted variation calculation to be direction-specific. --- langevin.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'langevin.cpp') 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 stokes(10, z1, z2); + Rope 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; } -- cgit v1.2.3-70-g09d2