diff --git a/examples/curve-pot.py b/examples/curve-pot.py index 310a11315efb1fe4d2c92bd0ef97fcc20f22d8dc..dbd8f6117dcc0e9e7fc04a5c6cc54b232a4c25e6 100644 --- a/examples/curve-pot.py +++ b/examples/curve-pot.py @@ -170,13 +170,14 @@ def draw_pot_figure(aspect_ratio, evt, (vol_pot,) = p2p(queue, fp.points, native_curve.pos, [native_curve.speed*native_weights*density], **volpot_kwargs) - evt, (curve_pot,) = lpot(queue, native_curve.pos, ovsmp_curve.pos, centers, - [ovsmp_density], ovsmp_curve.speed, ovsmp_weights, + evt, (curve_pot,) = lpot(queue, native_curve.pos, ovsmp_curve.pos, + centers, + [ovsmp_density * ovsmp_curve.speed * ovsmp_weights], **lpot_kwargs) # }}} - if 0: + if 1: # {{{ plot on-surface potential in 2D pt.plot(curve_pot, label="pot") @@ -245,7 +246,6 @@ def draw_pot_figure(aspect_ratio, if __name__ == "__main__": - 1/0 # FIXME update to new conventions draw_pot_figure(aspect_ratio=1, nsrc=100, novsmp=100, helmholtz_k=0, what_operator="D", what_operator_lpot="D", force_center_side=1) pt.savefig("eigvals-ext-nsrc100-novsmp100.pdf") diff --git a/examples/curve.py b/examples/curve.py index e894a56be474668cf7c556a070cf2aee0549e966..1a7be77f9cc7d3b83c869c2215067251e9881f20 100644 --- a/examples/curve.py +++ b/examples/curve.py @@ -9,7 +9,7 @@ import scipy.fftpack class CurveGrid: def __init__(self, x, y): - self.pos = np.vstack([x,y]).T.copy() + self.pos = np.vstack([x,y]).copy() xp = self.xp = sp.fftpack.diff(x, period=1) yp = self.yp = sp.fftpack.diff(y, period=1) xpp = self.xpp = sp.fftpack.diff(xp, period=1) @@ -17,7 +17,7 @@ class CurveGrid: self.mean_curvature = (xp*ypp-yp*xpp)/((xp**2+yp**2)**(3/2)) speed = self.speed = np.sqrt(xp**2+yp**2) - self.normal = (np.vstack([yp, -xp])/speed).T.copy() + self.normal = (np.vstack([yp, -xp])/speed).copy() def __len__(self): return len(self.pos)