Changeset 8708


Ignore:
Timestamp:
Feb 19, 2013, 5:37:23 PM (12 years ago)
Author:
steve
Message:

Working on test_neighbour_mesh

Location:
trunk/anuga_core/source/anuga
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/neighbour_mesh.py

    r8699 r8708  
    804804        y2 = V[2::3, 1]
    805805
     806
    806807        #print 'check areas'
    807808        area = self.areas
     
    810811
    811812
    812 
    813813        assert num.sum(num.abs((area - ref)/area)) < epsilon, 'Error in areas'
    814814
     
    818818        tx0 = x2 - x1
    819819        ty0 = y2 - y1
     820        a0  = num.sqrt(tx0**2 + ty0**2)
     821
     822
     823        tx0 = tx0/a0
     824        ty0 = ty0/a0
     825
     826
    820827        tx1 = x0 - x2
    821828        ty1 = y0 - y2
     829        a1  = num.sqrt(tx1**2 + ty1**2)
     830        tx1 = tx1/a1
     831        ty1 = ty1/a1
     832
    822833        tx2 = x1 - x0
    823834        ty2 = y1 - y0
     835        a2  = num.sqrt(tx2**2 + ty2**2)
     836        tx2 = tx2/a2
     837        ty2 = ty2/a2
    824838
    825839        nx0 = self.normals[:,0]
     
    830844        ny2 = self.normals[:,5]
    831845
    832         #print nx0.shape
    833         #print tx0.shape
    834         #print ny0.shape
    835         #print ty0.shape
    836 
    837 
    838         #print 'check edge |_ to normals'
     846
    839847        assert num.all(tx0*nx0 + ty0*ny0 < epsilon), 'Normal not perpendicular to edge'
    840848        assert num.all(tx1*nx1 + ty1*ny1 < epsilon), 'Normal not perpendicular to edge'
  • trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/test_neighbour_mesh.py

    r8563 r8708  
    10141014                     [19,17, 4],
    10151015                     [16, 6, 5]]
     1016
     1017
     1018        triangles = num.array(triangles,num.int)
     1019        points = num.array(points,num.float)
    10161020
    10171021        mesh = Mesh(points, triangles)
     
    18461850if __name__ == "__main__":
    18471851    suite = unittest.makeSuite(Test_Mesh, 'test_')
    1848     runner = unittest.TextTestRunner()
     1852    runner = unittest.TextTestRunner()#verbosity=2)
    18491853    runner.run(suite)
  • trunk/anuga_core/source/anuga/utilities/compile.py

    r8705 r8708  
    2929    netcdf_lib_dirs = ' -L"%s" ' % NETCDF_LIB_DIR
    3030
    31 print 'netcdf_lib_dirs: ',netcdf_lib_dirs
     31#print 'netcdf_lib_dirs: ',netcdf_lib_dirs
    3232
    3333#NumPy ------------------------------------
Note: See TracChangeset for help on using the changeset viewer.