summaryrefslogtreecommitdiff
path: root/langevin.cpp
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2021-01-06 11:16:20 +0100
committerJaron Kent-Dobias <jaron@kent-dobias.com>2021-01-06 11:16:20 +0100
commit1094eaa434d791d3a511f853df9d6d66d169b2ab (patch)
tree18bd0248f207a45bb3fb977a86af350bb02c1a55 /langevin.cpp
parent252ad65ae0af4249bc089cd18aad4ab739b80d70 (diff)
downloadcode-1094eaa434d791d3a511f853df9d6d66d169b2ab.tar.gz
code-1094eaa434d791d3a511f853df9d6d66d169b2ab.tar.bz2
code-1094eaa434d791d3a511f853df9d6d66d169b2ab.zip
Lots of work, and fixed bug stemming from choice of matrix algorithm.
Diffstat (limited to 'langevin.cpp')
-rw-r--r--langevin.cpp5
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;