Catalyst
The Catalyst module contains classes to aid with insitu visualization with Catalyst2.
The objects in this module simply wrap around the Catalyst2 API to make it easier.
Catalyst2
Classes to interface with paraview - catalyst
- class pysemtools.io.catalyst.CatalystSession(comm: Comm, pipeline: str, channel: str, implementation_name=None, implementation_path: str | None = None)
Class to interface with catalyst
Interface with catalyst to set up a session and load the pipeline.
- Parameters:
- commMPI.Comm
- pipelinestr
Path to the saved ParaView Catalyst state file (e.g. “pipeline.py”).
- channelstr
Name of the catalyst channel to use (must match the registrationName in your saved state script, e.g. “rbc00001.vtkhdf”).
- implementation_namestr
Optional name of the catalyst implementation to use. Also set with env variable CATALYST_IMPLEMENTATION_NAME e.g. export CATALYST_IMPLEMENTATION_NAME=paraview
- implementation_pathstr
Optional path to the catalyst implementation. Also set with env variable CATALYST_IMPLEMENTATION_PATH e.g. export CATALYST_IMPLEMENTATION_PATH=/path/to/paraview/lib/catalyst
Methods
execute([timestep, time_value])Execute the catalyst pipeline for the current mesh and fields
finalize()Finalize the catalyst session
set_field(fields)Set the fields for the catalyst session / conduit node
set_mesh(x, y, z[, cell_type])Set the mesh for the catalyst session / conduit node
- execute(timestep=0, time_value=0.0)
Execute the catalyst pipeline for the current mesh and fields
- Parameters:
- timestep: int
Current timestep to set in the catalyst state.
- time_value: float
Current time value to set in the catalyst state.
- finalize()
Finalize the catalyst session
- set_field(fields: dict[str, ndarray])
Set the fields for the catalyst session / conduit node
- Parameters:
- fields: dict[str, np.ndarray]
Dictionary of field name to field values.
- set_mesh(x: ndarray, y: ndarray, z: ndarray, cell_type: str = 'hex')
Set the mesh for the catalyst session / conduit node
- Parameters:
- x: np.ndarray
array with local x coordinates on this rank.
- y: np.ndarray
array with local y coordinates on this rank.
- z: np.ndarray
array with local z coordinates on this rank.
- cell_type: str
cell type, currently only “hex” is supported.