get_subcomponent_coords_from_component_ID#
- get_subcomponent_coords_from_component_ID(domain, component_ID, component_dimension, subcomponents_dimension)#
Retrieve the coordinates of subcomponents from a given component ID.
- Parameters:
- domainobject
A muspan domain object.
- component_IDint
The ID of the component to retrieve subcomponents from.
- component_dimensionint
The dimension of the component (e.g., 0 for vertices, 1 for edges, 2 for faces).
- subcomponents_dimensionint
The dimension of the subcomponents to retrieve.
- Returns:
- tuple
A tuple containing the coordinates of the subcomponents and their IDs.
- Raises:
- ValueError
If the requested component dimension is greater than the domain dimension, if the requested subcomponent dimension is greater than the component dimension, or if the component ID is not found in the specified dimension.
- NotImplementedError
If the component dimension is not 0, 1, or 2.
Notes
This function currently supports up to 2D components. Higher dimensions will require modifications to the storage and retrieval logic. The function should ideally call itself recursively to handle higher dimensions.