jaxdem.writers.vtk_facets_writer#

VTK writer that exports facets as lines or triangles.

Classes

VTKFacetsWriter()

A VTKBaseWriter that writes facets as VTK lines (2D) or triangles (3D).

class jaxdem.writers.vtk_facets_writer.VTKFacetsWriter#

Bases: VTKBaseWriter

A VTKBaseWriter that writes facets as VTK lines (2D) or triangles (3D).

classmethod is_active(state: State, system: System) bool[source]#

Check whether this writer has data to write for the given state and system.

classmethod write(state: State, system: System, filename: Path, binary: bool) None[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.