~ubuntu-branches/ubuntu/maverick/dolfin/maverick

« back to all changes in this revision

Viewing changes to sandbox/ilmarw/assembler_bench/Laplace_2D/PoissonP2.py

  • Committer: Bazaar Package Importer
  • Author(s): Johannes Ring
  • Date: 2008-09-16 08:41:20 UTC
  • Revision ID: james.westby@ubuntu.com-20080916084120-i8k3u6lhx3mw3py3
Tags: upstream-0.9.2
ImportĀ upstreamĀ versionĀ 0.9.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
from ffc import *
 
2
 
 
3
# Reserved variables for forms
 
4
(a, L, M) = (None, None, None)
 
5
 
 
6
# Reserved variable for element
 
7
element = None
 
8
 
 
9
# Copyright (C) 2005-2007 Anders Logg.
 
10
# Licensed under the GNU LGPL Version 2.1.
 
11
#
 
12
# First added:  2005
 
13
# Last changed: 2007-05-14
 
14
#
 
15
# The bilinear form a(v, U) and linear form L(v) for
 
16
# Poisson's equation.
 
17
#
 
18
# Compile this form with FFC: ffc -l dolfin Poisson.form.
 
19
 
 
20
element = FiniteElement("Lagrange", "triangle", 2)
 
21
 
 
22
v = TestFunction(element)
 
23
u = TrialFunction(element)
 
24
f = Function(element)
 
25
g = Function(element)
 
26
 
 
27
a = dot(grad(v), grad(u))*dx
 
28
L = v*f*dx
 
29
 
 
30
compile([a, L, M, element], "PoissonP2", options={'language': 'dolfin', 'blas': False, 'form_postfix': True, 'precision': '15', 'cache_dir': None, 'cpp optimize': False, 'split_implementation': False, 'quadrature_points': False, 'output_dir': '.', 'representation': 'tensor', 'shared_ptr': True, 'optimize': False}, global_variables=globals())