~njansson/dolfin/hpc

« back to all changes in this revision

Viewing changes to sandbox/bdm/MixedPoisson.form

  • Committer: Johannes Ring
  • Date: 2008-03-05 22:43:06 UTC
  • Revision ID: johannr@simula.no-20080305224306-2npsdyhfdpl2esji
The BIG commit!

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright (C) 2006-2007 Anders Logg (logg@simula.no)
 
2
# Licensed under the GNU LGPL Version 2.1
 
3
#
 
4
# The bilinear form a(v, u) and linear form L(v) for
 
5
# a mixed formulation of Poisson's equation with BDM
 
6
# (Brezzi-Douglas-Marini) elements.
 
7
 
 
8
# Compile this form with FFC: ffc MixedPoisson.form
 
9
 
 
10
q = 1
 
11
 
 
12
BDM = FiniteElement("Brezzi-Douglas-Marini", "triangle", q)
 
13
DG  = FiniteElement("Discontinuous Lagrange", "triangle", q - 1)
 
14
 
 
15
mixed_element = BDM + DG
 
16
 
 
17
(v, w) = TestFunctions(mixed_element)
 
18
(q, u) = TrialFunctions(mixed_element)
 
19
 
 
20
a = (dot(v, q) - div(v)*u + w*div(q))*dx
 
21
L = w*f*dx