jaxdem.writers.vtk_deformable_particle_writer#
VTK writers for deformable particles.
Classes
A |
|
A |
|
A |
- class jaxdem.writers.vtk_deformable_particle_writer.VTKDeformableEdgeAdjacenciesWriter#
Bases:
VTKBaseWriterA
VTKBaseWriterthat writes the shared hinges between adjacent elements.In 3D the writer draws each shared edge as a VTK line. In 2D it draws each shared vertex as a VTK point. It attaches the rest and current bending angles and the bending stiffness
ebasCellDataarrays.- 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.
- class jaxdem.writers.vtk_deformable_particle_writer.VTKDeformableEdgesWriter#
Bases:
VTKBaseWriterA
VTKBaseWriterthat writes deformable particle edges as VTK lines.It attaches the rest and current edge lengths and the edge stiffness
elasCellDataarrays.- 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.
- class jaxdem.writers.vtk_deformable_particle_writer.VTKDeformableElementsWriter#
Bases:
VTKBaseWriterA
VTKBaseWriterthat writes deformable particle elements.The writer draws 3-vertex elements as VTK triangles and 2-vertex elements as VTK lines. It attaches per-element properties (
elements_id,ec,gamma, rest and current element measures,partial_content, andelement_normals) asCellDataarrays.- 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.