1
# Copyright (C) 2010 Garth N. Wells.
2
# Licensed under the GNU GPL version 3 or any later version.
1
# Copyright (C) 2010 Garth N. Wells
3
# This file is part of FFC.
5
# FFC is free software: you can redistribute it and/or modify
6
# it under the terms of the GNU Lesser General Public License as published by
7
# the Free Software Foundation, either version 3 of the License, or
8
# (at your option) any later version.
10
# FFC is distributed in the hope that it will be useful,
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
# GNU Lesser General Public License for more details.
15
# You should have received a copy of the GNU Lesser General Public License
16
# along with FFC. If not, see <http://www.gnu.org/licenses/>.
4
18
# First added: 2010-06-07
19
# Last changed: 2011-03-08
8
22
element = FiniteElement("Discontinuous Lagrange", triangle, 1)
10
u = TrialFunction(element)
11
24
v = TestFunction(element)
12
25
w = Coefficient(element)
26
F = inner(grad(w), grad(v))*dx - dot(avg(grad(w)), avg(grad(v)))*dS
14
F = inner(grad(v), grad(w))*dx - dot(avg(grad(v)), avg(grad(w)))*dS
28
u = TrialFunction(element)
15
29
a = derivative(F, w, u)