pymor.tools.io.vtk
¶
Module Contents¶
- pymor.tools.io.vtk.read_vtkfile(filename, metadata_key='timestep')[source]¶
Try to read a given file into a Sequence of meshio.Mesh instances
Parameters
- metadata_key
Which metadata to extract and return alongside the meshio.Mesh instances.
Returns
- A list of (metadata_value, meshio.Mesh) tuples. The length of the list is either 1 for
a singular vtk/vtu/vtp input file (None is returned as metadata), or however many members are in the collection file (pvd).
- pymor.tools.io.vtk.write_vtk_collection(filename_base, meshes, metadata=None)[source]¶
Output grid-associated data in vtk format
- filename_base
common component for output files in collection
- meshes
Sequence of meshio.Mesh objects
- metadata
dict of {key1: sequence1, key2: sequence2} where sequence must be of len(meshes) or len == 1 currently supported keys are “timestep”, “name”, “group” and “part” used to describe datapoints in Vtk collection file defaults to { ‘timestep’: list(range(len(meshes))) }
Returns
full filename of saved file