← Back to team overview

ffc team mailing list archive

slight modification of FFC and UFL

 

Hello. I would like to know how hard it would be to modify FFC (and UFL) to do the following.

Here is the sample .ufl file:

Poisson.ufl
------------------------------------------
element = FiniteElement("Lagrange", "triangle", 2)
vector  = VectorElement("Lagrange", "triangle", 2)

v = TestFunction(element)
u = TrialFunction(element)
f = Function(element)
G = Function(vector)

a = inner(grad(v), grad(u))*dx
L = v*f*dx
------------------------------------------

And I would like to do the following in C++:

// in C++
a.G = Some_Function;

Basically, I just want to attach to `a' some external function that does NOT appear in the bilinear form. How hard would that be? I'm not sure what the UFL syntax should be. This is for the higher order mesh stuff.

- Shawn


Follow ups