import firedrake
import viskex
Generate a mesh of the unit square by dividing each edge of the square in 6 segments.
square = firedrake.UnitSquareMesh(6, 6, distribution_parameters={"partitioner_type": "simple"})
Each plotting function accepts optional keyword arguments, that are passed directly to the add_mesh
method of the underlying pyvista plotter. For instance, the following two notebook cells plot the mesh using pyvista
default color (red) first, and then using a custom color provided as a keyword argument (blue).
viskex.firedrake.plot_mesh(square)
viskex.firedrake.plot_mesh(square, color="blue")