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

Integral without domain is now illegal

0 votes

Dear all,

I tried to superponate 2 Functions in anUFL-File with setting a neumann boundary condition.

While trying to compile this to a cpp-header I got the Error

UFLException: An Integral without a Domain is now illegal.

I tried to superponate the functions like this:

DG = FiniteElement("DG", cell, 0)
u = TrialFunction(DG)
v = TestFunction(DG)
k = Constant(cell) 
g = Coefficient(DG)
u1 = Coefficient(DG)
u2 = Coefficient(DG)

a = u*v*(dx(1)+dx(2)+dx(3)+dx(4)+dx(5))
L = v*u1*(dx(1)+(1-k)*(dx(2)+dx(3))+dx(4)) + v*u2*(k*(dx(2)+dx(3))+dx(5)) + g*v*(ds(2)-ds(3))

where dx(1)-dx(5) are Subdomains and ds(2) and ds(3) are Facets, defined by Meshfunctions in my C++-Code. Why can't I compile it like this?

Every dx() or ds() I used is defined anywhere else and I never had the error by using ds(..:) and dx(...).

I hope anyone of you can help me to fix this and explain me, why this happens.

Sincerely,
Justus

asked Nov 9, 2016 by Pama328 FEniCS Novice (480 points)
...