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:
PVGeo.base.AlgorithmBase
This creates a vtkRectilinearGrid where the discretization along a given axis is uniformly distributed.
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:
PVGeo.base.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.-
_add_model_data
(pdo, data)[source]¶ Add an array to the output data object. If data is None, random values will be generated.
-
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
-
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:
PVGeo.base.AlgorithmBase
Create uniform grid (
vtkImageData
)