distribute mixed element mesh

This commit is contained in:
Joachim Schoeberl 2011-08-22 14:51:21 +00:00
parent 577ecd6f47
commit 71c6645567

View File

@ -83,8 +83,6 @@ namespace netgen
} }
} }
if (id == 0) if (id == 0)
SendMesh (); SendMesh ();
else else
@ -263,7 +261,6 @@ namespace netgen
} }
Array<int> num_distpnums(ntasks); Array<int> num_distpnums(ntasks);
num_distpnums = 0; num_distpnums = 0;
@ -322,6 +319,7 @@ namespace netgen
for (int dest = 1; dest < ntasks; dest ++ ) for (int dest = 1; dest < ntasks; dest ++ )
sendrequests.Append (MyMPI_ISend (elementarrays[dest], dest, MPI_TAG_MESH+2)); sendrequests.Append (MyMPI_ISend (elementarrays[dest], dest, MPI_TAG_MESH+2));
PrintMessage ( 3, "Sending Face Descriptors" ); PrintMessage ( 3, "Sending Face Descriptors" );
Array<double> fddata (6 * GetNFD()); Array<double> fddata (6 * GetNFD());
@ -653,7 +651,6 @@ namespace netgen
{ {
if (id != 0 || ntasks == 1 ) return; if (id != 0 || ntasks == 1 ) return;
#ifdef METIS #ifdef METIS
ParallelMetis (); ParallelMetis ();
#else #else
@ -661,7 +658,6 @@ namespace netgen
(*this)[ei].SetPartition(ntasks * ei/GetNE() + 1); (*this)[ei].SetPartition(ntasks * ei/GetNE() + 1);
#endif #endif
for (ElementIndex ei = 0; ei < GetNE(); ei++) for (ElementIndex ei = 0; ei < GetNE(); ei++)
*testout << "el(" << ei << ") is in part " << (*this)[ei].GetPartition() << endl; *testout << "el(" << ei << ") is in part " << (*this)[ei].GetPartition() << endl;
for (SurfaceElementIndex ei = 0; ei < GetNSE(); ei++) for (SurfaceElementIndex ei = 0; ei < GetNSE(); ei++)
@ -724,10 +720,10 @@ namespace netgen
if (!uniform_els) if (!uniform_els)
{ {
PartHybridMesh ( ); PartHybridMesh ();
return;
} }
else
{
// uniform (TET) mesh, JS // uniform (TET) mesh, JS
int npe = VolumeElement(1).GetNP(); int npe = VolumeElement(1).GetNP();
@ -788,6 +784,8 @@ namespace netgen
// we want: 1 ... ntasks // we want: 1 ... ntasks
for (int i=1; i<=ne; i++) for (int i=1; i<=ne; i++)
VolumeElement(i).SetPartition(epart[i-1] + 1); VolumeElement(i).SetPartition(epart[i-1] + 1);
}
for (int sei = 1; sei <= GetNSE(); sei++ ) for (int sei = 1; sei <= GetNSE(); sei++ )