- Timestamp:
- Feb 8, 2005, 7:07:56 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/ga/storm_surge/pyvolution/test_shallow_water.py
r850 r851 2415 2415 Bd = Dirichlet_boundary([0.3,0,0]) 2416 2416 Bt = Transmissive_boundary(domain1) 2417 domain1.set_boundary({'left': Bd, 'right': B t, 'top': Br, 'bottom': Br})2417 domain1.set_boundary({'left': Bd, 'right': Br, 'top': Br, 'bottom': Br}) 2418 2418 2419 2419 #Initial condition … … 2452 2452 domain2.reduction = domain1.reduction 2453 2453 domain2.smooth = False 2454 domain2.visualise = True2454 domain2.visualise = False 2455 2455 domain2.default_order = 2 2456 2456 … … 2465 2465 2466 2466 2467 #FIXME: Continue from here!!!!!!!2468 return2469 2470 2467 Bf = Spatio_temporal_boundary(domain1.filename + '.' + domain1.format, 2471 2468 domain2) 2472 domain2.set_boundary({'right':B t, 'bottom':Br, 'diagonal':Bf})2469 domain2.set_boundary({'right':Br, 'bottom':Br, 'diagonal':Bf}) 2473 2470 2474 2471 #Initial condition … … 2486 2483 cv2 = domain2.quantities['stage'].centroid_values 2487 2484 2488 print take(cv1, (12,14,16)) #Right 2489 print take(cv2, (4,6,8)) 2490 2485 #print take(cv1, (12,14,16)) #Right 2486 #print take(cv2, (4,6,8)) 2491 2487 #print take(cv1, (0,6,12)) #Bottom 2492 2493 assert allclose( take(cv1, (12,14,16)), take(cv2, (4,6,8))) #RHS 2494 assert allclose( take(cv1, (0,6,12)), take(cv2, (0,1,4))) #Bottom 2488 #print take(cv2, (0,1,4)) 2489 #print take(cv1, (0,8,16)) #Diag 2490 #print take(cv2, (0,3,8)) 2491 #assert allclose( take(cv1, (12,14,16)), take(cv2, (4,6,8))) #RHS 2492 #assert allclose( take(cv1, (0,6,12)), take(cv2, (0,1,4))) #Bottom 2495 2493 2496 2494 #Cleanup 2497 os.remove(domain1.filename + '.' + domain1.format) 2498 2495 try: 2496 os.remove(domain1.filename + '.' + domain1.format) 2497 except: 2498 pass 2499 2499 2500 #------------------------------------------------------------- 2500 2501 if __name__ == "__main__": 2501 #suite = unittest.makeSuite(TestCase,'test')2502 suite = unittest.makeSuite(TestCase,'test_spatio_temporal_boundary')2502 suite = unittest.makeSuite(TestCase,'test') 2503 #suite = unittest.makeSuite(TestCase,'test_spatio_temporal_boundary') 2503 2504 runner = unittest.TextTestRunner() 2504 2505 runner.run(suite)
Note: See TracChangeset
for help on using the changeset viewer.