diff options
Diffstat (limited to 'langevin.cpp')
-rw-r--r-- | langevin.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/langevin.cpp b/langevin.cpp index 3bc12ed..05b436e 100644 --- a/langevin.cpp +++ b/langevin.cpp @@ -7,6 +7,8 @@ #include "pcg-cpp/include/pcg_random.hpp" #include "randutils/randutils.hpp" +#include <eigen3/Eigen/LU> + #include "complex_normal.hpp" #include "p-spin.hpp" #include "stereographic.hpp" @@ -57,7 +59,8 @@ Vector findSaddle(const Tensor& J, const Vector& z0, double γ0, double δ, doub while (W > ε) { double γ = pow(r.variate<double, std::normal_distribution>(0, γ0), 2); - Vector ζNew = ζ - ddH.ldlt().solve(dH); + Vector dζ = ddH.partialPivLu().solve(dH); + Vector ζNew = ζ - dζ; double WNew; Vector dWNew; |