diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2020-12-29 13:43:52 +0100 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2020-12-29 13:43:52 +0100 |
commit | fb75f0d923ba89296fc49a20d5296309a0ce5b1e (patch) | |
tree | c26b330d2d806f0297fe250e98e0b1b2317f93c8 | |
parent | 459d89d7614842d51d04a7cfa6941199d08bcaf9 (diff) | |
download | code-fb75f0d923ba89296fc49a20d5296309a0ce5b1e.tar.gz code-fb75f0d923ba89296fc49a20d5296309a0ce5b1e.tar.bz2 code-fb75f0d923ba89296fc49a20d5296309a0ce5b1e.zip |
Fixed mistake in constraint step.
-rw-r--r-- | langevin.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/langevin.cpp b/langevin.cpp index 73cf4c0..5287cd7 100644 --- a/langevin.cpp +++ b/langevin.cpp @@ -126,7 +126,7 @@ std::tuple<double, Vector, std::complex<double>, Vector> WdW(const Tensor& J, co Vector dWdz = grad.contract(conjHess, ip) - (pow(p, 2) / 2.0 * ((double)z.size() - zz(0))) * zc; Scalar dWdε = (-(double)p) * grad.contract(zc, ip); - Vector dεdz = (1 / (double)z.size()) * ((1 - 1/(double)p) * grad - ((double)p * ε) * z - (1 /(double)p) * z.contract(hess, ip)); + Vector dεdz = (1 / (double)z.size()) * ((1 - 1/(double)p) * grad + ((double)p * ε) * z - (1 /(double)p) * z.contract(hess, ip)); return {W, dWdz, dWdε(0), dεdz}; |