mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-27 13:20:34 +05:00
parallel refinement
This commit is contained in:
parent
fbb7071939
commit
2e6f7850d7
@ -292,21 +292,20 @@ namespace netgen
|
|||||||
for (int edge = 1; edge <= ned; edge++)
|
for (int edge = 1; edge <= ned; edge++)
|
||||||
{
|
{
|
||||||
topology.GetEdgeVertices (edge, v1, v2);
|
topology.GetEdgeVertices (edge, v1, v2);
|
||||||
// INDEX_2 es(GetGlobalPNum(v1), GetGlobalPNum(v2));
|
INDEX_2 es(GetGlobalPNum(v1), GetGlobalPNum(v2));
|
||||||
// es.Sort();
|
es.Sort();
|
||||||
|
|
||||||
// gv2e.Set (es, edge);
|
gv2e.Set (es, edge);
|
||||||
|
|
||||||
for (int dest = 1; dest < ntasks; dest++)
|
for (int dest = 1; dest < ntasks; dest++)
|
||||||
if (IsExchangeVert (dest, v1) && IsExchangeVert (dest, v2))
|
if (IsExchangeVert (dest, v1) && IsExchangeVert (dest, v2))
|
||||||
{
|
{
|
||||||
SetDistantEdgeNum(dest, edge);
|
// SetDistantEdgeNum(dest, edge);
|
||||||
// send_edges.Add (dest-1, es[0]);
|
send_edges.Add (dest-1, es[0]);
|
||||||
// send_edges.Add (dest-1, es[1]);
|
send_edges.Add (dest-1, es[1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
TABLE<int> recv_edges(ntasks-1);
|
TABLE<int> recv_edges(ntasks-1);
|
||||||
MyMPI_ExchangeTable (send_edges, recv_edges, MPI_TAG_MESH+9, MPI_LocalComm);
|
MyMPI_ExchangeTable (send_edges, recv_edges, MPI_TAG_MESH+9, MPI_LocalComm);
|
||||||
|
|
||||||
@ -321,7 +320,6 @@ namespace netgen
|
|||||||
SetDistantEdgeNum (sender, gv2e.Get(gv12));
|
SetDistantEdgeNum (sender, gv2e.Get(gv12));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
NgProfiler::StopTimer (timere);
|
NgProfiler::StopTimer (timere);
|
||||||
|
|
||||||
@ -331,10 +329,10 @@ namespace netgen
|
|||||||
if (mesh.GetDimension() == 3)
|
if (mesh.GetDimension() == 3)
|
||||||
{
|
{
|
||||||
NgProfiler::StartTimer (timerf);
|
NgProfiler::StartTimer (timerf);
|
||||||
|
Array<int> verts;
|
||||||
|
|
||||||
// exchange faces
|
// exchange faces
|
||||||
cnt_send = 0;
|
cnt_send = 0;
|
||||||
Array<int> verts;
|
|
||||||
for (int face = 1; face <= nfa; face++)
|
for (int face = 1; face <= nfa; face++)
|
||||||
{
|
{
|
||||||
topology.GetFaceVertices (face, verts);
|
topology.GetFaceVertices (face, verts);
|
||||||
@ -351,6 +349,7 @@ namespace netgen
|
|||||||
for (int face = 1; face <= nfa; face++)
|
for (int face = 1; face <= nfa; face++)
|
||||||
{
|
{
|
||||||
topology.GetFaceVertices (face, verts);
|
topology.GetFaceVertices (face, verts);
|
||||||
|
|
||||||
INDEX_3 fs (GetGlobalPNum(verts[0]),
|
INDEX_3 fs (GetGlobalPNum(verts[0]),
|
||||||
GetGlobalPNum(verts[1]),
|
GetGlobalPNum(verts[1]),
|
||||||
GetGlobalPNum(verts[2]));
|
GetGlobalPNum(verts[2]));
|
||||||
@ -363,6 +362,7 @@ namespace netgen
|
|||||||
IsExchangeVert (dest, verts[1]) &&
|
IsExchangeVert (dest, verts[1]) &&
|
||||||
IsExchangeVert (dest, verts[2]))
|
IsExchangeVert (dest, verts[2]))
|
||||||
{
|
{
|
||||||
|
// SetDistantFaceNum (dest, face);
|
||||||
send_faces.Add (dest-1, fs[0]);
|
send_faces.Add (dest-1, fs[0]);
|
||||||
send_faces.Add (dest-1, fs[1]);
|
send_faces.Add (dest-1, fs[1]);
|
||||||
send_faces.Add (dest-1, fs[2]);
|
send_faces.Add (dest-1, fs[2]);
|
||||||
|
@ -375,6 +375,7 @@ namespace netgen
|
|||||||
i2.I2() = pnums.Get(betw[j][1]);
|
i2.I2() = pnums.Get(betw[j][1]);
|
||||||
i2.Sort();
|
i2.Sort();
|
||||||
|
|
||||||
|
/*
|
||||||
if (between.Used(i2))
|
if (between.Used(i2))
|
||||||
pnums.Elem(5+j) = between.Get(i2);
|
pnums.Elem(5+j) = between.Get(i2);
|
||||||
else
|
else
|
||||||
@ -384,6 +385,15 @@ namespace netgen
|
|||||||
mesh.Point(i2.I2())));
|
mesh.Point(i2.I2())));
|
||||||
between.Set (i2, pnums.Elem(5+j));
|
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] =
|
static int reftab[8][4] =
|
||||||
|
Loading…
Reference in New Issue
Block a user