reservoirflow.grids.RegularCartesian.get_cell_icoords#

RegularCartesian.get_cell_icoords(coords)#

Convert coords from (i,j,k) into (k,j,i).

This method is required to create icoords based on (k,j,i) which can be used to access ndarrays in this class. icoords is not compatible with pyvista grid which use coords based on (i,j,k).

Parameters:

coords (tuple of int, tuple of tuples of int) – cell coordinates (i,j,k) as a tuple of int. For multiple cells, tuple of tuples of int as ((i,j,k),(i,j,k),..). Warning: providing an unhashable type (e.g. list, ndarray) is not supported and will cause TypeError.

Returns:

internal coords (icoords)

Return type:

tuple/list of tuples