Subject: [FFC-dev] New operators

From: Anders Logg <[email-masked]>
Date: Thu, 10 May 2007 22:01:21 +0200

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

---

From: [email-masked]
Date: Thu, 10 May 2007 22:38:20 +0200 (CEST)

> Pretty cool, but watch out...

Very Cool!
So what does
a = 1/f dx
mean ?

Is it based on quadrature such that
a = \sum_i (1/( sum_j f(x_i) N_j(x_i)) w_i,
where x_i and w_i are quadrature nodes and weights
and N_j are the finite element basis?
How do you determine the order of the quadrature?

Kent

---

From: Anders Logg <[email-masked]>
Date: Fri, 11 May 2007 09:08:53 +0200

> How do you determine the order of the quadrature?

Almost, if a = 1/f, then

    a(x) = \sum_i (1/f_i) \phi_i(x)

where f_i are the expansion coefficients in the nodal basis. So it
makes sense for piecewise constants and it also makes limited sense
for higher order Lagrange elements.

/Anders