Skip to content

Instantly share code, notes, and snippets.

@funsim
Created September 26, 2014 10:45
Show Gist options
  • Save funsim/a9765d93340dec40e7d0 to your computer and use it in GitHub Desktop.
Save funsim/a9765d93340dec40e7d0 to your computer and use it in GitHub Desktop.
from dolfin import *
mesh = UnitSquareMesh(2, 2)
V = FunctionSpace(mesh, "DG", 0)
f = interpolate(Expression("x[0]*x[1]"), V)
pvd = File("out.pvd")
pvd << f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment