- edited description
assemble 0 vectors
Issue #44
invalid
The code
from dolfin import *
mesh = UnitIntervalMesh(20)
V = FunctionSpace(mesh, 'CG', 1)
v = TestFunction(V)
f = zero() * v * dx
#f = 0 * v * dx
#f = 1 * v * dx
assemble(f)
fails to execute with
ufl.log.UFLException: Unable to extract common cell; missing cell definition in form or expression
if the form that is to be assembled is factually 0.
This are blueprints about this on launchpad, cf. https://blueprints.launchpad.net/ufl/+spec/annotate-zero-with-arguments https://blueprints.launchpad.net/dolfin/+spec/zero-form-righthand-side.
Comments (5)
-
reporter -
reporter - edited description
-
The dolfin blueprint you mention is limited to the solve(a == 0) context.
The general issue is in ufl: https://blueprints.launchpad.net/ufl/+spec/annotate-zero-with-arguments
For the exact example code you present, a workaround is to replace 0 with Constant(0.0).
I'm closing this as it's not a dolfin bug. I'll transfer the ufl issues to bitbucket later in June, I'm quite overworked atm.
-
- changed status to invalid
This is a known ufl issue, not a dolfin issue.
-
reporter - edited description
- Log in to comment