jaxdem.writers.vtkDomainWriter#
VTK writer for domain geometry.
Classes
A |
- class jaxdem.writers.vtkDomainWriter.VTKDomainWriter[source]#
Bases:
VTKBaseWriter
A
VTKBaseWriter
that writes the simulation domain as a VTK geometric primitive.The domain is represented as an axis-aligned cuboid (3D) or rectangle (2D), using a
vtkCubeSource
. If input arrays are 2D, they are padded to 3D as required by VTK.- classmethod write(state: State, system: System, filename: Path, binary: bool)[source][source]#
Write information from a simulation snapshot to a VTK PolyData file.
This abstract method is the core interface for all concrete VTK writers. Implementations should assume that all jax arrays are converted to numpy arrays before write is called.
- Parameters:
state (State) – The simulation
jaxdem.State
snapshot to be written.system (System) – The simulation
jaxdem.System
configuration.filename (Path) – Target path where the VTK file should be saved. The caller guarantees that it exists.
binary (bool) – If True, the VTK file is written in binary mode; if False, it is written in ASCII (human-readable) mode.