resqpy.olio.box_utilities.local_box_cell_from_parent_cell¶
- resqpy.olio.box_utilities.local_box_cell_from_parent_cell(box, parent_cell, based_0_or_1=0)[source]¶
Given a cell index triplet in the host grid, and a box, returns the equivalent local cell index triplet.
- input arguments (unmodified):
- box: numpy int array of shape (2, 3)
lower & upper indices in 3 dimensions defining a logical cuboid subset of a 3D cartesian grid indices in the same ordering as parent_cell; start value (python or Fortran/simulator) given by based_0_or_1
- parent_cell: numpy int array of shape (3)
indices of a cell within host grid indices in the same ordering as box; start value (python or Fortran/simulator) given by based_0_or_1
- based_0_or_1: int, value 0 or 1
start value (base) for indices of box and parent_cell arguments, and of return value
- returns: numpy int array of shape (3); or None
indices defining the parent_cell in coords local to box, if the cell is within the box if parent_cell is not within box, None is returned