phon.mesh_objects package¶
Submodules¶
phon.mesh_objects.element module¶
phon.mesh_objects.element_set module¶
-
class
phon.mesh_objects.element_set.
ElementSet
(name, dimension, ids=None)[source]¶ Represents a set of elements
Parameters: - name (str) – Name of the element set.
- dimension (int) – The dimension of the elements in the set
- ids (list of ints) – Identifiers of the elements in the set.
-
get_all_node_ids
(mesh)[source]¶ Gets all the nodes identifiers for the elements in the element set.
Parameters: mesh – The mesh :type mesh: phon.mesh_objects.mesh.Mesh()
Returns: The node identifiers Return type: list of ints
phon.mesh_objects.element_side_set module¶
phon.mesh_objects.mesh module¶
-
class
phon.mesh_objects.mesh.
Mesh
(name, nodes=None, elements=None, element_sets=None, element_side_sets=None, node_sets=None)[source]¶ Represents a mesh which includes nodes, elements, element sets and node sets.
Parameters: - name (string) – Name of the mesh.
- nodes (dict of format {node_id (int) :
Node
}) – Nodes in the mesh. - elements (dict of format {element_id (int) :
Element
}) – All elements in the mesh. - element_sets (dict of format {element_set (string) : [element_ids (int)]}) – Different element sets
- element_side_sets (dict of format {element_set (string) : [element_ids (int)]}) – Different element side sets
- node_sets (dict of format {node_set (string) : [node_ids (int)]}) –
-
get_number_of_2d_elements
()[source]¶ Calculates the number of two dimensional elements in the mesh.
Returns: Number of two dimensional elements. Return type: int
-
get_number_of_3d_elements
()[source]¶ Calculates the number of three dimensional elements in the mesh.
Returns: Number of three dimensional elements Return type: int
-
renumber_nodes
()[source]¶ Renumbers nodes so that they are “dense” on the number line. For example, if the mesh consist of four nodes with identifiers 1, 2, 5, 7 this would change them to 1, 2, 3, 4. This method also updates the elements to use the renumbered node identifiers.
Currently only updates nodes for 3d elements so don’t do anything with 2d elements after calling this.