quickpaver.rlg_idx_to_nn#

quickpaver.rlg_idx_to_nn(ix: int | ndarray[tuple[Any, ...], dtype[int64]] | Sequence[int], nx: int = 1, iy: int | ndarray[tuple[Any, ...], dtype[int64]] | Sequence[int] = 0, ny: int = 1, iz: int | ndarray[tuple[Any, ...], dtype[int64]] | Sequence[int] = 0, indices_start_at_one: bool = False) ndarray[tuple[Any, ...], dtype[int64]][source]#

Convert indices (ix, iy, iz) to a node-number.

For 1D and 2D, simply leave iy, ny, iz and nz to their default values.

Note

Node numbering start at zero.

Warning

This applies only for regular grids. It is not suited for vertex.

Parameters:
  • ix (int) – Index on the x-axis.

  • nx (int, optional) – Number of grid cells on the x-axis. The default is 1.

  • iy (int, optional) – Index on the y-axis. The default is 0.

  • ny (int, optional) – Number of grid cells on the y-axis. The default is 1.

  • iz (int, optional) – Index on the z-axis. The default is 0.

  • indices_start_at_one (bool, optional) – Whether the indices start at 1. Otherwise, start at 0. The default is False.

Returns:

The node number.

Return type:

int