From dbbacfbefd82546a57db434a4672a16281e8ee1e Mon Sep 17 00:00:00 2001 From: graham Date: Tue, 21 Dec 2010 15:20:00 +0000 Subject: [PATCH] ENH: Don't write badFaces when there are none. --- .../utilities/surface/surfaceCheck/surfaceCheck.C | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/applications/utilities/surface/surfaceCheck/surfaceCheck.C b/applications/utilities/surface/surfaceCheck/surfaceCheck.C index 85593d457f..be220dfa2e 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"); - str << problemFaces; + Info<< "Dumping bad quality faces to " << str.name() << endl + << "Paste this into the input for surfaceSubset" << nl + << nl << endl; + + str << problemFaces; + } } }