Grids

Create Even Rectilinear Grid

class PVGeo.model_build.grids.CreateEvenRectilinearGrid(extent=[10, 10, 10], xrng=[-1.0, 1.0], yrng=[-1.0, 1.0], zrng=[-1.0, 1.0])[source]

Bases: AlgorithmBase

This creates a vtkRectilinearGrid where the discretization along a given axis is uniformly distributed.

RequestData(request, inInfo, outInfo)[source]

Used by pipeline to generate the output

RequestInformation(request, inInfo, outInfo)[source]

Used by pipeline to handle output extents

set_extent(nx, ny, nz)[source]

Set the extent of the output grid.

set_x_range(start, stop)[source]

Set range (min, max) for the grid in the X-direction.

set_y_range(start, stop)[source]

Set range (min, max) for the grid in the Y-direction

set_z_range(start, stop)[source]

Set range (min, max) for the grid in the Z-direction

Create Tensor Mesh

class PVGeo.model_build.grids.CreateTensorMesh(origin=[-350.0, -400.0, 0.0], data_name='Data', xcellstr='200 100 50 20*50.0 50 100 200', ycellstr='200 100 50 21*50.0 50 100 200', zcellstr='20*25.0 50 100 200')[source]

Bases: AlgorithmBase

This creates a vtkRectilinearGrid where the discretization along a given axis is not uniform. Cell spacings along each axis can be set via strings with repeating patterns or explicitly using the Set*Cells methods.

RequestData(request, inInfo, outInfo)[source]

Used by pipeline to generate output data object

RequestInformation(request, inInfo, outInfo)[source]

Used by pipeline to set output whole extent

_add_model_data(pdo, data)[source]

Add an array to the output data object. If data is None, random values will be generated.

_make_model(pdo)[source]

Generates the output data object

static _read_cell_line(line)[source]

Read cell sizes for each line in the UBC mesh line strings

get_extent()[source]

Get the extent of the created mesh

set_origin(x0, y0, z0)[source]

Set the origin of the output

set_x_cells(xcells)[source]

Set the spacings for the cells in the X direction

Parameters:

xcells (list or np.array(floats)) – the spacings along the X-axis

set_x_cells_str(xcellstr)[source]

Set the spacings for the cells in the X direction

Parameters:

xcellstr (str) – the spacings along the X-axis in the UBC style

set_y_cells(ycells)[source]

Set the spacings for the cells in the Y direction

Parameters:

ycells (list or np.array(floats)) – the spacings along the Y-axis

set_y_cells_str(ycellstr)[source]

Set the spacings for the cells in the Y direction

Parameters:

ycellstr (str) – the spacings along the Y-axis in the UBC style

set_z_cells(zcells)[source]

Set the spacings for the cells in the Z direction

Parameters:

zcells (list or np.array(floats)) – the spacings along the Z-axis

set_z_cells_str(zcellstr)[source]

Set the spacings for the cells in the Z direction

Parameters:

zcellstr (str) – the spacings along the Z-axis in the UBC style

Create Uniform Grid

class PVGeo.model_build.grids.CreateUniformGrid(extent=(10, 10, 10), spacing=(1.0, 1.0, 1.0), origin=(0.0, 0.0, 0.0))[source]

Bases: AlgorithmBase

Create uniform grid (vtkImageData)

RequestData(request, inInfo, outInfo)[source]

Used by pipeline to generate the output

RequestInformation(request, inInfo, outInfo)[source]

Used by pipeline to handle output extents

set_extent(nx, ny, nz)[source]

Set the extent of the output grid.

set_origin(x0, y0, z0)[source]

Set the origin of the output grid.

set_spacing(dx, dy, dz)[source]

Set the spacing for the points along each axial direction.