firedrakeproject/firedrake — pull request #89 by wence- (2013-11-25 13:40:49+00:00)
Title: Compilation failures for some compound forms

The following errors in compilation.

````python
from firedrake import *
m = UnitSquareMesh(1, 1)

V = FunctionSpace(m, 'CG', 1)

u = TrialFunction(V)
v = TestFunction(V)

u_0 = Function(V)
u_1 = Function(V)
out = Function(V)

a = u*v*dx

form = ufl.action(a, out) + u_0*v*ds + u_1*v*dx

assemble(form).dat.data

=> RuntimeError: In instant.recompile: The module did not compile with command

````
The problem is that when pulling the integrals out of a multi-component form, we do so on the unpreprocessed form. Thus, our integrals do not match the kernels that ffc throws back:

````python

len(form.integrals()) => 3
from pyop2.ffc_interface import compile_form
len(compile_form(form, 'a')) => 2
# oops
````

Using the preprocessed form, the measure's domain ids change (from dxeverywhere and so forth to dxotherwise), so I think this needs changes for facet handling.