upxo.meshing.gbconformant.fm_steel_abaqus.junctions module

Grain-boundary junction lines of a voxel label array and of a tetrahedral mesh.

A junction edge is a segment shared by three or more regions. Each edge carries the set of regions meeting along it (labels sorted ascending and padded on the left with -1; the box exterior, when included, is label 0). Edges with the same region set that touch end to end form one junction line.

class upxo.meshing.gbconformant.fm_steel_abaqus.junctions.JunctionEdges(nodes: ndarray, sets: ndarray, lengths: ndarray, truncated: int = 0)[source]

Bases: object

Junction edges: node pairs, region sets and lengths.

nodes: ndarray
sets: ndarray
lengths: ndarray
truncated: int = 0
class upxo.meshing.gbconformant.fm_steel_abaqus.junctions.JunctionLines(sets: ndarray, set_index: ndarray, length: ndarray, n_edges: ndarray)[source]

Bases: object

Junction lines: connected junction edges sharing one region set.

sets: ndarray
set_index: ndarray
length: ndarray
n_edges: ndarray
upxo.meshing.gbconformant.fm_steel_abaqus.junctions.voxel_junction_edges(labels, include_rve_faces=False)[source]

Junction edges of a voxel label array; each edge is one voxel edge long.

With include_rve_faces the box exterior counts as a region (label 0), so grain-boundary traces on the box faces are included. Without it only edges inside the box are used.

upxo.meshing.gbconformant.fm_steel_abaqus.junctions.box_face_bits(points, face_tolerance=1e-08)[source]

One bit per box face for every node: bit 2 axis is the low face of the axis, 2 axis + 1 the high one.

upxo.meshing.gbconformant.fm_steel_abaqus.junctions.junction_point_nodes(edges, n_nodes, ignore_ends=None)[source]

Nodes where junction lines end, branch or change their region set: the junction points.

A node is a junction point when its junction edges carry two or more different region sets, when three or more junction edges meet at it, or when only one does (a line that ends). ignore_ends is a boolean mask of nodes whose line ends do not count (nodes on the box faces, when the box exterior is not a region).

upxo.meshing.gbconformant.fm_steel_abaqus.junctions.tet_junction_edges(points, tetrahedra, grains, include_rve_faces=False, face_tolerance=1e-08)[source]

Junction edges of a tetrahedral (or hexahedral) mesh; grains is one label per element.

grains must be positive. With include_rve_faces an edge lying in a box face also belongs to the exterior region (label 0). tetrahedra may be (T, 8) hexahedra: their twelve edges are used instead of six.

upxo.meshing.gbconformant.fm_steel_abaqus.junctions.junction_lines(edges)[source]

Group junction edges into lines: connected edges with the same region set.

upxo.meshing.gbconformant.fm_steel_abaqus.junctions.regions_of(set_row)[source]

Positive labels of one region-set row (drops padding and the exterior).

upxo.meshing.gbconformant.fm_steel_abaqus.junctions.totals_per_grain(lines)[source]

{label: total length of the lines that border it}.

upxo.meshing.gbconformant.fm_steel_abaqus.junctions.totals_per_set(lines)[source]

{region set (tuple of labels incl. exterior 0): total length}.