From 55f5ade6e96a6576964531b98607b3aa58df435c Mon Sep 17 00:00:00 2001 From: Henrik Rusche Date: Fri, 15 Jun 2012 00:34:42 +0200 Subject: [PATCH] Added debug to cell to quench Warnings --- src/OpenFOAM/meshes/meshShapes/cell/cell.C | 2 ++ src/OpenFOAM/meshes/meshShapes/cell/cell.H | 2 ++ .../meshes/meshShapes/cell/oppositeCellFace.C | 15 +++++++++------ 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/OpenFOAM/meshes/meshShapes/cell/cell.C b/src/OpenFOAM/meshes/meshShapes/cell/cell.C index 894651775..7527e6dde 100644 --- a/src/OpenFOAM/meshes/meshShapes/cell/cell.C +++ b/src/OpenFOAM/meshes/meshShapes/cell/cell.C @@ -31,6 +31,8 @@ License const char* const Foam::cell::typeName = "cell"; +int Foam::cell::debug(debug::debugSwitch("cell", 0)); + // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // Foam::labelList Foam::cell::labels(const unallocFaceList& f) const diff --git a/src/OpenFOAM/meshes/meshShapes/cell/cell.H b/src/OpenFOAM/meshes/meshShapes/cell/cell.H index e8feedc9f..867e6c187 100644 --- a/src/OpenFOAM/meshes/meshShapes/cell/cell.H +++ b/src/OpenFOAM/meshes/meshShapes/cell/cell.H @@ -66,6 +66,8 @@ public: static const char* const typeName; + //- Debug switch + static int debug; // Constructors diff --git a/src/OpenFOAM/meshes/meshShapes/cell/oppositeCellFace.C b/src/OpenFOAM/meshes/meshShapes/cell/oppositeCellFace.C index 5b6a23728..405177658 100644 --- a/src/OpenFOAM/meshes/meshShapes/cell/oppositeCellFace.C +++ b/src/OpenFOAM/meshes/meshShapes/cell/oppositeCellFace.C @@ -97,12 +97,15 @@ Foam::label Foam::cell::opposingFaceLabel } else { - // There has already been an opposite face. - // Non-prismatic cell - Info<< "Multiple faces not sharing vertex: " - << oppositeFaceLabel << " and " - << curFaceLabels[faceI] << endl; - return -1; + if(debug) + { + // There has already been an opposite face. + // Non-prismatic cell + Info<< "Multiple faces not sharing vertex: " + << oppositeFaceLabel << " and " + << curFaceLabels[faceI] << endl; + return -1; + } } } }