upxo.meshing.gbconformant.d3v2p0.guard_relaxation module
Re-smooth geometry-guard rollback regions under the guard’s own checks.
The geometry guard pulls defective neighbourhoods back toward voxel coordinates by a per-node weight. The step in weight at the edge of a rollback region leaves creases. This optional stage applies further Laplacian steps to rolled-back nodes and a margin of neighbouring nodes only, and keeps a node’s move only while every changed triangle stays free of intersections, facet openings below minimum_facet_angle, orientation reversal or collapse relative to the voxel triangles, and RVE-plane clearance. Fixed junction points, fixed coordinates (RVE planes, frozen grains) and junction-line displacement limits are kept exactly as in smoothing. A full intersection scan certifies the result.
- upxo.meshing.gbconformant.d3v2p0.guard_relaxation.fold_counts(points, triangles, grain_pairs, thresholds=(150.0, 120.0), exclude_grain_ids=())[source]
Number of same-interface neighbouring triangle pairs with an opening (180 = flat) below each threshold, optionally excluding some grains.
- upxo.meshing.gbconformant.d3v2p0.guard_relaxation.check_nodes_outside(p, triangles, lower, upper)[source]
Nodes of the given triangles outside the RVE clearance box.
- upxo.meshing.gbconformant.d3v2p0.guard_relaxation.relax_guarded_interfaces(surface, smoothed, dimensions, enabled=True, iterations=20, relaxation=0.35, junction_relaxation=0.25, margin_rings=2, minimum_facet_angle=1.0, boundary_clearance=0.025, junction_max_displacement=None, exclude_grain_ids=(), progress=None)[source]
Return (Interfaces, report) after relaxing the guard’s rollback regions.
surface is the geometry-guard output and smoothed its input; both share triangles, original_points, node_kind, fixed_axes and junction_edges. exclude_grain_ids only affects the fold counts in the report.