~njansson/dolfin/hpc

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Copyright (C) 2007 Kristian B. Oelgaard.
# Licensed under the GNU LGPL Version 2.1.
#
# First added:  2007
# Last changed: 2007-11-23
#
# The bilinear form a(v, U) and linear form L(v) for
# Poisson's equation.
#
# Compile this form with FFC: ffc -l dolfin Poisson.form.

element = FiniteElement("Lagrange", "interval", 1)

# Test and trial functions
v = TestFunction(element)
u = TrialFunction(element)

f = Function(element)
g = Function(element)

a = dot(grad(v), grad(u))*dx
L = v*f*dx + v*g*ds