Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.
Hi all, I'll try to explain my problem : I've got a mesh in 3D with about 200 000 samples and 1 000 000 tetras. I apply the method used in Delaunay.main (line 955...) : DelaunayCadoe delaun = new DelaunayCadoe(samples,tetra); // The same as DelaunayCustom but without copy, with debug and // 4 edges (6 in DelaunayCustom) Irregular3DSet iset = new Irregular3DSet(xyz,samples,null,null,null,delaun); int numEdges = delaun.NumEdges; Gridded3DSet[] gsp = new Gridded3DSet[numEdges]; int[] e0 = {0, 0, 1, 2}; int[] e1 = {1, 3, 2, 3}; for (int i=0; i<numEdges; i++) gsp[i] = null; for (int i=0; i<delaun.Edges.length; i++) { int[] trii = delaun.Tri[i]; int[] edgesi = delaun.Edges[i]; for (int j=0; j<4; j++) { if (gsp[edgesi[j]] == null) { float[][] pts = new float[3][2]; float[] p0 = pts[0]; float[] p1 = pts[1]; float[] p2 = pts[2]; int tp0 = trii[e0[j]]; int tp1 = trii[e1[j]]; p0[0] = samples[0][tp0]; p1[0] = samples[1][tp0]; p2[0] = samples[2][tp0]; p0[1] = samples[0][tp1]; p1[1] = samples[1][tp1]; p2[1] = samples[2][tp1]; gsp[edgesi[j]] = new Gridded3DSet(xyz, pts, 2); } } } UnionSet tet = new UnionSet(xyz, gsp); final DataReference tetref = new DataReferenceImpl("tet"); tetref.setData(tet); The problem is that this part of code and the display of this mesh, use about 755M of Memory... As i'm quite new in java, I don't know which element is so huge (There is no sizeof() as in C ?). how can I optimize this code ? Any comments may be very helpful... -Sylvain-
visad
archives: