This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

zero() * v * dx: AssertionError: Expecting a completed form with domains at this point.

0 votes

I'd like to discretize a zero right-hand side. The following used to work, but no longer does.

from dolfin import *

mesh = UnitSquareMesh(10, 10)
V = FunctionSpace(mesh, 'CG', 1)

v = TrialFunction(V)

L = zero() * v * dx
# L = 0.0 * v * dx

b = assemble(L)

How to handle this now?

asked Feb 12, 2014 by nschloe FEniCS User (7,120 points)

1 Answer

+2 votes
 
Best answer

Hi, the following works

L = Constant(0.0) * v * dx 
answered Feb 12, 2014 by MiroK FEniCS Expert (80,920 points)
selected Feb 12, 2014 by nschloe
...