Changeset 7722
- Timestamp:
- May 13, 2010, 9:42:35 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/fit_interpolate/test_interpolate.py
r7710 r7722 1834 1834 1835 1835 def test_interpolate_one_point_many_triangles(self): 1836 # this test has 10 triangles that share the same vert.1837 # If the number of points per cell in a quad tree is less1838 # than 10 it will crash.1839 1836 z0 = [2.0, 5.0] 1840 z1 = [2.0, 5.0] 1841 z2 = [2.0, 5.0] 1842 z3 = [2.0, 5.0] 1843 z4 = [2.0, 5.0] 1844 z5 = [2.0, 5.0] 1845 z6 = [2.0, 5.0] 1846 z7 = [2.0, 5.0] 1847 z8 = [2.0, 5.0] 1848 z9 = [2.0, 5.0] 1849 z10 = [2.0, 5.0] 1850 1837 1851 1838 v0 = [0.0, 0.0] 1852 1839 v1 = [1.0, 0.0] … … 1854 1841 v3 = [3.0, 0.0] 1855 1842 v4 = [4.0, 0.0] 1856 v5 = [0.0, 10.0] 1857 v6 = [1.0, 10.0] 1858 v7 = [2.0, 10.0] 1859 v8 = [3.0, 10.0] 1860 v9 = [4.0, 10.0] 1861 1862 vertices = [z0,v0, v1, v2, v3,v4 ,v5, v6, v7, v8, v9, 1863 z1, z2, z3, z4, z5, z6, z7, z8, z9] 1843 v5 = [5.0, 0.0] 1844 v6 = [6.0, 0.0] 1845 v7 = [0.0, 10.0] 1846 v8 = [1.0, 10.0] 1847 v9 = [2.0, 10.0] 1848 v10= [3.0, 10.0] 1849 v11= [4.0, 10.0] 1850 v12= [5.0, 10.0] 1851 v13= [6.0, 10.0] 1852 1853 vertices = [z0,v0, v1, v2, v3,v4 ,v5, v6, v7, v8, v9, v10, v11, 1854 v12, v13] 1864 1855 triangles = [ 1865 [11,1,2], 1866 [12,2,3], 1867 [13,3,4], 1868 [14,4,5], 1869 [7,6,15], 1870 [8,7,16], 1871 [9,8,17], 1872 [10,9,18], 1873 [6,1,19], 1874 [5,10,0] 1856 [0,1,2], 1857 [0,2,3], 1858 [0,3,4], 1859 [0,4,5], 1860 [0,5,6], 1861 [0,6,7], 1862 [0,9,8], 1863 [0,10,9], 1864 [0,11,10], 1865 [0,12,11], 1866 [0,13,12], 1867 [0,14,13] 1875 1868 ] 1876 1869 … … 1882 1875 interp = Interpolate(vertices, triangles) 1883 1876 except RuntimeError: 1884 self.failUnless(0 ==1, 'quad fails with 10 verts at the same \ 1885 position. Real problems have had 9. \ 1886 Should be able to handle 13.') 1877 self.failUnless(0 ==1, 'quad fails with 14 verts at the same \ 1878 position. Should be able to handle any number.') 1887 1879 f = linear_function(vertices) 1888 1880 z = interp.interpolate(f, point_coords)
Note: See TracChangeset
for help on using the changeset viewer.