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

« back to all changes in this revision

Viewing changes to sandbox/jit/test.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 dolfin import *
 
2
 
 
3
element = FiniteElement("Lagrange", "triangle", 1)
 
4
mesh = UnitSquare(2, 2)
 
5
 
 
6
f = Function(element, mesh, 1.0)
 
7
 
 
8
v = TestFunction(element)
 
9
u = TrialFunction(element)
 
10
a = dot(grad(v), grad(u))*dx
 
11
L = v*f*dx
 
12
 
 
13
A = assemble(a, mesh)
 
14
b = assemble(L, mesh)