SyFi  0.3
test_sfc.test_uflacsmode.TestUflacsMode Class Reference

Inherits TempDirTestBase.

List of all members.

Public Member Functions

def __init__
def setUp
def set_uflacs_options
def tearDown
def test_uflacs_options
def test_uflacs_jit
def xtest_backlog

Detailed Description

Definition at line 19 of file test_uflacsmode.py.


Constructor & Destructor Documentation

def test_sfc.test_uflacsmode.TestUflacsMode.__init__ (   self,
  args,
  kwargs 
)

Definition at line 20 of file test_uflacsmode.py.

00020 
00021     def __init__(self, *args, **kwargs):
00022         TempDirTestBase.__init__(self, *args, **kwargs)


Member Function Documentation

Definition at line 28 of file test_uflacsmode.py.

References test_sfc.test_tempdir_base.TempDirTestBase.options.

Referenced by test_sfc.test_uflacsmode.TestUflacsMode.setUp().

00028 
00029     def set_uflacs_options(self):
00030         try:
00031             import uflacs
00032             self.options.code.integral.use_uflacs = True
00033         except:
00034             print "UFLACS NOT AVAILABLE"

Definition at line 35 of file test_uflacsmode.py.

00035 
00036     def tearDown(self):
00037         TempDirTestBase.tearDown(self)

Definition at line 44 of file test_uflacsmode.py.

References test_sfc::cell_assembly.assemble_on_cell(), test_sfc::cell_assembly.num_integrals(), and test_sfc.test_tempdir_base.TempDirTestBase.options.

00044 
00045     def test_uflacs_jit(self):
00046         cell = triangle
00047         v = cell.volume
00048         a = v*dx
00049 
00050         form, module, formdata, prefix = sfc.jit(a, parameters = self.options)
00051         self.assertTrue(form.rank() == 0)
00052         self.assertTrue(form.num_coefficients() == 0)
00053         self.assertTrue(num_integrals(form) == (1,0,0))
00054 
00055         if 0: # Testing call of generated throw code
00056             e = None
00057             try:
00058                 A = assemble_on_cell(form, cell.domain(), coeffs=[], elements=[])
00059             except e:
00060                 pass
00061 
00062         # TODO: Assert correct result instead

Definition at line 38 of file test_uflacsmode.py.

References test_sfc.test_tempdir_base.TempDirTestBase.options.

00038 
00039     def test_uflacs_options(self):
00040         self.assertTrue(hasattr(self.options.code.integral, "use_uflacs"))
00041         self.assertTrue(hasattr(self.options.code.integral, "uflacs"))
00042         self.assertTrue(hasattr(self.options.code.integral.uflacs, "register_threshold"))
00043         self.assertTrue(hasattr(self.options.code.integral.uflacs, "max_registers"))

TODO: Make backlog

Definition at line 63 of file test_uflacsmode.py.

00063 
00064     def xtest_backlog(self):
00065         """
00066         TODO: Make backlog
00067         """
00068         pass

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines