dolfinx.io.vtkhdf#
Support for VTKHDF5 file format.
Functions
|
Array for permuting VTK ordering to DOLFINx ordering. |
|
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.cell_perm_array(cell_type: CellType, num_nodes: int) ndarray[tuple[Any, ...], dtype[uint16]][source]#
Array for permuting VTK ordering to DOLFINx ordering.
- Parameters:
cell_type – DOLFINx cell type.
num_nodes – Number of nodes in the cell.
- Returns:
An array
psuch thata_dolfinx[i] = a_vtk[p[i]].
- 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) Mesh[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) None[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) None[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) None[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.