reservoirflow.grids.RegularCartesian.extract_boundaries#
- RegularCartesian.extract_boundaries(in_data, points=None, fmt='tuple')#
Extract boundary cells from ndarrays.
- Parameters:
in_data (ndarray) – input array must contain all cells including boundary cell.
points (bool, optional) – True for points (i.e. tuples of len 3 like coords, icoords) and False for scaler values (e.g. id). If value is set to None, bool value is calculated automatically. Warning: this argument must be specified in case that in_data was for scaler values in fshape that is (#,..,3) (i.e. not flatten). For more information about points automatic calculation, check the utility function utils.helpers.ispoints().
fmt (str, optional) – format of output data as str in [‘tuple’, ‘list’, ‘set’, ‘array’].
- Returns:
output data based on fmt argument.
- Return type:
ndarray, list, set
- Raises:
ValueError – ‘fmt is unknown’ when fmt is not in [‘tuple’,’list’,’array’]
ValueError – ‘dtype must be ndarray’ when in_data is not numpy array.
See also
remove_boundaries
remove boundary cells from input data.