dolfinx.io.vtkhdf
Support for VTKHDF5 file format.
Functions
|
Read a mesh from a VTKHDF format file. |
|
Write data at cells of the mesh. |
|
Write a mesh to file in VTKHDF format. |
|
Write data at vertices of the mesh. |
- dolfinx.io.vtkhdf.read_mesh(comm: Comm, filename: str | Path, dtype: DTypeLike = <class 'numpy.float64'>, gdim: int = 3, max_facet_to_cell_links: int = 2)[source]
Read a mesh from a VTKHDF format file.
Note
Changing max_facet_to_cell_links from the default value should only be required when working on branching manifolds. Changing this value on non-branching meshes will only result in a slower mesh partitioning and creation.
- Parameters:
comm – An MPI communicator.
filename – File to read from.
dtype – Scalar type of mesh geometry (need not match dtype in file).
gdim – Geometric dimension of the mesh.
max_facet_to_cell_links – Maximum number of cells that can be linked to a facet.
- dolfinx.io.vtkhdf.write_cell_data(filename: str | Path, mesh: Mesh, data: ndarray[tuple[Any, ...], dtype[_ScalarT]], time: float)[source]
Write data at cells of the mesh.
- Parameters:
filename – File to write to.
mesh – Mesh.
data – Data at the cells of the mesh, local to each process.
time – Timestamp.
- dolfinx.io.vtkhdf.write_mesh(filename: str | Path, mesh: Mesh)[source]
Write a mesh to file in VTKHDF format.
- Parameters:
filename – File to write to.
mesh – Mesh.
- dolfinx.io.vtkhdf.write_point_data(filename: str | Path, mesh: Mesh, data: ndarray[tuple[Any, ...], dtype[_ScalarT]], time: float)[source]
Write data at vertices of the mesh.
- Parameters:
filename – File to write to.
mesh – Mesh.
data – Data at the points of the mesh, local to each process.
time – Timestamp.