Subject: [FFC-dev] Add support for arbitrary mixed elements (experimental and untested). [...]

From: [email-masked]
Date: Tue, 20 Sep 2005 17:06:24 +0200

Commit from logg (2005-09-20 17:06 CEST)
----------------

Add support for arbitrary mixed elements (experimental and untested).

The following code creates a Taylor-Hood element:

  P1 = FiniteElement("Lagrange", "triangle", 1)
  P2 = FiniteElement("Vector Lagrange", "triangle", 2)
  TH = P2 + P1

  (v, q) = BasisFunctions(TH)
  (u, p) = BasisFunctions(TH)

  ffc  ChangeLog                          1.76
  ffc  src/bin/ffc                        1.21
  ffc  src/ffc/compiler/dofmap.py         1.19
  ffc  src/ffc/compiler/finiteelement.py  1.24
  ffc  src/ffc/compiler/integrator.py     1.16
  ffc  src/ffc/compiler/pointmap.py       1.6

---

From: "Garth N. Wells" <[email-masked]>
Date: Tue, 20 Sep 2005 19:19:52 +0200

This looks really nice, and will be really useful. Is it limited to two fields?

Garth

Quoting [email-masked]:

> _______________________________________________
> FFC-dev mailing list
> [email-masked]
> http://www.fenics.org/cgi-bin/mailman/listinfo/ffc-dev
>

---

From: Anders Logg <[email-masked]>
Date: Tue, 20 Sep 2005 13:36:25 -0500

No, you can have any number of elements:

    P1 = FiniteElement("Lagrange", "triangle", 1)
    P2 = FiniteElement("Vector Lagrange", "triangle", 2)
    P3 = FiniteElement("Vector Lagrange", "triangle", 3)
    TH = P2 + P1 + P3
    element = P1 + TH + P3 + TH + TH + P3 # :-)

etc.

You can also initialize a mixed element from a list of elements:

    TH = MixedElement([P2, P1])

/Anders

-- 
Anders Logg
Research Assistant Professor
Toyota Technological Institute at Chicago
http://www.tti-c.org/logg/