Changeset 7615
- Timestamp:
- Feb 5, 2010, 5:23:30 PM (15 years ago)
- Location:
- anuga_core/source/anuga_parallel
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga_parallel/run_parallel_sw_merimbula_test.py
r3846 r7615 39 39 40 40 # Numeric arrays 41 from Numeric import array, zeros, Float 41 import numpy as num 42 #from numpy import array, zeros, float 42 43 43 44 # Print debugging information … … 46 47 # pmesh 47 48 from anuga.shallow_water import Domain 48 from parallel_shallow_water import Parallel_ Domain49 from parallel_shallow_water import Parallel_domain 49 50 from anuga.abstract_2d_finite_volumes.pmesh2domain\ 50 51 import pmesh_to_domain_instance … … 54 55 55 56 # Mesh partition routines 56 from pmesh_divideimport pmesh_divide_metis57 from build_submeshimport build_submesh58 from build_localimport build_local_mesh59 from build_communimport send_submesh, rec_submesh, extract_hostmesh57 from distribute_mesh import pmesh_divide_metis 58 from distribute_mesh import build_submesh 59 from distribute_mesh import build_local_mesh 60 from distribute_mesh import send_submesh, rec_submesh, extract_hostmesh 60 61 61 62 … … 66 67 numprocs = pypar.size() 67 68 myid = pypar.rank() 68 processor_name = pypar. Get_processor_name()69 processor_name = pypar.get_processor_name() 69 70 70 71 ############################ … … 72 73 ############################ 73 74 74 rect = zeros( 4, Float) # Buffer for results75 rect = num.zeros( 4, num.float) # Buffer for results 75 76 76 77 class Set_Stage: … … 94 95 # Read in the test files 95 96 96 filename = 'test-100.tsh'97 # filename = 'test-100.tsh' 97 98 # filename = 'merimbula_10785_1.tsh' 99 filename = 'merimbula_43200.tsh' 98 100 99 101 # Build the whole domain … … 105 107 # dependencies = [filename]) 106 108 107 rect = array(domain_full.xy_extent, Float) 109 rect = num.array(domain_full.get_extent(), num.float) 110 print rect 108 111 109 112 # Initialise the wave 110 113 111 domain_full.set_quantity('stage', Set_Stage(200.0,300.0,1.0))112 #domain_full.set_quantity('stage', Set_Stage(756000.0,756500.0,2.0))114 #domain_full.set_quantity('stage', Set_Stage(200.0,300.0,1.0)) 115 domain_full.set_quantity('stage', Set_Stage(756000.0,756500.0,2.0)) 113 116 # domain_full.set_quantity('stage', Set_Stage(756000.0,756500.0,0.0)) 114 117 … … 123 126 print triangles_per_proc 124 127 125 rect = array(domain_full.xy_extent, Float)128 rect = num.array(domain_full.get_extent(), num.float) 126 129 127 130 submesh = build_submesh(nodes, triangles, boundary,\ … … 143 146 144 147 else: 145 points, vertices, boundary, quantities, ghost_recv_dict, full_send_dict \146 = rec_submesh(0)148 points, vertices, boundary, quantities, ghost_recv_dict, full_send_dict , \ 149 no_full_nodes, no_full_trigs = rec_submesh(0) 147 150 148 151 … … 163 166 pypar.broadcast(rect,0) 164 167 165 domain = Parallel_ Domain(points, vertices, boundary,168 domain = Parallel_domain(points, vertices, boundary, 166 169 full_send_dict = full_send_dict, 167 170 ghost_recv_dict = ghost_recv_dict) … … 185 188 186 189 #Boundaries 187 from parallel_shallow_waterimport Transmissive_boundary, Reflective_boundary190 from anuga.interface import Transmissive_boundary, Reflective_boundary 188 191 189 192 T = Transmissive_boundary(domain) … … 202 205 203 206 print 'Processor %d on %s: No of elements %d'%(domain.processor,processor_name,domain.number_of_elements) 204 yieldstep = 0.05205 finaltime = 5 .0206 207 yieldstep = 1 208 finaltime = None 207 yieldstep = 50.0 208 finaltime = 500.0 209 210 #yieldstep = 1000 211 #finaltime = 40000 209 212 210 213 #yieldstep = 1 … … 276 279 print 'Reduction Communication time %.2f seconds'%domain.communication_reduce_time 277 280 print 'Broadcast time %.2f seconds'%domain.communication_broadcast_time 281 282 283 pypar.finalize()
Note: See TracChangeset
for help on using the changeset viewer.