dolfinx.plot

Support functions for plotting

Functions

_(V[, entities])

Creates a VTK mesh topology (topology array and array of cell types) that is based on the degree-of-freedom coordinates.

vtk_mesh()

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

dolfinx.plot.vtk_mesh(msh: Mesh, dim: int | None = None, entities=None)[source]
dolfinx.plot.vtk_mesh(V: FunctionSpace, 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.