~njansson/dolfin/hpc

« back to all changes in this revision

Viewing changes to src/bench/la/sparse-matrix/VectorPoisson.form

  • Committer: Anders Logg
  • Date: 2007-01-10 09:04:44 UTC
  • mfrom: (1689.1.221 trunk)
  • Revision ID: logg@simula.no-20070110090444-ecyux3n1qnei4i8h
RemoveĀ oldĀ head

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright (C) 2006 Garth N. Wells.
 
2
# Licensed under the GNU GPL Version 2.
 
3
#
 
4
# First added:  2006-08-18
 
5
# Last changed:
 
6
#
 
7
# Bilinear form a(v, U) for vector-valued Poisson equation
 
8
#
 
9
 
 
10
element = FiniteElement("Vector Lagrange", "triangle", 1)
 
11
 
 
12
v = TestFunction(element)
 
13
U = TrialFunction(element)
 
14
 
 
15
 
 
16
# Use symmetric gradient to increase coupling which is more demanding
 
17
# for matrix assembly
 
18
 
 
19
def symgrad(v):
 
20
    return 0.5 * (grad(v) + transp(grad(v)))
 
21
 
 
22
a = dot(symgrad(v), symgrad(U))*dx