meshCheck::checkTopology: Multiple disconnected region sets now only written for allTopology
NCC cases have multiple disconnected regions that polyMesh topology checking considers a potential error and meshCheck::checkTopology can generate diagnostic cell and point sets relating to these regions but these are now only written if allTopology is set true to remove unnecessary clutter when checking the mesh at run-time for moving mesh cases using the checkMesh functionObject.
This commit is contained in:
@ -333,8 +333,11 @@ Foam::label Foam::meshCheck::checkTopology
|
||||
Info<< " *Number of regions: " << rs.nRegions() << endl;
|
||||
|
||||
Info<< " The mesh has multiple regions which are not connected "
|
||||
"by any face." << endl
|
||||
<< " <<Writing region information to "
|
||||
"by any face." << endl;
|
||||
|
||||
if (allTopology)
|
||||
{
|
||||
Info<< " <<Writing region information to "
|
||||
<< mesh.time().name()/"cellToRegion"
|
||||
<< endl;
|
||||
|
||||
@ -351,8 +354,12 @@ Foam::label Foam::meshCheck::checkTopology
|
||||
rs
|
||||
);
|
||||
ctr.write();
|
||||
}
|
||||
|
||||
|
||||
// Write region sets for allTopology
|
||||
if (allTopology)
|
||||
{
|
||||
// Points in multiple regions
|
||||
pointSet points
|
||||
(
|
||||
@ -402,12 +409,14 @@ Foam::label Foam::meshCheck::checkTopology
|
||||
}
|
||||
}
|
||||
|
||||
Pstream::listCombineGather(regionDisconnected, andEqOp<bool>());
|
||||
Pstream::listCombineGather
|
||||
(
|
||||
regionDisconnected,
|
||||
andEqOp<bool>()
|
||||
);
|
||||
Pstream::listCombineScatter(regionDisconnected);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// write cellSet for each region
|
||||
PtrList<cellSet> cellRegions(rs.nRegions());
|
||||
for (label i = 0; i < rs.nRegions(); i++)
|
||||
@ -432,8 +441,7 @@ Foam::label Foam::meshCheck::checkTopology
|
||||
for (label i = 0; i < rs.nRegions(); i++)
|
||||
{
|
||||
Info<< " <<Writing region " << i;
|
||||
if (allTopology)
|
||||
{
|
||||
|
||||
if (regionDisconnected[i])
|
||||
{
|
||||
Info<< " (fully disconnected)";
|
||||
@ -442,11 +450,13 @@ Foam::label Foam::meshCheck::checkTopology
|
||||
{
|
||||
Info<< " (point connected)";
|
||||
}
|
||||
}
|
||||
|
||||
Info<< " with "
|
||||
<< returnReduce(cellRegions[i].size(), sumOp<scalar>())
|
||||
<< " cells to cellSet " << cellRegions[i].name() << endl;
|
||||
<< " cells to cellSet " << cellRegions[i].name()
|
||||
<< endl;
|
||||
|
||||
cellRegions[i].instance() = mesh.pointsInstance();
|
||||
cellRegions[i].write();
|
||||
}
|
||||
|
||||
@ -456,6 +466,8 @@ Foam::label Foam::meshCheck::checkTopology
|
||||
Info<< " <<Writing " << nPoints
|
||||
<< " points that are in multiple regions to set "
|
||||
<< points.name() << endl;
|
||||
|
||||
points.instance() = mesh.pointsInstance();
|
||||
points.write();
|
||||
if (setWriter.valid())
|
||||
{
|
||||
@ -464,6 +476,7 @@ Foam::label Foam::meshCheck::checkTopology
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user