SyFi 0.3
|
Classes | |
class | SFCJitTest |
Functions | |
def | num_integrals |
def | UnitCell |
def | assemble_on_cell |
def | test |
Variables | |
dictionary | cell2dim = { "interval": 1, "triangle": 2, "tetrahedron": 3, "quadrilateral": 2, "hexahedron": 3 } |
dictionary | cell2volume = { "interval": 1.0, "triangle": 0.5, "tetrahedron": 1.0/6.0, "quadrilateral": 1.0, "hexahedron": 1.0 } |
string | _test_temp_dir = "temp_dir" |
string | _done_test_temp_dir = "done_temp_dir" |
def sfc_jit::test::assemble_on_cell | ( | form, | |
celltype, | |||
coeffs | |||
) |
Definition at line 83 of file tests/sfc_jit/test.py.
def sfc_jit::test::num_integrals | ( | form | ) |
Definition at line 34 of file tests/sfc_jit/test.py.
def sfc_jit::test::test | ( | verbosity = 0 | ) |
Definition at line 219 of file tests/sfc_jit/test.py.
00220 : 00221 shutil.rmtree(_done_test_temp_dir, ignore_errors=True) 00222 os.mkdir(_done_test_temp_dir) 00223 00224 classes = [SFCJitTest] 00225 suites = [unittest.makeSuite(c) for c in classes] 00226 testsuites = unittest.TestSuite(suites) 00227 unittest.TextTestRunner(verbosity=verbosity).run(testsuites)
def sfc_jit::test::UnitCell | ( | celltype | ) |
Definition at line 42 of file tests/sfc_jit/test.py.
00043 : 00044 tdim = cell2dim[celltype] 00045 gdim = tdim 00046 mesh = Mesh() 00047 editor = MeshEditor() 00048 editor.open(mesh, celltype, tdim, gdim) 00049 if celltype == "interval": 00050 vertices = [(0.0,), 00051 (1.0,)] 00052 if celltype == "triangle": 00053 vertices = [(0.0, 0.0), 00054 (1.0, 0.0), 00055 (0.0, 1.0)] 00056 if celltype == "tetrahedron": 00057 vertices = [(0.0, 0.0, 0.0), 00058 (1.0, 0.0, 0.0), 00059 (0.0, 1.0, 0.0), 00060 (0.0, 0.0, 1.0)] 00061 if celltype == "quadrilateral": 00062 vertices = [(0.0, 0.0), 00063 (1.0, 0.0), 00064 (1.0, 1.0), 00065 (0.0, 1.0)] 00066 if celltype == "hexahedron": 00067 vertices = [(0.0, 0.0, 0.0), 00068 (1.0, 0.0, 0.0), 00069 (1.0, 1.0, 0.0), 00070 (0.0, 1.0, 0.0), 00071 (0.0, 0.0, 1.0), 00072 (1.0, 0.0, 1.0), 00073 (1.0, 1.0, 1.0), 00074 (0.0, 1.0, 1.0)] 00075 editor.initVertices(len(vertices)) 00076 editor.initCells(1) 00077 for i, p in enumerate(vertices): 00078 editor.addVertex(i, *p) 00079 editor.addCell(0, *range(len(vertices))) 00080 editor.close() 00081 return mesh 00082
string sfc_jit::test::_done_test_temp_dir = "done_temp_dir" |
Definition at line 92 of file tests/sfc_jit/test.py.
string sfc_jit::test::_test_temp_dir = "temp_dir" |
Definition at line 91 of file tests/sfc_jit/test.py.
dictionary sfc_jit::test::cell2dim = { "interval": 1, "triangle": 2, "tetrahedron": 3, "quadrilateral": 2, "hexahedron": 3 } |
Definition at line 37 of file tests/sfc_jit/test.py.
dictionary sfc_jit::test::cell2volume = { "interval": 1.0, "triangle": 0.5, "tetrahedron": 1.0/6.0, "quadrilateral": 1.0, "hexahedron": 1.0 } |
Definition at line 39 of file tests/sfc_jit/test.py.