upxo.meshing.gbconformant.fm_steel_abaqus.identity module
Which raw feature each meshed grain stands for.
Cleaning only reassigns voxels between labels that already exist, so every meshed grain traces back to one or more raw labels. When whole grains merge, the merged grain keeps the identity (and so the orientation and element-set name) of the largest member by raw voxel count; equal sizes are decided by a seeded random pick that does not depend on dictionary order.
- class upxo.meshing.gbconformant.fm_steel_abaqus.identity.IdentityMap(winner: dict, members: dict, survivor_raw: dict, rule: str, seed: int, report: dict = <factory>)[source]
Bases:
objectMeshed label -> winning raw label, with the merge history.
- upxo.meshing.gbconformant.fm_steel_abaqus.identity.resolve_identities(raw_sizes, *, shuffle_map=None, survivor_map=None, rule='larger', seed=0)[source]
Resolve the raw identity of every meshed grain.
- Parameters:
raw_sizes (mapping raw label -> voxel count before any cleaning.)
shuffle_map (mapping raw label -> pipeline label (grain-ID shuffle);) –
Nonemeans the pipeline used the raw labels unchanged.survivor_map (mapping pipeline label -> pipeline label of the grain it) – was merged into (the small-grain removal’s
original_to_survivor);Nonemeans no grain was merged.rule (
'larger'keeps the largest member’s identity;'survivor') – keeps the identity of the grain that absorbed the others.seed (seeds the pick between equally large members.)