- Timestamp:
- Jul 7, 2005, 5:02:56 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inundation/ga/storm_surge/parallel/parallel_shallow_water.py
r1575 r1588 108 108 109 109 110 from Numeric import take,put 110 111 import time 111 112 t0 = time.time() … … 125 126 Xout = self.full_send_dict[send_proc][2] 126 127 127 N = len(Idf) 128 129 for i in range(N): 130 Xout[i,0] = stage_cv[Idf[i]] 131 Xout[i,1] = xmomentum_cv[Idf[i]] 132 Xout[i,2] = ymomentum_cv[Idf[i]] 133 128 Xout[:,0] = take(stage_cv, Idf) 129 Xout[:,1] = take(xmomentum_cv, Idf) 130 Xout[:,2] = take(ymomentum_cv, Idf) 134 131 135 132 pypar.send(Xout,send_proc) … … 144 141 145 142 X = pypar.receive(iproc,X) 146 N = len(Idg)147 143 148 for i in range(N): 149 stage_cv[Idg[i]] = X[i,0] 150 xmomentum_cv[Idg[i]] = X[i,1] 151 ymomentum_cv[Idg[i]] = X[i,2] 152 144 put(stage_cv, Idg, X[:,0]) 145 put(xmomentum_cv, Idg, X[:,1]) 146 put(ymomentum_cv, Idg, X[:,2]) 153 147 154 148 #local update of ghost cells … … 164 158 Idg = self.ghost_recv_dict[iproc][0] 165 159 166 N = len(Idg) 167 168 for i in range(N): 169 stage_cv[Idg[i]] = stage_cv[Idf[i]] 170 xmomentum_cv[Idg[i]] = xmomentum_cv[Idf[i]] 171 ymomentum_cv[Idg[i]] = ymomentum_cv[Idf[i]] 160 put(stage_cv, Idg, take(stage_cv, Idf)) 161 put(xmomentum_cv, Idg, take(xmomentum_cv, Idf)) 162 put(ymomentum_cv, Idg, take(ymomentum_cv, Idf)) 172 163 173 164 self.communication_time += time.time()-t0 … … 203 194 #Pass control on to outer loop for more specific actions 204 195 yield(t) 205
Note: See TracChangeset
for help on using the changeset viewer.