1
"""Unit tests for FFC finite elements"""
3
# Copyright (C) 2013 Marie E. Rognes
5
# This file is part of FFC.
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.
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.
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/>.
22
from ufl import interval
23
from ufl import FiniteElement
25
from ffc import compile_element
27
class TestCompileElements(unittest.TestCase):
30
"Test that Radau elements compile."
31
for degree in range(3):
32
element = FiniteElement("Radau", interval, degree)
33
compile_element(element)
35
def testLobatto(self):
36
"Test that Lobatto elements compile."
37
for degree in range(1, 4):
38
element = FiniteElement("Lobatto", interval, degree)
39
compile_element(element)
42
if __name__ == "__main__":