sector⚓︎
Extract a sector from an existing cornerpoint grid.
extract_cell_prop(prop, least, most)
⚓︎
Extract the property values for a submodel.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
prop
|
ndarray
|
Property values for each cell in the entire grid with shape (nk, nj, ni). |
required |
least
|
tuple of int
|
Lower, left-most, back corner of submodel, (k1, j1, i1). |
required |
most
|
tuple of int
|
Upper, right-most, front corner of submodel, (k2, j2, i2). |
required |
Returns:
Type | Description |
---|---|
ndarray
|
Property values for each cell in the submodel with shape (k2-k1+1, j2-j1+1, i2-i1+1). |
extract_coord(coord, least, most)
⚓︎
Extract the coordinate pillars for a submodel.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
coord
|
ndarray
|
Coordinate pillars for the entire grid with shape (nj+1, ni+1, 2, 3). |
required |
least
|
tuple of int
|
Lower, left-most, back corner of submodel, (k1, j1, i1). |
required |
most
|
tuple of int
|
Upper, right-most, front corner of submodel, (k2, j2, i2). |
required |
Returns:
Type | Description |
---|---|
ndarray
|
Coordinate pillars for the submodel with shape (j2-j1+2, i2-i1+2, 2, 3). |
extract_dimens(least, most)
⚓︎
Build a new dimension tuple for a submodel.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
least
|
tuple of int
|
Lower, left-most, back corner of submodel, (k1, j1, i1). |
required |
most
|
tuple of int
|
Upper, right-most, front corner of submodel, (k2, j2, i2). |
required |
Returns:
Type | Description |
---|---|
ndarray
|
Dimensions of the submodel. |
extract_grid(grid, least, most)
⚓︎
Extract a submodel from a full grid.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
grid
|
dict
|
Attributes of the full grid, such as COORD, ZCORN, ACTNUM. |
required |
least
|
tuple of int
|
Lower, left-most, back corner of the submodel, (k1, j1, i1). |
required |
most
|
tuple of int
|
Upper, right-most, front corner of the submodel, (k2, j2, i2). |
required |
Returns:
Type | Description |
---|---|
dict
|
Attributes of the sector model. |
extract_zcorn(zcorn, least, most)
⚓︎
Extract hinge depth values for a submodel from the entire grid.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
zcorn
|
ndarray
|
Hinge depth values for the entire grid with shape (nk, 2, nj, 2, ni, 2). |
required |
least
|
tuple of int
|
Lower, left-most, back corner of submodel, (k1, j1, i1). |
required |
most
|
tuple of int
|
Upper, right-most, front corner of submodel, (k2, j2, i2). |
required |
Returns:
Type | Description |
---|---|
ndarray
|
Hinge depth values for the submodel with shape (k2-k1+1, 2, j2-j1+1, 2, i2-i1+1). |
main(*args)
⚓︎
Read a data file to see if it parses OK.
parse_tuple(corner)
⚓︎
Parse a coordinate specification string into a tuple of zero-based coordinates.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
corner
|
str
|
Coordinate specification in the format "(i1,j1,k1)". |
required |
Returns:
Type | Description |
---|---|
tuple of int
|
The parsed tuple, converted into zero-based coordinates and in Python-matrix order: (k, j, i). |
sort_tuples(corner, opposite)
⚓︎
Parameters:
Name | Type | Description | Default |
---|---|---|---|
corner
|
tuple of int
|
Coordinates of one corner. |
required |
opposite
|
tuple of int
|
Coordinates of the opposite corner. |
required |
Returns:
Type | Description |
---|---|
tuple of tuple of int
|
The two tuples, but with coordinates interchanged so that one corner is always in the lower, left, back and the other is in the upper, right, front. |