From 49cd83ac5d277ff2bc4bde331817fda6a443f5e8 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Fri, 26 Jun 2015 19:30:41 +0100 Subject: [PATCH] Minor clean-up and documentation comments --- src/Pstream/mpi/IPread.C | 8 +-- src/Pstream/mpi/OPwrite.C | 2 - .../slidingInterface/slidingInterface.H | 3 +- .../octree/indexedOctree/indexedOctree.H | 8 ++- .../algorithms/octree/octree/PointIndexHit.H | 5 +- src/foam/algorithms/octree/octree/octree.H | 10 ++-- src/foam/db/IOstreams/Pstreams/IPstream.H | 7 ++- src/foam/db/IOstreams/Pstreams/OPstream.H | 12 +++- src/foam/db/IOstreams/Pstreams/Pstream.C | 4 +- src/foam/db/IOstreams/Pstreams/Pstream.H | 9 ++- .../IOstreams/Pstreams/combineGatherScatter.C | 2 - .../db/IOstreams/Pstreams/gatherScatterList.C | 16 ++--- src/foam/db/error/error.H | 2 +- src/foam/db/regIOobject/regIOobject.C | 1 + src/foam/global/argList/argList.C | 24 ++++---- src/foam/global/global.Cver | 1 + .../IOPatchToPatchInterpolation.C | 2 +- .../immersedBoundaryFvPatch.C | 5 +- src/meshTools/meshSearch/meshSearch.C | 12 +++- .../searchableSurface/triSurfaceMesh.H | 7 ++- .../triSurfaceSearch/triSurfaceSearch.H | 5 +- .../sampledSurface/writers/surfaceWriter.C | 5 ++ .../tools/labelledTri/labelledTri.H | 1 + src/triSurface/triSurface/triSurface.C | 58 ++++++++++--------- src/triSurface/triSurface/triSurface.H | 17 +++--- 25 files changed, 134 insertions(+), 92 deletions(-) diff --git a/src/Pstream/mpi/IPread.C b/src/Pstream/mpi/IPread.C index 78668c39a..8f533bb53 100644 --- a/src/Pstream/mpi/IPread.C +++ b/src/Pstream/mpi/IPread.C @@ -52,7 +52,7 @@ Foam::IPstream::IPstream MPI_Status status; - // If the buffer size is not specified, probe the incomming message + // If the buffer size is not specified, probe the incoming message // and set it if (!bufSize) { @@ -108,7 +108,7 @@ Foam::label Foam::IPstream::read ( "IPstream::read" "(const int fromProcNo, char* buf, std::streamsize bufSize)" - ) << "MPI_Recv cannot receive incomming message" + ) << "MPI_Recv cannot receive incoming message" << Foam::abort(FatalError); return 0; @@ -127,7 +127,7 @@ Foam::label Foam::IPstream::read "IPstream::read" "(const int fromProcNo, char* buf, std::streamsize bufSize)" ) << "buffer (" << label(bufSize) - << ") not large enough for incomming message (" + << ") not large enough for incoming message (" << messageSize << ')' << Foam::abort(FatalError); } @@ -232,6 +232,4 @@ bool Foam::IPstream::finishedRequest(const label i) } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - // ************************************************************************* // diff --git a/src/Pstream/mpi/OPwrite.C b/src/Pstream/mpi/OPwrite.C index 131a9fefa..5b9519ad1 100644 --- a/src/Pstream/mpi/OPwrite.C +++ b/src/Pstream/mpi/OPwrite.C @@ -172,6 +172,4 @@ bool Foam::OPstream::finishedRequest(const label i) } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - // ************************************************************************* // diff --git a/src/dynamicMesh/dynamicMesh/polyMeshModifiers/slidingInterface/slidingInterface.H b/src/dynamicMesh/dynamicMesh/polyMeshModifiers/slidingInterface/slidingInterface.H index 19c844a58..a3539001c 100644 --- a/src/dynamicMesh/dynamicMesh/polyMeshModifiers/slidingInterface/slidingInterface.H +++ b/src/dynamicMesh/dynamicMesh/polyMeshModifiers/slidingInterface/slidingInterface.H @@ -175,7 +175,8 @@ private: mutable labelList* slavePointPointHitsPtr_; //- Slave edge hit. The index of master edge hit by the - // slave point in projection. For point or no edge hit, set to -1 + // slave point in projection. + // For point or no edge hit, set to -1 mutable labelList* slavePointEdgeHitsPtr_; //- Slave face hit. The index of master face hit by the diff --git a/src/foam/algorithms/octree/indexedOctree/indexedOctree.H b/src/foam/algorithms/octree/indexedOctree/indexedOctree.H index c41413966..72e918e9c 100644 --- a/src/foam/algorithms/octree/indexedOctree/indexedOctree.H +++ b/src/foam/algorithms/octree/indexedOctree/indexedOctree.H @@ -93,7 +93,7 @@ public: //- Bounding box of this node treeBoundBox bb_; - //- parent node (index into nodes_ of tree) + //- Parent node (index into nodes_ of tree) label parent_; //- IDs of the 8 nodes on all sides of the mid point @@ -165,8 +165,8 @@ private: // Construction - //- Split list of indices into 8 bins according to where they are in - // relation to mid. + //- Split list of indices into 8 bins according to where they are + // in relation to mid. void divide ( const labelList& indices, @@ -376,6 +376,8 @@ private: public: + // Static functions + //- Get the perturbation tolerance static scalar& perturbTol(); diff --git a/src/foam/algorithms/octree/octree/PointIndexHit.H b/src/foam/algorithms/octree/octree/PointIndexHit.H index 6966385fa..2899d2c3e 100644 --- a/src/foam/algorithms/octree/octree/PointIndexHit.H +++ b/src/foam/algorithms/octree/octree/PointIndexHit.H @@ -25,11 +25,12 @@ Class Foam::PointIndexHit Description - This class describes the interaction of (usually) a face and a point. + This class describes the interaction of a shape (edge, face, cell) + and a point. It carries the info of a successful hit and (if successful), returns the interaction point. - like pointHit but carries face (or cell, edge etc.) index + Works like pointHit but carries face (or cell, edge etc.) index SourceFiles diff --git a/src/foam/algorithms/octree/octree/octree.H b/src/foam/algorithms/octree/octree/octree.H index e2cc1df94..0e3b050b2 100644 --- a/src/foam/algorithms/octree/octree/octree.H +++ b/src/foam/algorithms/octree/octree/octree.H @@ -140,7 +140,8 @@ class octree const treeBoundBox octreeBb_; //- Refinement crit: size of leaves. Average number of entries per - // leaf. Should be fine enough for efficient searching at lowest level. + // leaf. Should be fine enough for efficient searching + // at lowest level. const scalar maxLeafRatio_; //- Refinement crit: multiplicity of entries (so in how many leaves @@ -165,7 +166,8 @@ class octree // Static data members - //- Refinement crit: max number of level + + //- Refinement criterion max number of level static const label maxNLevels = 20; @@ -325,8 +327,8 @@ public: //- Find nearest to line. Returns -1 or index of shape and // sets: // - tightest (is both input and output). - // - linePoint : point on line (-GREAT,-GREAT,-GREAT if not found) - // - shapePoint : point on shape (GREAT, GREAT, GREAT if not found) + // - linePoint: point on line (-GREAT,-GREAT,-GREAT if not found) + // - shapePoint: point on shape (GREAT, GREAT, GREAT if not found) // Uses Type::calcNearest. label findNearest ( diff --git a/src/foam/db/IOstreams/Pstreams/IPstream.H b/src/foam/db/IOstreams/Pstreams/IPstream.H index 3bb33d4a1..46fcd4c1d 100644 --- a/src/foam/db/IOstreams/Pstreams/IPstream.H +++ b/src/foam/db/IOstreams/Pstreams/IPstream.H @@ -55,7 +55,10 @@ class IPstream { // Private data + //- ID of sending processor int fromProcNo_; + + //- Message size label messageSize_; @@ -76,14 +79,14 @@ public: // Constructors - //- Construct given process index to read from and optional buffer size, + //- Construct given process index to read from, optional buffer size, // read format and IO version IPstream ( const commsTypes commsType, const int fromProcNo, const label bufSize = 0, - streamFormat format=BINARY, + streamFormat format = BINARY, versionNumber version = currentVersion ); diff --git a/src/foam/db/IOstreams/Pstreams/OPstream.H b/src/foam/db/IOstreams/Pstreams/OPstream.H index 0ab74f3d4..2f92900d1 100644 --- a/src/foam/db/IOstreams/Pstreams/OPstream.H +++ b/src/foam/db/IOstreams/Pstreams/OPstream.H @@ -55,6 +55,7 @@ class OPstream { // Private data + // ID of receiving processor int toProcNo_; @@ -68,7 +69,12 @@ class OPstream inline void writeToBuffer(const char&); //- Write data to the transfer buffer - inline void writeToBuffer(const void* data, size_t count, size_t align); + inline void writeToBuffer + ( + const void* data, + size_t count, + size_t align + ); public: @@ -82,7 +88,7 @@ public: const commsTypes commsType, const int toProcNo, const label bufSize = 0, - streamFormat format=BINARY, + streamFormat format = BINARY, versionNumber version = currentVersion ); @@ -140,7 +146,7 @@ public: Ostream& writeQuoted ( const std::string&, - const bool quoted=true + const bool quoted = true ); //- Write label diff --git a/src/foam/db/IOstreams/Pstreams/Pstream.C b/src/foam/db/IOstreams/Pstreams/Pstream.C index 8f21cc1a9..bdab2f32c 100644 --- a/src/foam/db/IOstreams/Pstreams/Pstream.C +++ b/src/foam/db/IOstreams/Pstreams/Pstream.C @@ -269,9 +269,9 @@ const Foam::debug::optimisationSwitch Foam::Pstream::defaultCommsType ( "commsType", - "nonBlocking", +// "nonBlocking", // "scheduled", -// "blocking", + "blocking", "blocking, nonBlocking, scheduled" ); diff --git a/src/foam/db/IOstreams/Pstreams/Pstream.H b/src/foam/db/IOstreams/Pstreams/Pstream.H index 9db57b752..9570f7048 100644 --- a/src/foam/db/IOstreams/Pstreams/Pstream.H +++ b/src/foam/db/IOstreams/Pstreams/Pstream.H @@ -373,7 +373,8 @@ public: template static void gather(T& Value, const BinaryOp& bop); - //- Scatter data. Distribute without modification. Reverse of gather + //- Scatter data. Distribute without modification. + // Reverse of gather template static void scatter(const List& comms, T& Value); @@ -421,7 +422,11 @@ public: //- Like above but switches between linear/tree communication template - static void listCombineGather(List& Value, const CombineOp& cop); + static void listCombineGather + ( + List& Value, + const CombineOp& cop + ); //- Scatter data. Reverse of combineGather template diff --git a/src/foam/db/IOstreams/Pstreams/combineGatherScatter.C b/src/foam/db/IOstreams/Pstreams/combineGatherScatter.C index 3be1998c4..71972301a 100644 --- a/src/foam/db/IOstreams/Pstreams/combineGatherScatter.C +++ b/src/foam/db/IOstreams/Pstreams/combineGatherScatter.C @@ -547,8 +547,6 @@ void Pstream::mapCombineScatter(Container& Values) } - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam diff --git a/src/foam/db/IOstreams/Pstreams/gatherScatterList.C b/src/foam/db/IOstreams/Pstreams/gatherScatterList.C index 41a5774e0..3510afb16 100644 --- a/src/foam/db/IOstreams/Pstreams/gatherScatterList.C +++ b/src/foam/db/IOstreams/Pstreams/gatherScatterList.C @@ -99,7 +99,7 @@ void Pstream::gatherList IPstream fromBelow(Pstream::scheduled, belowID); fromBelow >> Values[belowID]; - if (debug & 2) + if (debug > 1) { Pout<< " received through " << belowID << " data from:" << belowID @@ -112,7 +112,7 @@ void Pstream::gatherList label leafID = belowLeaves[leafI]; fromBelow >> Values[leafID]; - if (debug & 2) + if (debug > 1) { Pout<< " received through " << belowID << " data from:" << leafID @@ -129,11 +129,11 @@ void Pstream::gatherList { const labelList& belowLeaves = myComm.allBelow(); - if (debug & 2) + if (debug > 1) { Pout<< " sending to " << myComm.above() - << " data from me:" << Pstream::myProcNo() - << " data:" << Values[Pstream::myProcNo()] << endl; + << " data from: " << Pstream::myProcNo() + << " data: " << Values[Pstream::myProcNo()] << endl; } if (contiguous()) @@ -163,11 +163,11 @@ void Pstream::gatherList { label leafID = belowLeaves[leafI]; - if (debug & 2) + if (debug > 1) { Pout<< " sending to " - << myComm.above() << " data from:" << leafID - << " data:" << Values[leafID] << endl; + << myComm.above() << " data from: " << leafID + << " data: " << Values[leafID] << endl; } toAbove << Values[leafID]; } diff --git a/src/foam/db/error/error.H b/src/foam/db/error/error.H index 71f23d743..62f0aa4ee 100644 --- a/src/foam/db/error/error.H +++ b/src/foam/db/error/error.H @@ -69,7 +69,6 @@ class error public std::exception, public messageStream { - protected: // Protected data @@ -83,6 +82,7 @@ protected: bool throwExceptions_; OStringStream* messageStreamPtr_; + public: // Constructors diff --git a/src/foam/db/regIOobject/regIOobject.C b/src/foam/db/regIOobject/regIOobject.C index 659f8cb97..a0e7cb295 100644 --- a/src/foam/db/regIOobject/regIOobject.C +++ b/src/foam/db/regIOobject/regIOobject.C @@ -38,6 +38,7 @@ Foam::regIOobject::fileModificationSkew 30 ); + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // Construct from IOobject diff --git a/src/foam/global/argList/argList.C b/src/foam/global/argList/argList.C index 869cbe01a..6fbc5f472 100644 --- a/src/foam/global/argList/argList.C +++ b/src/foam/global/argList/argList.C @@ -235,7 +235,7 @@ Foam::argList::argList regroupArgv(argc, argv); // Get executable name - args_[0] = fileName(argv[0]); + args_[0] = fileName(argv[0]); executable_ = fileName(argv[0]).name(); // Check arguments and options, we already have argv[0] @@ -420,12 +420,12 @@ Foam::argList::argList fileNameList roots; decompDict.lookup("roots") >> roots; - if (roots.size() != Pstream::nProcs()-1) + if (roots.size() != Pstream::nProcs() - 1) { FatalError << "number of entries in decompositionDict::roots" << " is not equal to the number of slaves " - << Pstream::nProcs()-1 + << Pstream::nProcs() - 1 << exit(FatalError); } @@ -433,8 +433,8 @@ Foam::argList::argList bool hadCaseOpt = options_.found("case"); for ( - int slave=Pstream::firstSlave(); - slave<=Pstream::lastSlave(); + int slave = Pstream::firstSlave(); + slave <= Pstream::lastSlave(); slave++ ) { @@ -486,8 +486,8 @@ Foam::argList::argList // Distribute the master's argument list (unaltered) for ( - int slave=Pstream::firstSlave(); - slave<=Pstream::lastSlave(); + int slave = Pstream::firstSlave(); + slave <= Pstream::lastSlave(); slave++ ) { @@ -599,14 +599,14 @@ Foam::argList::argList if (Pstream::master()) { slaveProcs.setSize(Pstream::nProcs() - 1); - word slaveMachine; + word slaveMachine; label slavePid; label procI = 0; for ( - int slave=Pstream::firstSlave(); - slave<=Pstream::lastSlave(); + int slave = Pstream::firstSlave(); + slave <= Pstream::lastSlave(); slave++ ) { @@ -731,12 +731,12 @@ void Foam::argList::printUsage() const } keyValuePair<< ']'; - sortedValidOptions[i]= keyValuePair.str(); + sortedValidOptions[i]= keyValuePair.str(); } sortedValidOptions.sort(); forAll (sortedValidOptions, sI) - Info << " " << sortedValidOptions[sI].c_str(); + Info<< " " << sortedValidOptions[sI].c_str(); // place help/doc/srcDoc options of the way at the end, // but with an extra space to separate it a little diff --git a/src/foam/global/global.Cver b/src/foam/global/global.Cver index 32c967da4..71b7b43be 100644 --- a/src/foam/global/global.Cver +++ b/src/foam/global/global.Cver @@ -32,6 +32,7 @@ Description \*---------------------------------------------------------------------------*/ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + #include "foamVersion.H" const char* const Foam::FOAMversion = "VERSION_STRING"; diff --git a/src/foam/interpolations/patchToPatchInterpolation/IOpatchToPatchInterpolation/IOPatchToPatchInterpolation.C b/src/foam/interpolations/patchToPatchInterpolation/IOpatchToPatchInterpolation/IOPatchToPatchInterpolation.C index 4a199734b..1d110b07e 100644 --- a/src/foam/interpolations/patchToPatchInterpolation/IOpatchToPatchInterpolation/IOPatchToPatchInterpolation.C +++ b/src/foam/interpolations/patchToPatchInterpolation/IOpatchToPatchInterpolation/IOPatchToPatchInterpolation.C @@ -62,7 +62,7 @@ IOPatchToPatchInterpolation::IOPatchToPatchInterpolation labelList* faPtr = new labelList(is); FieldField* fwPtr = new FieldField(is); scalarField* fdPtr = new scalarField(is); - Info << "Setting weights from file" << endl; + Info<< "Setting weights from file" << endl; this->setWeights(paPtr, pwPtr, pdPtr, faPtr, fwPtr, fdPtr); } } diff --git a/src/immersedBoundary/immersedBoundary/immersedBoundaryFvPatch/immersedBoundaryFvPatch.C b/src/immersedBoundary/immersedBoundary/immersedBoundaryFvPatch/immersedBoundaryFvPatch.C index 1a19cc8c2..1fcae6f92 100644 --- a/src/immersedBoundary/immersedBoundary/immersedBoundaryFvPatch/immersedBoundaryFvPatch.C +++ b/src/immersedBoundary/immersedBoundary/immersedBoundaryFvPatch/immersedBoundaryFvPatch.C @@ -1248,7 +1248,10 @@ void Foam::immersedBoundaryFvPatch::makeIbCellCells() const labelList procIbCells = procIbCellsSet.toc(); sort(procIbCells); - // Send and receive num of immersed boundary cells + // Note: consider more sophisticated gather-scatter + // HJ, 18/Jun/2015 + + // Send and receive number of immersed boundary cells // next to processor boundaries for (label procI = 0; procI < Pstream::nProcs(); procI++) { diff --git a/src/meshTools/meshSearch/meshSearch.C b/src/meshTools/meshSearch/meshSearch.C index 386270b60..bd016535e 100644 --- a/src/meshTools/meshSearch/meshSearch.C +++ b/src/meshTools/meshSearch/meshSearch.C @@ -97,7 +97,10 @@ bool Foam::meshSearch::findNearer // tree based searching -Foam::label Foam::meshSearch::findNearestCellTree(const point& location) const +Foam::label Foam::meshSearch::findNearestCellTree +( + const point& location +) const { const indexedOctree& tree = cellCentreTree(); @@ -109,12 +112,17 @@ Foam::label Foam::meshSearch::findNearestCellTree(const point& location) const { info = tree.findNearest(location, Foam::sqr(GREAT)); } + return info.index(); } // linear searching -Foam::label Foam::meshSearch::findNearestCellLinear(const point& location) const +Foam::label +Foam::meshSearch::findNearestCellLinear +( + const point& location +) const { const vectorField& centres = mesh_.cellCentres(); diff --git a/src/meshTools/searchableSurface/triSurfaceMesh.H b/src/meshTools/searchableSurface/triSurfaceMesh.H index a5d1b7cd1..a9825900e 100644 --- a/src/meshTools/searchableSurface/triSurfaceMesh.H +++ b/src/meshTools/searchableSurface/triSurfaceMesh.H @@ -269,7 +269,10 @@ public: //- WIP. From a set of hits (points and // indices) get the specified field. Misses do not get set. - virtual void getField(const List&, labelList&) const; + virtual void getField + ( + const List&, labelList& + ) const; // regIOobject implementation @@ -277,6 +280,7 @@ public: bool writeData(Ostream&) const { notImplemented("triSurfaceMesh::writeData(Ostream&) const"); + return false; } @@ -287,7 +291,6 @@ public: IOstream::versionNumber ver, IOstream::compressionType cmp ) const; - }; diff --git a/src/meshTools/triSurface/triSurfaceSearch/triSurfaceSearch.H b/src/meshTools/triSurface/triSurfaceSearch/triSurfaceSearch.H index 6a8703437..7b4d83869 100644 --- a/src/meshTools/triSurface/triSurfaceSearch/triSurfaceSearch.H +++ b/src/meshTools/triSurface/triSurfaceSearch/triSurfaceSearch.H @@ -68,13 +68,13 @@ class triSurfaceSearch // Private Member Functions - //- Disallow default bitwise copy construct triSurfaceSearch(const triSurfaceSearch&); //- Disallow default bitwise assignment void operator=(const triSurfaceSearch&); + public: // Static data members @@ -86,8 +86,7 @@ public: // Constructors //- Construct from surface. Holds reference to surface! - triSurfaceSearch(const triSurface&); - + explicit triSurfaceSearch(const triSurface&); // Member Functions diff --git a/src/sampling/sampledSurface/writers/surfaceWriter.C b/src/sampling/sampledSurface/writers/surfaceWriter.C index a143e5ae9..c2264e8ae 100644 --- a/src/sampling/sampledSurface/writers/surfaceWriter.C +++ b/src/sampling/sampledSurface/writers/surfaceWriter.C @@ -32,6 +32,11 @@ License #include "HashTable.H" #include "word.H" +template<> +Foam::surfaceWriter::wordConstructorTable* +Foam::surfaceWriter::wordConstructorTablePtr_; + + // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // template diff --git a/src/triSurface/tools/labelledTri/labelledTri.H b/src/triSurface/tools/labelledTri/labelledTri.H index 326ba6a8f..667f62eb6 100644 --- a/src/triSurface/tools/labelledTri/labelledTri.H +++ b/src/triSurface/tools/labelledTri/labelledTri.H @@ -52,6 +52,7 @@ class labelledTri { // Private data + //- Region ID label region_; diff --git a/src/triSurface/triSurface/triSurface.C b/src/triSurface/triSurface/triSurface.C index 7312d128f..8542d7ced 100644 --- a/src/triSurface/triSurface/triSurface.C +++ b/src/triSurface/triSurface/triSurface.C @@ -50,7 +50,7 @@ Foam::fileName Foam::triSurface::triSurfInstance(const Time& d) instantList ts = d.times(); label i; - for (i=ts.size()-1; i>=0; i--) + for (i = ts.size() - 1; i >= 0; i--) { if (ts[i].value() <= d.timeOutputValue()) { @@ -61,9 +61,9 @@ Foam::fileName Foam::triSurface::triSurfInstance(const Time& d) // Noting that the current directory has already been searched // for mesh data, start searching from the previously stored time directory - if (i>=0) + if (i >= 0) { - for (label j=i; j>=0; j--) + for (label j = i; j >= 0; j--) { if (isFile(d.path()/ts[j].name()/typeName/foamName)) { @@ -86,7 +86,8 @@ Foam::fileName Foam::triSurface::triSurfInstance(const Time& d) << "reading " << foamName << " from constant/" << endl; } - return "constant"; + + return d.constant(); } @@ -98,7 +99,7 @@ Foam::List Foam::triSurface::convertToTri { List triFaces(faces.size()); - forAll(triFaces, faceI) + forAll (triFaces, faceI) { const face& f = faces[faceI]; @@ -133,7 +134,7 @@ Foam::List Foam::triSurface::convertToTri { List triFaces(faces.size()); - forAll(triFaces, faceI) + forAll (triFaces, faceI) { const triFace& f = faces[faceI]; @@ -159,8 +160,7 @@ void Foam::triSurface::printTriangle const pointField& points ) { - os - << pre.c_str() << "vertex numbers:" + os << pre.c_str() << "vertex numbers:" << f[0] << ' ' << f[1] << ' ' << f[2] << endl << pre.c_str() << "vertex coords :" << points[f[0]] << ' ' << points[f[1]] << ' ' << points[f[2]] @@ -188,7 +188,7 @@ void Foam::triSurface::checkTriangles(const bool verbose) // Simple check on indices ok. const label maxPointI = points().size() - 1; - forAll(*this, faceI) + forAll (*this, faceI) { const labelledTri& f = (*this)[faceI]; @@ -218,7 +218,7 @@ void Foam::triSurface::checkTriangles(const bool verbose) const labelListList& fFaces = faceFaces(); - forAll(*this, faceI) + forAll (*this, faceI) { const labelledTri& f = (*this)[faceI]; @@ -240,12 +240,12 @@ void Foam::triSurface::checkTriangles(const bool verbose) } else { - // duplicate triangle check + // Duplicate triangle check const labelList& neighbours = fFaces[faceI]; // Check if faceNeighbours use same points as this face. // Note: discards normal information - sides of baffle are merged. - forAll(neighbours, neighbourI) + forAll (neighbours, neighbourI) { if (neighbours[neighbourI] <= faceI) { @@ -291,7 +291,7 @@ void Foam::triSurface::checkTriangles(const bool verbose) { // Pack label newFaceI = 0; - forAll(*this, faceI) + forAll (*this, faceI) { if (valid[faceI]) { @@ -321,7 +321,7 @@ void Foam::triSurface::checkEdges(const bool verbose) { const labelListList& eFaces = edgeFaces(); - forAll(eFaces, edgeI) + forAll (eFaces, edgeI) { const labelList& myFaces = eFaces[edgeI]; @@ -503,7 +503,7 @@ Foam::surfacePatchList Foam::triSurface::calcPatches(labelList& faceMap) const // Sort according to region numbers of labelledTri SortableList