Mesh Utilities#
Mesh Class#
|
Backend-neutral mesh container for Structure Genome I/O. |
Node and Element Numbering#
The numbering module provides validation and utilities for node and element numbering.
Validation Functions#
|
Validate node ID numbering according to format requirements. |
|
Validate element ID numbering according to format requirements. |
Utility Functions#
|
Extract node ID mapping from mesh. |
|
Ensure mesh has node IDs in point_data. |
|
Ensure mesh has element IDs in cell_data. |
|
Check for duplicate IDs in a list. |
|
Check for forbidden IDs according to format requirements. |
|
Renumber elements sequentially starting from 1. |
|
Automatically renumber nodes/elements to meet format requirements. |
Format Numbering Requirements#
Each target format declares its node/element numbering constraints. The writers consult this registry and adjust numbering automatically, so explicit renumbering is normally unnecessary.
|
Numbering requirements for a target format. |
|
Normalize a user-provided format string. |
|
Get numbering requirements for a format. |
Two module-level tables back these functions:
sgio.FORMAT_ALIASESMaps format aliases to their canonical name (for example
'sc'to'swiftcomp').normalize_format_name()applies this mapping.sgio.FORMAT_REQUIREMENTSMaps each canonical format name to its
FormatNumberingRequirements.get_numbering_requirements()looks up this table, resolving aliases first.
Mesh Validation Functions#
|
Check node ordering for supported cell types. |
|
Fix node ordering for supported cell types. |
|
Check if there are isolated/unconnected nodes in the mesh. |