Changeset 4852
- Timestamp:
- Nov 22, 2007, 5:51:01 PM (17 years ago)
- Location:
- anuga_core/source/anuga
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/fit_interpolate/interpolate.py
r4851 r4852 552 552 msg += 'outside specified mesh. ' 553 553 msg += 'Offending points:\n' 554 out_interp_pts = [] 554 555 for i in indices: 555 556 msg += '%d: %s\n' %(i, interpolation_points[i]) 556 557 #from anuga.utilities.polygon import plot_polygons_points 558 #in_interp_pts =557 out_interp_pts.append(ensure_numeric(interpolation_points[i])) 558 559 from anuga.utilities.polygon import plot_polygons_points 559 560 #out_interp_pts = take(interpolation_points,[indices]) 560 #title = 'Interpolation points fall outside specified mesh'561 #plot_polygons_points([mesh_boundary_polygon,in_interp_pts,out_interp_pts],562 # ['line','point','outside'],label=title,verbose=verbose)561 title = 'Interpolation points fall outside specified mesh' 562 plot_polygons_points([mesh_boundary_polygon,interpolation_points,out_interp_pts], 563 ['line','point','outside'],figname='points_boundary_out',label=title,verbose=verbose) 563 564 564 565 # Joaquim Luis suggested this as an Exception, so … … 575 576 title = 'Interpolation function: Polygon and interpolation points' 576 577 plot_polygons_points([mesh_boundary_polygon,interpolation_points], 577 ['line','point'], label=title,verbose=verbose)578 ['line','point'],figname='points_boundary',label=title,verbose=verbose) 578 579 579 580 m = len(self.interpolation_points) -
anuga_core/source/anuga/shallow_water/test_shallow_water_domain.py
r4845 r4852 5103 5103 # domain2) 5104 5104 Bf = Field_boundary(domain1.get_name() + '.' + domain1.format, 5105 domain2, mean_stage=1, verbose= True)5105 domain2, mean_stage=1, verbose=False) 5106 5106 5107 5107 domain2.set_boundary({'right':Br, 'bottom':Br, 'diagonal':Bf}) -
anuga_core/source/anuga/utilities/polygon.py
r4851 r4852 378 378 379 379 if label is None: label = '' 380 380 381 381 n = len(polygons_points) 382 382 colour = [] … … 389 389 else: 390 390 for s in style: 391 if s == 'line': 392 colour.append('b-') 393 if s == 'outside': 394 colour.append('r.') 395 else: 396 colour.append('g.') 391 if s == 'line': colour.append('b-') 392 if s == 'outside': colour.append('r.') 393 if s <> 'line': 394 if s <> 'outside': 395 colour.append('g.') 397 396 398 397 for i, item in enumerate(polygons_points): 399 x, y = poly_xy(item) 398 x, y = poly_xy(item) 400 399 if min(x) < minx: minx = min(x) 401 400 if max(x) > maxx: maxx = max(x) … … 406 405 ylabel('y') 407 406 title(label) 408 407 408 if minx <> 0: 409 axis([minx*0.9,maxx*1.1,miny*0.9,maxy*1.1]) 410 else: 411 if miny == 0: 412 axis([-maxx*.01,maxx*1.1,-maxy*0.01,maxy*1.1]) 413 else: 414 axis([-maxx*.01,maxx*1.1,miny*0.9,maxy*1.1]) 415 409 416 if figname is not None: 410 417 savefig(figname)
Note: See TracChangeset
for help on using the changeset viewer.