Mixins (discretize.mixins)

The mixins module provides a set of tools for interfacing discretize with external libraries such as VTK, OMF, and matplotlib. These modules are only imported if those external packages are available in the active Python environment and provide extra functionality that different finite volume meshes can inherit.

Mixin Classes


Class for managing the input/output of tensor meshes and models.


Class for managing the input/output of tree meshes and models.


Class for plotting discretize meshes with matplotlib.


Class enabling straight forward conversion between discretize meshes and their corresponding VTK or PyVista data objects.


The InterfaceOMF class was designed for easy conversion between discretize objects and open mining format (OMF) objects.

Other Optional Classes

Slicer(mesh, v[, xslice, yslice, zslice, ...])

Plot slices of a 3D volume, interactively (scroll wheel).