resqpy.olio.box_utilities.parent_cell_from_local_box_cell

resqpy.olio.box_utilities.parent_cell_from_local_box_cell(box, box_cell, based_0_or_1=0)[source]

Given a box and a local cell index triplet, converts to the equivalent cell index triplet in the host grid.

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 box_cell; start value (python or Fortran/simulator) given by based_0_or_1

box_cell: numpy int array of shape (3)

indices of a cell within box, in coords local to box 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 box_cell arguments, and of return value

returns: numpy int array of shape (3)

indices defining the cell in the host grid space equivalent to box_cell ordering of indices is same as that of box and box_cell; base is given by based_0_or_1 argument