~ubuntu-branches/ubuntu/vivid/ffc/vivid

« back to all changes in this revision

Viewing changes to test/unit/elements/test.py

  • Committer: Package Import Robot
  • Author(s): Johannes Ring
  • Date: 2014-01-10 13:56:45 UTC
  • mfrom: (1.1.14)
  • Revision ID: package-import@ubuntu.com-20140110135645-4ozcd71y1oggj44z
Tags: 1.3.0-1
* New upstream release.
* debian/watch: Update URL for move to Bitbucket.
* debian/docs: README -> README.rst and remove TODO.
* debian/control:
  - Add python-numpy to Build-Depends.
  - Replace python-all with python-all-dev in Build-Depends.
  - Add ${shlibs:Depends} to Depends.
  - Change to Architecture: any.
  - Bump Standards-Version to 3.9.5 (no changes needed).
* debian/rules: Call dh_numpy in override_dh_python2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
"""Unit tests for FFC finite elements"""
 
2
 
 
3
# Copyright (C) 2013 Marie E. Rognes
 
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
import unittest
 
21
 
 
22
from ufl import interval
 
23
from ufl import FiniteElement
 
24
 
 
25
from ffc import compile_element
 
26
 
 
27
class TestCompileElements(unittest.TestCase):
 
28
 
 
29
    def testRadau(self):
 
30
        "Test that Radau elements compile."
 
31
        for degree in range(3):
 
32
            element = FiniteElement("Radau", interval, degree)
 
33
            compile_element(element)
 
34
 
 
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)
 
40
 
 
41
 
 
42
if __name__ == "__main__":
 
43
    unittest.main()