Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev

This commit is contained in:
Henry Weller
2023-07-29 16:33:06 +01:00

View File

@ -326,12 +326,13 @@ Foam::polyMesh::polyMesh(const IOobject& io)
boundary_.calcGeometry();
// Warn if global empty mesh
if (returnReduce(nPoints(), sumOp<label>()) == 0)
const bool complete = Pstream::parRun() || !time().processorCase();
if (complete && returnReduce(nPoints(), sumOp<label>()) == 0)
{
WarningInFunction
<< "no points in mesh" << endl;
}
if (returnReduce(nCells(), sumOp<label>()) == 0)
if (complete && returnReduce(nCells(), sumOp<label>()) == 0)
{
WarningInFunction
<< "no cells in mesh" << endl;