Changeset 3872


Ignore:
Timestamp:
Oct 26, 2006, 11:56:05 AM (18 years ago)
Author:
nick
Message:

added a commented out segment of code that could be used to test for
interior polygons that lie outside the bounding polygon.

Location:
anuga_core/source/anuga/pmesh
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/pmesh/mesh_interface.py

    r3868 r3872  
    3737
    3838    Boundary tags is a dictionary of symbolic tags. For every tag there
    39     is a list of indices referring to segments associated with that tag
     39    is a list of indices referring to segments associated with that tag.
     40    If a segment is omitted it will be assigned the default tag ''.
    4041
    4142    maximum_triangle_area is the maximal area per triangle
     
    157158                      %(str(interior_polygon), str(bounding_polygon))
    158159                raise PolygonError, msg
     160   
     161# the following segment of code could be used to Test that all the
     162# interior polygons are inside the bounding_poly... however it might need
     163# to be change a bit   
     164#
     165#count = 0
     166#for i in range(len(interior_regions)):
     167#    region = interior_regions[i]
     168#    interior_polygon = region[0]
     169#    if len(inside_polygon(interior_polygon, bounding_polygon,
     170#                   closed = True, verbose = False)) <> len(interior_polygon):
     171#        print 'WARNING: interior polygon %d is outside bounding polygon' %(i)
     172#        count += 1
     173
     174#if count == 0:
     175#    print 'interior regions OK'
     176#else:
     177#    print 'check out your interior polygons'
     178#    print 'check %s in production directory' %figname
     179#    import sys; sys.exit()
     180   
    159181
    160182    if interior_holes is not None:       
  • anuga_core/source/anuga/pmesh/test_mesh_interface.py

    r3868 r3872  
    647647        interior_regions = [[poly_onslow, 50000], [poly_region, 50000], [poly_coast,100000], [poly_thevenard, 100000]]
    648648
    649 #        boundary_tags = {'walls':[0,1],'bom':[2]}
    650 
     649        boundary_tags = {'walls':[0,1],'bom':[2]}
     650       
    651651        try:
    652652            m = create_mesh_from_regions(poly_all,
Note: See TracChangeset for help on using the changeset viewer.