From 2a98d566247da745947d16b103c12842b3a5389b Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Fri, 12 Feb 2021 09:21:09 +0100 Subject: Revert "Added code to try and find critical points at very large a." This reverts commit 388449d66164fe8b5595cf11dbc0f3aa116ef36d. --- langevin.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'langevin.cpp') diff --git a/langevin.cpp b/langevin.cpp index 38ef3d9..5ca2d72 100644 --- a/langevin.cpp +++ b/langevin.cpp @@ -92,24 +92,26 @@ int main(int argc, char* argv[]) { return W; }; - double aGoal = 1e2; + double aGoal = 1e3; std::function energyInvA = [aGoal] (const ComplexTensor& J, const ComplexVector& z) { - return 0; + double a = z.squaredNorm(); + if (a > aGoal) { + return -aGoal; + } else { + return -z.squaredNorm(); + } }; - while (zSaddle.squaredNorm() / z.size() < aGoal) { - std::tie(std::ignore, z) = metropolis(J, z, energyInvA, T, 0.1, M, d, r.engine()); + while (zSaddle.squaredNorm() < aGoal) { + std::tie(std::ignore, z) = metropolis(J, z, energyInvA, T, γ, 100, d, r.engine()); try { - std::cerr << "Starting descent from " << z.squaredNorm() / z.size() << "." << std::endl; + std::cerr << "Starting descent from " << z.squaredNorm() << "." << std::endl; zSaddle = findSaddle(J, z, ε); } catch (std::exception& e) { } - std::cerr << "Current saddle is of size " << zSaddle.squaredNorm() / z.size() << "." << std::endl; - Complex energy; - std::tie(energy, std::ignore, std::ignore) = hamGradHess(J, zSaddle); - std::cout << zSaddle.squaredNorm() / z.size() << " " << energy.real() / z.size() << " " << energy.imag() / z.size() << std::endl; + std::cerr << "Current saddle is of size " << zSaddle.squaredNorm() << "." << std::endl; } ComplexVector zSaddlePrev = ComplexVector::Zero(N); -- cgit v1.2.3-70-g09d2