diff options
-rw-r--r-- | langevin.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/langevin.cpp b/langevin.cpp index acac6c7..a4c9cf3 100644 --- a/langevin.cpp +++ b/langevin.cpp @@ -1,3 +1,4 @@ +#include <exception> #include <getopt.h> #include <eigen3/Eigen/LU> @@ -131,7 +132,7 @@ int main(int argc, char* argv[]) { // simulation parameters double ε = 1e-4; - double εJ = 5e-2; + double εJ = 1e-2; double δ = 1e-2; // threshold for determining saddle double Δ = 1e-3; double γ = 1e-2; // step size @@ -219,10 +220,14 @@ int main(int argc, char* argv[]) { iterateOver<Scalar, p>(Jp, perturbJ); - Vector zSaddleNew = findSaddle(Jp, zSaddle, ε); - Vector zSaddlePrevNew = findSaddle(Jp, zSaddlePrev, ε); + try { + Vector zSaddleNew = findSaddle(Jp, zSaddle, ε); + Vector zSaddlePrevNew = findSaddle(Jp, zSaddlePrev, ε); - std::cout << (zSaddleNew - zSaddlePrevNew).norm() << std::endl; + std::cout << zSaddleNew.transpose() << " " << zSaddlePrevNew.transpose() << std::endl; + } catch (std::exception& e) { + std::cerr << "Couldn't find a saddle with new couplings, skipping." << std::endl; + } } return 0; |