SyFi  0.3
test_elements.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 
00003 __authors__ = "Martin Sandve Alnes"
00004 __date__ = "2012-05-16"
00005 
00006 from unittest import TestCase
00007 import swiginac
00008 import SyFi
00009 
00010 class TestElements(TestCase):
00011 
00012     def test_lagrange_elements(self):
00013         SyFi.initSyFi(3)
00014         cells = [SyFi.ReferenceLine(),
00015                  SyFi.ReferenceTriangle(),
00016                  SyFi.ReferenceTetrahedron(),
00017                  SyFi.ReferenceRectangle(),
00018                  SyFi.ReferenceBox()]
00019         for cell in cells:
00020             dim = cell.no_space_dim()
00021             for order in (1,2):
00022                 fe = SyFi.Lagrange(cell, order)
00023                 self.assertEqual(fe.get_order(), order)
00024                 #self.assertEqual(fe.get_polygon(), cell)
00025                 for i in range(fe.nbf()):
00026                     N = fe.N(i)
00027                     dof = fe.dof(i)
00028                     # TODO: Assert something
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator