cherab.imas.ids.common.ggd.load_unstruct_grid_2dΒΆ

cherab.imas.ids.common.ggd.load_unstruct_grid_2d(grid_ggd: IDSStructure, space_index: int = 0, with_subsets: bool = False) UnstructGrid2D | tuple[UnstructGrid2D, dict[str, ndarray[tuple[Any, ...], dtype[int32]]], dict[str, int]]SourceΒΆ

Load unstructured 2D grid from the grid_ggd structure.

Parameters:
grid_ggd: IDSStructureΒΆ

The grid_ggd structure.

space_index: int = 0ΒΆ

The index of the grid space, by default 0.

with_subsets: bool = FalseΒΆ

Read grid subset data, by default False.

Returns:

  • grid (UnstructGrid2D) – Unstructured 2D grid object.

  • subsets (dict[str, NDArray[numpy.int32]]) – Dictionary with grid subsets for each subset name containing the indices of the cells from that subset. Note that β€˜Cells’ subset is included only if cell indices are specified.

  • subset_id (dict[str, int]) – Dictionary with grid subset indices.

Raises:

ValueError – If the specified space does not contain a 2D grid.