- Timestamp:
- Oct 19, 2006, 6:21:11 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga_parallel/test_parallel_sw_runup.py
r3818 r3829 28 28 from anuga.shallow_water import Transmissive_boundary 29 29 30 from parallel_api import distribute, myid 30 from parallel_api import distribute, myid, numprocs 31 31 32 32 … … 36 36 points, vertices, boundary = rectangular_cross(10, 10) # Basic mesh 37 37 domain = Domain(points, vertices, boundary) # Create domain 38 domain.set_name('runup') # Set sww filename39 domain.set_datadir('.') # Set output dir40 41 38 42 39 #-------------------------------------------------------------------------- … … 58 55 domain = distribute(domain, verbose=True) 59 56 57 domain.set_name('runup') # Set sww filename 58 domain.set_datadir('.') # Set output dir 59 domain.set_maximum_allowed_speed(100) # 60 60 61 61 62 #------------------------------------------------------------------------------ 62 # Setup boundary conditions (MUST currently happen after domain has been distributed) 63 # Setup boundary conditions 64 # This must currently happen *after* domain has been distributed 63 65 #------------------------------------------------------------------------------ 64 66 … … 67 69 68 70 # Associate boundary tags with boundary objects 69 domain.modify_boundary({'left': Br, 'right': Bd, 'top': Br, 'bottom': Br}) 71 domain.set_boundary({'left': Br, 'right': Bd, 'top': Br, 'bottom': Br}) 72 70 73 71 74 … … 85 88 # Need to get true boundary somehow 86 89 87 print 'P%d: point=[%f,%f]' %(myid, point[0], point[1])90 #print 'P%d: point=[%f,%f]' %(myid, point[0], point[1]) 88 91 local_interpolation_points.append(i) 92 93 # Hack 94 if numprocs == 2: 95 if myid == 0: 96 del local_interpolation_points[0] 97 #local_interpolation_points = [1,2,3] 98 99 if numprocs == 3: 100 if myid == 1: 101 del local_interpolation_points[0] 102 103 104 if numprocs == 4: 105 if myid == 0: 106 del local_interpolation_points[1] #2 107 del local_interpolation_points[1] #3 108 if myid == 3: 109 del local_interpolation_points[1] 110 111 112 113 print 'P%d has points = %s' %(myid, local_interpolation_points) 89 114 90 115
Note: See TracChangeset
for help on using the changeset viewer.