dolfinx.plot

Support functions for plotting

Functions

vtk_mesh()

Create vtk mesh topology data for mesh entities of a given dimension.

dolfinx.plot.vtk_mesh(msh: Mesh, dim: Optional[int] = None, entities=None)[source]
dolfinx.plot.vtk_mesh(V: FunctionSpaceBase, entities=None)

Create vtk mesh topology data for mesh entities of a given dimension. The vertex indices in the returned topology array are the indices for the associated entry in the mesh geometry.

Parameters:
  • mesh – Mesh to extract data from.

  • dim – Topological dimension of entities to extract.

  • entities – Entities to extract. Extract all if None.

Returns:

Topology, type for each cell, and geometry in VTK-ready format.