← Back to team overview

ffc team mailing list archive

Re: Named Functions

 



Anders Logg wrote:
On Sat, Dec 06, 2008 at 03:48:34PM +0000, Garth N. Wells wrote:
It would be useful if we could somehow associate names with mixed functions, e.g.

   P2 = VectorElement("Lagrange", "triangle", 2)
   P1 = FiniteElement("Lagrange", "triangle", 1)
   TH = P2 + P1
   (u, p, "U") = Functions(TH)

Is it ever necessary to create a Functions that way?

TestFunctions and TrialFunctions are special since they correspond to
subsets of a bigger system, but for coefficients, one can just do

  u = Function(P2)
  p = Function(P1)

Even though it seems strange to name two coefficients "u" and "p" for
Stokes.


With the above they won't share the same vector. It's common that the Functions that are of interest in the form will come from solution, for example, the solution at previous time steps.

Garth



------------------------------------------------------------------------

_______________________________________________
FFC-dev mailing list
FFC-dev@xxxxxxxxxx
http://www.fenics.org/mailman/listinfo/ffc-dev




Follow ups

References