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

« back to all changes in this revision

Viewing changes to demo/pde/nonlinear-poisson/cpp/NonlinearPoisson.ufl

  • 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:
 
1
# Copyright (C) 2005 Garth N. Wells.
 
2
# Licensed under the GNU LGPL Version 2.1.
 
3
#
 
4
# Modified by Harish Narayanan, 2009.
 
5
#
 
6
# The linearised bilinear form a(v, U) and linear form L(v) for
 
7
# the nonlinear equation - div (1+u^2) grad u = f
 
8
#
 
9
# Compile this form with FFC: ffc -l dolfin NonlinearPoisson.form.
 
10
 
 
11
element = FiniteElement("Lagrange", "triangle", 1)
 
12
 
 
13
v  = TestFunction(element)
 
14
du = TrialFunction(element)
 
15
f  = Function(element)
 
16
u  = Function(element)
 
17
L  = inner(grad(v), (1 + u**2)*grad(u))*dx - v*f*dx
 
18
a  = derivative(L, u, du)
 
19