Subject: [FFC-dev] Functionals

From: Anders Logg <[email-masked]>
Date: Tue, 19 Sep 2006 20:25:45 +0200

I've added support for evaluation of functionals to FFC and DOLFIN.
An example can be found in src/demo/pde/functional

A functional is defined as follows in FFC (here an energy norm):

  v = Function(element)
  M = (v*v + dot(grad(v), grad(v)))*dx

Then in DOLFIN, just assemble the functional directly:

  EnergyNorm::Functional M(v);
  real value = FEM::assemble(M, mesh);

Note that functionals may be defined for an arbitrary number of
arguments and that they don't need to be linear.

/Anders

---

From: Johan Jansson <[email-masked]>
Date: Fri, 22 Sep 2006 14:39:38 +0200

> arguments and that they don't need to be linear.

Very nice. So the only missing piece for automated error estimation is
to construct the residual (and the dual eventually)?

  Johan

---

From: Anders Logg <[email-masked]>
Date: Fri, 22 Sep 2006 16:05:29 +0200

> to construct the residual (and the dual eventually)?

And differentiation of functionals and nonlinear forms.

/Anders