Skip to content

unstruct⚓︎

Convert cornerpoint grids to unstructured grids.

Examples:

>>> import pyresito.grid.unstruct as us
>>> import pyresito.io.grdecl as grdecl
>>> g = grdecl.read('~/proj/cmgtools/bld/overlap.grdecl')

Face ⚓︎

Bases: object

A (vertical) face consists of two ridges, because all of the faces in a hexahedron can be seen as (possibly degenerate) quadrilaterals.

is_above(other) ⚓︎

Weak ordering of faces based on vertical placement.

Parameters:

Name Type Description Default
other Face

Face to be compared to this object.

required

Returns:

Type Description
bool

True if all points in face self are above all points in face other, False otherwise.

Ridge ⚓︎

Bases: object

A ridge consists of two points, anchored in each their pillar. We only need to store the z-values, because the x- and y- values are determined by the pillar themselves.

is_not_below(other) ⚓︎

Weak ordering of ridges based on vertical placement.

Parameters:

Name Type Description Default
other Ridge

Ridge to be compared to this object.

required

Returns:

Type Description
bool or None

True if no point on self is below any on the other, None if the ridges cross, and False if there is a point on the other ridge that is above any on self.

conv(grid) ⚓︎

Convert a cornerpoint grid to an unstructured grid.

Parameters:

Name Type Description Default
grid dict

Cornerpoint grid to be converted. Should contain 'COORD', 'ZCORN', 'ACTNUM'.

required

Returns:

Type Description
dict

Unstructured grid.