diff --git a/applications/utilities/surface/surfaceCheck/surfaceCheck.C b/applications/utilities/surface/surfaceCheck/surfaceCheck.C index 85593d457f774d3bdabd35375fac9f339ee129d3..be220dfa2e090516fb187e7ed9668bafd97752eb 100644 --- a/applications/utilities/surface/surfaceCheck/surfaceCheck.C +++ b/applications/utilities/surface/surfaceCheck/surfaceCheck.C @@ -396,13 +396,17 @@ int main(int argc, char *argv[]) problemFaces.append(faceI); } } - OFstream str("badFaces"); - Info<< "Dumping bad quality faces to " << str.name() << endl - << "Paste this into the input for surfaceSubset" << nl - << nl << endl; + if (!problemFaces.empty()) + { + OFstream str("badFaces"); + + Info<< "Dumping bad quality faces to " << str.name() << endl + << "Paste this into the input for surfaceSubset" << nl + << nl << endl; - str << problemFaces; + str << problemFaces; + } } } diff --git a/src/OpenFOAM/meshes/primitiveShapes/tetrahedron/tetrahedronI.H b/src/OpenFOAM/meshes/primitiveShapes/tetrahedron/tetrahedronI.H index 24a39c214f57507d016ddbe6801c73f5aaafb6b6..c015c63db2ebd46daa6ca39b7797685085a8c543 100644 --- a/src/OpenFOAM/meshes/primitiveShapes/tetrahedron/tetrahedronI.H +++ b/src/OpenFOAM/meshes/primitiveShapes/tetrahedron/tetrahedronI.H @@ -156,10 +156,7 @@ inline Point tetrahedron<Point, PointRef>::circumCentre() const if (Foam::mag(denom) < ROOTVSMALL) { - WarningIn("Point tetrahedron<Point, PointRef>::circumCentre() const") - << "Degenerate tetrahedron:" << nl << *this << nl - <<"Returning centre instead of circumCentre." - << endl; + // Degenerate tetrahedron, returning centre instead of circumCentre. return centre(); } @@ -186,11 +183,7 @@ inline scalar tetrahedron<Point, PointRef>::circumRadius() const if (Foam::mag(denom) < ROOTVSMALL) { - //WarningIn("Point tetrahedron<Point, PointRef>::circumCentre() const") - // << "Degenerate tetrahedron:" << nl << *this << nl - // << "Returning GREAT for circumRadius." - // << endl; - + // Degenerate tetrahedron, returning GREAT for circumRadius. return GREAT; } @@ -269,16 +262,7 @@ scalar tetrahedron<Point, PointRef>::barycentric if (Foam::mag(detT) < SMALL) { - WarningIn - ( - "List<scalar> tetrahedron<Point, PointRef>::barycentric" - "(" - "const point& pt" - ") const" - ) - << "Degenerate tetrahedron:" << nl << *this << nl - << "Returning 1/4 barycentric coordinates." - << endl; + // Degenerate tetrahedron, returning 1/4 barycentric coordinates. bary = List<scalar>(4, 0.25); diff --git a/src/OpenFOAM/meshes/primitiveShapes/triangle/triangleI.H b/src/OpenFOAM/meshes/primitiveShapes/triangle/triangleI.H index b99ba990cd7eed7e31a4cbb235a39bd8445bd890..1145e403a606c3b56803b2baa872a8dae7e22860 100644 --- a/src/OpenFOAM/meshes/primitiveShapes/triangle/triangleI.H +++ b/src/OpenFOAM/meshes/primitiveShapes/triangle/triangleI.H @@ -121,10 +121,7 @@ inline Point triangle<Point, PointRef>::circumCentre() const if (Foam::mag(c) < ROOTVSMALL) { - WarningIn("Point triangle<Point, PointRef>::circumCentre() const") - << "Degenerate triangle:" << nl << *this << nl - << "Returning centre instead of circumCentre." - << endl; + // Degenerate triangle, returning centre instead of circumCentre. return centre(); } @@ -147,10 +144,7 @@ inline scalar triangle<Point, PointRef>::circumRadius() const if (Foam::mag(denom) < VSMALL) { - WarningIn("scalar triangle<Point, PointRef>::circumRadius() const") - << "Degenerate triangle:" << nl << *this << nl - << "Returning GREAT for circumRadius." - << endl; + // Degenerate triangle, returning GREAT for circumRadius. return GREAT; } @@ -263,16 +257,7 @@ scalar triangle<Point, PointRef>::barycentric if (Foam::mag(denom) < SMALL) { - WarningIn - ( - "List<scalar> triangle<Point, PointRef>::barycentric" - "(" - "const point& pt" - ") const" - ) - << "Degenerate triangle:" << nl << *this << nl - << "Returning 1/3 barycentric coordinates." - << endl; + // Degenerate triangle, returning 1/3 barycentric coordinates. bary = List<scalar>(3, 1.0/3.0); @@ -537,20 +522,7 @@ pointHit triangle<Point, PointRef>::nearestPointClassify { if ((d1 - d3) < ROOTVSMALL) { - WarningIn - ( - "pointHit triangle<Point, PointRef>::nearestPointClassify" - "(" - "const point& p," - "label& nearType," - "label& nearLabel" - ") const" - ) - << "Degenerate triangle:" << nl << *this << nl - << "d1, d3: " << d1 << ", " << d3 << endl; - - // For d1 = d3, a_ and b_ are likely coincident. - + // Degenerate triangle, for d1 = d3, a_ and b_ are likely coincident nearType = POINT; nearLabel = 0; return pointHit(false, a_, Foam::mag(a_ - p), true); @@ -586,20 +558,7 @@ pointHit triangle<Point, PointRef>::nearestPointClassify { if ((d2 - d6) < ROOTVSMALL) { - WarningIn - ( - "pointHit triangle<Point, PointRef>::nearestPointClassify" - "(" - "const point& p," - "label& nearType," - "label& nearLabel" - ") const" - ) - << "Degenerate triangle:" << nl << *this << nl - << "d2, d6: " << d2 << ", " << d6 << endl; - - // For d2 = d6, a_ and c_ are likely coincident. - + // Degenerate triangle, for d2 = d6, a_ and c_ are likely coincident nearType = POINT; nearLabel = 0; return pointHit(false, a_, Foam::mag(a_ - p), true); @@ -621,21 +580,8 @@ pointHit triangle<Point, PointRef>::nearestPointClassify { if (((d4 - d3) + (d5 - d6)) < ROOTVSMALL) { - WarningIn - ( - "pointHit triangle<Point, PointRef>::nearestPointClassify" - "(" - "const point& p," - "label& nearType," - "label& nearLabel" - ") const" - ) - << "Degenerate triangle:" << nl << *this << nl - << "(d4 - d3), (d6 - d5): " << (d4 - d3) << ", " << (d6 - d5) - << endl; - - // For (d4 - d3) = (d6 - d5), b_ and c_ are likely coincident. - + // Degenerate triangle, for (d4 - d3) = (d6 - d5), b_ and c_ are + // likely coincident nearType = POINT; nearLabel = 1; return pointHit(false, b_, Foam::mag(b_ - p), true); @@ -655,19 +601,8 @@ pointHit triangle<Point, PointRef>::nearestPointClassify if ((va + vb + vc) < ROOTVSMALL) { - WarningIn - ( - "pointHit triangle<Point, PointRef>::nearestPointClassify" - "(" - "const point& p," - "label& nearType," - "label& nearLabel" - ") const" - ) - << "Degenerate triangle:" << nl << *this << nl - << "va, vb, vc: " << va << ", " << vb << ", " << vc - << endl; - + // Degenerate triangle, return the centre because no edge or points are + // closest point nearPt = centre(); nearType = NONE, nearLabel = -1; diff --git a/src/lagrangian/basic/Particle/ParticleI.H b/src/lagrangian/basic/Particle/ParticleI.H index cf135b3229ac09589e3cedd219acc436047952fb..e39931adaaabc6a1c992b3d7ffceb4e382b5df1c 100644 --- a/src/lagrangian/basic/Particle/ParticleI.H +++ b/src/lagrangian/basic/Particle/ParticleI.H @@ -104,7 +104,7 @@ inline Foam::scalar Foam::Particle<ParticleType>::tetLambda if (mag(lambdaNumerator) < SMALL) { // Track starts on the face, and is potentially - // parallel to it. +-SMALL)/+-SMALL is not a good + // parallel to it. +-SMALL/+-SMALL is not a good // comparison, return 0.0, in anticipation of tet // centre correction. diff --git a/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.C b/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.C index e14b11200bbdb7bbaf318b63e6916a888c34f11f..5388f8a2a0e3a4e8f3daf7874c39a6075b545018 100644 --- a/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.C +++ b/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.C @@ -51,7 +51,7 @@ Foam::scalar Foam::streamLineParticle::calcSubCycleDeltaT scalar fraction = testParticle.trackToFace(position()+dt*U, td); td.keepParticle = oldKeepParticle; td.switchProcessor = oldSwitchProcessor; - // Adapt the dt to subdivide the trajectory into 4 substeps. + // Adapt the dt to subdivide the trajectory into substeps. return dt*fraction/td.nSubCycle_; }