upxo.meshing.gbconformant.d3v2p0.gmsh_interfaces module
Gmsh remeshing of shared, labelled discrete grain interfaces.
- class upxo.meshing.gbconformant.d3v2p0.gmsh_interfaces.RemeshedInterfaces(points: numpy.ndarray, triangles: numpy.ndarray, grain_pairs: numpy.ndarray, curve_edges: numpy.ndarray, report: dict)[source]
Bases:
object
- upxo.meshing.gbconformant.d3v2p0.gmsh_interfaces.remesh_interfaces_gmsh(interfaces, mesh_size=1.0, verbose=False, algorithm=6, *, check_intersections=False, intersection_retries=2, rve_dimensions=None, max_chart_triangles=None, minimum_facet_angle=0.1, _patch_keys=None, _oriented=False, _retry_depth=0, frozen_grain_ids=(), minimum_remesh_opening=None)[source]
Reparametrize and regenerate every interface, retaining shared curve mesh.
Existing 1D mesh nodes and edges are kept, so junctions and RVE-face traces remain exactly at their smoothed positions. Only the 2D mesh is regenerated. Gmsh may split an interface into multiple parametrizable charts; grain-pair labels are recovered from original element tags before remeshing. Charts that cannot be parametrized are split along existing triangle edges into disk-shaped charts and retried, without altering grain geometry. max_chart_triangles optionally partitions the input into bounded disks before Gmsh topology construction. Smaller values retain more source seams. check_intersections enables geometric checks and local source-chart fallback; rve_dimensions also rejects internal triangles flattened onto an RVE plane. algorithm selects a triangular surface mesher: 1 MeshAdapt, 2 Automatic, 5 Delaunay, or 6 Frontal-Delaunay. Gmsh may fall back internally on failure. minimum_remesh_opening (degrees, with check_intersections) also treats as defects openings below that angle which are sharper than the sharpest source opening within mesh_size (no-sharpening rule). Their charts fall back to the source triangles like other defects.