reservoirflow.grids.RegularCartesian.remove_boundaries#

RegularCartesian.remove_boundaries(in_data, points=None, remove='both')#

Remove boundary cells from ndarray.

Parameters:
  • in_data (ndarray, dict of ndarray) – input data where boundaries need to be removed. Input data must be an ndarray with boundaries. Input data as dict with keys for these arrays is also possible.

  • 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().

  • remove (str, optional) – boundaries to remove as str in [‘both’, ‘left’, ‘right’].

Returns:

array with boundaries removed.

Return type:

ndarray, dict

Raises:
  • ValueError – boundaries are not included or points argument must be correctly assigned.

  • ValueError – dtype must be ndarray.

See also

extract_boundaries

keep only boundary cells from input data.