Debian Codegraph @

demo/MixedCoefficient.ufl

raw
1 # -*- coding: utf-8 -*-
2
3 # Copyright (C) 2016 Miklós Homolya
4 #
5 # This file is part of FFC.
6 #
7 # FFC is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU Lesser General Public License as published by
9 # the Free Software Foundation, either version 3 of the License, or
10 # (at your option) any later version.
11 #
12 # FFC is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU Lesser General Public License for more details.
16 #
17 # You should have received a copy of the GNU Lesser General Public License
18 # along with FFC. If not, see <http://www.gnu.org/licenses/>.
19 #
20 # Mixed coefficient
21 #
22 # Compile this form with FFC: ffc MixedCoefficient.ufl
23
24 cell = triangle
25
26 DG = VectorElement("DG", cell, 0)
27 CG = FiniteElement("Lagrange", cell, 2)
28 RT = FiniteElement("RT", cell, 3)
29
30 element = MixedElement(DG, CG, RT)
31
32 f, g, h = Coefficients(element)
33
34 forms = [dot(f('+'), h('-'))*dS + g*dx]