parq_blockmodel.geometry.LocalGeometry#

class parq_blockmodel.geometry.LocalGeometry(corner, block_size, shape)[source]#

Local dense grid geometry with C-order indexing.

This class models the logical/local lattice only (local corner/origin, block size, shape). It has no rotation, CRS, or world-frame meaning.

corner#

Local (u0, v0, w0) corner of the (i=0, j=0, k=0) block.

Type:

Point

block_size#

Block dimensions (dx, dy, dz) along the local i/j/k (u/v/w) axes.

Type:

BlockSize

shape#

Grid shape (ni, nj, nk) - number of blocks along each axis.

Type:

Shape3D

__init__(corner, block_size, shape)#

Methods

__init__(corner, block_size, shape)

ijk_from_row_index(rows)

Convert row index/indices into (i, j, k) using C-order.

ijk_from_uvw(u, v, w[, tol])

Map local centroid coordinates to integer logical ijk indices.

row_index_from_ijk(i, j, k)

Convert (i, j, k) into row index using C-order.

uvw_from_ijk(i, j, k)

Convert logical indices to local centroid coordinates.

Attributes

centroids_uvw

Compute local centroids as a (3, N) array in C-order.

corner

block_size

shape

property centroids_uvw: ndarray#

Compute local centroids as a (3, N) array in C-order.

ijk_from_row_index(rows)[source]#

Convert row index/indices into (i, j, k) using C-order.

ijk_from_uvw(u, v, w, tol=1e-06)[source]#

Map local centroid coordinates to integer logical ijk indices.

Return type:

tuple[ndarray, ndarray, ndarray]

row_index_from_ijk(i, j, k)[source]#

Convert (i, j, k) into row index using C-order.

uvw_from_ijk(i, j, k)[source]#

Convert logical indices to local centroid coordinates.

Return type:

tuple[ndarray, ndarray, ndarray]