Viper is a minimalistic scientific plotter and run-time visualization module. It has support for visualizing meshes and solutions in DOLFIN.
from dolfin import *
# Plot a mesh
mesh = UnitCube(16, 16, 16)
# the following code is out of date!
# Plot a scalar function
u = Function("poisson.xml")
# Plot a vector function as a displacement field
d = Function("elasticity.xml")
# Save as png
p = plot(mesh)
# Save as VTK
p = plot(u)
Viper depends on VTK with Python support.
Here are some key features of "Viper":
· Light-weight and minimalistic
· Extended keybindings
· Save as png, VTK
· 2D and 3D
· Scalar, vector, and displacement fields
· Multiple input formats
· In PyCC mode; direct plotting of numpy arrays over DOLFIN meshes
· Can be used as standalone plotting application, or used as part of PyDOLFIN
What's New in This Release: [ read full changelog ]
· This release provides some minor bug fixes for Viper. This will be the last Viper release since VTK-based plotting is now incorporated directly in DOLFIN 1.1.