diff --git a/skfem/mesh/mesh3d/mesh3d.py b/skfem/mesh/mesh3d/mesh3d.py index 11c72c645..218714c5f 100644 --- a/skfem/mesh/mesh3d/mesh3d.py +++ b/skfem/mesh/mesh3d/mesh3d.py @@ -27,10 +27,7 @@ def edges_satisfying(self, test: Callable[[ndarray], bool]) -> ndarray: the output set. """ - mx = 0.5 * (self.p[0, self.edges[0, :]] + self.p[0, self.edges[1, :]]) - my = 0.5 * (self.p[1, self.edges[0, :]] + self.p[1, self.edges[1, :]]) - mz = 0.5 * (self.p[2, self.edges[0, :]] + self.p[2, self.edges[1, :]]) - return np.nonzero(test(mx, my, mz))[0] + return np.nonzero(test(self.p[:, self.edges].mean(1)))[0] def boundary_edges(self) -> ndarray: """Return an array of boundary edge indices."""