Changeset 4923


Ignore:
Timestamp:
Jan 9, 2008, 4:25:07 PM (17 years ago)
Author:
duncan
Message:

removing obsolete code

File:
1 edited

Legend:

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

    r4906 r4923  
    2525
    2626
    27 #class NoTrianglesError(exceptions.Exception): pass
    28  
    29 #import load_mesh
    3027from anuga.coordinate_transforms.geo_reference import Geo_reference, \
    3128     DEFAULT_ZONE
     
    5350    kinds = _kinds()
    5451   
    55 #FIXME: this is not tested.
    56 from anuga.utilities.numerical_tools import gradient
    57 
    58 
    5952
    6053# 1st and third values must be the same
     
    6255initialconversions = ['', 'exterior', '']
    6356
    64 #from os import sep
    65 #sys.path.append('..'+sep+'pmesh')
    66 #print "sys.path",sys.path
    6757
    6858class MeshObject:
     
    16031593        return alpha_segs_no_user_segs, segs2delete, optimum_alpha
    16041594   
    1605     def _boundary2mesh_old(self, raw_boundary=True,
    1606                     remove_holes=False,
    1607                     smooth_indents=False,
    1608                     expand_pinch=False):
    1609         """
    1610         Precon there must be a shape object.
    1611         """
    1612         self.shape.set_boundary_type(raw_boundary=raw_boundary,
    1613                                  remove_holes=remove_holes,
    1614                                  smooth_indents=smooth_indents,
    1615                                  expand_pinch=expand_pinch)
    1616         boundary_segs = self.shape.get_boundary()
    1617         #print "boundary_segs",boundary_segs
    1618         segs2delete = self.alphaUserSegments
    1619 
    1620         #FIXME(DSG-DSG) this algorithm needs comments
    1621         #FIXME(DSG-DSG) can it be sped up?  It's slow
    1622         new_segs = []
    1623         alpha_segs = []
    1624         user_segs = []
    1625         for seg in boundary_segs:
    1626             v1 = self.userVertices[int(seg[0])]
    1627             v2 = self.userVertices[int(seg[1])]
    1628             alpha_seg = self.representedAlphaUserSegment(v1, v2)
    1629             user_seg = self.representedUserSegment(v1, v2)
    1630             #DSG!!!
    1631             assert not(not (alpha_seg == None) and not (user_seg == None))
    1632             if not alpha_seg == None:
    1633                 alpha_segs.append(alpha_seg)
    1634             elif not user_seg  == None:
    1635                 user_segs.append(user_seg)
    1636             else:
    1637                 unique_seg = Segment(v1, v2)
    1638                 new_segs.append(unique_seg)
    1639                
    1640             for seg in alpha_segs:
    1641                 try:
    1642                     segs2delete.remove(seg)
    1643                 except:
    1644                     pass
    1645        
    1646         self.alphaUserSegments = []
    1647         self.alphaUserSegments.extend(new_segs)
    1648         self.alphaUserSegments.extend(alpha_segs)
    1649 
    1650         optimum_alpha = self.shape.get_alpha()
    1651         # need to draw newsegs
    1652         return new_segs, segs2delete, optimum_alpha
    16531595   
    16541596    def representedAlphaUserSegment(self, v1,v2):
     
    24392381
    24402382
    2441 
    2442 
    24432383def unique(s):
    24442384    """Return a list of the elements in s, but without duplicates.
Note: See TracChangeset for help on using the changeset viewer.