Grids

Grid

class Grid(*args, **kwargs)[source]

Bases: SpatialComponent

Basic grid class.

property actnum_ids

Raveled indices of active cells.

property as_corner_point

Corner-point representation of the grid.

bounding_box

Pair of diagonal corner points for grid’s bounding box.

property cell_centroids

Centroids of cells.

property cell_volumes

Volumes of cells.

create_vtk_grid()[source]

Creates VTK instructured grid.

create_vtk_locator()[source]

Creates VTK localor.

property dx_

DX attribute.

property dy_

DY attribute.

property dz_

DZ attribute.

property ex

Unit vector along grid X axis.

property ey

Unit vector along grid Y axis.

get_points_and_coonectivity()[source]

Get points and connectivity arrays.

get_xyz(ijk=None)[source]

Get x, y, z coordinates of cell vertices.

id_to_ijk(idx)[source]

Convert raveled positional index of active cell to ijk.

ijk_to_id(ijk)[source]

Convert ijk index of active cell to raveled positional index.

property locator

VTK locator.

property origin

Grid axes origin relative to the map coordinates.

ravel(attr, **kwargs)[source]

Ravel order ‘F’ transformations.

to_corner_point()[source]

Corner-point representation of the grid.

to_spatial(attr, **kwargs)[source]

Spatial order ‘F’ transformations.

property vtk_grid

VTK unstructured grid.

Orthogonal grid

class OrthogonalGrid(**kwargs)[source]

Bases: Grid

Orthogonal uniform grid.

property as_corner_point

Creates CornerPoint representation of the current grid.

get_points_and_coonectivity()[source]

Get points and connectivity arrays.

get_xyz(ijk=None)[source]

Get x, y, z coordinates of cell vertices.

to_corner_point()[source]

Create corner point representation of the current grid.

Returns:

grid

Return type:

CornerPointGrid

Corner-point grid

class CornerPointGrid(*args, **kwargs)[source]

Bases: Grid

Corner point grid.

property as_corner_point

Returns itself.

get_points_and_coonectivity()[source]

Get points and connectivity arrays.

get_xyz(ijk=None)[source]

Get x, y, z coordinates of cell vertices.

map_grid()[source]

Map pillars (COORD) to axis defined by `MAPAXES’.

Returns:

Grid with updated COORD and MAPAXES fields.

Return type:

CornerPointGrid

property origin

Grid axes origin relative to the map coordinates.

to_corner_point()[source]

Returns itself.