jaxdem.writers.vtk_domain_writer#
VTK writer for domain geometry.
Classes
A |
- class jaxdem.writers.vtk_domain_writer.VTKDomainWriter#
Bases:
VTKBaseWriterA
VTKBaseWriterthat writes the simulation domain as a VTK geometric primitive.The writer draws the domain as an axis-aligned cuboid (3D) or rectangle (2D) with a
vtkCubeSource. It pads 2D input arrays to 3D as VTK requires.- classmethod write(state: State, system: System, filename: Path, binary: bool) None[source]#
Write information from a simulation snapshot to a VTK PolyData file.
Concrete writers implement this method. The caller converts all JAX arrays to NumPy arrays before it calls write.
- Parameters:
state (State) – The simulation
jaxdem.Statesnapshot to write.system (System) – The simulation
jaxdem.Systemconfiguration.filename (Path) – Target path of the VTK file. The caller guarantees that the parent directory exists.
binary (bool) – If True, write the VTK file in binary mode. If False, write it in ASCII (human-readable) mode.