zoomy_core.mesh.mesh_util#
Reference-element geometry (face order, normals, areas, volumes, inradii) for the supported cell
types, used by BaseMesh.
Module Contents#
Functions#
Map a Zoomy cell type ( |
|
Cell type obtained by extruding |
|
Index (plus |
|
Elements sharing a face with |
|
Unit normals of the faces of one element, |
|
Area (length in 2D) of each face of one element. |
|
Vertex-average centre of |
|
Volume (area in 2D, length for lines) of one element of |
|
Inradius of one element of |
|
Euclidean length of |
|
Local index of the edge/face of |
|
Volume of the sub-simplex spanned by a face and the cell centre (length, triangle, tetrahedron or pyramid for dim 1, 2, 3). |
API#
- zoomy_core.mesh.mesh_util.convert_mesh_type_to_meshio_mesh_type(mesh_type: str) str#
Map a Zoomy cell type (
wface= wedge) to the meshio cell-type name.
- zoomy_core.mesh.mesh_util.get_extruded_mesh_type(mesh_type: str) str#
Cell type obtained by extruding
mesh_typeone layer (line -> quad, triangle -> wface, quad -> hexahedron).
- zoomy_core.mesh.mesh_util.get_global_cell_index_from_vertices(cells, coordinates, return_first=True, offset=0)#
Index (plus
offset) of the first cell, or of all cells ifreturn_firstis False, containing every vertex incoordinates.
- zoomy_core.mesh.mesh_util.get_element_neighbors(element_vertices, current_elem, mesh_type)#
Elements sharing a face with
current_elem; returns(n_found, neighbour_indices, local_face_indices).
- zoomy_core.mesh.mesh_util.face_normals(coordinates, element, mesh_type) float#
Unit normals of the faces of one element,
(n_faces, 3); orientation follows the vertex order.
- zoomy_core.mesh.mesh_util.face_areas(coordinates, element, mesh_type) float#
Area (length in 2D) of each face of one element.
- zoomy_core.mesh.mesh_util.center(coordinates, element) float#
Vertex-average centre of
element.
- zoomy_core.mesh.mesh_util.volume(coordinates, element, mesh_type) float#
Volume (area in 2D, length for lines) of one element of
mesh_type.
- zoomy_core.mesh.mesh_util.inradius(coordinates, element, mesh_type) float#
Inradius of one element of
mesh_type.
- zoomy_core.mesh.mesh_util.edge_length(coordinates, edge) float#
Euclidean length of
edge.
- zoomy_core.mesh.mesh_util.find_edge_index(element, edge_vertices, element_type)#
Local index of the edge/face of
elementwhose vertices lie inedge_vertices.
- zoomy_core.mesh.mesh_util.compute_subvolume(face_vertices, cell_center, dim)#
Volume of the sub-simplex spanned by a face and the cell centre (length, triangle, tetrahedron or pyramid for dim 1, 2, 3).
Args
face_vertices: coordinates of the face vertices.cell_center: coordinates of the cell centre.dim: spatial dimension (1, 2 or 3).