Changeset 9461
- Timestamp:
- Jan 21, 2015, 4:40:56 PM (10 years ago)
- Location:
- trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/test
- Files:
-
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/test/test_gauge.py
r9460 r9461 28 28 29 29 30 def test_function(x, y):31 return x+y30 # def simple_function(x, y): 31 # return x+y 32 32 33 33 class Test_Gauge(unittest.TestCase): -
trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/test/test_pmesh2domain.py
r9460 r9461 210 210 "bad geo_referece") 211 211 212 #*********** 213 def old_test_tags_to_boundaries (self): 214 meshDict = {} 215 p0 = [0.0, 0.0] 216 p1 = [1.0, 0.0] 217 p2 = [0.0, 1.0] 218 p3 = [0.646446609407, 0.353553390593] 219 meshDict['vertices'] = [p0,p1,p2,p3] 220 meshDict['vertex_attributes'] = [[0.0, 0.0,7.0],[10.0, 0.0,7.0],[0.0, 10.0,7.0],[6.46446609407, 3.53553390593,7.0]] 221 meshDict['triangles'] = [[0,3,2],[0,1,3]] 222 meshDict['triangle_tags'] = [6.6,6.6] 223 meshDict['triangle_neighbors'] = [[-1,-1,1],[-1,0,-1]] 224 meshDict['segments'] = [[1,0],[0,2],[2,3],[3,1]] 225 meshDict['segment_tags'] = [2,3,1,1] 226 227 domain = Domain.pmesh_dictionary_to_domain(meshDict) 228 229 #domain.set_tag_dict(tag_dict) 230 #Boundary tests 231 b1 = Dirichlet_boundary(conserved_quantities = num.array([0.0])) 232 b2 = Dirichlet_boundary(conserved_quantities = num.array([1.0])) 233 b3 = Dirichlet_boundary(conserved_quantities = num.array([1.0])) 234 #test adding a boundary 235 tags = {} 236 tags[1] = b1 237 tags[2] = b2 238 tags[3] = b3 239 domain.set_boundary(tags) 240 inverted_id = Volume.instances[0].neighbours[0] 241 id = -(inverted_id+1) 242 boundary_value = Boundary_value.instances[id] 243 boundary_obj = boundary_value.boundary_object 244 245 self.failUnless( boundary_obj == b1, 246 "test_tags_to_boundaries failed. Single boundary wasn't added.") 247 248 inverted_id = Volume.instances[0].neighbours[1] 249 id = -(inverted_id+1) 250 boundary_value = Boundary_value.instances[id] 251 boundary_obj = boundary_value.boundary_object 252 self.failUnless( boundary_obj == b3, 253 "test_tags_to_boundaries failed. Single boundary wasn't added.") 212 254 213 255 214 #-------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.