parMetis: Added test for points on all processors

Unfortunately ParMETIS does not support redistribution of empty processors.
This commit is contained in:
Henry Weller
2024-05-26 14:27:06 +01:00
parent 0933bd106f
commit ed17d3c405

View File

@ -308,6 +308,14 @@ Foam::labelList Foam::decompositionMethods::parMetis::decompose
<< exit(FatalError);
}
if (Pstream::parRun() && !points.size())
{
Pout<< "No points on processor " << Pstream::myProcNo() << nl
<< " ParMETIS cannot redistribute without points"
"on all processors." << endl;
FatalErrorInFunction << exit(FatalError);
}
// Make Metis CSR (Compressed Storage Format) storage
// adjncy : contains neighbours (= edges in graph)
// xadj(celli) : start of information in adjncy for celli
@ -352,6 +360,13 @@ Foam::labelList Foam::decompositionMethods::parMetis::decompose
<< exit(FatalError);
}
if (Pstream::parRun() && !regionPoints.size())
{
Pout<< "No points on processor " << Pstream::myProcNo() << nl
<< " ParMETIS cannot redistribute without points"
"on all processors." << endl;
FatalErrorInFunction << exit(FatalError);
}
// Make Metis CSR (Compressed Storage Format) storage
// adjncy : contains neighbours (= edges in graph)
@ -405,6 +420,14 @@ Foam::labelList Foam::decompositionMethods::parMetis::decompose
<< ")." << exit(FatalError);
}
if (Pstream::parRun() && !cellCentres.size())
{
Pout<< "No points on processor " << Pstream::myProcNo() << nl
<< " ParMETIS cannot redistribute without points"
"on all processors." << endl;
FatalErrorInFunction << exit(FatalError);
}
// Make Metis Distributed CSR (Compressed Storage Format) storage
// adjncy : contains neighbours (= edges in graph)
// xadj(celli) : start of information in adjncy for celli