resqpy.olio.box_utilitiesΒΆ
Simple functions relating to cartesian grid boxes.
A box is a logical cuboid subset of the cells of a cartesian grid. A box is defined by a small numpy array: [[min_k, min_j, min_i], [max_k, max_j, max_i]]. The cells identified by the max indices are included in the box (not following the python convention) The ordering of the i,j & k indices might be reversed - identifier names then have a suffix of _ijk instead of _kji. The indices can be in simulator convention, starting at 1, or python convention, starting at 0, indicated by suffix of 0 or 1
Functions
Returns an integer array of extent [2, 3] converted from a list of words representing logical box. |
|
Returns True if the two boxes have any overlap in 3D, otherwise False. |
|
Returns True if cell is within box, otherwise False. |
|
Returns the indices of the cell at the centre of the box. |
|
Returns a 3 integer numpy array holding the size of the box, with the same ordering as the box. |
|
Returns a box containing all the cells in a grid of the given extent. |
|
Given a cell index triplet in the host grid, and a box, returns the equivalent local cell index triplet. |
|
Checks for 3D overlap of two boxes; returns True and sets trim_box if there is overlap, otherwise False. |
|
Given a box and a local cell index triplet, converts to the equivalent cell index triplet in the host grid. |
|
Returns a box containing the single given cell; protocol for box matches that of cell. |
|
Returns a string representing the box space in simulator input format, eg. |
|
Returns a string representing the box space in simulator protocol, eg. |
|
Reduces box_to_be_trimmed by trim_box; trim_box must be a neat subset box at one face of box_to_be_trimmed. |
|
Reduce the coverage of bounding box to the minimum needed to contain True elements of mask. |
|
Returns the box which contains both box_1 and box_2. |
|
Returns True if the entire box is within a grid of size host_extent. |
|
Returns the number of cells in the logical 3D cell space defined by box. |