Commit 449a0279 by Martin Reinecke

### 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): ... @@ -53,6 +53,7 @@ def generate_krylov_samples(D_inv, S, j, N_samps, controller): D_inv(x) = j D_inv(x) = j and the second entry are a list of samples from D_inv.inverse 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 j = S.draw_sample(from_inverse=True) if j is None else j x = Field.full(D_inv.domain, 0.) x = Field.full(D_inv.domain, 0.) energy = QuadraticEnergy(x, D_inv, j) energy = QuadraticEnergy(x, D_inv, j) ... @@ -65,7 +66,6 @@ def generate_krylov_samples(D_inv, S, j, N_samps, controller): ... @@ -65,7 +66,6 @@ def generate_krylov_samples(D_inv, S, j, N_samps, controller): r = j.copy() r = j.copy() p = r.copy() p = r.copy() d = p.vdot(D_inv(p)) d = p.vdot(D_inv(p)) y = [S.draw_sample() for _ in range(N_samps)] while True: while True: gamma = r.vdot(r)/d gamma = r.vdot(r)/d if gamma == 0.: if gamma == 0.: ... ...
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!