upxo.meshing.gbconformant.d3v2p1.tet_smoothing module

Block-parallel tet dihedral smoothing (d3v2p0.tet_smoothing rules, unchanged).

The RVE is cut into cubic blocks of fixed size, coloured by the parity of their grid indices (8 colours), so blocks of one colour are a block apart. Each pass runs 8 phases, one per colour; the blocks of a phase run in parallel. A block moves the nodes it contains (membership from the positions at the start of the pass) and reads the nodes around them, which may lie in neighbouring blocks of other colours; those stay fixed during the phase. Every node is thus worked on once per pass, including nodes at block faces. A node is skipped only if another block of the same phase would read it (a star wider than a block). Each block runs d3v2p0’s node search and acceptance rule; tet and surface-triangle floors are anchored to the start of the whole call and the surface deviation limit is computed once for the whole surface, so the d3v2p0 guarantees hold across blocks. Block layout does not depend on the worker count, so results are identical for any n_workers.

upxo.meshing.gbconformant.d3v2p1.tet_smoothing.smooth_tet_dihedrals(points, tetrahedra, movable, *, enabled=True, target=30.0, max_angle=150.0, neighbour_floor=None, max_passes=10, node_iterations=3, max_halvings=8, initial_step=0.3, softness=20.0, surface=None, frozen_grain_ids=(), max_deviation=None, minimum_facet_angle=0.0, triangle_target=30.0, triangle_floor=None, search_directions=True, progress=None, corner_max_deviation=None, wedge_limit=None, n_workers=None, block_size=12.0, minimum_gain=0.0, backend='auto', track_history=True)[source]

Block-parallel version of d3v2p0.tet_smoothing.smooth_tet_dihedrals.

Same arguments and rules, plus backend / n_workers (see d3v2p1.backend; None = automatic; the result does not depend on the worker count). Blocks run in worker processes; with numba available (‘auto’ or ‘numba’) each block evaluates trial positions with compiled kernels, which can change the last bit of some volumes and so, rarely, a borderline choice (‘numpy’ keeps d3v2p0’s arithmetic). block_size (physical units; fixed so results do not depend on n_workers) and minimum_gain (stop when a pass reduces the number of tets outside the limits by less than this fraction; 0 runs until no move is accepted). Returns (points, report).

upxo.meshing.gbconformant.d3v2p1.tet_smoothing.smooth_grain_tetrahedra(tets, surface_node_count, *, n_workers=None, block_size=12.0, minimum_gain=0.0, backend='auto', **kwargs)[source]

Block-parallel version of d3v2p0.tet_smoothing.smooth_grain_tetrahedra.

Smoothing runs in d3v2p1 blocks; verification (positive volumes, RVE and grain volumes against the moved surface, moved-surface intersections, Gmsh minSICN, dihedral statistics, readiness) is d3v2p0’s (see _verify_smoothed), run on the result.