Skip to content

DeformationRenderer

DeformationRenderer

DeformationRenderer(results)

Configure and write deformation movies from a result set.

Attributes

results instance-attribute

results = results

response instance-attribute

response = 'displacement'

scale instance-attribute

scale = 1.0

_field_name instance-attribute

_field_name: Optional[str] = None

_field_location instance-attribute

_field_location = 'point'

_field_reduction instance-attribute

_field_reduction: Optional[Union[str, int]] = None

_field_options instance-attribute

_field_options: dict[str, Any] = {}

_mesh_options instance-attribute

_mesh_options: dict[str, Any] = {'show_edges': True}

_camera_position instance-attribute

_camera_position: Any = None

_parallel_projection instance-attribute

_parallel_projection = False

_zoom instance-attribute

_zoom: Optional[float] = None

_background instance-attribute

_background: Any = None

Methods:

deform_by

deform_by(response: str = 'displacement', *, scale: float = 1.0) -> 'DeformationRenderer'

Choose the vector response and visual deformation scale.

color_by

color_by(field: str, *, location: str = 'point', reduction: Optional[Union[str, int]] = None, **options: Any) -> 'DeformationRenderer'

Color by a transient response or an existing static mesh array.

style_mesh

style_mesh(**options: Any) -> 'DeformationRenderer'

Set options forwarded to pyvista.Plotter.add_mesh.

set_view

set_view(camera_position: Any = None, *, parallel_projection: bool = False, zoom: Optional[float] = None, background: Any = None) -> 'DeformationRenderer'

Configure the shared camera and background.

write

write(filename: Union[str, Path], *, stride: int = 1, frame_rate: int = 30, quality: int = 5, progress: bool = True, window_size: tuple[int, int] = (960, 544)) -> Path

Render the configured result sequence to an MP4 file.

_validate_static_field

_validate_static_field(meshes) -> None

_transient_field_location

_transient_field_location() -> Optional[str]

_assign_field

_assign_field(mesh: UnstructuredGrid, partition: int, step: int, location: str) -> None

_reduce

_reduce(values: ndarray) -> np.ndarray

_as_xyz staticmethod

_as_xyz(values: ndarray) -> np.ndarray