diff --git a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snapParameters/snapParameters.H b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snapParameters/snapParameters.H index c81b889999c7cde166d5fe1bd0278b37574bfcaf..18aca4d8c790756ed2b92b1fe3697af26195f2d8 100644 --- a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snapParameters/snapParameters.H +++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snapParameters/snapParameters.H @@ -233,10 +233,6 @@ public: { return minAreaRatio_; } - - - - }; diff --git a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriver.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriver.C index e25b4185fa67c570635c3bfb157e2ef8f46353af..a00e7804014ca33059eaa883e19d22dd20972b4b 100644 --- a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriver.C +++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriver.C @@ -2015,12 +2015,23 @@ Foam::vectorField Foam::snappySnapDriver::calcNearestSurface { if (snapSurf[pointi] == -1) { - WarningInFunction - << "For point:" << pointi - << " coordinate:" << localPoints[pointi] - << " did not find any surface within:" - << minSnapDist[pointi] - << " metre." << endl; + static label nWarn = 0; + + if (nWarn < 100) + { + WarningInFunction + << "For point:" << pointi + << " coordinate:" << localPoints[pointi] + << " did not find any surface within:" + << minSnapDist[pointi] << " metre." << endl; + nWarn++; + if (nWarn == 100) + { + WarningInFunction + << "Reached warning limit " << nWarn + << ". Suppressing further warnings." << endl; + } + } } } diff --git a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriverFeature.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriverFeature.C index e7f391fdc4ede11800565a824c1f0ef3f0b96959..7f7a3ac556a71fd8e2f5cab95f3eed5b0194afca 100644 --- a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriverFeature.C +++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriverFeature.C @@ -328,9 +328,21 @@ void Foam::snappySnapDriver::calcNearestFace } else { - WarningInFunction - << "Did not find surface near face centre " << fc[hiti] + 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; + } + } } } } @@ -392,9 +404,22 @@ void Foam::snappySnapDriver::calcNearestFace } else { - WarningInFunction - << "Did not find surface near face centre " << fc[hiti] - << endl; + 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; + } + } } } @@ -3283,9 +3308,22 @@ void Foam::snappySnapDriver::reverseAttractMeshPoints } else { - WarningInFunction - << "Did not find pp point near " << featPt - << endl; + 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; + } + } + } } }