upxo.meshing.gbconformant.d3v2p1.interfaces module

d3v2p0.interfaces.smooth_interfaces with the node and edge tables built from integer keys.

The extracted interfaces, their smoothing and the result are d3v2p0’s; only the set-per-node and set-per-edge Python loops, the np.unique(axis=0) tables and the facet-angle edge table (rebuilt on every check although the connectivity never changes) are replaced. The result is identical to d3v2p0’s. The Interfaces class and upscale_labels are d3v2p0’s.

upxo.meshing.gbconformant.d3v2p1.interfaces.smooth_interfaces(labels, spacing=1.0, iterations=20, relaxation=0.35, junction_iterations=None, junction_relaxation=0.25, junction_max_displacement=None, frozen_grain_ids=(), iterations_by_pair=None, ramp_rings=2, thickness_cap_fraction=None, minimum_wedge_angle=None, minimum_corner_angle=None, progress=None, track_history=False)[source]

Return shared internal interface triangles; no tetrahedra or RVE caps.

Voxel axes are x/y/z. Surface nodes average surface neighbors and junction nodes average junction neighbors. Junction endpoints, branches and >=4-grain nodes stay fixed, as do coordinates on RVE planes. Local step suppression and backtracking prevent triangle collapse and per-step normal reversal. This surface preview does not certify self-intersection-free geometry or preserve individual grain volumes, and differs from volume-constrained CM01. Junction smoothing has an independent iteration count (None uses iterations), relaxation and optional maximum displacement in physical units from the extracted geometry. Only edges incident to >=3 distinct grains are junction edges; endpoint label sets alone do not identify a junction edge. frozen_grain_ids locks every shared node incident to the selected grains in all three axes, preserving their voxel facets through Laplacian updates.

Differential smoothing (all optional; defaults reproduce the above): iterations_by_pair maps a grain pair (a, b) to the number of Laplacian iterations its interface nodes receive; a node takes the smallest count of the pairs it touches, and counts rise by at most an equal step per ring of neighbours over ramp_rings rings, so no step change leaves a crease. thickness_cap_fraction caps each node’s distance from its voxel position at that fraction of half the smallest local thickness (local_thickness) of the grains it touches, in physical units: thin necks and plates move little, thick regions are unaffected. minimum_wedge_angle (degrees) stops a node for the remaining iterations when its move would bring two triangles sharing an edge (a grain wedge at a junction line, or a fold) below that opening; such openings are reported, not repaired. minimum_corner_angle (degrees) does the same for patch corners: the angle of one interface patch at a fixed junction point (the sum of its triangle angles there, i.e. the angle between the two junction lines bounding it). A move that would bring a corner below the minimum, or make an already smaller corner smaller, stops the nodes involved. track_history: when True, smoothing_report[‘history’] holds one entry per accepted iteration (displacement, newly wedge/corner-frozen nodes, turn-angle stats).