Index: /inundation/ga/storm_surge/pmesh/load_mesh/loadASCII.py
===================================================================
--- /inundation/ga/storm_surge/pmesh/load_mesh/loadASCII.py	(revision 720)
+++ /inundation/ga/storm_surge/pmesh/load_mesh/loadASCII.py	(revision 721)
@@ -336,5 +336,5 @@
     else:
         numVertAttrib = str(len(vertices_attributes[0]))
-    fd.write(numVert + " " + numVertAttrib + " # <vertex #> <x> <y> [attributes] ...Triangulation Vertices..." + "\n")
+    fd.write(numVert + " " + numVertAttrib + " # <# of verts> <# of vert attributes>, next lines <vertex #> <x> <y> [attributes] ...Triangulation Vertices..." + "\n")
 
     #<vertex #> <x> <y> [attributes]    
@@ -358,5 +358,5 @@
     #<# of triangles>
     n = len(triangles)
-    fd.write(str(n) + " # <triangle #> [<vertex #>] [<neigbouring triangle #>] [attribute of region] ...Triangulation Triangles..." + "\n")
+    fd.write(str(n) + " # <# of triangles>, next lines <triangle #> [<vertex #>] [<neigbouring triangle #>] [attribute of region] ...Triangulation Triangles..." + "\n")
         
     # <triangle #> <vertex #>  <vertex #> <vertex #> <neigbouring triangle #> <neigbouring triangle #> <neigbouring triangle #> [attribute of region]
@@ -391,5 +391,5 @@
     #One line:  <# of segments> 
     fd.write(str(len(segments)) + 
-             " # <segment #> <vertex #>  <vertex #> [boundary marker] ...Triangulation Segments..." + "\n")
+             " # <# of segments>, next lines <segment #> <vertex #>  <vertex #> [boundary marker] ...Triangulation Segments..." + "\n")
         
     #Following lines:  <segment #> <vertex #>  <vertex #> [boundary marker]
Index: /inundation/ga/storm_surge/pmesh/mesh.py
===================================================================
--- /inundation/ga/storm_surge/pmesh/mesh.py	(revision 720)
+++ /inundation/ga/storm_surge/pmesh/mesh.py	(revision 721)
@@ -1514,5 +1514,5 @@
         else:
             numVertAttrib = str(len(userVertices[0].attributes))
-        fd.write(numVert + " " + numVertAttrib + " # <vertex #> <x> <y> [attributes] ...Mesh Vertices..." + "\n")
+        fd.write(numVert + " " + numVertAttrib + " # <# of verts> <# of vert attributes>, next lines <vertex #> <x> <y> [attributes] ...Mesh Vertices..." + "\n")
         
         # <x> <y> [attributes]
@@ -1532,5 +1532,5 @@
         #One line:  <# of segments> 
         fd.write(str(len(userSegments)) + 
-                 " # <segment #> <vertex #>  <vertex #> [boundary marker] ...Mesh Segments..." + "\n")
+                 " # <# of segments>, next lines <segment #> <vertex #>  <vertex #> [boundary marker] ...Mesh Segments..." + "\n")
         
         #Following lines:  <vertex #>  <vertex #> [boundary marker]
@@ -1545,5 +1545,5 @@
         #One line:  <# of holes> 
         fd.write(str(len(holes)) + 
-                 " # <Hole #> <x> <y> ...Mesh Holes..." + "\n")    
+                 " # <# of holes>, next lines <Hole #> <x> <y> ...Mesh Holes..." + "\n")    
         # <x> <y>
         index = 0
@@ -1556,5 +1556,5 @@
         #One line:  <# of regions> 
         fd.write(str(len(regions)) + 
-                 " # <Region #> <x> <y> <tag>...Mesh Regions..." + "\n")    
+                 " # <# of regions>, next lines <Region #> <x> <y> <tag>...Mesh Regions..." + "\n")    
         # <index> <x> <y> <tag>
         index = 0
@@ -1571,5 +1571,5 @@
         #One line:  <# of regions> 
         fd.write(str(len(regions)) + 
-                 " # <Region #> [Max Area] ...Mesh Regions..." + "\n") 
+                 " # <# of regions>, next lines <Region #> [Max Area] ...Mesh Regions..." + "\n") 
         for r in regions:
             area = r.getMaxArea()
Index: /inundation/ga/storm_surge/pmesh/meshHarness.py
===================================================================
--- /inundation/ga/storm_surge/pmesh/meshHarness.py	(revision 720)
+++ /inundation/ga/storm_surge/pmesh/meshHarness.py	(revision 721)
@@ -490,5 +490,78 @@
         #print "@^@^"
 
-        self.failUnless(lFile[0] == "5 0 # <vertex #> <x> <y> [attributes] ...Triangulation Vertices..."
+        # no need to check the title again
+        #self.failUnless(lFile[0] == "5 0 # <vertex #> <x> <y> [attributes] ...Triangulation Vertices..."
+          #              ,'Ascii file is wrong, vertex title')
+        self.failUnless(lFile[1] == "0 0.0 0.0 " and #1.1 " and
+                        lFile[2] == "1 0.0 4.0 " and #1.2 " and
+                        lFile[3] == "2 4.0 0.0 " and #1.3 " and
+                        lFile[4] == "3 1.0 1.0 " and #1.4 " and
+                        lFile[5] == "4 2.0 2.0 "  #1.25 " 
+                        ,
+                        'Ascii file is wrong, vertex')
+        
+        #self.failUnless(lFile[6] == "# attribute column titles ...Triangulation Vertex Titles..."
+          #              ,'Ascii file is wrong, attribute column title')
+        self.failUnless(lFile[8] == "0 3 2 4 -1 2 3  " and
+                        lFile[9] == "1 1 0 3 3 2 -1  " and
+                        lFile[10] == "2 3 4 1 -1 1 0  " and
+                        lFile[11] == "3 2 3 0 1 -1 0  "
+                        ,
+                        'Ascii file is wrong, triangle') 
+
+        self.failUnless( lFile[13] == "0 0 1 exterior" and
+                        lFile[14] == "1 1 4 exterior" and
+                        lFile[15] == "2 2 0 exterior" and
+                        lFile[16] == "3 0 3 " and
+                        lFile[17] == "4 4 2 exterior" ,
+                        'Ascii file is wrong, segment')
+        
+       # self.failUnless(lFile[18] == '4 0 # <vertex #> <x> <y> [attributes] ...Mesh Vertices...',
+        #                'Ascii file is wrong, Mesh Vertices Title')
+        
+        self.failUnless(lFile[19] == '0 0.0 0.0 ' and #1.1 ' and
+                        lFile[20] == '1 0.0 4.0 ' and #1.2 ' and
+                        lFile[21] == '2 4.0 0.0 ' and #1.3 ' and
+                        lFile[22] == '3 1.0 1.0 ' #1.4 '
+                        ,
+                        'Ascii file is wrong, Mesh Vertices II')
+        
+        self.failUnless(lFile[24] == '0 0 1 ' and
+                        lFile[25] == '1 1 2 ' and
+                        lFile[26] == '2 0 2 ' and
+                        lFile[27] == '3 0 3 '
+                        ,'Ascii file is wrong, Mesh Segments')       
+
+  
+    def test_ascii_file(self):
+    
+        a = Vertex (0.0, 0.0) #, attributes = [1.1])
+        d = Vertex (0.0, 4.0) #, attributes = [1.2])
+        f = Vertex (4.0,0.0) #, attributes = [1.3])
+        e = Vertex (1.0,1.0) #, attributes = [1.4])
+    
+        s1 = Segment(a,d)
+        s2 = Segment(d,f)
+        s3 = Segment(a,f)
+        s4 = Segment(a,e)
+     
+        m = Mesh(userVertices=[a,d,f,e], userSegments=[s1,s2,s3,s4])
+
+        m.generateMesh("QApz", maxArea = 2.1 )
+
+        seg = m.getMeshSegments()
+        
+        fileName = tempfile.mktemp(".txt")
+        m.exportASCIItrianglulationfile(fileName)
+        file = open(fileName)
+        lFile = file.read().split('\n')
+        file.close()
+        os.remove(fileName)
+        
+        print "@^@^"
+        for l in lFile:
+            print l,"<"
+        print "@^@^"
+        self.failUnless(lFile[0] == "5 0 # <# of verts> <# of vert attributes>, next lines <vertex #> <x> <y> [attributes] ...Triangulation Vertices..."
                         ,
                         'Ascii file is wrong, vertex title')
@@ -504,5 +577,5 @@
                         ,
                         'Ascii file is wrong, attribute column title')
-        self.failUnless(lFile[7] == "4 # <triangle #> [<vertex #>] [<neigbouring triangle #>] [attribute of region] ...Triangulation Triangles..." and
+        self.failUnless(lFile[7] == "4 # <# of triangles>, next lines <triangle #> [<vertex #>] [<neigbouring triangle #>] [attribute of region] ...Triangulation Triangles..." and
                         lFile[8] == "0 3 2 4 -1 2 3  " and
                         lFile[9] == "1 1 0 3 3 2 -1  " and
@@ -512,5 +585,5 @@
                         'Ascii file is wrong, triangle') 
 
-        self.failUnless(lFile[12] == "5 # <segment #> <vertex #>  <vertex #> [boundary marker] ...Triangulation Segments..." and
+        self.failUnless(lFile[12] == "5 # <# of segments>, next lines <segment #> <vertex #>  <vertex #> [boundary marker] ...Triangulation Segments..." and
                         lFile[13] == "0 0 1 exterior" and
                         lFile[14] == "1 1 4 exterior" and
@@ -520,5 +593,5 @@
                         'Ascii file is wrong, segment')
         
-        self.failUnless(lFile[18] == '4 0 # <vertex #> <x> <y> [attributes] ...Mesh Vertices...',
+        self.failUnless(lFile[18] == '4 0 # <# of verts> <# of vert attributes>, next lines <vertex #> <x> <y> [attributes] ...Mesh Vertices...',
                         'Ascii file is wrong, Mesh Vertices Title')
         
@@ -530,91 +603,11 @@
                         'Ascii file is wrong, Mesh Vertices II')
         
-        self.failUnless(lFile[23] == '4 # <segment #> <vertex #>  <vertex #> [boundary marker] ...Mesh Segments...' and
+        self.failUnless(lFile[23] == '4 # <# of segments>, next lines <segment #> <vertex #>  <vertex #> [boundary marker] ...Mesh Segments...' and
                         lFile[24] == '0 0 1 ' and
                         lFile[25] == '1 1 2 ' and
                         lFile[26] == '2 0 2 ' and
                         lFile[27] == '3 0 3 ' and
-                        lFile[28] == '0 # <Hole #> <x> <y> ...Mesh Holes...' and
-                        lFile[29] == '0 # <Region #> <x> <y> <tag>...Mesh Regions...'
-                        ,
-                        'Ascii file is wrong, Mesh Segments')       
-
-  
-    def test_ascii_file(self):
-    
-        a = Vertex (0.0, 0.0) #, attributes = [1.1])
-        d = Vertex (0.0, 4.0) #, attributes = [1.2])
-        f = Vertex (4.0,0.0) #, attributes = [1.3])
-        e = Vertex (1.0,1.0) #, attributes = [1.4])
-    
-        s1 = Segment(a,d)
-        s2 = Segment(d,f)
-        s3 = Segment(a,f)
-        s4 = Segment(a,e)
-     
-        m = Mesh(userVertices=[a,d,f,e], userSegments=[s1,s2,s3,s4])
-
-        m.generateMesh("QApz", maxArea = 2.1 )
-
-        seg = m.getMeshSegments()
-        
-        fileName = tempfile.mktemp(".txt")
-        m.exportASCIItrianglulationfile(fileName)
-        file = open(fileName)
-        lFile = file.read().split('\n')
-        file.close()
-        os.remove(fileName)
-        
-        #print "@^@^"
-        #for l in lFile:
-        #    print l,"<"
-        #print "@^@^"
-        self.failUnless(lFile[0] == "5 0 # <vertex #> <x> <y> [attributes] ...Triangulation Vertices..."
-                        ,
-                        'Ascii file is wrong, vertex title')
-        self.failUnless(lFile[1] == "0 0.0 0.0 " and #1.1 " and
-                        lFile[2] == "1 0.0 4.0 " and #1.2 " and
-                        lFile[3] == "2 4.0 0.0 " and #1.3 " and
-                        lFile[4] == "3 1.0 1.0 " and #1.4 " and
-                        lFile[5] == "4 2.0 2.0 "  #1.25 " 
-                        ,
-                        'Ascii file is wrong, vertex')
-        
-        self.failUnless(lFile[6] == "# attribute column titles ...Triangulation Vertex Titles..."
-                        ,
-                        'Ascii file is wrong, attribute column title')
-        self.failUnless(lFile[7] == "4 # <triangle #> [<vertex #>] [<neigbouring triangle #>] [attribute of region] ...Triangulation Triangles..." and
-                        lFile[8] == "0 3 2 4 -1 2 3  " and
-                        lFile[9] == "1 1 0 3 3 2 -1  " and
-                        lFile[10] == "2 3 4 1 -1 1 0  " and
-                        lFile[11] == "3 2 3 0 1 -1 0  "
-                        ,
-                        'Ascii file is wrong, triangle') 
-
-        self.failUnless(lFile[12] == "5 # <segment #> <vertex #>  <vertex #> [boundary marker] ...Triangulation Segments..." and
-                        lFile[13] == "0 0 1 exterior" and
-                        lFile[14] == "1 1 4 exterior" and
-                        lFile[15] == "2 2 0 exterior" and
-                        lFile[16] == "3 0 3 " and
-                        lFile[17] == "4 4 2 exterior" ,
-                        'Ascii file is wrong, segment')
-        
-        self.failUnless(lFile[18] == '4 0 # <vertex #> <x> <y> [attributes] ...Mesh Vertices...',
-                        'Ascii file is wrong, Mesh Vertices Title')
-        
-        self.failUnless(lFile[19] == '0 0.0 0.0 ' and #1.1 ' and
-                        lFile[20] == '1 0.0 4.0 ' and #1.2 ' and
-                        lFile[21] == '2 4.0 0.0 ' and #1.3 ' and
-                        lFile[22] == '3 1.0 1.0 ' #1.4 '
-                        ,
-                        'Ascii file is wrong, Mesh Vertices II')
-        
-        self.failUnless(lFile[23] == '4 # <segment #> <vertex #>  <vertex #> [boundary marker] ...Mesh Segments...' and
-                        lFile[24] == '0 0 1 ' and
-                        lFile[25] == '1 1 2 ' and
-                        lFile[26] == '2 0 2 ' and
-                        lFile[27] == '3 0 3 ' and
-                        lFile[28] == '0 # <Hole #> <x> <y> ...Mesh Holes...' and
-                        lFile[29] == '0 # <Region #> <x> <y> <tag>...Mesh Regions...'
+                        lFile[28] == '0 # <# of holes>, next lines <Hole #> <x> <y> ...Mesh Holes...' and
+                        lFile[29] == '0 # <# of regions>, next lines <Region #> <x> <y> <tag>...Mesh Regions...'
                         ,
                         'Ascii file is wrong, Mesh Segments')       
