upxo.meshing.gbconformant.d3v2p0.views module
Read-only PyVista views of the final shared grain complex.
- upxo.meshing.gbconformant.d3v2p0.views.grain_volume_changes(labels, spacing, surface)[source]
Compare labelled voxel volumes with oriented closed grain-shell volumes.
- upxo.meshing.gbconformant.d3v2p0.views.volume_change_view(labels, spacing, surface, *, grain_id=None, mode='percent', cmap='coolwarm', limits=None, voxel_edges=True, voxel_opacity=1.0, internal_opacity=0.35, rve_opacity=0.35, show_internal=True, show_rve=True, show_edges=False, show_lines=False, line_color='red', line_width=3.0, show_points=False, point_color='black', point_size=10.0, top_n=20, window_size=(1500, 700), show=True)[source]
Linked voxel/final-surface maps; negative is shrinkage, positive expansion.
Each shared interface is displayed once, using its first owner unless a particular grain is selected. No averaging of two grains’ volume changes.
- upxo.meshing.gbconformant.d3v2p0.views.displacement_view(interfaces, *, grain_id=None, component='magnitude', cmap='viridis', limits=None, opacity=1.0, show_edges=False, show_lines=True, line_color='red', line_width=3.0, show_points=False, point_color='black', point_size=10.0, window_size=(1500, 700), show=True)[source]
Linked original/current surfaces with exact pre-Gmsh node displacement.
- upxo.meshing.gbconformant.d3v2p0.views.grain_selector(labels, spacing, surface, grid, *, initial_grain=None, grain_cmap='nipy_spectral', segment_cmap='tab20', voxel_opacity=1.0, tet_opacity=1.0, surface_opacity=0.65, voxel_edges=True, tet_edges=False, surface_edges=True, show_rve=True, show_lines=True, line_color='red', line_width=3.0, show_points=False, point_color='black', point_size=10.0, include_rve_junctions=True, reset_camera=True, window_size=(1800, 700), show=True, curvature_type=None, curvature_cmap='tab20c', curvature_limits=None)[source]
Interactive linked voxel/tet/interface view with grain-index slider.
Membership indexes and physical junctions are built once. Surface segment IDs are local to the selected grain, separated by neighbour, cap face, and edge-connected component; artificial Gmsh chart seams do not split segments. Returns the plotter and an exact-ID selection callback.
- upxo.meshing.gbconformant.d3v2p0.views.linked_comparison(labels, spacing, surface, quality, *, cmap='nipy_spectral', voxel_opacity=1.0, surface_opacity=1.0, transparent_opacity=0.2, show_rve=False, rve_opacity=0.1, line_color='red', line_width=3.0, show_points=False, point_color='black', point_size=10.0, include_rve_junctions=True, bins=60, log_counts=False, quality_threshold=0.05, window_size=(2000, 650), show=True)[source]
Three camera-linked geometry panels and an independent minSICN histogram.
- upxo.meshing.gbconformant.d3v2p0.views.junction_geometry(surface, grain_ids=None, include_rve=True)[source]
Extract physical junctions, excluding artificial Gmsh chart seams.
Three material regions define a line; the exterior counts as one region when requested. Points are line endpoints/branches or >=4-region nodes. Classify globally before restricting to the displayed grains.
- upxo.meshing.gbconformant.d3v2p0.views.non_touching_grains(surface, seed=42, maximum=None)[source]
Seeded greedy maximal set: no selected grains share a surface node.
This is not a maximum-cardinality independent-set solver. With maximum supplied the selection stops early. Touching includes face/edge/point contact.
- upxo.meshing.gbconformant.d3v2p0.views.surface_view(surface, *, internal_grains_only=False, show_rve=True, internal_opacity=0.35, rve_opacity=0.15, cmap='nipy_spectral', show_lines=True, line_color='red', line_width=3.0, show_points=False, point_color='black', point_size=10.0, include_rve_junctions=True, show=True)[source]
- upxo.meshing.gbconformant.d3v2p0.views.tet_view(surface, grid, *, seed=42, maximum=None, color_segments=False, cmap='nipy_spectral', opacity=1.0, show_edges=False, show_lines=True, line_color='red', line_width=3.0, show_points=False, point_color='black', point_size=10.0, include_rve_junctions=True, clip=False, crinkle=True, normal='x', origin=None, invert=False, show=True)[source]