So this is just a UFL annoyance.


For DG0, grad(p) is zero, so dot(u, grad(p)) is zero, thus UFL sees 0*dx, which doesn't have an integration domain.


You can satisfy UFL with writing dot(u, grad(p))*dx(domain=p.ufl_domain()) for example.


From: firedrake-bounces@imperial.ac.uk <firedrake-bounces@imperial.ac.uk> on behalf of William Booker <scwb@leeds.ac.uk>
Sent: 12 May 2016 09:54:16
To: firedrake
Subject: [firedrake] Error with constant DG basis
 

Dear Firedrakers,

The attached code runs and gives good convergence for linear and quadratic DG basis.
But when I run the scheme with a constant basis I get the following error:

This integral is missing an integration domain.
Traceback (most recent call last):
  File "compressible_acoustic.py", line 98, in <module>
    L1 = -div_u(dFdu_vec, dHdrho0)
  File "compressible_acoustic.py", line 94, in div_u
    return (dot(u, grad(p)))*dx + (jump(p)*dot((u('-')*(1-theta)+u('+')*theta), n('-')))*(dS)
  File "/usr/not-backed-up/firedrake/2016-05-11/firedrake/lib/python2.7/site-packages/ufl/measure.py", line 398, in __rmul__
    error("This integral is missing an integration domain.")
  File "/usr/not-backed-up/firedrake/2016-05-11/firedrake/lib/python2.7/site-packages/ufl/log.py", line 158, in error
    raise self._exception_type(self._format_raw(*message))
ufl.log.UFLException: This integral is missing an integration domain.

I've had a working version, including a constant basis, when I had the terms separately instead of being a definition.
So I'm not quite sure where the error is.

Regards,
Will