mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: reduced verbosity when decomposing/reconstructing empty meshes
- only warn about missing cells/points if the mesh is also missing boundary patches. - reduce verbosity when decomposing to an empty mesh - skip face matching when either mesh has no faces
This commit is contained in:
@ -831,11 +831,18 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets)
|
|||||||
|
|
||||||
|
|
||||||
// Statistics
|
// Statistics
|
||||||
|
Info<< nl << "Processor " << proci;
|
||||||
|
|
||||||
Info<< endl
|
if (procMesh.nCells())
|
||||||
<< "Processor " << proci << nl
|
{
|
||||||
<< " Number of cells = " << procMesh.nCells()
|
Info<< nl << " ";
|
||||||
<< endl;
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Info<< ": ";
|
||||||
|
}
|
||||||
|
|
||||||
|
Info<< "Number of cells = " << procMesh.nCells() << nl;
|
||||||
|
|
||||||
maxProcCells = max(maxProcCells, procMesh.nCells());
|
maxProcCells = max(maxProcCells, procMesh.nCells());
|
||||||
|
|
||||||
@ -865,9 +872,12 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< " Number of processor patches = " << nProcPatches << nl
|
if (procMesh.nCells() && (nBoundaryFaces || nProcFaces))
|
||||||
<< " Number of processor faces = " << nProcFaces << nl
|
{
|
||||||
<< " Number of boundary faces = " << nBoundaryFaces << endl;
|
Info<< " Number of processor patches = " << nProcPatches << nl
|
||||||
|
<< " Number of processor faces = " << nProcFaces << nl
|
||||||
|
<< " Number of boundary faces = " << nBoundaryFaces << nl;
|
||||||
|
}
|
||||||
|
|
||||||
totProcFaces += nProcFaces;
|
totProcFaces += nProcFaces;
|
||||||
totProcPatches += nProcPatches;
|
totProcPatches += nProcPatches;
|
||||||
|
|||||||
@ -325,15 +325,21 @@ Foam::polyMesh::polyMesh(const IOobject& io)
|
|||||||
boundary_.calcGeometry();
|
boundary_.calcGeometry();
|
||||||
|
|
||||||
// Warn if global empty mesh
|
// Warn if global empty mesh
|
||||||
if (returnReduce(nPoints(), sumOp<label>()) == 0)
|
if (returnReduce(boundary_.empty(), orOp<bool>()))
|
||||||
{
|
{
|
||||||
WarningInFunction
|
WarningInFunction
|
||||||
<< "no points in mesh" << endl;
|
<< "mesh missing boundary on one or more domains" << endl;
|
||||||
}
|
|
||||||
if (returnReduce(nCells(), sumOp<label>()) == 0)
|
if (returnReduce(nPoints(), sumOp<label>()) == 0)
|
||||||
{
|
{
|
||||||
WarningInFunction
|
WarningInFunction
|
||||||
<< "no cells in mesh" << endl;
|
<< "no points in mesh" << endl;
|
||||||
|
}
|
||||||
|
if (returnReduce(nCells(), sumOp<label>()) == 0)
|
||||||
|
{
|
||||||
|
WarningInFunction
|
||||||
|
<< "no cells in mesh" << endl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialise demand-driven data
|
// Initialise demand-driven data
|
||||||
|
|||||||
@ -886,6 +886,15 @@ void Foam::faceCoupleInfo::findPerfectMatchingFaces
|
|||||||
labelList& mesh1Faces
|
labelList& mesh1Faces
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
// Quick check: skip face matching if either mesh has no faces
|
||||||
|
if (!mesh0.nFaces() || !mesh1.nFaces())
|
||||||
|
{
|
||||||
|
mesh0Faces.clear();
|
||||||
|
mesh1Faces.clear();
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Face centres of external faces (without invoking
|
// Face centres of external faces (without invoking
|
||||||
// mesh.faceCentres since mesh might have been clearedOut)
|
// mesh.faceCentres since mesh might have been clearedOut)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user