upxo.meshing.gbconformant.pipeline.mesh_regions module
Where the grain boundary surface, the junction lines and the junction points of a mesh are, and how many layers of elements every element and surface face lies from each of them.
The mesh is made of linear tetrahedra ((T, 4), faces are triangles) or linear hexahedra ((T, 8), for example
one per voxel, faces are quadrilaterals); the type is told by the shape of the connectivity array. Names below say
tetrahedron and triangle; for a hexahedral mesh read hexahedron and quadrilateral.
A feature is one of three things a grain structure has:
gb_surface: the faces that separate two grains,junction_lines: the mesh edges shared by three or more regions (grains, and the box exterior when asked),junction_points: the nodes where junction lines end, branch or change the set of regions they separate (for a generic grain structure, the points where four grains meet).
The layer of an element is 1 when it touches the feature, 2 when it shares a node with a layer-1 element and is
not itself in layer 1, 3 when it shares a node with a layer-2 element and is not in layers 1 or 2, and so on; 0 when
it is farther than the asked-for order. What counts as touching is a choice (TOUCH_CHOICES): sharing a face
(with the grain boundary surface) or an edge (with a junction line), or sharing any node. Junction points are always
touched by a node. Triangles are only ever grown along the surface they belong to.
- class upxo.meshing.gbconformant.pipeline.mesh_regions.MeshSurface(nodes: ndarray, grains: ndarray, tets: ndarray, between_grains: ndarray, nonmanifold: int = 0)[source]
Bases:
objectThe triangles that separate regions: faces between two grains and, when asked, faces on the box exterior.
- nodes: ndarray
(F, 3) node indices of every triangle, ascending in each row; (F, 4) quadrilaterals in cyclic order.
- class upxo.meshing.gbconformant.pipeline.mesh_regions.RegionLayers(order: int, touch: str, include_rve_faces: bool, surface: MeshSurface, tet: dict = <factory>, triangle: dict = <factory>, edges: ndarray = <factory>, line_nodes: ndarray = <factory>, point_nodes: ndarray = <factory>, counts: dict = <factory>)[source]
Bases:
objectThe layer of every tetrahedron and surface triangle for each feature (0 = beyond the asked-for order).
- surface: MeshSurface
- upxo.meshing.gbconformant.pipeline.mesh_regions.tet_faces(tetrahedra, n_nodes)[source]
Every distinct face of the mesh:
(nodes (F,3), first tet, second tet or -1, number of tets on the face).Hexahedra
(T, 8)give(F, 4)quadrilaterals (seeelement_faces()).
- upxo.meshing.gbconformant.pipeline.mesh_regions.mesh_surface(tetrahedra, grains, n_nodes, include_rve_faces=False) MeshSurface[source]
The grain boundary triangles of a mesh, with the box exterior’s triangles when
include_rve_faces.
- upxo.meshing.gbconformant.pipeline.mesh_regions.feature_layers(points, tetrahedra, grains, *, order=1, touch='face or edge', include_rve_faces=False, features=('gb_surface', 'junction_lines', 'junction_points')) RegionLayers[source]
Layer of every tetrahedron and surface triangle for each of
featuresup toorderlayers away.