Subject: [Ffc] [[email-masked]: [Branch ~ffc-core/ffc/main] Rev 1437: Added demo/Mini.ufl illustrating the use of bubble elements and]

From: Anders Logg <[email-masked]>
Date: Sun, 7 Mar 2010 21:07:38 +0100

Cool! :-)

--
Anders

Subject: [Branch ~ffc-core/ffc/main] Rev 1437: Added demo/Mini.ufl illustrating the use of bubble elements and
From: [email-masked]
To: Anders Logg <[email-masked]>
Date: Sun, 07 Mar 2010 18:52:21 -0000

------------------------------------------------------------
revno: 1437
committer: Marie E. Rognes <[email-masked]>
branch nick: ffc
timestamp: Sun 2010-03-07 18:54:04 +0100
message:
  Added demo/Mini.ufl illustrating the use of bubble elements and
  ElementUnion.
added:
  demo/Mini.ufl

--
lp:ffc
https://code.launchpad.net/~ffc-core/ffc/main

Your team FFC Core Team is subscribed to branch lp:ffc.
To unsubscribe from this branch go to https://code.launchpad.net/~ffc-core/ffc/main/+edit-subscription.
=== added file 'demo/Mini.ufl'
--- demo/Mini.ufl	1970-01-01 00:00:00 +0000
+++ demo/Mini.ufl	2010-03-07 17:54:04 +0000
@@ -0,0 +1,25 @@
+# Copyright (C) 2010 Marie E. Rognes
+# Licensed under the GNU GPL version 3 or any later version
+#
+# Illustration of ElementUnion: The bilinear form a(v, u) for the
+# Stokes equations using a mixed formulation involving the Mini
+# element. The velocity element is composed of a P1 element augmented
+# by the cubic bubble function.
+
+# Compile this form with FFC: ffc Mini.ufl
+
+
+P1 = VectorElement("Lagrange", triangle, 1)
+B = VectorElement("Bubble", triangle, None)
+V = ElementUnion(P1, B)
+
+Q = FiniteElement("DG", triangle, 0)
+Mini =  V + Q
+
+(v, q) = TestFunctions(Mini)
+(u, p) = TrialFunctions(Mini)
+
+f = Coefficient(P1)
+
+a = (inner(grad(v), grad(u)) - div(v)*p + q*div(u))*dx
+L = inner(v, f)*dx