1
# Copyright (C) 2006-2007 Anders Logg.
2
# Licensed under the GNU LGPL Version 2.1.
4
# First added: 2006-02-09
5
# Last changed: 2007-04-30
7
# The bilinear form a(v, u) and linear form L(v) for
8
# convection-diffusion using cG(1)cG(1).
10
# Compile this form with FFC: ffc -l dolfin ConvectionDiffusion.form
12
scalar = FiniteElement("Lagrange", "triangle", 1)
13
vector = VectorElement("Lagrange", "triangle", 2)
15
v = TestFunction(scalar)
16
u1 = TrialFunction(scalar)
24
a = v*u1*dx + 0.5*k*(v*dot(b, grad(u1))*dx + c*dot(grad(v), grad(u1))*dx)
25
L = v*u0*dx - 0.5*k*(v*dot(b, grad(u0))*dx + c*dot(grad(v), grad(u0))*dx) + k*v*f*dx