Commit e8272dcf by Martin Reinecke

### Field.dot->Field.vdot

parent 3dc1ba04
Pipeline #13878 passed with stage
in 5 minutes and 28 seconds
 ... ... @@ -24,7 +24,7 @@ class WienerFilterEnergy(Energy): @property def value(self): D_inv_x = self.D_inverse_x() H = 0.5 * D_inv_x.dot(self.position) - self.j.dot(self.position) H = 0.5 * D_inv_x.vdot(self.position) - self.j.dot(self.position) return H.real @property ... ...
 ... ... @@ -109,7 +109,7 @@ class LineEnergy(Energy): @property def gradient(self): return self.energy.gradient.dot(self.line_direction) return self.energy.gradient.vdot(self.line_direction) @property def curvature(self): ... ...
 ... ... @@ -1040,7 +1040,7 @@ class Field(Loggable, Versionable, object): new_field.set_val(new_val=new_val, copy=False) return new_field def dot(self, x=None, spaces=None, bare=False): def vdot(self, x=None, spaces=None, bare=False): """ Computes the volume-factor-aware dot product of 'self' with x. Parameters ... ...
 ... ... @@ -121,12 +121,12 @@ class ConjugateGradient(Loggable, object): r = b - A(x0) d = self.preconditioner(r) previous_gamma = r.dot(d) previous_gamma = r.vdot(d) if previous_gamma == 0: self.logger.info("The starting guess is already perfect solution " "for the inverse problem.") return x0, self.convergence_level+1 norm_b = np.sqrt(b.dot(b)) norm_b = np.sqrt(b.vdot(b)) x = x0 convergence = 0 iteration_number = 1 ... ... @@ -137,7 +137,7 @@ class ConjugateGradient(Loggable, object): self.callback(x, iteration_number) q = A(d) alpha = previous_gamma/d.dot(q) alpha = previous_gamma/d.vdot(q) if not np.isfinite(alpha): self.logger.error("Alpha became infinite! Stopping.") ... ... @@ -158,7 +158,7 @@ class ConjugateGradient(Loggable, object): r -= q * alpha s = self.preconditioner(r) gamma = r.dot(s) gamma = r.vdot(s) if gamma.real < 0: self.logger.warn("Positive definitness of preconditioner " ... ...