diff --git a/libsrc/meshing/paralleltop.cpp b/libsrc/meshing/paralleltop.cpp index c137eb8a..f8e7e078 100644 --- a/libsrc/meshing/paralleltop.cpp +++ b/libsrc/meshing/paralleltop.cpp @@ -292,21 +292,20 @@ namespace netgen for (int edge = 1; edge <= ned; edge++) { topology.GetEdgeVertices (edge, v1, v2); - // INDEX_2 es(GetGlobalPNum(v1), GetGlobalPNum(v2)); - // es.Sort(); + INDEX_2 es(GetGlobalPNum(v1), GetGlobalPNum(v2)); + es.Sort(); - // gv2e.Set (es, edge); + gv2e.Set (es, edge); for (int dest = 1; dest < ntasks; dest++) if (IsExchangeVert (dest, v1) && IsExchangeVert (dest, v2)) { - SetDistantEdgeNum(dest, edge); - // send_edges.Add (dest-1, es[0]); - // send_edges.Add (dest-1, es[1]); + // SetDistantEdgeNum(dest, edge); + send_edges.Add (dest-1, es[0]); + send_edges.Add (dest-1, es[1]); } } - /* TABLE recv_edges(ntasks-1); MyMPI_ExchangeTable (send_edges, recv_edges, MPI_TAG_MESH+9, MPI_LocalComm); @@ -321,7 +320,6 @@ namespace netgen SetDistantEdgeNum (sender, gv2e.Get(gv12)); } } - */ NgProfiler::StopTimer (timere); @@ -331,10 +329,10 @@ namespace netgen if (mesh.GetDimension() == 3) { NgProfiler::StartTimer (timerf); + Array verts; // exchange faces cnt_send = 0; - Array verts; for (int face = 1; face <= nfa; face++) { topology.GetFaceVertices (face, verts); @@ -344,13 +342,14 @@ namespace netgen IsExchangeVert (dest, verts[2])) cnt_send[dest-1]+=3; } - + TABLE send_faces(cnt_send); INDEX_3_HASHTABLE gv2f(2*nfa); for (int face = 1; face <= nfa; face++) { topology.GetFaceVertices (face, verts); + INDEX_3 fs (GetGlobalPNum(verts[0]), GetGlobalPNum(verts[1]), GetGlobalPNum(verts[2])); @@ -363,6 +362,7 @@ namespace netgen IsExchangeVert (dest, verts[1]) && IsExchangeVert (dest, verts[2])) { + // SetDistantFaceNum (dest, face); send_faces.Add (dest-1, fs[0]); send_faces.Add (dest-1, fs[1]); send_faces.Add (dest-1, fs[2]); diff --git a/libsrc/meshing/refine.cpp b/libsrc/meshing/refine.cpp index e2d96df6..164ab8e6 100644 --- a/libsrc/meshing/refine.cpp +++ b/libsrc/meshing/refine.cpp @@ -375,6 +375,7 @@ namespace netgen i2.I2() = pnums.Get(betw[j][1]); i2.Sort(); + /* if (between.Used(i2)) pnums.Elem(5+j) = between.Get(i2); else @@ -384,6 +385,15 @@ namespace netgen mesh.Point(i2.I2()))); between.Set (i2, pnums.Elem(5+j)); } + */ + PointIndex pinew = between.Get(i2); + pnums.Elem(j+5) = pinew; + if (!pointset[pinew]) + { + pointset[pinew] = true; + mesh.Point(pinew) = Center(mesh.Point(i2.I1()), + mesh.Point(i2.I2())); + } } static int reftab[8][4] =