mesh.Mesh.border_mesh#
- Mesh.border_mesh(compact=True)#
Return a Mesh representing the border.
Parameters#
- compact: bool
If True (default), the returned Mesh will be compacted. If False, the returned Mesh will contain all the nodes present in the input Mesh.
Returns#
Notes#
This is a convenient shorthand for
self.get_free_entities_mesh(level=-1,compact=compact)
Element fields (type=’elem’) are propagated from the parent elements to the corresponding border elements. This is intended primarily for rendering or visualization purposes.
Important
The mapping of element fields may not always make sense. For example, if the original element field represents the volume of a hex8 element, the corresponding quad4 border elements do not have a volume.
Examples#
>>> M = Mesh(eltype='quad4') >>> print(M.border_mesh()) Mesh: n_nodes: 4, n_elems: 4, plexitude: 2, level: 1, eltype: line2 BBox: [0. 0. 0.], [1. 1. 0.] Size: [1. 1. 0.] Length: 4.0