diff --git a/src/finiteVolume/fvMesh/wallDist/reflectionVectors.C b/src/finiteVolume/fvMesh/wallDist/reflectionVectors.C index 39ce85dfd..b2a5a6d57 100644 --- a/src/finiteVolume/fvMesh/wallDist/reflectionVectors.C +++ b/src/finiteVolume/fvMesh/wallDist/reflectionVectors.C @@ -49,13 +49,12 @@ Foam::reflectionVectors::reflectionVectors(const Foam::fvMesh& mesh) // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - void Foam::reflectionVectors::correct() { const fvMesh& mesh = n_.mesh(); const fvPatchList& patches = mesh.boundary(); - forAll(patches, patchi) + forAll (patches, patchi) { // find the nearest face for every cell if (patches[patchi].isWall()) diff --git a/src/finiteVolume/fvMesh/wallDist/wallDist.C b/src/finiteVolume/fvMesh/wallDist/wallDist.C index cc51ec843..65fb89159 100644 --- a/src/finiteVolume/fvMesh/wallDist/wallDist.C +++ b/src/finiteVolume/fvMesh/wallDist/wallDist.C @@ -69,7 +69,8 @@ void Foam::wallDist::correct() // AJ: make sure to pick up all patches that are specified as a wall const polyBoundaryMesh& bMesh = cellDistFuncs::mesh().boundaryMesh(); labelHashSet wallPatchIDs(bMesh.size()); - forAll(bMesh, patchI) + + forAll (bMesh, patchI) { if (bMesh[patchI].isWall()) { @@ -87,7 +88,7 @@ void Foam::wallDist::correct() transfer(wave.distance()); // Transfer values on patches into boundaryField of *this - forAll(boundaryField(), patchI) + forAll (boundaryField(), patchI) { if (!isA(boundaryField()[patchI])) { diff --git a/src/finiteVolume/fvMesh/wallDist/wallDistData.C b/src/finiteVolume/fvMesh/wallDist/wallDistData.C index 5315c75f3..3f6cb68de 100644 --- a/src/finiteVolume/fvMesh/wallDist/wallDistData.C +++ b/src/finiteVolume/fvMesh/wallDist/wallDistData.C @@ -72,7 +72,8 @@ Foam::wallDistData::~wallDistData() template void Foam::wallDistData::correct() { - Info<< "wallDistData.correct() called" << endl; + Info<< "wallDistData.correct() called" << endl; + const polyMesh& mesh = cellDistFuncs::mesh(); // diff --git a/src/meshTools/cellDist/cellDistFuncs.H b/src/meshTools/cellDist/cellDistFuncs.H index 978c1d25f..ffe18704c 100644 --- a/src/meshTools/cellDist/cellDistFuncs.H +++ b/src/meshTools/cellDist/cellDistFuncs.H @@ -80,10 +80,12 @@ class cellDistFuncs //- Disallow default bitwise assignment void operator=(const cellDistFuncs&); + public: ClassName("cellDistFuncs"); + // Constructors //- Construct from mesh @@ -101,7 +103,7 @@ public: //- Get patchIDs of named patches labelHashSet getPatchIDs(const wordList&) const; - //- Get patchIDs of/derived off certain type (e.g. 'processorPolyPatch') + //- Get patchIDs of/derived off certain type (e.g. processorPolyPatch) // Uses isA, not isType template labelHashSet getPatchIDs() const; diff --git a/src/meshTools/cellDist/patchWave/patchWave.C b/src/meshTools/cellDist/patchWave/patchWave.C index 219e21362..0c5367b83 100644 --- a/src/meshTools/cellDist/patchWave/patchWave.C +++ b/src/meshTools/cellDist/patchWave/patchWave.C @@ -126,6 +126,7 @@ Foam::label Foam::patchWave::getValues(const MeshWave& waveInfo) } } } + return nIllegal; } diff --git a/src/meshTools/cellDist/patchWave/patchWave.H b/src/meshTools/cellDist/patchWave/patchWave.H index 75501a7d9..235e86a37 100644 --- a/src/meshTools/cellDist/patchWave/patchWave.H +++ b/src/meshTools/cellDist/patchWave/patchWave.H @@ -109,6 +109,7 @@ public: bool correctWalls = true ); + // Destructor virtual ~patchWave(); @@ -145,7 +146,6 @@ public: { return patchDistance_; } - }; diff --git a/src/meshTools/cellDist/wallPoint/wallPoint.H b/src/meshTools/cellDist/wallPoint/wallPoint.H index 9304bf545..dc86944f2 100644 --- a/src/meshTools/cellDist/wallPoint/wallPoint.H +++ b/src/meshTools/cellDist/wallPoint/wallPoint.H @@ -71,6 +71,7 @@ class wallPoint //- normal distance (squared) from cellcenter to origin scalar distSqr_; + // Private Member Functions //- Evaluate distance to point. Update distSqr, origin from whomever @@ -88,7 +89,7 @@ public: // Static data members - //- initial point far away. + //- Initial point far away static point greatPoint; @@ -130,7 +131,8 @@ public: // still contains original (invalid) value. inline bool valid() const; - //- Check for identical geometrical data. Used for cyclics checking. + //- Check for identical geometrical data + // Used for cyclics checking inline bool sameGeometry ( const polyMesh&, @@ -138,7 +140,7 @@ public: const scalar ) const; - //- Convert any absolute coordinates into relative to (patch)face + //- Convert any absolute coordinates into relative to (patch) face // centre inline void leaveDomain ( diff --git a/src/meshTools/cellDist/wallPoint/wallPointData.H b/src/meshTools/cellDist/wallPoint/wallPointData.H index 9001478f8..007f41eba 100644 --- a/src/meshTools/cellDist/wallPoint/wallPointData.H +++ b/src/meshTools/cellDist/wallPoint/wallPointData.H @@ -65,7 +65,7 @@ class wallPointData { // Private data - //- data at nearest wall center + //- Data at nearest wall center Type data_; diff --git a/src/meshTools/meshSearch/meshSearch.H b/src/meshTools/meshSearch/meshSearch.H index 110b8c84e..00017fc4c 100644 --- a/src/meshTools/meshSearch/meshSearch.H +++ b/src/meshTools/meshSearch/meshSearch.H @@ -135,7 +135,7 @@ class meshSearch ) const; //- Calculate offset vector in direction dir with as length a - // fraction of the cell size (of the cell straddling boundary face) + // fraction of the cell size of the cell straddling boundary face vector offset ( const point& bPoint, @@ -183,14 +183,14 @@ public: return mesh_; } - //- Get (demand driven) reference to octree holding all + //- Get demand driven reference to octree holding all // boundary faces const indexedOctree& boundaryTree() const; - //- Get (demand driven) reference to octree holding all cells + //- Get demand driven reference to octree holding all cells const indexedOctree& cellTree() const; - //- Get (demand driven) reference to octree holding all cell centres + //- Get demand driven reference to octree holding all cell centres const indexedOctree& cellCentreTree() const; diff --git a/src/sampling/meshToMeshInterpolation/meshToMesh/calculateMeshToMeshAddressing.C b/src/sampling/meshToMeshInterpolation/meshToMesh/calculateMeshToMeshAddressing.C index 760b37c0a..296fb963c 100644 --- a/src/sampling/meshToMeshInterpolation/meshToMesh/calculateMeshToMeshAddressing.C +++ b/src/sampling/meshToMeshInterpolation/meshToMesh/calculateMeshToMeshAddressing.C @@ -244,10 +244,9 @@ void meshToMesh::cellAddresses bool forceFind ) const { - label nCellsOutsideAddressing = 0; - // the implemented search method is a simple neighbour array search. + // The implemented search method is a simple neighbour array search. // It starts from a cell zero, searches its neighbours and finds one // which is nearer to the target point than the current position. // The location of the "current position" is reset to that cell and @@ -264,7 +263,6 @@ void meshToMesh::cellAddresses forAll (points, toI) { - scalar localTol = cellCentreDistanceTol; bool isBoundary = false; @@ -272,7 +270,7 @@ void meshToMesh::cellAddresses // pick up target position const vector& p = points[toI]; - // set the sqr-distance + // Set the sqr-distance scalar distSqr = magSqr(p - centresFrom[curCell]); bool closer; @@ -281,7 +279,7 @@ void meshToMesh::cellAddresses { closer = false; - // set the current list of neighbouring cells + // Set the current list of neighbouring cells const labelList& neighbours = cc[curCell]; forAll (neighbours, nI) @@ -289,7 +287,7 @@ void meshToMesh::cellAddresses scalar curDistSqr = magSqr(p - centresFrom[neighbours[nI]]); - // search through all the neighbours. + // Search through all the neighbours. // If the cell is closer, reset current cell and distance if (curDistSqr < (1 - SMALL)*distSqr) {