- Timestamp:
- Mar 7, 2005, 9:32:07 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/ga/storm_surge/pyvolution/test_general_mesh.py
r1011 r1018 9 9 from Numeric import allclose, array, ones, Float 10 10 11 12 class Test Case(unittest.TestCase):11 12 class Test_General_Mesh(unittest.TestCase): 13 13 def setUp(self): 14 14 pass 15 15 16 16 def tearDown(self): 17 17 pass … … 24 24 from shallow_water import Domain 25 25 from Numeric import zeros, Float 26 26 27 27 #Create basic mesh 28 28 points, vertices, boundary = rectangular(1, 3) 29 29 domain = Domain(points, vertices, boundary) 30 30 31 31 value = [7] 32 32 indexes = [1] 33 assert domain.get_vertices() == domain.triangles 33 assert domain.get_vertices() == domain.triangles 34 34 assert domain.get_vertices([0,4]) == [domain.triangles[0], 35 35 domain.triangles[4]] … … 38 38 from shallow_water import Domain 39 39 from Numeric import zeros, Float 40 40 41 41 #Create basic mesh 42 42 points, vertices, boundary = rectangular(1, 3) 43 43 domain = Domain(points, vertices, boundary) 44 44 45 assert domain.get_area() == 1.0 45 assert domain.get_area() == 1.0 46 46 47 47 … … 53 53 from shallow_water import Domain 54 54 from Numeric import zeros, Float 55 55 56 56 #Create basic mesh 57 57 points, vertices, boundary = rectangular(1, 3) 58 58 domain = Domain(points, vertices, boundary) 59 59 60 60 assert domain.get_unique_vertices() == [0,1,2,3,4,5,6,7] 61 61 unique_vertices = domain.get_unique_vertices([0,1,4]) 62 62 unique_vertices.sort() 63 63 assert unique_vertices == [0,1,2,4,5,6,7] 64 64 65 65 unique_vertices = domain.get_unique_vertices([0,4]) 66 66 unique_vertices.sort() 67 67 assert unique_vertices == [0,2,4,5,6,7] 68 68 69 69 #------------------------------------------------------------- 70 70 if __name__ == "__main__": 71 suite = unittest.makeSuite(Test Case,'test')71 suite = unittest.makeSuite(Test_General_Mesh,'test') 72 72 runner = unittest.TextTestRunner() 73 73 runner.run(suite) 74 74 75
Note: See TracChangeset
for help on using the changeset viewer.