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

« back to all changes in this revision

Viewing changes to demo/pde/poisson1D/python/demo.py

  • Committer: Bazaar Package Importer
  • Author(s): Johannes Ring
  • Date: 2009-10-12 14:13:18 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20091012141318-hkbxl0sq555vqv7d
Tags: 0.9.4-1
* New upstream release. This version cleans up the design of the
  function class by adding a new abstraction for user-defined
  functions called Expression. A number of minor bugfixes and
  improvements have also been made.
* debian/watch: Update for new flat directory structure.
* Update debian/copyright.
* debian/rules: Use explicit paths to PETSc 3.0.0 and SLEPc 3.0.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
"""
14
14
 
15
15
__author__ = "Kristian B. Oelgaard (k.b.oelgaard@tudelft.nl)"
16
 
__date__ = "2007-11-28 -- 2008-12-19"
 
16
__date__ = "2007-11-28 -- 2009-10-07"
17
17
__copyright__ = "Copyright (C) 2007 Kristian B. Oelgaard"
18
18
__license__  = "GNU LGPL Version 2.1"
19
19
 
31
31
# Define variational problem
32
32
v = TestFunction(V)
33
33
u = TrialFunction(V)
34
 
f = Function(V, "9.0*pi*pi*sin(3.0*pi*x[0])")
35
 
g = Function(V, "3.0*pi*cos(3.0*pi*x[0])")
 
34
f = Expression("9.0*pi*pi*sin(3.0*pi*x[0])", V = V)
 
35
g = Expression("3.0*pi*cos(3.0*pi*x[0])", V = V)
36
36
 
37
37
a = dot(grad(v), grad(u))*dx
38
38
L = v*f*dx + v*g*ds