from dolfin import *
mesh = UnitSquare(32, 32)
V = FunctionSpace(mesh, "CG", 1)
Q = FunctionSpace(mesh, "R", 0)
M = V * Q
(u, c) = TrialFunctions(M)
(v, d) = TestFunctions(M)
f = Expression("x[0]*x[1]*sin(pi*x[0])")
a = dot(grad(v), grad(u))*dx + d*u*dx + c*v*dx
L = v*f*dx
pde = VariationalProblem(a, L)
u_h = pde.solve()
plot(u_h[0])
interactive()
--
Marie
_______________________________________________
Mailing list: https://launchpad.net/~dolfin
Post to : dolfin@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~dolfin
More help : https://help.launchpad.net/ListHelp