jaxdem.writers.vtkDeformableParticleWriter#

VTK writers for deformable particles.

Classes

class jaxdem.writers.vtkDeformableParticleWriter.VTKDeformableEdgeAdjacenciesWriter#

Bases: VTKBaseWriter

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.

class jaxdem.writers.vtkDeformableParticleWriter.VTKDeformableEdgesWriter#

Bases: VTKBaseWriter

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.

class jaxdem.writers.vtkDeformableParticleWriter.VTKDeformableElementsWriter#

Bases: VTKBaseWriter

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.