Quoting Martin Sandve Alnæs <martinal@xxxxxxxxx>:
Hi all,
thanks for all the nice comments and feedback at the workshop.
There was in particular some interest in how to extend UFL
with experimental features without having to interfere with the
main development branch. I'd like to compile a list of the kind
of features that are most interesting to people, so we can figure
out what to make extensible. Then I'll see what I can do.
Extending UFL with lifting operators.
Recall that for the Poisson equation we have:
a = \int (grad(v) + R(v))(grad(u) + R(u)) d\Omega
+ \sum_e \int (\eta r^e(v) r^e(u) d\Omega
with
R(u) = \sum_e r^e(u)
and
\int_{E = E^{+} + E^{-}} w r^e(u) d\Omega = - \int_e {w}[u] d\Gamma
where the last equation is the lifting operation.
I think we need to introduce two new functions in order to distinguish terms
like grad(v)R(u) and the stabilisation term r^e(v)r^e(u).
As mentioned at the workshop, we probably also need a new integral type.
So (some of) the terms in the Poisson equation could be represented as:
element = FiniteElement("Discontinuous Lagrange", triangle, 1)
l_space = VectorElement("Discontinuous Lagrange", triangle, 0)
v = TestFunction(element)
u = TrialFunction(element)
R = LiftingFunction(l_space)
r = LiftingOperator(l_space)
a = inner(grad(v), R(u))*dE + inner(r(v), r(u))*dE
For this to work, we probably have to introduce a new type of integral in UFC
and modify the assembly in DOLFIN.