UBC OcTree Mesh Appender
- class PVGeo.ubc.octree.OcTreeAppender(**kwargs)
This filter reads a timeseries of models and appends it to an input
- _place_on_mesh(output, idx=0)
Internal helper to place a model on the mesh for a given index
Internal helper to read all data at start
UBC OcTree Mesh Reader
- class PVGeo.ubc.octree.OcTreeReader(nOutputPorts=1, outputType='vtkUnstructuredGrid', **kwargs)
This class reads a UBC OcTree Mesh file and builds a
vtkUnstructuredGridof the data in the file. Model File is optional. Reader will still construct
- RequestData(request, inInfo, outInfo)
Used by pipeline to generate output
- RequestInformation(request, inInfo, outInfo)
Pipeline method for handling requests about the grid extents and time step values
- __ubc_octree(filename_mesh, filename_models, output)
Wrapper to Read UBC GIF OcTree mesh and model file pairs. UBC OcTree models are defined using a 2-file format. The “mesh” file describes how the data is descritized. The “model” file lists the physical property values for all cells in a mesh. A model file is meaningless without an associated mesh file. This only handles OcTree formats
filename_mesh (str) – The OcTree Mesh filename as an absolute path for the input mesh file in UBC OcTree Mesh Format
- filename_models (list(str)): The model filenames as absolute paths for
the input model timesteps in UBC OcTree Model Format. output (vtkUnstructuredGrid): The output data object
vtkUnstructuredGridgenerated from the UBC 2D/3D Mesh grid. Mesh is defined by the input mesh file. Cell data is defined by the input model file.
- Return type
Use to clean/rebuild the mesh.
Use to clean the models and reread the data
- description = 'PVGeo: UBC OcTree Mesh'
- static place_model_on_octree_mesh(mesh, model, data_name='Data')
Places model data onto a mesh. This is for the UBC Grid data readers to associate model data with the mesh grid.
mesh (vtkUnstructuredGrid) – The
vtkUnstructuredGridthat is the mesh to place the model data upon. Needs to have been read in by ubcOcTree
model (np.ndarray) – A NumPy float array that holds all of the data to place inside of the mesh’s cells.
data_name (str) – The name of the model data array once placed on the
vtkUnstructuredGridwith model data appended.
- Return type
- ubc_octree_mesh(FileName, pdo=None)
This method reads a UBC OcTree Mesh file and builds a
vtkUnstructuredGridof the data in the file. This method generates the
vtkUnstructuredGridwithout any data attributes.
FileName (str) – The mesh filename as an absolute path for the input mesh file in UBC OcTree format.
pdo (vtkUnstructuredGrid) – A pointer to the output data object.
vtkUnstructuredGridgenerated from the UBCMesh grid. Mesh is defined by the input mesh file. No data attributes here, simply an empty mesh. Use the
place_model_on_octree_mesh()method to associate with model data.
- Return type