Changeset 8708
- Timestamp:
- Feb 19, 2013, 5:37:23 PM (12 years ago)
- 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 804 804 y2 = V[2::3, 1] 805 805 806 806 807 #print 'check areas' 807 808 area = self.areas … … 810 811 811 812 812 813 813 assert num.sum(num.abs((area - ref)/area)) < epsilon, 'Error in areas' 814 814 … … 818 818 tx0 = x2 - x1 819 819 ty0 = y2 - y1 820 a0 = num.sqrt(tx0**2 + ty0**2) 821 822 823 tx0 = tx0/a0 824 ty0 = ty0/a0 825 826 820 827 tx1 = x0 - x2 821 828 ty1 = y0 - y2 829 a1 = num.sqrt(tx1**2 + ty1**2) 830 tx1 = tx1/a1 831 ty1 = ty1/a1 832 822 833 tx2 = x1 - x0 823 834 ty2 = y1 - y0 835 a2 = num.sqrt(tx2**2 + ty2**2) 836 tx2 = tx2/a2 837 ty2 = ty2/a2 824 838 825 839 nx0 = self.normals[:,0] … … 830 844 ny2 = self.normals[:,5] 831 845 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 839 847 assert num.all(tx0*nx0 + ty0*ny0 < epsilon), 'Normal not perpendicular to edge' 840 848 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 1014 1014 [19,17, 4], 1015 1015 [16, 6, 5]] 1016 1017 1018 triangles = num.array(triangles,num.int) 1019 points = num.array(points,num.float) 1016 1020 1017 1021 mesh = Mesh(points, triangles) … … 1846 1850 if __name__ == "__main__": 1847 1851 suite = unittest.makeSuite(Test_Mesh, 'test_') 1848 runner = unittest.TextTestRunner() 1852 runner = unittest.TextTestRunner()#verbosity=2) 1849 1853 runner.run(suite) -
trunk/anuga_core/source/anuga/utilities/compile.py
r8705 r8708 29 29 netcdf_lib_dirs = ' -L"%s" ' % NETCDF_LIB_DIR 30 30 31 print 'netcdf_lib_dirs: ',netcdf_lib_dirs31 #print 'netcdf_lib_dirs: ',netcdf_lib_dirs 32 32 33 33 #NumPy ------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.