File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -137,9 +137,8 @@ u = pygalmesh.Difference(s0, s1)
137137a = np.sqrt(radius ** 2 - displacement ** 2 )
138138max_edge_size_at_feature_edges = 0.15
139139n = int (2 * np.pi * a / max_edge_size_at_feature_edges)
140- alpha = np.linspace(0.0 , 2 * np.pi, n, endpoint = False )
141- circ = a * np.column_stack([np.zeros(n), np.cos(alpha), np.sin(alpha)])
142- circ.append(circ[0 ])
140+ alpha = np.linspace(0.0 , 2 * np.pi, n + 1 )
141+ circ = a * np.column_stack([np.zeros(n + 1 ), np.cos(alpha), np.sin(alpha)])
143142
144143mesh = pygalmesh.generate_mesh(
145144 u,
@@ -317,7 +316,9 @@ class Schwarz(pygalmesh.DomainBase):
317316 super ().__init__ ()
318317
319318 def eval (self , x ):
320- x2, y2, z2 = np.cos(x * 2 * np.pi)
319+ x2 = np.cos(x[0 ] * 2 * np.pi)
320+ y2 = np.cos(x[1 ] * 2 * np.pi)
321+ z2 = np.cos(x[2 ] * 2 * np.pi)
321322 return x2 + y2 + z2
322323
323324
You can’t perform that action at this time.
0 commit comments