diff --git a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/laserDTRM/laserDTRM.C b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/laserDTRM/laserDTRM.C index 0da121430a01cfa088545524bfa78d2c816569a9..db0cebfc4f08eb207008f14ae9850bf6a8359667 100644 --- a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/laserDTRM/laserDTRM.C +++ b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/laserDTRM/laserDTRM.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2017-2019 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -175,11 +175,9 @@ void Foam::radiation::laserDTRM::initialise() const vector lPosition = focalLaserPosition_->value(t); const vector lDir = normalised(laserDirection_->value(t)); - if (debug) - { - Info << "Laser position : " << lPosition << endl; - Info << "Laser direction : " << lDir << endl; - } + DebugInfo + << "Laser position : " << lPosition << nl + << "Laser direction : " << lDir << endl; // Find a vector on the area plane. Normal to laser direction vector rArea = Zero; diff --git a/src/OpenFOAM/meshes/polyMesh/polyMesh.C b/src/OpenFOAM/meshes/polyMesh/polyMesh.C index 1be83502c8aea17c7de09ecfaee8ed85537e0286..4e1d725c897b590ef4687328dae698ac038fc56f 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMesh.C @@ -1091,8 +1091,7 @@ const Foam::pointField& Foam::polyMesh::oldPoints() const { if (debug) { - WarningInFunction - << endl; + WarningInFunction << endl; } oldPointsPtr_.reset(new pointField(points_)); @@ -1108,12 +1107,9 @@ Foam::tmp<Foam::scalarField> Foam::polyMesh::movePoints const pointField& newPoints ) { - if (debug) - { - InfoInFunction - << "Moving points for time " << time().value() - << " index " << time().timeIndex() << endl; - } + DebugInFunction + << "Moving points for time " << time().value() + << " index " << time().timeIndex() << endl; if (newPoints.size() != points_.size()) { diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshCheck.C b/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshCheck.C index 377a969df8c2e3cd22685156ee37f3b08e8ba0e3..db054a267fab4d2c267307acb50683a92f44aae3 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshCheck.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshCheck.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2012-2016 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -42,10 +42,7 @@ bool Foam::polyMesh::checkFaceOrthogonality labelHashSet* setPtr ) const { - if (debug) - { - InfoInFunction << "Checking mesh non-orthogonality" << endl; - } + DebugInFunction << "Checking mesh non-orthogonality" << endl; const labelList& own = faceOwner(); const labelList& nei = faceNeighbour(); @@ -179,10 +176,7 @@ bool Foam::polyMesh::checkFaceSkewness labelHashSet* setPtr ) const { - if (debug) - { - InfoInFunction << "Checking face skewness" << endl; - } + DebugInFunction << "Checking face skewness" << endl; const labelList& own = faceOwner(); const labelList& nei = faceNeighbour(); @@ -283,10 +277,7 @@ bool Foam::polyMesh::checkEdgeAlignment // Empty direction info is passed in as a vector of labels (synchronised) // which are 1 if the direction is non-empty, 0 if it is. - if (debug) - { - InfoInFunction << "Checking edge alignment" << endl; - } + DebugInFunction << "Checking edge alignment" << endl; label nDirs = 0; for (direction cmpt=0; cmpt<vector::nComponents; cmpt++) @@ -413,10 +404,7 @@ bool Foam::polyMesh::checkCellDeterminant { const scalar warnDet = 1e-3; - if (debug) - { - InfoInFunction << "Checking for under-determined cells" << endl; - } + DebugInFunction << "Checking for under-determined cells" << endl; tmp<scalarField> tcellDeterminant = primitiveMeshTools::cellDeterminant ( @@ -491,10 +479,7 @@ bool Foam::polyMesh::checkFaceWeight labelHashSet* setPtr ) const { - if (debug) - { - InfoInFunction << "Checking for low face interpolation weights" << endl; - } + DebugInFunction << "Checking for low face interpolation weights" << endl; tmp<scalarField> tfaceWght = polyMeshTools::faceWeights ( @@ -580,10 +565,7 @@ bool Foam::polyMesh::checkVolRatio labelHashSet* setPtr ) const { - if (debug) - { - InfoInFunction << "Checking for volume ratio < " << minRatio << endl; - } + DebugInFunction << "Checking for volume ratio < " << minRatio << endl; tmp<scalarField> tvolRatio = polyMeshTools::volRatio(*this, cellVols); scalarField& volRatio = tvolRatio.ref(); diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshClear.C b/src/OpenFOAM/meshes/polyMesh/polyMeshClear.C index 6c247e03c47d578fa7986eb44ec73d4915700b78..123a95741a90d219f891f79fc050304172c853a0 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshClear.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshClear.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -37,10 +38,7 @@ License void Foam::polyMesh::removeBoundary() { - if (debug) - { - InfoInFunction << "Removing boundary patches." << endl; - } + DebugInFunction << "Removing boundary patches." << endl; // Remove the point zones boundary_.clear(); @@ -54,10 +52,7 @@ void Foam::polyMesh::removeBoundary() void Foam::polyMesh::clearGeom() { - if (debug) - { - InfoInFunction << "Clearing geometric data" << endl; - } + DebugInFunction << "Clearing geometric data" << endl; // Clear all geometric mesh objects meshObject::clear<pointMesh, GeometricMeshObject>(*this); @@ -82,12 +77,10 @@ void Foam::polyMesh::updateGeom autoPtr<labelIOList>& newTetBasePtIsPtr ) { - if (debug) - { - InfoInFunction << "Updating geometric data with newPoints:" - << newPoints.size() << " newTetBasePtIs:" - << newTetBasePtIsPtr.valid() << endl; - } + DebugInFunction + << "Updating geometric data with newPoints:" + << newPoints.size() << " newTetBasePtIs:" + << newTetBasePtIsPtr.valid() << endl; if (points_.size() != 0 && points_.size() != newPoints.size()) { @@ -158,11 +151,8 @@ void Foam::polyMesh::updateGeom void Foam::polyMesh::clearAddressing(const bool isMeshUpdate) { - if (debug) - { - InfoInFunction - << "Clearing topology isMeshUpdate:" << isMeshUpdate << endl; - } + DebugInFunction + << "Clearing topology isMeshUpdate:" << isMeshUpdate << endl; if (isMeshUpdate) { @@ -238,10 +228,7 @@ void Foam::polyMesh::clearOut() void Foam::polyMesh::clearTetBasePtIs() { - if (debug) - { - InfoInFunction << "Clearing tet base points" << endl; - } + DebugInFunction << "Clearing tet base points" << endl; tetBasePtIsPtr_.clear(); } @@ -249,10 +236,7 @@ void Foam::polyMesh::clearTetBasePtIs() void Foam::polyMesh::clearCellTree() { - if (debug) - { - InfoInFunction << "Clearing cell tree" << endl; - } + DebugInFunction << "Clearing cell tree" << endl; cellTreePtr_.clear(); } diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshFromShapeMesh.C b/src/OpenFOAM/meshes/polyMesh/polyMeshFromShapeMesh.C index 6a037d8e3899ffa8c588d5f14796957e57a1e1ab..178aa18718808d92db94dc26dcadcfcc69af1b1e 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshFromShapeMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshFromShapeMesh.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2018 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -526,10 +526,8 @@ Foam::polyMesh::polyMesh curMotionTimeIndex_(time().timeIndex()), oldPointsPtr_(nullptr) { - if (debug) - { - Info<<"Constructing polyMesh from cell and boundary shapes." << endl; - } + DebugInfo + << "Constructing polyMesh from cell and boundary shapes." << endl; // Calculate faces and cells labelList patchSizes; @@ -808,10 +806,8 @@ Foam::polyMesh::polyMesh curMotionTimeIndex_(time().timeIndex()), oldPointsPtr_(nullptr) { - if (debug) - { - Info<<"Constructing polyMesh from cell and boundary shapes." << endl; - } + DebugInfo + << "Constructing polyMesh from cell and boundary shapes." << endl; // Calculate faces and cells labelList patchSizes; @@ -940,7 +936,7 @@ Foam::polyMesh::polyMesh { if (checkMesh()) { - Info << "Mesh OK" << endl; + Info<< "Mesh OK" << endl; } } } diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshIO.C b/src/OpenFOAM/meshes/polyMesh/polyMeshIO.C index cf26d49c0aa513e55a7ac1e4c58f429c6088a588..0789ee7accf14828bb219e6b1f6f2de9ab1194b1 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshIO.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshIO.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2015-2019 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -29,6 +29,7 @@ License #include "polyMesh.H" #include "Time.H" #include "cellIOList.H" + // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // void Foam::polyMesh::setInstance @@ -37,10 +38,7 @@ void Foam::polyMesh::setInstance const IOobject::writeOption wOpt ) { - if (debug) - { - InfoInFunction << "Resetting file instance to " << inst << endl; - } + DebugInFunction << "Resetting file instance to " << inst << endl; points_.writeOpt() = wOpt; points_.instance() = inst; @@ -76,10 +74,7 @@ void Foam::polyMesh::setInstance Foam::polyMesh::readUpdateState Foam::polyMesh::readUpdate() { - if (debug) - { - InfoInFunction << "Updating mesh based on saved data." << endl; - } + DebugInFunction << "Updating mesh based on saved data." << endl; // Find the point and cell instance fileName pointsInst(time().findInstance(meshDir(), "points")); diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshInitMesh.C b/src/OpenFOAM/meshes/polyMesh/polyMeshInitMesh.C index 714042f976d37dba981b3670ddb44d938843b576..ab175969776ef1bcebceb6ee3585bb79beb4c138 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshInitMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshInitMesh.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -32,10 +32,7 @@ License void Foam::polyMesh::initMesh() { - if (debug) - { - InfoInFunction << "initialising primitiveMesh" << endl; - } + DebugInFunction << "initialising primitiveMesh" << endl; // For backward compatibility check if the neighbour array is the same // length as the owner and shrink to remove the -1s padding @@ -111,10 +108,7 @@ void Foam::polyMesh::initMesh() void Foam::polyMesh::initMesh(cellList& c) { - if (debug) - { - InfoInFunction << "Calculating owner-neighbour arrays" << endl; - } + DebugInFunction << "Calculating owner-neighbour arrays" << endl; owner_.setSize(faces_.size(), -1); neighbour_.setSize(faces_.size(), -1); diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshUpdate.C b/src/OpenFOAM/meshes/polyMesh/polyMeshUpdate.C index a890621338e83c819932e6cff4432a5726c708ee..80232d4498e081d7e3098538278b994bf3426bc5 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshUpdate.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshUpdate.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -40,12 +41,8 @@ Description void Foam::polyMesh::updateMesh(const mapPolyMesh& mpm) { - if (debug) - { - InfoInFunction - << "Updating addressing and (optional) pointMesh/pointFields" - << endl; - } + DebugInFunction + << "Updating addressing and (optional) pointMesh/pointFields" << endl; // Update boundaryMesh (note that patches themselves already ok) boundary_.updateMesh(); diff --git a/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.C b/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.C index 2dd4a94f66be1457fe27ebb3c63eb5ecf26d99b4..9cd0fce6d95b9504d9dbf19618df619d5f4f5282 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2016-2018 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -493,12 +493,9 @@ Foam::label Foam::ZoneMesh<ZoneType, MeshType>::findZoneID } // Zone not found - if (debug) - { - InfoInFunction - << "Zone named " << zoneName << " not found. " - << "List of available zone names: " << names() << endl; - } + DebugInFunction + << "Zone named " << zoneName << " not found. " + << "List of available zone names: " << names() << endl; if (disallowGenericZones != 0) { diff --git a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C index 497c96cc2a1973a1e0f7a050c7580c181992c16d..a155d66278ff68b628d9894081b649292f9b28ac 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2017-2018 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -69,10 +69,7 @@ void Foam::faceZone::setFlipMap(const bool val) void Foam::faceZone::calcFaceZonePatch() const { - if (debug) - { - InfoInFunction << "Calculating primitive patch" << endl; - } + DebugInFunction << "Calculating primitive patch" << endl; if (patchPtr_) { @@ -107,19 +104,13 @@ void Foam::faceZone::calcFaceZonePatch() const } } - if (debug) - { - InfoInFunction << "Finished calculating primitive patch" << endl; - } + DebugInfo << "Finished calculating primitive patch" << endl; } void Foam::faceZone::calcCellLayers() const { - if (debug) - { - InfoInFunction << "Calculating master cells" << endl; - } + DebugInFunction << "Calculating master cells" << endl; // It is an error to attempt to recalculate edgeCells // if the pointer is already set diff --git a/src/OpenFOAM/meshes/polyMesh/zones/zone/zone.C b/src/OpenFOAM/meshes/polyMesh/zones/zone/zone.C index 93d6f6befeca8f0a2916300f61d8705410d85c86..20167b5983c3aa52400fefc0207ac836cb326e38 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/zone/zone.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/zone/zone.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2017 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -54,10 +54,7 @@ const Foam::Map<Foam::label>& Foam::zone::lookupMap() const void Foam::zone::calcLookupMap() const { - if (debug) - { - InfoInFunction << "Calculating lookup map" << endl; - } + DebugInFunction << "Calculating lookup map" << endl; if (lookupMapPtr_) { @@ -76,10 +73,7 @@ void Foam::zone::calcLookupMap() const lm.insert(addr[i], i); } - if (debug) - { - InfoInFunction << "Finished calculating lookup map" << endl; - } + DebugInfo << "Finished calculating lookup map" << endl; } diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheck.C b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheck.C index 4f4a1445f37c719769a6bf878fd90283dfea6751..96f7e48bda9ba3d303408fe1fa7f85f718ee0f3f 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheck.C +++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheck.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -52,11 +52,7 @@ bool Foam::primitiveMesh::checkClosedBoundary const bitSet& internalOrCoupledFaces ) const { - if (debug) - { - InfoInFunction - << "Checking whether the boundary is closed" << endl; - } + DebugInFunction << "Checking if boundary is closed" << endl; // Loop through all boundary faces and sum up the face area vectors. // For a closed boundary, this should be zero in all vector components @@ -110,11 +106,7 @@ bool Foam::primitiveMesh::checkClosedCells const Vector<label>& meshD ) const { - if (debug) - { - InfoInFunction - << "Checking whether cells are closed" << endl; - } + DebugInFunction << "Checking if cells are closed" << endl; // Check that all cells labels are valid const cellList& c = cells(); @@ -240,10 +232,7 @@ bool Foam::primitiveMesh::checkFaceAreas labelHashSet* setPtr ) const { - if (debug) - { - InfoInFunction << "Checking face area magnitudes" << endl; - } + DebugInFunction << "Checking face area magnitudes" << endl; const scalarField magFaceAreas(mag(faceAreas)); @@ -316,10 +305,7 @@ bool Foam::primitiveMesh::checkCellVolumes labelHashSet* setPtr ) const { - if (debug) - { - InfoInFunction << "Checking cell volumes" << endl; - } + DebugInFunction << "Checking cell volumes" << endl; scalar minVolume = GREAT; scalar maxVolume = -GREAT; @@ -384,11 +370,7 @@ bool Foam::primitiveMesh::checkFaceOrthogonality labelHashSet* setPtr ) const { - if (debug) - { - InfoInFunction << "Checking mesh non-orthogonality" << endl; - } - + DebugInFunction << "Checking mesh non-orthogonality" << endl; tmp<scalarField> tortho = primitiveMeshTools::faceOrthogonality ( @@ -494,10 +476,7 @@ bool Foam::primitiveMesh::checkFacePyramids labelHashSet* setPtr ) const { - if (debug) - { - InfoInFunction << "Checking face orientation" << endl; - } + DebugInFunction << "Checking face orientation" << endl; const labelList& own = faceOwner(); const labelList& nei = faceNeighbour(); @@ -594,10 +573,7 @@ bool Foam::primitiveMesh::checkFaceSkewness labelHashSet* setPtr ) const { - if (debug) - { - InfoInFunction << "Checking face skewness" << endl; - } + DebugInFunction << "Checking face skewness" << endl; // Warn if the skew correction vector is more than skewWarning times // larger than the face area vector @@ -664,10 +640,7 @@ bool Foam::primitiveMesh::checkFaceAngles labelHashSet* setPtr ) const { - if (debug) - { - InfoInFunction << "Checking face angles" << endl; - } + DebugInFunction << "Checking face angles" << endl; if (maxDeg < -SMALL || maxDeg > 180+SMALL) { @@ -743,15 +716,12 @@ bool Foam::primitiveMesh::checkFaceFlatness labelHashSet* setPtr ) const { - if (debug) - { - InfoInFunction << "Checking face flatness" << endl; - } + DebugInFunction << "Checking face flatness" << endl; if (warnFlatness < 0 || warnFlatness > 1) { FatalErrorInFunction - << "warnFlatness should be [0..1] but is now " << warnFlatness + << "warnFlatness should be [0..1] but is " << warnFlatness << exit(FatalError); } @@ -844,10 +814,7 @@ bool Foam::primitiveMesh::checkConcaveCells labelHashSet* setPtr ) const { - if (debug) - { - InfoInFunction << "Checking for concave cells" << endl; - } + DebugInFunction << "Checking for concave cells" << endl; const cellList& c = cells(); const labelList& fOwner = faceOwner(); @@ -951,10 +918,7 @@ bool Foam::primitiveMesh::checkUpperTriangular labelHashSet* setPtr ) const { - if (debug) - { - InfoInFunction << "Checking face ordering" << endl; - } + DebugInFunction << "Checking face ordering" << endl; // Check whether internal faces are ordered in the upper triangular order const labelList& own = faceOwner(); @@ -1112,10 +1076,7 @@ bool Foam::primitiveMesh::checkCellsZipUp labelHashSet* setPtr ) const { - if (debug) - { - InfoInFunction << "Checking topological cell openness" << endl; - } + DebugInFunction << "Checking topological cell openness" << endl; label nOpenCells = 0; @@ -1208,10 +1169,7 @@ bool Foam::primitiveMesh::checkFaceVertices labelHashSet* setPtr ) const { - if (debug) - { - InfoInFunction << "Checking face vertices" << endl; - } + DebugInFunction << "Checking face vertices" << endl; // Check that all vertex labels are valid const faceList& f = faces(); @@ -1279,10 +1237,7 @@ bool Foam::primitiveMesh::checkPoints labelHashSet* setPtr ) const { - if (debug) - { - InfoInFunction << "Checking points" << endl; - } + DebugInFunction << "Checking points" << endl; label nFaceErrors = 0; label nCellErrors = 0; @@ -1551,10 +1506,7 @@ bool Foam::primitiveMesh::checkFaceFaces labelHashSet* setPtr ) const { - if (debug) - { - InfoInFunction << "Checking face-face connectivity" << endl; - } + DebugInFunction << "Checking face-face connectivity" << endl; const labelListList& pf = pointFaces(); @@ -1872,10 +1824,7 @@ bool Foam::primitiveMesh::checkGeometry(const bool report) const bool Foam::primitiveMesh::checkMesh(const bool report) const { - if (debug) - { - InfoInFunction << "Checking primitiveMesh" << endl; - } + DebugInFunction << "Checking primitiveMesh" << endl; label nFailedChecks = checkTopology(report) + checkGeometry(report); diff --git a/src/finiteArea/faMesh/faMeshDemandDrivenData.C b/src/finiteArea/faMesh/faMeshDemandDrivenData.C index 1c4f775c15746db6de3d200cf803ea934aad6ba3..8e9a50dd09e583e63036076daa45675433e8e865 100644 --- a/src/finiteArea/faMesh/faMeshDemandDrivenData.C +++ b/src/finiteArea/faMesh/faMeshDemandDrivenData.C @@ -1229,10 +1229,8 @@ void Foam::faMesh::calcPointAreaNormalsByQuadricsFit() const if (curPoints.size() < 5) { - if (debug) - { - Info << "WARNING: Extending point set for fitting." << endl; - } + DebugInfo + << "WARNING: Extending point set for fitting." << endl; labelHashSet faceSet(pointFaces[curPoint]); labelList curFaces(faceSet.toc()); diff --git a/src/finiteArea/faMesh/faMeshUpdate.C b/src/finiteArea/faMesh/faMeshUpdate.C index 4da23e654d3c7dc6a700d35ff6110066888de494..cb518d77eff128dcbcb63f70f7c7feb247c4393a 100644 --- a/src/finiteArea/faMesh/faMeshUpdate.C +++ b/src/finiteArea/faMesh/faMeshUpdate.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016-2017 Wikki Ltd + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -36,11 +37,7 @@ License void Foam::faMesh::updateMesh(const mapPolyMesh& mpm) { - if (debug) - { - Info<< "bool faMesh::updateMesh(const mapPolyMesh& mpm) : " - << "Updating mesh" << endl; - } + DebugInFunction << "Updating mesh" << endl; // if (!mpm.morphing()) // { @@ -182,11 +179,7 @@ void Foam::faMesh::mapOldAreas(const faMeshMapper& mapper) const { if (S0Ptr_) { - if (debug) - { - InfoIn("void faMesh::mapOldAreas(const faMeshMapper& mapper)") - << "Mapping old face areas." << endl; - } + DebugInFunction << "Mapping old face areas." << endl; scalarField& S0 = *S0Ptr_; @@ -211,11 +204,7 @@ void Foam::faMesh::mapOldAreas(const faMeshMapper& mapper) const if (S00Ptr_) { - if (debug) - { - InfoIn("void faMesh::mapOldAreas(const faMeshMapper& mapper)") - << "Mapping old-old face areas." << endl; - } + DebugInFunction << "Mapping old-old face areas." << endl; scalarField& S00 = *S00Ptr_; diff --git a/src/finiteVolume/cfdTools/general/fvOptions/fvOptions.C b/src/finiteVolume/cfdTools/general/fvOptions/fvOptions.C index 452ed2c737d5b731f35e2d3a773ff6e5100c1275..312fbbe9ca10ff99899221af0e54d45ea0797ef1 100644 --- a/src/finiteVolume/cfdTools/general/fvOptions/fvOptions.C +++ b/src/finiteVolume/cfdTools/general/fvOptions/fvOptions.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -112,12 +112,9 @@ Foam::fv::options& Foam::fv::options::New(const fvMesh& mesh) } else { - if (debug) - { - InfoInFunction - << "Constructing " << typeName - << " for region " << mesh.name() << endl; - } + DebugInFunction + << "Constructing " << typeName + << " for region " << mesh.name() << nl; options* objectPtr = new options(mesh); regIOobject::store(objectPtr); diff --git a/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C index 2ae9499d698e4df7dfe50c5fb98653eb91beace4..d2b174ef6c36ece298a030c8a026eda383fbfa6d 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2015 OpenFOAM Foundation - Copyright (C) 2016-2019 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -204,12 +204,9 @@ Foam::turbulentDFSEMInletFvPatchVectorField::patchMapper() const pointField samplePoints((IFstream(samplePointsFile)())); - if (debug) - { - InfoInFunction - << " Read " << samplePoints.size() << " sample points from " - << samplePointsFile << endl; - } + DebugInFunction + << " Read " << samplePoints.size() << " sample points from " + << samplePointsFile << endl; // tbd: run-time selection diff --git a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchFieldNew.C b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchFieldNew.C index 872587c5fc711a42ce5563d5163e015266d99177..d1331e288c14390d4450bf393cc89750c9e2b199 100644 --- a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchFieldNew.C +++ b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchFieldNew.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -37,13 +37,9 @@ Foam::tmp<Foam::fvPatchField<Type>> Foam::fvPatchField<Type>::New const DimensionedField<Type, volMesh>& iF ) { - if (debug) - { - InfoInFunction - << "patchFieldType = " << patchFieldType - << " : " << p.type() - << endl; - } + DebugInFunction + << "patchFieldType = " << patchFieldType + << " : " << p.type() << nl; auto cstrIter = patchConstructorTablePtr_->cfind(patchFieldType); @@ -109,12 +105,8 @@ Foam::tmp<Foam::fvPatchField<Type>> Foam::fvPatchField<Type>::New { const word patchFieldType(dict.get<word>("type")); - if (debug) - { - InfoInFunction - << "patchFieldType = " << patchFieldType - << endl; - } + DebugInFunction + << "patchFieldType = " << patchFieldType << nl; auto cstrIter = dictionaryConstructorTablePtr_->cfind(patchFieldType); @@ -168,10 +160,8 @@ Foam::tmp<Foam::fvPatchField<Type>> Foam::fvPatchField<Type>::New const fvPatchFieldMapper& pfMapper ) { - if (debug) - { - InfoInFunction << "Constructing fvPatchField<Type>" << endl; - } + DebugInFunction + << "Constructing fvPatchField<Type>" << nl; auto cstrIter = patchMapperConstructorTablePtr_->cfind(ptf.type()); diff --git a/src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresVectors.C b/src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresVectors.C index 76c14c1be17b3061b5c2e4625cff231498540fb0..5aad6991f871b60688b228b7aefcfbb31f2cd599 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresVectors.C +++ b/src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresVectors.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2016 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -54,10 +55,7 @@ Foam::fv::LeastSquaresVectors<Stencil>::~LeastSquaresVectors() template<class Stencil> void Foam::fv::LeastSquaresVectors<Stencil>::calcLeastSquaresVectors() { - if (debug) - { - InfoInFunction << "Calculating least square gradient vectors" << endl; - } + DebugInFunction << "Calculating least square gradient vectors" << nl; const fvMesh& mesh = this->mesh_; const extendedCentredCellToCellStencil& stencil = this->stencil(); @@ -98,11 +96,8 @@ void Foam::fv::LeastSquaresVectors<Stencil>::calcLeastSquaresVectors() } } - if (debug) - { - InfoInFunction - << "Finished calculating least square gradient vectors" << endl; - } + DebugInfo + << "Finished calculating least square gradient vectors" << endl; } diff --git a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/invDistLeastSquaresVectors.C b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/invDistLeastSquaresVectors.C index baef9823d4aa9e70759259f916fc83d24458335f..9ac9e7f45c0ea47188b48c21538e8608d1408b4a 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/invDistLeastSquaresVectors.C +++ b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/invDistLeastSquaresVectors.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2016 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -84,10 +85,7 @@ Foam::leastSquaresVectors::~leastSquaresVectors() void Foam::leastSquaresVectors::calcLeastSquaresVectors() { - if (debug) - { - InfoInFunction << "Calculating least square gradient vectors" << endl; - } + DebugInFunction << "Calculating least square gradient vectors" << nl; const fvMesh& mesh = mesh_; @@ -168,11 +166,7 @@ void Foam::leastSquaresVectors::calcLeastSquaresVectors() } } - if (debug) - { - InfoInFunction - <<"Finished calculating least square gradient vectors" << endl; - } + DebugInfo << "Finished calculating least square gradient vectors" << endl; } diff --git a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresVectors.C b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresVectors.C index 6be92a954a9d3552951b00c813110a021f62aea4..e78c23d2d70e38e5514a06e6e79551eff25a7c70 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresVectors.C +++ b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresVectors.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -84,10 +85,7 @@ Foam::leastSquaresVectors::~leastSquaresVectors() void Foam::leastSquaresVectors::calcLeastSquaresVectors() { - if (debug) - { - InfoInFunction << "Calculating least square gradient vectors" << endl; - } + DebugInFunction << "Calculating least square gradient vectors" << nl; const fvMesh& mesh = mesh_; @@ -207,11 +205,7 @@ void Foam::leastSquaresVectors::calcLeastSquaresVectors() } } - if (debug) - { - InfoInFunction - << "Finished calculating least square gradient vectors" << endl; - } + DebugInfo << "Finished calculating least square gradient vectors" << nl; } diff --git a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/unweightedLeastSquaresVectors.C b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/unweightedLeastSquaresVectors.C index abdd2ee820eac348eafe14359b53dbf580aeb56e..1aa191c4ce52c20dae23863818dbd97ae0d6f20b 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/unweightedLeastSquaresVectors.C +++ b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/unweightedLeastSquaresVectors.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2016 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -84,10 +85,7 @@ Foam::leastSquaresVectors::~leastSquaresVectors() void Foam::leastSquaresVectors::calcLeastSquaresVectors() { - if (debug) - { - InfoInFunction << "Calculating least square gradient vectors" << endl; - } + DebugInFunction << "Calculating least square gradient vectors" << nl; const fvMesh& mesh = mesh_; @@ -164,11 +162,8 @@ void Foam::leastSquaresVectors::calcLeastSquaresVectors() } } - if (debug) - { - InfoInFunction - << "Finished calculating least square gradient vectors" << endl; - } + DebugInfo + << "Finished calculating least square gradient vectors" << endl; } diff --git a/src/finiteVolume/finiteVolume/snGradSchemes/CentredFitSnGrad/CentredFitSnGradData.C b/src/finiteVolume/finiteVolume/snGradSchemes/CentredFitSnGrad/CentredFitSnGradData.C index fa87ed5f0cd5fec68d9e0d44fa27e61ca2648e72..d006dd123d8c9a8a6956aa54b397bc07bce45efa 100644 --- a/src/finiteVolume/finiteVolume/snGradSchemes/CentredFitSnGrad/CentredFitSnGradData.C +++ b/src/finiteVolume/finiteVolume/snGradSchemes/CentredFitSnGrad/CentredFitSnGradData.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2016 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -52,18 +53,12 @@ Foam::CentredFitSnGradData<Polynomial>::CentredFitSnGradData ), coeffs_(mesh.nFaces()) { - if (debug) - { - InfoInFunction - << "Contructing CentredFitSnGradData<Polynomial>" << endl; - } + DebugInFunction + << "Contructing CentredFitSnGradData<Polynomial>" << nl; calcFit(); - if (debug) - { - Info<< " Finished constructing polynomialFit data" << endl; - } + DebugInfo << " Finished constructing polynomialFit data" << endl; } diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C index 1e1b5b626577097734f87818a0875a37c534aa73..5c8cc99d5a7362db7b1213390a225015427c157d 100644 --- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C +++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C @@ -282,11 +282,8 @@ Foam::fvMatrix<Type>::fvMatrix boundaryCoeffs_(psi.mesh().boundary().size()), faceFluxCorrectionPtr_(nullptr) { - if (debug) - { - InfoInFunction - << "Constructing fvMatrix<Type> for field " << psi_.name() << endl; - } + DebugInFunction + << "Constructing fvMatrix<Type> for field " << psi_.name() << endl; // Initialise coupling coefficients forAll(psi.mesh().boundary(), patchi) @@ -334,11 +331,8 @@ Foam::fvMatrix<Type>::fvMatrix(const fvMatrix<Type>& fvm) boundaryCoeffs_(fvm.boundaryCoeffs_), faceFluxCorrectionPtr_(nullptr) { - if (debug) - { - InfoInFunction - << "Copying fvMatrix<Type> for field " << psi_.name() << endl; - } + DebugInFunction + << "Copying fvMatrix<Type> for field " << psi_.name() << endl; if (fvm.faceFluxCorrectionPtr_) { @@ -378,11 +372,8 @@ Foam::fvMatrix<Type>::fvMatrix(const tmp<fvMatrix<Type>>& tfvm) ), faceFluxCorrectionPtr_(nullptr) { - if (debug) - { - InfoInFunction - << "Copying fvMatrix<Type> for field " << psi_.name() << endl; - } + DebugInFunction + << "Copying fvMatrix<Type> for field " << psi_.name() << endl; if (tfvm().faceFluxCorrectionPtr_) { @@ -420,11 +411,8 @@ Foam::fvMatrix<Type>::fvMatrix boundaryCoeffs_(psi.mesh().boundary().size()), faceFluxCorrectionPtr_(nullptr) { - if (debug) - { - InfoInFunction - << "Constructing fvMatrix<Type> for field " << psi_.name() << endl; - } + DebugInFunction + << "Constructing fvMatrix<Type> for field " << psi_.name() << endl; // Initialise coupling coefficients forAll(psi.mesh().boundary(), patchi) @@ -468,11 +456,8 @@ Foam::tmp<Foam::fvMatrix<Type>> Foam::fvMatrix<Type>::clone() const template<class Type> Foam::fvMatrix<Type>::~fvMatrix() { - if (debug) - { - InfoInFunction - << "Destroying fvMatrix<Type> for field " << psi_.name() << endl; - } + DebugInFunction + << "Destroying fvMatrix<Type> for field " << psi_.name() << endl; if (faceFluxCorrectionPtr_) { @@ -579,11 +564,8 @@ void Foam::fvMatrix<Type>::relax(const scalar alpha) return; } - if (debug) - { - InfoInFunction - << "Relaxing " << psi_.name() << " by " << alpha << endl; - } + DebugInFunction + << "Relaxing " << psi_.name() << " by " << alpha << endl; Field<Type>& S = source(); scalarField& D = diag(); diff --git a/src/finiteVolume/fvMesh/fvMesh.C b/src/finiteVolume/fvMesh/fvMesh.C index f5514df2393b599ffa048296646eef0684f21da1..9aff27408a42320329b01ab30f83d41d4349f1d5 100644 --- a/src/finiteVolume/fvMesh/fvMesh.C +++ b/src/finiteVolume/fvMesh/fvMesh.C @@ -127,10 +127,7 @@ void Foam::fvMesh::clearGeom() void Foam::fvMesh::clearAddressing(const bool isMeshUpdate) { - if (debug) - { - InfoInFunction << "isMeshUpdate: " << isMeshUpdate << endl; - } + DebugInFunction << "isMeshUpdate: " << isMeshUpdate << endl; if (isMeshUpdate) { @@ -168,15 +165,10 @@ void Foam::fvMesh::storeOldVol(const scalarField& V) { if (curTimeIndex_ < time().timeIndex()) { - if (debug) - { - InfoInFunction - << " Storing old time volumes since from time " << curTimeIndex_ - << " and time now " << time().timeIndex() - << " V:" << V.size() - << endl; - } - + DebugInFunction + << " Storing old time volumes since from time " << curTimeIndex_ + << " and time now " << time().timeIndex() + << " V:" << V.size() << endl; if (V00Ptr_ && V0Ptr_) { @@ -220,6 +212,7 @@ void Foam::fvMesh::storeOldVol(const scalarField& V) InfoInFunction << " Stored old time volumes V0:" << V0Ptr_->size() << endl; + if (V00Ptr_) { InfoInFunction @@ -266,10 +259,7 @@ Foam::fvMesh::fvMesh(const IOobject& io) CfPtr_(nullptr), phiPtr_(nullptr) { - if (debug) - { - InfoInFunction << "Constructing fvMesh from IOobject" << endl; - } + DebugInFunction << "Constructing fvMesh from IOobject" << endl; // Check the existence of the cell volumes and read if present // and set the storage of V00 @@ -370,10 +360,7 @@ Foam::fvMesh::fvMesh CfPtr_(nullptr), phiPtr_(nullptr) { - if (debug) - { - InfoInFunction << "Constructing fvMesh from components" << endl; - } + DebugInFunction << "Constructing fvMesh from components" << endl; } @@ -410,10 +397,7 @@ Foam::fvMesh::fvMesh CfPtr_(nullptr), phiPtr_(nullptr) { - if (debug) - { - InfoInFunction << "Constructing fvMesh from components" << endl; - } + DebugInFunction << "Constructing fvMesh from components" << endl; } @@ -521,10 +505,7 @@ void Foam::fvMesh::addFvPatches void Foam::fvMesh::removeFvBoundary() { - if (debug) - { - InfoInFunction << "Removing boundary patches." << endl; - } + DebugInFunction << "Removing boundary patches." << endl; // Remove fvBoundaryMesh data first. boundary_.clear(); @@ -537,19 +518,13 @@ void Foam::fvMesh::removeFvBoundary() Foam::polyMesh::readUpdateState Foam::fvMesh::readUpdate() { - if (debug) - { - InfoInFunction << "Updating fvMesh. "; - } + DebugInFunction << "Updating fvMesh. "; polyMesh::readUpdateState state = polyMesh::readUpdate(); if (state == polyMesh::TOPO_PATCH_CHANGE) { - if (debug) - { - Info<< "Boundary and topological update" << endl; - } + DebugInfo << "Boundary and topological update" << endl; boundary_.readUpdate(boundaryMesh()); @@ -558,28 +533,19 @@ Foam::polyMesh::readUpdateState Foam::fvMesh::readUpdate() } else if (state == polyMesh::TOPO_CHANGE) { - if (debug) - { - Info<< "Topological update" << endl; - } + DebugInfo << "Topological update" << endl; clearOut(); } else if (state == polyMesh::POINTS_MOVED) { - if (debug) - { - Info<< "Point motion update" << endl; - } + DebugInfo << "Point motion update" << endl; clearGeom(); } else { - if (debug) - { - Info<< "No update" << endl; - } + DebugInfo << "No update" << endl; } return state; @@ -596,12 +562,9 @@ const Foam::lduAddressing& Foam::fvMesh::lduAddr() const { if (!lduPtr_) { - if (debug) - { - InfoInFunction - << " calculating fvMeshLduAddressing from nFaces:" - << nFaces() << endl; - } + DebugInFunction + << "Calculating fvMeshLduAddressing from nFaces:" + << nFaces() << endl; lduPtr_ = new fvMeshLduAddressing(*this); } @@ -612,16 +575,12 @@ const Foam::lduAddressing& Foam::fvMesh::lduAddr() const void Foam::fvMesh::mapFields(const mapPolyMesh& meshMap) { - if (debug) - { - InfoInFunction - << " nOldCells:" << meshMap.nOldCells() - << " nCells:" << nCells() - << " nOldFaces:" << meshMap.nOldFaces() - << " nFaces:" << nFaces() - << endl; - } - + DebugInFunction + << " nOldCells:" << meshMap.nOldCells() + << " nCells:" << nCells() + << " nOldFaces:" << meshMap.nOldFaces() + << " nFaces:" << nFaces() + << endl; // We require geometric properties valid for the old mesh if @@ -717,11 +676,9 @@ void Foam::fvMesh::mapFields(const mapPolyMesh& meshMap) } } - if (debug) - { - Info<< "Mapping old time volume V0. Merged " - << nMerged << " out of " << nCells() << " cells" << endl; - } + DebugInfo + << "Mapping old time volume V0. Merged " + << nMerged << " out of " << nCells() << " cells" << endl; } @@ -760,11 +717,9 @@ void Foam::fvMesh::mapFields(const mapPolyMesh& meshMap) } } - if (debug) - { - Info<< "Mapping old time volume V00. Merged " - << nMerged << " out of " << nCells() << " cells" << endl; - } + DebugInfo + << "Mapping old time volume V00. Merged " + << nMerged << " out of " << nCells() << " cells" << endl; } } diff --git a/src/finiteVolume/fvMesh/fvMeshGeometry.C b/src/finiteVolume/fvMesh/fvMeshGeometry.C index 022327d402480389c1a65715afe07c8002c12632..b850fdd8668ed596b85f05169238c02dc3220f21 100644 --- a/src/finiteVolume/fvMesh/fvMeshGeometry.C +++ b/src/finiteVolume/fvMesh/fvMeshGeometry.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -39,10 +40,7 @@ License void Foam::fvMesh::makeSf() const { - if (debug) - { - InfoInFunction << "Assembling face areas" << endl; - } + DebugInFunction << "Assembling face areas" << endl; // It is an error to attempt to recalculate // if the pointer is already set @@ -76,10 +74,7 @@ void Foam::fvMesh::makeSf() const void Foam::fvMesh::makeMagSf() const { - if (debug) - { - InfoInFunction << "Assembling mag face areas" << endl; - } + DebugInFunction << "Assembling mag face areas" << endl; // It is an error to attempt to recalculate // if the pointer is already set @@ -112,10 +107,7 @@ void Foam::fvMesh::makeMagSf() const void Foam::fvMesh::makeC() const { - if (debug) - { - InfoInFunction << "Assembling cell centres" << endl; - } + DebugInFunction << "Assembling cell centres" << endl; // It is an error to attempt to recalculate // if the pointer is already set @@ -152,10 +144,7 @@ void Foam::fvMesh::makeC() const void Foam::fvMesh::makeCf() const { - if (debug) - { - InfoInFunction << "Assembling face centres" << endl; - } + DebugInFunction << "Assembling face centres" << endl; // It is an error to attempt to recalculate // if the pointer is already set @@ -191,11 +180,8 @@ const Foam::volScalarField::Internal& Foam::fvMesh::V() const { if (!VPtr_) { - if (debug) - { - InfoInFunction - << "Constructing from primitiveMesh::cellVolumes()" << endl; - } + DebugInFunction + << "Constructing from primitiveMesh::cellVolumes()" << endl; VPtr_ = new slicedVolScalarField::Internal ( @@ -248,10 +234,7 @@ const Foam::volScalarField::Internal& Foam::fvMesh::V00() const { if (!V00Ptr_) { - if (debug) - { - InfoInFunction << "Constructing from V0" << endl; - } + DebugInFunction << "Constructing from V0" << endl; V00Ptr_ = new DimensionedField<scalar, volMesh> ( @@ -379,10 +362,7 @@ const Foam::surfaceVectorField& Foam::fvMesh::Cf() const Foam::tmp<Foam::surfaceVectorField> Foam::fvMesh::delta() const { - if (debug) - { - InfoInFunction << "Calculating face deltas" << endl; - } + DebugInFunction << "Calculating face deltas" << endl; tmp<surfaceVectorField> tdelta ( diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CentredFitScheme/CentredFitData.C b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CentredFitScheme/CentredFitData.C index efb9310f5d4cbafd11275e075f1d6c18f5111886..15da0f3fbb7968e7bc59cd212973a588e1e9f616 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CentredFitScheme/CentredFitData.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CentredFitScheme/CentredFitData.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -54,17 +55,11 @@ Foam::CentredFitData<Polynomial>::CentredFitData ), coeffs_(mesh.nFaces()) { - if (debug) - { - InfoInFunction << "Contructing CentredFitData<Polynomial>" << endl; - } + DebugInFunction << "Contructing CentredFitData<Polynomial>" << nl; calcFit(); - if (debug) - { - Info<< "Finished constructing polynomialFit data" << endl; - } + DebugInfo << "Finished constructing polynomialFit data" << endl; } diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/UpwindFitScheme/UpwindFitData.C b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/UpwindFitScheme/UpwindFitData.C index 10a668a855fdeaf6d020be758fd501c1d4470c05..b28ac46476325431d20f21caace48e76ad83e99a 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/UpwindFitScheme/UpwindFitData.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/UpwindFitScheme/UpwindFitData.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -55,17 +56,11 @@ Foam::UpwindFitData<Polynomial>::UpwindFitData owncoeffs_(mesh.nFaces()), neicoeffs_(mesh.nFaces()) { - if (debug) - { - InfoInFunction << "Contructing UpwindFitData<Polynomial>" << endl; - } + DebugInFunction << "Contructing UpwindFitData<Polynomial>" << nl; calcFit(); - if (debug) - { - Info<< " Finished constructing polynomialFit data" << endl; - } + DebugInfo << " Finished constructing polynomialFit data" << nl; } diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/skewCorrected/skewCorrectionVectors.C b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/skewCorrected/skewCorrectionVectors.C index b57bf3c52f8da612974d90333a3da00cea1bd5f5..ac76afffeaab6e4329f0516c23c4affb748aa7e7 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/skewCorrected/skewCorrectionVectors.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/skewCorrected/skewCorrectionVectors.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -67,10 +68,7 @@ Foam::skewCorrectionVectors::~skewCorrectionVectors() void Foam::skewCorrectionVectors::calcSkewCorrectionVectors() { - if (debug) - { - InfoInFunction << "Calculating skew correction vectors" << endl; - } + DebugInFunction << "Calculating skew correction vectors" << nl; // Set local references to mesh data const volVectorField& C = mesh_.C(); @@ -134,10 +132,7 @@ void Foam::skewCorrectionVectors::calcSkewCorrectionVectors() max(mag(skewCorrectionVectors_)*mesh_.deltaCoeffs()).value(); } - if (debug) - { - InfoInFunction << "skew coefficient = " << skewCoeff << endl; - } + DebugInFunction << "skew coefficient = " << skewCoeff << nl; if (skewCoeff < 1e-5) { diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.C b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.C index b69e8f565118584836825e1d289739a1e53ee610..a1a5676181405e2456519a6c8e07f78821586144 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.C @@ -98,8 +98,7 @@ Foam::surfaceInterpolationScheme<Type>::New if (surfaceInterpolation::debug || surfaceInterpolationScheme<Type>::debug) { - InfoInFunction - << "Discretisation scheme = " << schemeName << endl; + InfoInFunction << "Discretisation scheme = " << schemeName << endl; } auto cstrIter = MeshFluxConstructorTablePtr_->cfind(schemeName); diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolationParallelOps.C b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolationParallelOps.C index d0ce79aa0338c7c5635049790e2bacbbc6ca85df..ad3a9ec83ad7d43af7c87deaea3155f2eccc4bc3 100644 --- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolationParallelOps.C +++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolationParallelOps.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -61,20 +62,14 @@ Foam::label Foam::AMIInterpolation<SourcePatch, TargetPatch>::calcDistribution if (nHaveFaces > 1) { proci = -1; - if (debug) - { - InfoInFunction - << "AMI split across multiple processors" << endl; - } + DebugInFunction + << "AMI split across multiple processors" << endl; } else if (nHaveFaces == 1) { proci = facesPresentOnProc.find(1); - if (debug) - { - InfoInFunction - << "AMI local to processor" << proci << endl; - } + DebugInFunction + << "AMI local to processor" << proci << endl; } } diff --git a/src/meshTools/AMIInterpolation/patches/cyclicPeriodicAMI/cyclicPeriodicAMIPolyPatch/cyclicPeriodicAMIPolyPatch.C b/src/meshTools/AMIInterpolation/patches/cyclicPeriodicAMI/cyclicPeriodicAMIPolyPatch/cyclicPeriodicAMIPolyPatch.C index 8f8ba6a2d96cf2f22dececdb7db68151940a9c20..2442caf86f3d3a04d22084f24d358bc2869ecd02 100644 --- a/src/meshTools/AMIInterpolation/patches/cyclicPeriodicAMI/cyclicPeriodicAMIPolyPatch/cyclicPeriodicAMIPolyPatch.C +++ b/src/meshTools/AMIInterpolation/patches/cyclicPeriodicAMI/cyclicPeriodicAMIPolyPatch/cyclicPeriodicAMIPolyPatch.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2015-2018 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -371,15 +371,12 @@ void Foam::cyclicPeriodicAMIPolyPatch::resetAMI // 'reverseTransformPosition' functionality. scalar srcSumDiff = 0; - if (debug) - { - InfoInFunction - << "patch:" << name() - << " srcSum:" << srcSum - << " tgtSum:" << tgtSum - << " direction:" << direction - << endl; - } + DebugInFunction + << "patch:" << name() + << " srcSum:" << srcSum + << " tgtSum:" << tgtSum + << " direction:" << direction + << endl; // Loop, replicating the geometry while @@ -395,24 +392,18 @@ void Foam::cyclicPeriodicAMIPolyPatch::resetAMI { periodicPatch.transformPosition(thisPoints); - if (debug) - { - InfoInFunction - << "patch:" << name() - << " moving this side from:" - << gAverage(thisPatch.points()) - << " to:" << gAverage(thisPoints) << endl; - } + DebugInFunction + << "patch:" << name() + << " moving this side from:" + << gAverage(thisPatch.points()) + << " to:" << gAverage(thisPoints) << endl; thisPatch.movePoints(thisPoints); - if (debug) - { - InfoInFunction - << "patch:" << name() - << " appending weights with untransformed slave side" - << endl; - } + DebugInFunction + << "patch:" << name() + << " appending weights with untransformed slave side" + << endl; AMIPtr_->append(thisPatch, nbrPatch0); @@ -425,14 +416,11 @@ void Foam::cyclicPeriodicAMIPolyPatch::resetAMI { periodicPatch.transformPosition(nbrPoints); - if (debug) - { - InfoInFunction - << "patch:" << name() - << " moving neighbour side from:" - << gAverage(nbrPatch.points()) - << " to:" << gAverage(nbrPoints) << endl; - } + DebugInFunction + << "patch:" << name() + << " moving neighbour side from:" + << gAverage(nbrPatch.points()) + << " to:" << gAverage(nbrPoints) << endl; nbrPatch.movePoints(nbrPoints); @@ -461,16 +449,13 @@ void Foam::cyclicPeriodicAMIPolyPatch::resetAMI ++iter; - if (debug) - { - InfoInFunction - << "patch:" << name() - << " iteration:" << iter - << " srcSum:" << srcSum - << " tgtSum:" << tgtSum - << " direction:" << direction - << endl; - } + DebugInFunction + << "patch:" << name() + << " iteration:" << iter + << " srcSum:" << srcSum + << " tgtSum:" << tgtSum + << " direction:" << direction + << endl; } diff --git a/src/meshTools/regionSplit/regionSplit.C b/src/meshTools/regionSplit/regionSplit.C index 9ffe02f7595c7195858c510c32d31498b3e90b26..ce000729577fa9092c5fe0b682932647e06273de 100644 --- a/src/meshTools/regionSplit/regionSplit.C +++ b/src/meshTools/regionSplit/regionSplit.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2013 OpenFOAM Foundation - Copyright (C) 2018 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -365,10 +365,7 @@ Foam::label Foam::regionSplit::calcLocalRegionSplit } } - if (debug) - { - Info<<"regionSplit = " << double(timing.elapsed()) << "s\n"; - } + DebugInfo << "regionSplit = " << double(timing.elapsed()) << "s\n"; return nLocalRegions; } @@ -817,11 +814,8 @@ Foam::autoPtr<Foam::globalIndex> Foam::regionSplit::reduceRegions cellRegion[celli] = localToGlobal[cellRegion[celli]]; } - if (debug) - { - Info<<"regionSplit::reduceRegions = " - << double(timing.elapsed()) << "s\n"; - } + DebugInfo + <<"regionSplit::reduceRegions = " << double(timing.elapsed()) << "s\n"; return globalCompactPtr; } diff --git a/src/meshTools/searchableSurfaces/searchablePlate/searchablePlate.C b/src/meshTools/searchableSurfaces/searchablePlate/searchablePlate.C index fe8841fe67680b79ff9084605516d681cea4e974..05a8aa3f2d1c39e391f90bb8e19f8fb5151c1e4f 100644 --- a/src/meshTools/searchableSurfaces/searchablePlate/searchablePlate.C +++ b/src/meshTools/searchableSurfaces/searchablePlate/searchablePlate.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -230,14 +231,10 @@ Foam::searchablePlate::searchablePlate span_(span), normalDir_(calcNormal(span_)) { - if (debug) - { - InfoInFunction - << " origin:" << origin_ - << " origin+span:" << origin_+span_ - << " normal:" << vector::componentNames[normalDir_] - << endl; - } + DebugInFunction + << " origin:" << origin_ + << " origin+span:" << origin_+span_ + << " normal:" << vector::componentNames[normalDir_] << nl; bounds() = boundBox(origin_, origin_ + span_); } @@ -254,14 +251,10 @@ Foam::searchablePlate::searchablePlate span_(dict.get<vector>("span")), normalDir_(calcNormal(span_)) { - if (debug) - { - InfoInFunction - << " origin:" << origin_ - << " origin+span:" << origin_+span_ - << " normal:" << vector::componentNames[normalDir_] - << endl; - } + DebugInFunction + << " origin:" << origin_ + << " origin+span:" << origin_+span_ + << " normal:" << vector::componentNames[normalDir_] << nl; bounds() = boundBox(origin_, origin_ + span_); } diff --git a/src/meshTools/triSurface/triSurfaceTools/pointToPointPlanarInterpolation.C b/src/meshTools/triSurface/triSurfaceTools/pointToPointPlanarInterpolation.C index 3ad4c38259cf644b51bbbde2aa4a213a0ab24b08..0dd064bbb344a758ae65c825aa959c219fe13900 100644 --- a/src/meshTools/triSurface/triSurfaceTools/pointToPointPlanarInterpolation.C +++ b/src/meshTools/triSurface/triSurfaceTools/pointToPointPlanarInterpolation.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2012-2016 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -122,13 +122,10 @@ Foam::pointToPointPlanarInterpolation::calcCoordinateSystem const vector n = normalised(e1 ^ (points[index2]-p0)); - if (debug) - { - InfoInFunction - << " Used points " << p0 << ' ' << points[index1] - << ' ' << points[index2] - << " to define coordinate system with normal " << n << endl; - } + DebugInFunction + << " Used points " << p0 << ' ' << points[index1] + << ' ' << points[index2] + << " to define coordinate system with normal " << n << endl; return coordSystem::cartesian ( @@ -210,14 +207,11 @@ void Foam::pointToPointPlanarInterpolation::calcWeights const boundBox bb(localVertices, true); const point bbMid(bb.centre()); - if (debug) - { - InfoInFunction - << " Perturbing points with " << perturb_ - << " fraction of a random position inside " << bb - << " to break any ties on regular meshes." - << nl << endl; - } + DebugInFunction + << " Perturbing points with " << perturb_ + << " fraction of a random position inside " << bb + << " to break any ties on regular meshes." << nl + << endl; Random rndGen(123456); forAll(localVertices, i) diff --git a/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C b/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C index 780354df3aa2f6b3ef464916dc1545b5d3f08588..7c042cc6ad26d4ed389d4286e2bf08aa7de17bc6 100644 --- a/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C +++ b/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C @@ -2545,11 +2545,9 @@ Foam::distributedTriSurfaceMesh::distributedTriSurfaceMesh(const IOobject& io) && (distType_ == INDEPENDENT || distType_ == DISTRIBUTED) ) { - if (debug) - { - InfoInFunction << "Read distributedTriSurface " << io.name() - << " from parent path " << actualFile << endl; - } + DebugInFunction + << "Read distributedTriSurface " << io.name() + << " from parent path " << actualFile << endl; if (Pstream::parRun()) { @@ -2571,7 +2569,8 @@ Foam::distributedTriSurfaceMesh::distributedTriSurfaceMesh(const IOobject& io) { if (debug) { - InfoInFunction << "Read distributedTriSurface " << io.name() + InfoInFunction + << "Read distributedTriSurface " << io.name() << " from actual path " << actualFile << ':' << endl; labelList nTris(Pstream::nProcs()); @@ -2590,8 +2589,8 @@ Foam::distributedTriSurfaceMesh::distributedTriSurfaceMesh(const IOobject& io) } if (debug) { - InfoInFunction << "Read distributedTriSurface " << io.name() << ':' - << endl; + InfoInFunction + << "Read distributedTriSurface " << io.name() << ':' << endl; writeStats(Info); } } @@ -2685,12 +2684,10 @@ Foam::distributedTriSurfaceMesh::distributedTriSurfaceMesh && (distType_ == INDEPENDENT || distType_ == DISTRIBUTED) ) { - if (debug) - { - InfoInFunction << "Read distributedTriSurface " << io.name() - << " from parent path " << actualFile - << " and dictionary" << endl; - } + DebugInFunction + << "Read distributedTriSurface " << io.name() + << " from parent path " << actualFile + << " and dictionary" << endl; if (Pstream::parRun()) { @@ -2712,7 +2709,8 @@ Foam::distributedTriSurfaceMesh::distributedTriSurfaceMesh { if (debug) { - InfoInFunction << "Read distributedTriSurface " << io.name() + InfoInFunction + << "Read distributedTriSurface " << io.name() << " from actual path " << actualFile << " and dictionary:" << endl; @@ -2732,8 +2730,8 @@ Foam::distributedTriSurfaceMesh::distributedTriSurfaceMesh } if (debug) { - InfoInFunction << "Read distributedTriSurface " << io.name() << ':' - << endl; + InfoInFunction + << "Read distributedTriSurface " << io.name() << ':' << endl; writeStats(Info); } } diff --git a/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C b/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C index 43a9e543af4bae06e9a772e9ba28dfd23399fd6a..44c4a6bda625437bb4c5b96111dec86d2ac711da 100644 --- a/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C +++ b/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2016-2019 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -227,10 +227,7 @@ void reactingOneDim::updateMesh(const scalarField& deltaV) void reactingOneDim::solveContinuity() { - if (debug) - { - InfoInFunction << endl; - } + DebugInFunction << endl; if (!moveMesh_) { @@ -255,10 +252,7 @@ void reactingOneDim::solveContinuity() void reactingOneDim::solveSpeciesMass() { - if (debug) - { - InfoInFunction << endl; - } + DebugInFunction << endl; volScalarField Yt(0.0*Ys_[0]); @@ -294,10 +288,7 @@ void reactingOneDim::solveSpeciesMass() void reactingOneDim::solveEnergy() { - if (debug) - { - InfoInFunction << endl; - } + DebugInFunction << endl; tmp<volScalarField> alpha(solidThermo_->alpha()); diff --git a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C index 5048aaf10084a47f321b4ed1d9d5f1bfa398e5d6..5aa7300b2de3b6edf19aab9886dcb379e5e99d2a 100644 --- a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C +++ b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -83,10 +83,7 @@ void kinematicSingleLayer::correctThermoFields() void kinematicSingleLayer::resetPrimaryRegionSourceTerms() { - if (debug) - { - InfoInFunction << endl; - } + DebugInFunction << endl; rhoSpPrimary_ == dimensionedScalar(rhoSp_.dimensions(), Zero); USpPrimary_ == dimensionedVector(USp_.dimensions(), Zero); @@ -109,10 +106,7 @@ void kinematicSingleLayer::transferPrimaryRegionThermoFields() void kinematicSingleLayer::transferPrimaryRegionSourceFields() { - if (debug) - { - InfoInFunction << endl; - } + DebugInFunction << endl; volScalarField::Boundary& rhoSpPrimaryBf = rhoSpPrimary_.boundaryFieldRef(); @@ -215,10 +209,7 @@ void kinematicSingleLayer::correctAlpha() void kinematicSingleLayer::updateSubmodels() { - if (debug) - { - InfoInFunction << endl; - } + DebugInFunction << endl; // Update injection model - mass returned is mass available for injection injection_.correct(availableMass_, cloudMassTrans_, cloudDiameterTrans_); @@ -269,10 +260,7 @@ void kinematicSingleLayer::continuityCheck() void kinematicSingleLayer::solveContinuity() { - if (debug) - { - InfoInFunction << endl; - } + DebugInFunction << endl; solve ( @@ -307,10 +295,7 @@ tmp<Foam::fvVectorMatrix> kinematicSingleLayer::solveMomentum const volScalarField& pp ) { - if (debug) - { - InfoInFunction << endl; - } + DebugInFunction << endl; // Momentum tmp<fvVectorMatrix> tUEqn @@ -366,10 +351,7 @@ void kinematicSingleLayer::solveThickness const fvVectorMatrix& UEqn ) { - if (debug) - { - InfoInFunction << endl; - } + DebugInFunction << endl; volScalarField rUA(1.0/UEqn.A()); U_ = rUA*UEqn.H(); @@ -854,14 +836,11 @@ void kinematicSingleLayer::addSources const scalar energySource ) { - if (debug) - { - InfoInFunction - << "\nSurface film: " << type() << ": adding to film source:" << nl - << " mass = " << massSource << nl - << " momentum = " << momentumSource << nl - << " pressure = " << pressureSource << endl; - } + DebugInFunction + << "\nSurface film: " << type() << ": adding to film source:" << nl + << " mass = " << massSource << nl + << " momentum = " << momentumSource << nl + << " pressure = " << pressureSource << endl; rhoSpPrimary_.boundaryFieldRef()[patchi][facei] -= massSource; USpPrimary_.boundaryFieldRef()[patchi][facei] -= momentumSource; @@ -873,10 +852,7 @@ void kinematicSingleLayer::addSources void kinematicSingleLayer::preEvolveRegion() { - if (debug) - { - InfoInFunction << endl; - } + DebugInFunction << endl; surfaceFilmRegionModel::preEvolveRegion(); @@ -900,10 +876,7 @@ void kinematicSingleLayer::preEvolveRegion() void kinematicSingleLayer::evolveRegion() { - if (debug) - { - InfoInFunction << endl; - } + DebugInFunction << endl; // Update sub-models to provide updated source contributions updateSubmodels(); @@ -937,10 +910,7 @@ void kinematicSingleLayer::evolveRegion() void kinematicSingleLayer::postEvolveRegion() { - if (debug) - { - InfoInFunction << endl; - } + DebugInFunction << endl; // Reset source terms for next time integration resetPrimaryRegionSourceTerms(); diff --git a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C index 44dedf932afab3e47194ff7245dc844494740bad..6c947d1eaa7ae4e430d5cdcd8c86c8db4acc5cb5 100644 --- a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C +++ b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2017 OpenCFD Ltd + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -94,10 +94,7 @@ bool thermoSingleLayer::read() void thermoSingleLayer::resetPrimaryRegionSourceTerms() { - if (debug) - { - InfoInFunction << endl; - } + DebugInFunction << endl; kinematicSingleLayer::resetPrimaryRegionSourceTerms(); @@ -153,10 +150,7 @@ void thermoSingleLayer::updateSurfaceTemperatures() void thermoSingleLayer::transferPrimaryRegionThermoFields() { - if (debug) - { - InfoInFunction << endl; - } + DebugInFunction << endl; kinematicSingleLayer::transferPrimaryRegionThermoFields(); @@ -172,10 +166,7 @@ void thermoSingleLayer::transferPrimaryRegionThermoFields() void thermoSingleLayer::transferPrimaryRegionSourceFields() { - if (debug) - { - InfoInFunction << endl; - } + DebugInFunction << endl; kinematicSingleLayer::transferPrimaryRegionSourceFields(); @@ -233,10 +224,7 @@ void thermoSingleLayer::correctAlpha() void thermoSingleLayer::updateSubmodels() { - if (debug) - { - InfoInFunction << endl; - } + DebugInFunction << endl; // Update heat transfer coefficient sub-models htcs_->correct(); @@ -289,11 +277,7 @@ tmp<fvScalarMatrix> thermoSingleLayer::q(volScalarField& hs) const void thermoSingleLayer::solveEnergy() { - if (debug) - { - InfoInFunction << endl; - } - + DebugInFunction << endl; dimensionedScalar residualDeltaRho ( @@ -603,10 +587,8 @@ void thermoSingleLayer::addSources energySource ); - if (debug) - { - Info<< " energy = " << energySource << nl << endl; - } + DebugInfo + << " energy = " << energySource << nl << nl; hsSpPrimary_.boundaryFieldRef()[patchi][facei] -= energySource; } @@ -614,10 +596,7 @@ void thermoSingleLayer::addSources void thermoSingleLayer::preEvolveRegion() { - if (debug) - { - InfoInFunction << endl; - } + DebugInFunction << endl; kinematicSingleLayer::preEvolveRegion(); primaryEnergyTrans_ == dimensionedScalar(dimEnergy, Zero); @@ -626,10 +605,7 @@ void thermoSingleLayer::preEvolveRegion() void thermoSingleLayer::evolveRegion() { - if (debug) - { - InfoInFunction << endl; - } + DebugInFunction << endl; // Solve continuity for deltaRho_ solveContinuity(); diff --git a/src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffle.C b/src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffle.C index 9533a415c6c6cfa65e687b840877395af24c1bc0..131aed9b48ccf1e5f9aa4d26ec7af335d0794481 100644 --- a/src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffle.C +++ b/src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffle.C @@ -27,7 +27,6 @@ License \*---------------------------------------------------------------------------*/ #include "thermalBaffle.H" - #include "fvm.H" #include "fvcDiv.H" #include "addToRunTimeSelectionTable.H" @@ -69,10 +68,7 @@ bool thermalBaffle::read(const dictionary& dict) void thermalBaffle::solveEnergy() { - if (debug) - { - InfoInFunction << endl; - } + DebugInFunction << endl; const polyBoundaryMesh& rbm = regionMesh().boundaryMesh(); diff --git a/src/sampling/meshToMesh/calcMethod/meshToMeshMethod/meshToMeshMethodNew.C b/src/sampling/meshToMesh/calcMethod/meshToMeshMethod/meshToMeshMethodNew.C index ab1b1117f453ee70ae29ae21d0ef1cdc471232a2..d279a3e9473aa5f17b2461758289ab76f9f2ce3f 100644 --- a/src/sampling/meshToMesh/calcMethod/meshToMeshMethod/meshToMeshMethodNew.C +++ b/src/sampling/meshToMesh/calcMethod/meshToMeshMethod/meshToMeshMethodNew.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2015 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -37,10 +37,7 @@ Foam::autoPtr<Foam::meshToMeshMethod> Foam::meshToMeshMethod::New const polyMesh& tgt ) { - if (debug) - { - Info<< "Selecting AMIMethod " << methodName << endl; - } + DebugInfo << "Selecting AMIMethod " << methodName << endl; auto cstrIter = componentsConstructorTablePtr_->cfind(methodName); diff --git a/src/sampling/meshToMesh/meshToMeshParallelOps.C b/src/sampling/meshToMesh/meshToMeshParallelOps.C index 62343bd8ddbba5bc9ae6752bd973b1f0d18f1d21..5b3faec2ca03da4360ab2e33eee6e7f063184eb2 100644 --- a/src/sampling/meshToMesh/meshToMeshParallelOps.C +++ b/src/sampling/meshToMesh/meshToMeshParallelOps.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2012-2017 OpenFOAM Foundation - Copyright (C) 2015-2018 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -66,20 +66,16 @@ Foam::label Foam::meshToMesh::calcDistribution if (nHaveCells > 1) { proci = -1; - if (debug) - { - InfoInFunction - << "Meshes split across multiple processors" << endl; - } + + DebugInFunction + << "Meshes split across multiple processors" << endl; } else if (nHaveCells == 1) { proci = cellsPresentOnProc.find(1); - if (debug) - { - InfoInFunction - << "Meshes local to processor" << proci << endl; - } + + DebugInFunction + << "Meshes local to processor" << proci << endl; } } @@ -889,11 +885,8 @@ void Foam::meshToMesh::distributeAndMergeCells if (hasMerged) { - if (debug) - { - Pout<< "Merged from " << tgtPoints.size() - << " down to " << newTgtPoints.size() << " points" << endl; - } + Pout<< "Merged from " << tgtPoints.size() + << " down to " << newTgtPoints.size() << " points" << endl; tgtPoints.transfer(newTgtPoints); forAll(tgtFaces, i) diff --git a/src/sampling/meshToMesh0/calculateMeshToMesh0Addressing.C b/src/sampling/meshToMesh0/calculateMeshToMesh0Addressing.C index d172abb4d171111e9117ad1b583fd4dac0b42580..c780b1bbbf05d528eb78abc9d8680e9955618f21 100644 --- a/src/sampling/meshToMesh0/calculateMeshToMesh0Addressing.C +++ b/src/sampling/meshToMesh0/calculateMeshToMesh0Addressing.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -41,11 +42,8 @@ Description void Foam::meshToMesh0::calcAddressing() { - if (debug) - { - InfoInFunction - << "Calculating mesh-to-mesh cell addressing" << endl; - } + DebugInFunction + << "Calculating mesh-to-mesh cell addressing" << endl; // set reference to cells const cellList& fromCells = fromMesh_.cells(); @@ -62,10 +60,7 @@ void Foam::meshToMesh0::calcAddressing() // visit all boundaries and mark the cell next to the boundary. - if (debug) - { - InfoInFunction << "Setting up rescue" << endl; - } + DebugInFunction << "Setting up rescue" << endl; List<bool> boundaryCell(fromCells.size(), false); @@ -93,13 +88,11 @@ void Foam::meshToMesh0::calcAddressing() meshBb.max() + vector(typDim, typDim, typDim) ); - if (debug) - { - Info<< "\nMesh" << endl; - Info<< " bounding box : " << meshBb << endl; - Info<< " bounding box (shifted) : " << shiftedBb << endl; - Info<< " typical dimension :" << shiftedBb.typDim() << endl; - } + DebugInfo + << "\nMesh" << nl + << " bounding box : " << meshBb << nl + << " bounding box (shifted) : " << shiftedBb << nl + << " typical dimension : " << shiftedBb.typDim() << endl; indexedOctree<treeDataCell> oc ( @@ -203,11 +196,8 @@ void Foam::meshToMesh0::calcAddressing() } } - if (debug) - { - InfoInFunction - << "Finished calculating mesh-to-mesh cell addressing" << endl; - } + DebugInFunction + << "Finished calculating mesh-to-mesh cell addressing" << endl; } diff --git a/src/sampling/probes/patchProbes.C b/src/sampling/probes/patchProbes.C index 617e0dd06ed854afa6b74a05421de9fa07d7db90..e638c89f9473a1dad5d4f4140e2353df38aedbb2 100644 --- a/src/sampling/probes/patchProbes.C +++ b/src/sampling/probes/patchProbes.C @@ -179,7 +179,7 @@ void Foam::patchProbes::findElements(const fvMesh& mesh) if (debug) { - InfoInFunction << endl; + InfoInFunction << nl; forAll(nearest, samplei) { label proci = nearest[samplei].second().second(); diff --git a/src/sampling/sampledSet/patchCloud/patchCloudSet.C b/src/sampling/sampledSet/patchCloud/patchCloudSet.C index eefe60e1e9c66661b35874235713c3b79c3954bf..fadf87af6d8d33d4314318fc1e623ba7a729a2c9 100644 --- a/src/sampling/sampledSet/patchCloud/patchCloudSet.C +++ b/src/sampling/sampledSet/patchCloud/patchCloudSet.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2017-2018 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -56,10 +56,7 @@ void Foam::patchCloudSet::calcSamples DynamicList<scalar>& samplingCurveDist ) const { - if (debug) - { - Info<< "patchCloudSet : sampling on patches :" << endl; - } + DebugInfo << "patchCloudSet : sampling on patches :" << endl; // Construct search tree for all patch faces. label sz = 0; @@ -69,10 +66,7 @@ void Foam::patchCloudSet::calcSamples sz += pp.size(); - if (debug) - { - Info<< " " << pp.name() << " size " << pp.size() << endl; - } + DebugInfo << " " << pp.name() << " size " << pp.size() << endl; } labelList patchFaces(sz); diff --git a/src/sampling/sampledSet/patchSeed/patchSeedSet.C b/src/sampling/sampledSet/patchSeed/patchSeedSet.C index e547968c33fe4fd783fda13fed89422380ba87b1..517bd5b254cd221ffc2e9382fb9d642115b9ad4c 100644 --- a/src/sampling/sampledSet/patchSeed/patchSeedSet.C +++ b/src/sampling/sampledSet/patchSeed/patchSeedSet.C @@ -56,10 +56,7 @@ void Foam::patchSeedSet::calcSamples DynamicList<scalar>& samplingCurveDist ) { - if (debug) - { - Info<< "patchSeedSet : sampling on patches :" << endl; - } + DebugInfo << "patchSeedSet : sampling on patches :" << endl; // Construct search tree for all patch faces. label sz = 0; @@ -69,10 +66,7 @@ void Foam::patchSeedSet::calcSamples sz += pp.size(); - if (debug) - { - Info<< " " << pp.name() << " size " << pp.size() << endl; - } + DebugInfo << " " << pp.name() << " size " << pp.size() << endl; } labelList patchFaces(sz); diff --git a/src/sampling/sampledSet/sampledSet/sampledSet.C b/src/sampling/sampledSet/sampledSet/sampledSet.C index 89eba4c74838275e10ed447672451913b703f64a..8cde03411c122ae64850f64136d53c5eadbb56f8 100644 --- a/src/sampling/sampledSet/sampledSet/sampledSet.C +++ b/src/sampling/sampledSet/sampledSet/sampledSet.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2018-2019 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -363,19 +363,16 @@ bool Foam::sampledSet::getTrackingPoint } } - if (debug) - { - InfoInFunction - << " samplePt:" << samplePt - << " bPoint:" << bPoint - << " bFacei:" << bFacei - << endl << " Calculated first tracking point :" - << " trackPt:" << trackPt - << " trackCelli:" << trackCelli - << " trackFacei:" << trackFacei - << " isGoodSample:" << isGoodSample - << endl; - } + DebugInFunction + << " samplePt:" << samplePt + << " bPoint:" << bPoint + << " bFacei:" << bFacei << nl + << " Calculated first tracking point :" + << " trackPt:" << trackPt + << " trackCelli:" << trackCelli + << " trackFacei:" << trackFacei + << " isGoodSample:" << isGoodSample + << endl; return isGoodSample; } diff --git a/src/sampling/sampledSurface/readers/ensight/ensightSurfaceReader.C b/src/sampling/sampledSurface/readers/ensight/ensightSurfaceReader.C index eefcf1d2835061da26b78a94cb1bfab5b4cd5e34..1b4425e7350519d2b63755c22e56fe659629e048 100644 --- a/src/sampling/sampledSurface/readers/ensight/ensightSurfaceReader.C +++ b/src/sampling/sampledSurface/readers/ensight/ensightSurfaceReader.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2015-2019 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -203,7 +203,7 @@ Foam::ensightSurfaceReader::readGeometryHeader(ensightReadFile& is) const void Foam::ensightSurfaceReader::readCase(IFstream& is) { - DebugInFunction<< nl; + DebugInFunction << endl; if (!is.good()) { @@ -259,12 +259,12 @@ void Foam::ensightSurfaceReader::readCase(IFstream& is) } else if (debug) { - Info<<"variable line: " << parsed.size(); + Info<< "variable line: " << parsed.size(); for (const auto& s : parsed) { - Info<<" " << s.str(); + Info<< " " << s.str(); } - Info<<nl; + Info<< nl; } fieldNames.append(parsed[parsed.size()-2].str()); @@ -332,7 +332,7 @@ Foam::ensightSurfaceReader::ensightSurfaceReader(const fileName& fName) const Foam::meshedSurface& Foam::ensightSurfaceReader::geometry() { - DebugInFunction<< nl; + DebugInFunction << endl; if (!surfPtr_.valid()) { diff --git a/src/sampling/sampledSurface/readers/ensight/ensightSurfaceReaderTemplates.C b/src/sampling/sampledSurface/readers/ensight/ensightSurfaceReaderTemplates.C index eb1a244ce8041291f5d8371a3c85c66707e42028..a0da8f152b298535975864900af73badde8798d7 100644 --- a/src/sampling/sampledSurface/readers/ensight/ensightSurfaceReaderTemplates.C +++ b/src/sampling/sampledSurface/readers/ensight/ensightSurfaceReaderTemplates.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2015-2018 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -65,10 +65,7 @@ Foam::tmp<Foam::Field<Type>> Foam::ensightSurfaceReader::readField const label fieldIndex ) const { - if (debug) - { - InfoInFunction<< endl; - } + DebugInFunction << endl; const word& fieldName(fieldNames_[fieldIndex]); const label fileIndex = timeStartIndex_ + timeIndex*timeIncrement_; @@ -106,10 +103,7 @@ Foam::tmp<Foam::Field<Type>> Foam::ensightSurfaceReader::readField is.read(primitiveType); - if (debug) - { - Info<< "primitiveType: " << primitiveType << endl; - } + DebugInfo << "primitiveType: " << primitiveType << endl; if (primitiveType != pTraits<Type>::typeName) { @@ -139,11 +133,9 @@ Foam::tmp<Foam::Field<Type>> Foam::ensightSurfaceReader::readField // Read data file using schema generated while reading the surface forAll(schema_, i) { - if (debug) - { - const string& faceType = schema_[i].first(); - Info<< "Reading face type " << faceType << " data" << endl; - } + DebugInfo + << "Reading face type " + << schema_[i].first() << " data" << endl; const label nFace = schema_[i].second(); diff --git a/src/sampling/sampledSurface/sampledPlane/sampledPlane.C b/src/sampling/sampledSurface/sampledPlane/sampledPlane.C index 41ac679efef7fb376cb79ed8d5209589198cc1e8..3c03d96643330874586fc5063c91a7d9b993dc0b 100644 --- a/src/sampling/sampledSurface/sampledPlane/sampledPlane.C +++ b/src/sampling/sampledSurface/sampledPlane/sampledPlane.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2017-2019 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -131,13 +131,11 @@ Foam::sampledPlane::sampledPlane const point orig = cs.globalPosition(pln.origin()); const vector norm = cs.globalVector(pln.normal()); - if (debug) - { - Info<< "plane " << name << " :" - << " origin:" << origin() - << " normal:" << normal() - << " defined within a local coordinateSystem" << endl; - } + DebugInfo + << "plane " << name << " :" + << " origin:" << origin() + << " normal:" << normal() + << " defined within a local coordinateSystem" << endl; // Reassign the plane pln = plane(orig, norm); diff --git a/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C b/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C index 31669126173fbfcb7ce0efc4306636cdbdcd79e8..835733612e642e948616d72903250defecf4082c 100644 --- a/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C +++ b/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2016-2019 OpenCFD Ltd. + Copyright (C) 2016-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -74,11 +74,8 @@ void Foam::radiation::viewFactor::initialise() totalNCoarseFaces_ = nLocalCoarseFaces_; reduce(totalNCoarseFaces_, sumOp<label>()); - if (debug && Pstream::master()) - { - InfoInFunction - << "Total number of clusters : " << totalNCoarseFaces_ << endl; - } + DebugInFunction + << "Total number of clusters : " << totalNCoarseFaces_ << endl; map_.reset ( @@ -139,11 +136,8 @@ void Foam::radiation::viewFactor::initialise() new scalarSquareMatrix(totalNCoarseFaces_, Zero) ); - if (debug) - { - InfoInFunction - << "Insert elements in the matrix..." << endl; - } + DebugInFunction + << "Insert elements in the matrix..." << endl; for (label procI = 0; procI < Pstream::nProcs(); procI++) { @@ -160,11 +154,7 @@ void Foam::radiation::viewFactor::initialise() if (coeffs_.get<bool>("smoothing")) { - if (debug) - { - InfoInFunction - << "Smoothing the matrix..." << endl; - } + DebugInFunction << "Smoothing the matrix..." << endl; for (label i=0; i<totalNCoarseFaces_; i++) { @@ -576,11 +566,7 @@ void Foam::radiation::viewFactor::calculate() } } - if (debug) - { - InfoInFunction - << "\nDecomposing C matrix..." << endl; - } + DebugInFunction << "\nDecomposing C matrix..." << endl; LUDecompose(CLU_(), pivotIndices_); } diff --git a/src/thermophysicalModels/radiation/submodels/solarCalculator/solarCalculator.C b/src/thermophysicalModels/radiation/submodels/solarCalculator/solarCalculator.C index b118c41883091e2f25ceb3bc34507b01f214e23b..0c4b0286f924dfd672f17befbfb9239268ce03a8 100644 --- a/src/thermophysicalModels/radiation/submodels/solarCalculator/solarCalculator.C +++ b/src/thermophysicalModels/radiation/submodels/solarCalculator/solarCalculator.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2015-2017 OpenCFD Ltd. + Copyright (C) 2015-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -116,11 +116,9 @@ void Foam::solarCalculator::calculateBetaTheta() theta_ += 2*(constant::mathematical::pi - theta_); } - if (debug) - { - Info << tab << "altitude : " << radToDeg(beta_) << endl; - Info << tab << "azimuth : " << radToDeg(theta_) << endl; - } + DebugInfo + << tab << "altitude : " << radToDeg(beta_) << nl + << tab << "azimuth : " << radToDeg(theta_) << endl; } @@ -141,18 +139,14 @@ void Foam::solarCalculator::calculateSunDirection() direction_.normalise(); - if (debug) - { - Info<< "Sun direction in absolute coordinates : " << direction_ <<endl; - } + DebugInfo + << "Sun direction in absolute coordinates : " << direction_ <<endl; // Transform to actual coordinate system direction_ = coord_->transform(direction_); - if (debug) - { - Info<< "Sun direction in the Grid coordinates : " << direction_ <<endl; - } + DebugInfo + << "Sun direction in the Grid coordinates : " << direction_ <<endl; } diff --git a/src/thermophysicalModels/reactionThermo/psiuReactionThermo/heheuPsiThermo.C b/src/thermophysicalModels/reactionThermo/psiuReactionThermo/heheuPsiThermo.C index bb08999c93f9e02f2ad969f4bedc6b0cb27e9546..46bbdfc7868d47b876f56c1693add112be4154df 100644 --- a/src/thermophysicalModels/reactionThermo/psiuReactionThermo/heheuPsiThermo.C +++ b/src/thermophysicalModels/reactionThermo/psiuReactionThermo/heheuPsiThermo.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2017-2019 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -398,22 +398,17 @@ Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::~heheuPsiThermo() template<class BasicPsiThermo, class MixtureType> void Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::correct() { - if (debug) - { - InfoInFunction << endl; - } + DebugInFunction << endl; // force the saving of the old-time values this->psi_.oldTime(); calculate(); - if (debug) - { - Info<< " Finished" << endl; - } + DebugInfo << " Finished" << endl; } + /* template<class BasicPsiThermo, class MixtureType> void Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::correctT() diff --git a/src/thermophysicalModels/solidThermo/solidThermo/heSolidThermo.C b/src/thermophysicalModels/solidThermo/solidThermo/heSolidThermo.C index ee32cb8e7fd0f4fbf34364494c44c93d028367af..b34b15b5f8554722319f9b1e43790029d6ba11a4 100644 --- a/src/thermophysicalModels/solidThermo/solidThermo/heSolidThermo.C +++ b/src/thermophysicalModels/solidThermo/solidThermo/heSolidThermo.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2017-2018 OpenCFD Ltd + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -218,17 +218,11 @@ Foam::heSolidThermo<BasicSolidThermo, MixtureType>::~heSolidThermo() template<class BasicSolidThermo, class MixtureType> void Foam::heSolidThermo<BasicSolidThermo, MixtureType>::correct() { - if (debug) - { - InfoInFunction << endl; - } + DebugInFunction << nl; calculate(); - if (debug) - { - Info<< " Finished" << endl; - } + DebugInfo << " Finished" << endl; } diff --git a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/liquidProperties/liquidProperties.C b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/liquidProperties/liquidProperties.C index 5a74a7382bacf19fd1912843758de6b63983f8f6..65d38c448d3ebdabc478cf0a5f93e16c007f015e 100644 --- a/src/thermophysicalModels/thermophysicalProperties/liquidProperties/liquidProperties/liquidProperties.C +++ b/src/thermophysicalModels/thermophysicalProperties/liquidProperties/liquidProperties/liquidProperties.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -92,10 +92,7 @@ Foam::autoPtr<Foam::liquidProperties> Foam::liquidProperties::New const word& name ) { - if (debug) - { - InfoInFunction << "Constructing liquidProperties" << endl; - } + DebugInFunction << "Constructing liquidProperties" << nl; auto cstrIter = ConstructorTablePtr_->cfind(name); @@ -118,10 +115,7 @@ Foam::autoPtr<Foam::liquidProperties> Foam::liquidProperties::New const dictionary& dict ) { - if (debug) - { - InfoInFunction << "Constructing liquidProperties" << endl; - } + DebugInFunction << "Constructing liquidProperties" << nl; const word liquidType(dict.dictName()); diff --git a/src/topoChangerFvMesh/mixerFvMesh/mixerFvMesh.C b/src/topoChangerFvMesh/mixerFvMesh/mixerFvMesh.C index 688ddc4af54c8e355314374938cb2d0d6009b982..5720ebe4d18e56e39c72ebc9a13913dad6620a52 100644 --- a/src/topoChangerFvMesh/mixerFvMesh/mixerFvMesh.C +++ b/src/topoChangerFvMesh/mixerFvMesh/mixerFvMesh.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2018 OpenCFD Ltd. + Copyright (C) 2018-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -176,12 +176,7 @@ void Foam::mixerFvMesh::addZonesAndModifiers() void Foam::mixerFvMesh::calcMovingMasks() const { - if (debug) - { - InfoInFunction - << "Calculating point and cell masks" - << endl; - } + DebugInFunction << "Calculating point and cell masks" << endl; if (movingPointsMaskPtr_) { @@ -340,10 +335,7 @@ bool Foam::mixerFvMesh::update() if (topoChangeMap.valid()) { - if (debug) - { - InfoInFunction << "Mesh topology is changing" << endl; - } + DebugInFunction << "Mesh topology is changing" << nl; deleteDemandDrivenData(movingPointsMaskPtr_); } diff --git a/tutorials/basic/potentialFoam/cylinder/system/controlDict b/tutorials/basic/potentialFoam/cylinder/system/controlDict index cc15d9a8b7840c7d0b614a1e5c3cc581bdee45b9..9daae07d678e0023f4761551e3b9e6176c2244e0 100644 --- a/tutorials/basic/potentialFoam/cylinder/system/controlDict +++ b/tutorials/basic/potentialFoam/cylinder/system/controlDict @@ -72,7 +72,7 @@ functions dimensionedScalar uInfX("uInfx", dimVelocity, ULeft); - Info << "U at inlet = " << uInfX.value() << " m/s" << endl; + Info<< "U at inlet = " << uInfX.value() << " m/s" << endl; scalar magCylinder = 0.0; @@ -86,7 +86,7 @@ functions dimensionedScalar radius("radius", dimLength, magCylinder); - Info << "Cylinder radius = " << radius.value() << " m" << endl; + Info<< "Cylinder radius = " << radius.value() << " m" << endl; volVectorField UA (