Base Classes¶
Model Appender Base¶
-
class
PVGeo.ubc.two_file_base.
ModelAppenderBase
(inputType='vtkRectilinearGrid', outputType='vtkRectilinearGrid', **kwargs)[source]¶ Bases:
PVGeo.base.AlgorithmBase
A base class for create mesh-model appenders on the UBC Mesh formats
-
RequestInformation
(request, inInfo, outInfo)[source]¶ Used by pipeline to handle time variance and update output extents
-
add_model_file_name
(filename)[source]¶ Use to set the file names for the reader. Handles single string or list of strings.
-
get_model_filenames
(idx=None)[source]¶ Returns the list of file names or given and index returns a specified timestep’s filename.
-
UBC Mesh Reader Base¶
-
class
PVGeo.ubc.two_file_base.
ubcMeshReaderBase
(nOutputPorts=1, outputType='vtkUnstructuredGrid', **kwargs)[source]¶ Bases:
PVGeo.base.TwoFileReaderBase
A base class for the UBC mesh readers
-
_read_extent
()[source]¶ Reads the mesh file for the UBC 2D/3D Mesh or OcTree format to get output extents. Computationally inexpensive method to discover whole output extent.
-
extensions
= 'mesh msh dat txt text'¶
-
set_use_filename
(flag)[source]¶ Set a flag on whether or not to use the filename as the data array name
-
static
ubc_model_3d
(FileName)[source]¶ Reads the 3D model file and returns a 1D NumPy float array. Use the place_model_on_mesh() method to associate with a grid.
- Parameters
FileName (str) – The model file name(s) as an absolute path for the input model file in UBC 3D Model Model Format. Also accepts a list of string file names.
- Returns
Returns a NumPy float array that holds the model data read from the file. Use the
place_model_on_mesh()
method to associate with a grid. If a list of file names is given then it will return a dictionary of NumPy float array with keys as the basenames of the files.- Return type
np.array
-