mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: snappyHexMesh: limit warnings to 100 points. Fixes #941.
This commit is contained in:
@ -233,10 +233,6 @@ public:
|
||||
{
|
||||
return minAreaRatio_;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -2014,13 +2014,24 @@ Foam::vectorField Foam::snappySnapDriver::calcNearestSurface
|
||||
forAll(snapSurf, pointi)
|
||||
{
|
||||
if (snapSurf[pointi] == -1)
|
||||
{
|
||||
static label nWarn = 0;
|
||||
|
||||
if (nWarn < 100)
|
||||
{
|
||||
WarningInFunction
|
||||
<< "For point:" << pointi
|
||||
<< " coordinate:" << localPoints[pointi]
|
||||
<< " did not find any surface within:"
|
||||
<< minSnapDist[pointi]
|
||||
<< " metre." << endl;
|
||||
<< minSnapDist[pointi] << " metre." << endl;
|
||||
nWarn++;
|
||||
if (nWarn == 100)
|
||||
{
|
||||
WarningInFunction
|
||||
<< "Reached warning limit " << nWarn
|
||||
<< ". Suppressing further warnings." << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -327,10 +327,22 @@ void Foam::snappySnapDriver::calcNearestFace
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
static label nWarn = 0;
|
||||
|
||||
if (nWarn < 100)
|
||||
{
|
||||
WarningInFunction
|
||||
<< "Did not find surface near face centre " << fc[hiti]
|
||||
<< endl;
|
||||
nWarn++;
|
||||
if (nWarn == 100)
|
||||
{
|
||||
WarningInFunction
|
||||
<< "Reached warning limit " << nWarn
|
||||
<< ". Suppressing further warnings." << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -391,10 +403,23 @@ void Foam::snappySnapDriver::calcNearestFace
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
static label nWarn = 0;
|
||||
|
||||
if (nWarn < 100)
|
||||
{
|
||||
WarningInFunction
|
||||
<< "Did not find surface near face centre " << fc[hiti]
|
||||
<< endl;
|
||||
|
||||
nWarn++;
|
||||
if (nWarn == 100)
|
||||
{
|
||||
WarningInFunction
|
||||
<< "Reached warning limit " << nWarn
|
||||
<< ". Suppressing further warnings." << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -3282,10 +3307,23 @@ void Foam::snappySnapDriver::reverseAttractMeshPoints
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
static label nWarn = 0;
|
||||
|
||||
if (nWarn < 100)
|
||||
{
|
||||
WarningInFunction
|
||||
<< "Did not find pp point near " << featPt
|
||||
<< endl;
|
||||
nWarn++;
|
||||
if (nWarn == 100)
|
||||
{
|
||||
WarningInFunction
|
||||
<< "Reached warning limit " << nWarn
|
||||
<< ". Suppressing further warnings." << endl;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user