~ubuntu-branches/ubuntu/trusty/ffc/trusty

« back to all changes in this revision

Viewing changes to demo/PoissonDG.ufl

  • Committer: Bazaar Package Importer
  • Author(s): Johannes Ring
  • Date: 2010-02-03 20:22:35 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100203202235-fe8d0kajuvgy2sqn
Tags: 0.9.0-1
* New upstream release.
* debian/control: Bump Standards-Version (no changes needed).
* Update debian/copyright and debian/copyright_hints.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
# Licensed under the GNU GPL version 3 or any later version.
3
3
#
4
4
# First added:  2006-12-05
5
 
# Last changed: 2007-07-15
 
5
# Last changed: 2010-01-14
6
6
#
7
7
# The bilinear form a(v, u) and linear form L(v) for
8
8
# Poisson's equation in a discontinuous Galerkin (DG)
16
16
# Test and trial functions
17
17
v = TestFunction(element)
18
18
u = TrialFunction(element)
19
 
f = Function(element)
 
19
f = Coefficient(element)
20
20
 
21
21
# Normal component, mesh size and right-hand side
22
22
n = element.cell().n
23
23
h = Constant(triangle)
 
24
 
24
25
# Compute average of mesh size
25
26
h_avg = (h('+') + h('-'))/2.0
26
27
 
27
28
# Neumann boundary conditions
28
 
gN = Function(element)
 
29
gN = Coefficient(element)
29
30
 
30
31
# Parameters
31
32
alpha = 4.0
42
43
 
43
44
# Linear form
44
45
L = v*f*dx + v*gN*ds
45