cherab.imas.ggd.GGDGrid¶
-
class cherab.imas.ggd.GGDGrid(name: str =
'', dimension: int =1, coordinate_system: 'cylindrical' | 'cartesian' ='cartesian')Source¶ Bases:
objectBase class for general grids (GGD).
- Parameters:
Methods
interpolator(grid_data[, fill_value])Return an Function interpolator instance for the data defined on this grid.
plot_mesh([data, ax])Plot the grid geometry to a matplotlib figure.
subset(indices[, name])Create a subset grid from this instance.
vector_interpolator(grid_vectors[, fill_vector])Return a VectorFunction interpolator instance for the vector data defined on this grid.
Attributes
Cell areas as
(num_cell,)array.Coordinate of cell centres as
(num_cell, dimension)array.Cell volume as
(num_cell,)array.Coordinate system.
Grid dimension.
Extent of the mesh.
Grid name.
Number of grid cells.
- property cell_centre : ndarray[tuple[Any, ...], dtype[float64]] | NoneSource¶
Coordinate of cell centres as
(num_cell, dimension)array.
- property cell_area : ndarray[tuple[Any, ...], dtype[float64]] | NoneSource¶
Cell areas as
(num_cell,)array.
- property cell_volume : ndarray[tuple[Any, ...], dtype[float64]] | NoneSource¶
Cell volume as
(num_cell,)array.
- property mesh_extent : dict[str, float] | NoneSource¶
Extent of the mesh.
A dictionary with xmin, xmax, ymin and ymax, … keys.
-
subset(indices: ArrayLike, name: str | None =
None) GGDGridSource¶ Create a subset grid from this instance.
-
interpolator(grid_data: ArrayLike, fill_value: float =
0.0) Function2D | Function3DSource¶ Return an Function interpolator instance for the data defined on this grid.
On the second and subsequent calls, the interpolator is created as an instance of the previously created interpolator.
-
vector_interpolator(grid_vectors: ArrayLike, fill_vector: Vector3D =
Vector3D(0.0, 0.0, 0.0)) Function2D | Function3DSource¶ Return a VectorFunction interpolator instance for the vector data defined on this grid.
On the second and subsequent calls, the interpolator is created as an instance of the previously created interpolator.