jaxdem.writers.vtk_facets_writer#
VTK writer for facet geometry.
Classes
A |
- class jaxdem.writers.vtk_facets_writer.VTKFacetsWriter#
Bases:
VTKBaseWriterA
VTKBaseWriterthat writes facets as thickened VTK cells.The writer groups vertices by
facet_id. In 2D it expands each 2-vertex facet into a convex-hull polygon that covers the facet plus its thickness, or a quad when the hull is not available. In 3D it expands each 3-vertex facet into a convex-hull triangle mesh, or a flat prism when the hull is not available. It also attaches per-vertexStatefields and quaternion components asPointDataarrays.- 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.
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.