ffc team mailing list archive
-
ffc team
-
Mailing list archive
-
Message #02826
UFL/PyDOLFIN problem
I've run into a problem with zero coefficients. The code:
mesh = UnitSquare(32, 32)
V = FunctionSpace(mesh, "CG", 1)
v = TestFunction(V)
# Source term
f = 0.0
# Linear form
L = v*f*dx
# Assemble and apply boundary conditions
b = assemble(L)
gives an error since f = 0 which means that UFL eliminates it. I can get
around it by doing
f = Function(V, "0.0")
but that's not very satisfactory. It would work if I had some other term
in the linear form which is non-zero. UFL should generate a
representation for f = 0 if there are no other terms in the form.
Garth
Follow ups