ffc team mailing list archive
-
ffc team
-
Mailing list archive
-
Message #01090
New operators
It is now possible to take the inverse, absolute value and square root
of functions in FFC.
The operators are applied directly to the function coefficients so
this only makes sense for Lagrange elements (and then it only makes
limited sense for higher order elements).
Here's an example:
element = FiniteElement("Lagrange", "triangle", 1)
v = TestFunction(element)
u = TrialFunction(element)
f = Function(element)
g = Function(element)
a = sqrt(1/abs(1/f))*sqrt(g)*dot(grad(v), grad(u))*dx + \
v*u*sqrt(f*g)*g*dx
Pretty cool, but watch out...
/Anders
Follow ups