plaid.utils.cgns_helper¶
Utility functions for working with CGNS trees and nodes.
Functions¶
|
Get a list of base names from a CGNSTree. |
|
Get consistent time values from CGNSBase_t nodes in a CGNSTree. |
|
Pretty print for CGNS Tree. |
|
Provide a summary of a CGNS tree's contents. |
Module Contents¶
- get_base_names(tree: plaid.types.CGNSTree, full_path: bool = False, unique: bool = False) list[str][source]¶
Get a list of base names from a CGNSTree.
- Parameters:
- Returns:
A list of base names.
- Return type:
- get_time_values(tree: plaid.types.CGNSTree) numpy.ndarray[source]¶
Get consistent time values from CGNSBase_t nodes in a CGNSTree.
- Parameters:
tree (CGNSTree) – The CGNSTree containing CGNSBase_t nodes.
- Returns:
An array of consistent time values.
- Return type:
np.ndarray
- Raises:
AssertionError – If the time values across bases are not consistent.
- summarize_cgns_tree(pyTree: list, verbose=True) str[source]¶
Provide a summary of a CGNS tree’s contents.
- Parameters:
Example
>>> summarize_cgns_tree(pyTree) Number of Bases: 2 Number of Zones: 5 Number of Nodes: 20 Number of Elements: 10 Number of Fields: 8
- Fields:
‘Base1/Zone1/Solution1/Field1’ ‘Base1/Zone1/Solution1/Field2’ ‘Base2/Zone2/Solution2/Field1’ …