upxo.meshing.gbconformant.fm_steel_abaqus.hierarchy module

Hierarchy levels of a raw feature export (PAG, packet, block, sub-block).

A raw export folder holds one label array and one orientation file per level (<prefix>_lgi.npy, <prefix>_orientations.pkl) and a raw_export.pkl bundle with the maps between level identifiers, parentage, units and voxel size. This module reads it, reports which levels are present and builds the feature table (orientation, parentage, global ID) for one chosen level.

class upxo.meshing.gbconformant.fm_steel_abaqus.hierarchy.Feature(label: int, level: str, source_id: object, pag_id: int, pkt_idx: int | None, blk_local: int | None, sb_local: int | None, euler: tuple, global_id: int)[source]

Bases: object

One feature of the chosen level, identified by its label-array value.

label: int
level: str
source_id: object
pag_id: int
pkt_idx: int | None
blk_local: int | None
sb_local: int | None
euler: tuple
global_id: int
property pck_key
property blk_key
property key
class upxo.meshing.gbconformant.fm_steel_abaqus.hierarchy.Hierarchy(level: str, lgi: numpy.ndarray, features: dict, voxel_counts: dict, units: str, voxel_size: float, pag_order: list = <factory>, pck_order: list = <factory>, blk_order: list = <factory>, sblk_order: list = <factory>, global_ids: dict = <factory>, origin: tuple | None = None, parent_shape: tuple | None = None, names: dict = <factory>, material_names: dict = <factory>, extra: dict = <factory>, groups: dict = <factory>, system: str = 'FM steel')[source]

Bases: object

level: str
lgi: ndarray
features: dict
voxel_counts: dict
units: str
voxel_size: float
pag_order: list
pck_order: list
blk_order: list
sblk_order: list
global_ids: dict
origin: tuple | None = None
parent_shape: tuple | None = None
names: dict
material_names: dict
extra: dict
groups: dict
system: str = 'FM steel'
property level_text

grain for a structure that has only grains (twinned FCC), else the level code.

Type:

The level as a person reads it

ordered_features()[source]

Features in global-ID order, which is the deck’s material order.

upxo.meshing.gbconformant.fm_steel_abaqus.hierarchy.read_bundle(folder)[source]
upxo.meshing.gbconformant.fm_steel_abaqus.hierarchy.detect_levels(folder, prefixes=None)[source]

Levels (coarse to fine) with both a label array and an orientation file.

upxo.meshing.gbconformant.fm_steel_abaqus.hierarchy.load_hierarchy(folder, level, prefixes=None)[source]

Read level of the raw export in folder into a Hierarchy.

upxo.meshing.gbconformant.fm_steel_abaqus.hierarchy.parent_tables(hierarchy)[source]

Lookup tables from a feature label to its parents.

Returns (pag_lut, pck_lut, pck_keys, blk_lut, blk_keys); pag_lut holds PAG IDs, the packet and block tables hold indices into the key lists (-1 where the level does not apply).