fedoo.Mesh.extract_elements

Mesh.extract_elements(element_set: str | list, name: str = '') Mesh

Return a new mesh from the set of elements defined by element_set

Parameters:
  • element_set (str|list) – The set of elements. If str is given, it should refer to an element set that exist in the dict: mesh.node_sets with the given key. If a list (or similar object) is given, it should contains the indices of the nodes.

  • name (str, default="") – The name of the new Mesh

Return type:

Mesh

Notes

  • The new mesh keep the former element_sets dict with only the extrated elements.

  • The element indices of the new mesh are not the same as the former one.

  • The new mesh keep the initial nodes array (shared with the parent), so an assembly built on it stays in the parent DOF space and can be summed with full-mesh assemblies. To also remove the nodes, a simple solution is to use the method “remove_isolated_nodes” with the new mesh.

  • The result carries a parent_node_indices attribute listing the rows of self.nodes actually referenced by the extracted elements. Consumers that need the active subset (e.g. RigidBody slaving the right DOFs) read it directly without recomputing np.unique(elements.ravel()).