← Back to team overview

ffc team mailing list archive

Functionals

 

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


Follow ups