jaxdem.writers.vtkSpheresWriter#
VTK writer that exports spheres data.
Classes
A |
- class jaxdem.writers.vtkSpheresWriter.VTKSpheresWriter[source]#
Bases:
VTKBaseWriterA
VTKBaseWriterthat writes particle centers as VTK points and attaches per-particleStatefields asPointDataattributes.For each particle, its position is written as a point. Relevant per-particle fields (e.g.,
vel,rad,mass) are exported as arrays. Positions and 2-component vectors 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.Statesnapshot to be written.system (System) – The simulation
jaxdem.Systemconfiguration.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.