re-add prune() for backwards compat
import collections
+import warnings
import numpy
@@ -79,6 +80,14 @@ class Mesh:
return "\n".join(lines)
+ def prune(self):
+ warnings.warn(
+ "prune() will soon be deprecated. "
+ "Use remove_lower_dimensional_cells(), remove_orphaned_nodes() instead."
+ )
+ self.remove_lower_dimensional_cells()
+ self.remove_orphaned_nodes()
+
def remove_lower_dimensional_cells(self):
"""Remove all cells of topological dimension lower than the max dimension in the
mesh, i.e., in a mesh that contains tetrahedra, remove triangles, lines, etc.
