Commit 449a0279 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

fixes

parent 329b16b8
Pipeline #27867 passed with stages
in 14 minutes and 32 seconds
......@@ -53,6 +53,7 @@ def generate_krylov_samples(D_inv, S, j, N_samps, controller):
D_inv(x) = j
and the second entry are a list of samples from D_inv.inverse
"""
# MR FIXME: this should be synchronized with the "official" Nifty CG
j = S.draw_sample(from_inverse=True) if j is None else j
x = Field.full(D_inv.domain, 0.)
energy = QuadraticEnergy(x, D_inv, j)
......@@ -65,7 +66,6 @@ def generate_krylov_samples(D_inv, S, j, N_samps, controller):
r = j.copy()
p = r.copy()
d = p.vdot(D_inv(p))
y = [S.draw_sample() for _ in range(N_samps)]
while True:
gamma = r.vdot(r)/d
if gamma == 0.:
......
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