Changeset 9655
- Timestamp:
- Feb 10, 2015, 6:31:03 PM (9 years ago)
- Location:
- trunk/anuga_core/anuga
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/anuga/parallel/parallel_inlet.py
r9001 r9655 548 548 549 549 for proc in self.procs: 550 message += '======> inlet triangle indices and centres a t P%d\n' %(proc)550 message += '======> inlet triangle indices and centres and elevation at P%d\n' %(proc) 551 551 message += '%s' % tri_indices[proc] 552 552 message += '\n' … … 554 554 message += '%s' % self.domain.get_centroid_coordinates()[tri_indices[proc]] 555 555 message += '\n' 556 557 elev = self.domain.quantities['elevation'].centroid_values[tri_indices[proc]] 558 message += '%s' % elev 559 message += '\n' 560 561 if elev.min() != elev.max(): 562 message += 'Warning: Non-constant inlet elevation can lead to well-balancing problems' 563 556 564 557 565 message += 'line\n' -
trunk/anuga_core/anuga/structures/internal_boundary_functions.py
r9654 r9655 91 91 internal_boundary_curves[:, 0]) 92 92 self.free_flow_curve = interp1d( 93 free_flow_data[:, 0], free_flow_data[:, 1] )93 free_flow_data[:, 0], free_flow_data[:, 1], kind='linear') 94 94 self.free_flow_data = free_flow_data 95 95 … … 152 152 153 153 self.nonfree_flow_curves.append( 154 interp1d(curve_data[:, 0], curve_data[:, 1] ))154 interp1d(curve_data[:, 0], curve_data[:, 1], kind='linear')) 155 155 curve_counter += 1 156 156 … … 310 310 Q = (w0 * upper_curve_Q + w1 * lower_curve_Q) / (w0 + w1) 311 311 312 print 'Q: ', Q , ' HW: ', hw, ' TW:', tw 313 312 314 return(Q*sign_multiplier) 313 315 -
trunk/anuga_core/anuga/structures/structure_operator.py
r9652 r9655 471 471 message += '-------------------------------------\n' 472 472 473 message += 'inlet triangle indices and centres \n'473 message += 'inlet triangle indices and centres and elevations\n' 474 474 message += '%s' % inlet.triangle_indices 475 475 message += '\n' … … 477 477 message += '%s' % self.domain.get_centroid_coordinates()[inlet.triangle_indices] 478 478 message += '\n' 479 480 elev = self.domain.quantities['elevation'].centroid_values[inlet.triangle_indices] 481 message += '%s' % elev 482 message += '\n' 483 484 if elev.min() != elev.max(): 485 message += 'Warning: non-constant inlet elevation can cause well-balancing problems' 479 486 480 487 message += 'region\n' -
trunk/anuga_core/anuga/utilities/spatialInputUtil.py
r9553 r9655 171 171 172 172 ########################################################################### 173 def read_polygon(filename ):173 def read_polygon(filename, close_polygon_shapefiles=False): 174 174 """ 175 175 … … 192 192 # Read as either a polygon or line shapefile 193 193 try: 194 outPol=readShp_1PolyGeo(filename )194 outPol=readShp_1PolyGeo(filename, dropLast = (not close_polygon_shapefiles)) 195 195 assert len(outPol)>1 196 196 except: … … 1170 1170 allBreakLines = {} 1171 1171 for shapefile in fileList: 1172 allBreakLines[shapefile] = read_polygon(shapefile) 1172 allBreakLines[shapefile] = read_polygon(shapefile, 1173 close_polygon_shapefiles=True) 1173 1174 1174 1175 return allBreakLines
Note: See TracChangeset
for help on using the changeset viewer.