~njansson/dolfin/hpc

« back to all changes in this revision

Viewing changes to src/demo/pde/convection-diffusion/Stokes.form

  • Committer: Anders Logg
  • Date: 2007-01-10 09:04:44 UTC
  • mfrom: (1689.1.221 trunk)
  • Revision ID: logg@simula.no-20070110090444-ecyux3n1qnei4i8h
RemoveĀ oldĀ head

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# Copyright (c) 2005-2006 Anders Logg (logg@tti-c.org)
2
2
# Licensed under the GNU GPL Version 2
3
3
#
 
4
# First added:  2005
 
5
# Last changed: 2006-03-28
 
6
#
4
7
# The bilinear form a(v, u) and Linear form L(v) for the Stokes
5
8
# equations using a mixed formulation (Taylor-Hood elements).
6
9
#
10
13
P2 = FiniteElement("Vector Lagrange", "triangle", 2)
11
14
TH = P2 + P1
12
15
 
13
 
(v, q) = BasisFunctions(TH)
14
 
(u, p) = BasisFunctions(TH)
 
16
(v, q) = TestFunctions(TH)
 
17
(U, P) = TrialFunctions(TH)
15
18
 
16
19
f = Function(P2)
17
20
 
18
 
a = (dot(grad(v), grad(u)) - div(v)*p + q*div(u))*dx
 
21
a = (dot(grad(v), grad(U)) - div(v)*P + q*div(U))*dx
19
22
L = dot(v, f)*dx