Commit f0a3b3b2 authored by Reimar H Leike's avatar Reimar H Leike
Browse files

fixed a bug that broke krylov sampling for Multifields at commit 329b16b8

parent cb13f9db
......@@ -80,8 +80,8 @@ def generate_krylov_samples(D_inv, S, j, N_samps, controller):
logger.error("Error: ConjugateGradient: alpha<0.")
return energy.position, y
for samp in y:
samp += (np.random.randn()*np.sqrt(ddotq) - samp.vdot(q))/ddotq * d
for i in range(len(y)):
y[i] += (np.random.randn()*np.sqrt(ddotq) - y[i].vdot(q))/ddotq * d
q *= -alpha
r = r + q
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment