← Back to team overview

ffc team mailing list archive

[noreply@xxxxxxxxxxxxx: [Branch ~ffc-core/ffc/main] Rev 1437: Added demo/Mini.ufl illustrating the use of bubble elements and]

 

Cool! :-)

--
Anders
--- Begin Message ---
------------------------------------------------------------
revno: 1437
committer: Marie E. Rognes <meg@xxxxxxxxx>
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


--- End Message ---

Attachment: signature.asc
Description: Digital signature