SyFi
0.3
|
Inherits TempDirTestBase.
Public Member Functions | |
def | __init__ |
def | setUp |
def | set_uflacs_options |
def | tearDown |
def | test_uflacs_options |
def | test_uflacs_jit |
def | xtest_backlog |
Definition at line 19 of file test_uflacsmode.py.
def test_sfc.test_uflacsmode.TestUflacsMode.__init__ | ( | self, | |
args, | |||
kwargs | |||
) |
Definition at line 20 of file test_uflacsmode.py.
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"
def test_sfc.test_uflacsmode.TestUflacsMode.setUp | ( | self | ) |
Definition at line 23 of file test_uflacsmode.py.
References test_sfc.test_tempdir_base.TempDirTestBase.options, test_sfc.test_uflacsmode.TestUflacsMode.set_uflacs_options(), test_sfc.test_geometry_code.UflacsGeometryTest.set_uflacs_options(), and test_sfc.test_form_argument_code.UflacsFormArgumentTest.set_uflacs_options().
00023 00024 def setUp(self): 00025 TempDirTestBase.setUp(self) 00026 self.options.code.integral.integration_method = "quadrature" 00027 self.set_uflacs_options()
def test_sfc.test_uflacsmode.TestUflacsMode.tearDown | ( | self | ) |
Definition at line 35 of file test_uflacsmode.py.
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