From 7ba2ddce9f6a3bd84a3297411b70732a6e59f4e4 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Fri, 11 Mar 2011 16:33:04 +0000 Subject: [PATCH] Clean-up --- src/OpenFOAM/meshes/meshTools/matchPoints.C | 5 ++-- .../polyMesh/globalMeshData/globalMeshData.H | 6 ++--- .../meshes/polyMesh/polyMeshFromShapeMesh.C | 6 +++-- .../derived/cohesive/cohesivePolyPatch.C | 24 +++++++++---------- .../polyPatches/polyPatch/polyPatch.C | 1 + .../PrimitivePatch/PrimitivePatchMeshData.C | 2 +- .../primitiveMeshCheck/primitiveMeshCheck.C | 1 - 7 files changed, 24 insertions(+), 21 deletions(-) diff --git a/src/OpenFOAM/meshes/meshTools/matchPoints.C b/src/OpenFOAM/meshes/meshTools/matchPoints.C index 690a3c1c9..0c0d6efe1 100644 --- a/src/OpenFOAM/meshes/meshTools/matchPoints.C +++ b/src/OpenFOAM/meshes/meshTools/matchPoints.C @@ -59,7 +59,7 @@ bool Foam::matchPoints SortableList pts1MagSqr(magSqr(pts1 - compareOrigin)); - forAll(pts0MagSqr, i) + forAll (pts0MagSqr, i) { scalar dist0 = pts0MagSqr[i]; @@ -78,7 +78,7 @@ bool Foam::matchPoints // Go through range of equal mag and find nearest vector. scalar minDistSqr = VGREAT; label minFaceI = -1; - + for ( label j = startI; @@ -90,6 +90,7 @@ bool Foam::matchPoints ) { label faceI = pts1MagSqr.indices()[j]; + // Compare actual vectors scalar distSqr = magSqr(pts0[face0I] - pts1[faceI]); diff --git a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.H b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.H index cf2f6e2d4..0eeadf1a1 100644 --- a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.H +++ b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.H @@ -27,9 +27,9 @@ Class Description Various mesh related information for a parallel run. Upon construction - constructs all info by using parallel communication. + constructs all info by using parallel communication. - Requires: + Requires: - all processor patches to have correct ordering. - all processorPatches to have their transforms set ('makeTransforms') @@ -148,7 +148,7 @@ class globalMeshData // Processor patch addressing (be careful if not running in parallel!) - //- List of processor patch labels + //- List of processor patch labels // (size of list = number of processor patches) labelList processorPatches_; diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshFromShapeMesh.C b/src/OpenFOAM/meshes/polyMesh/polyMeshFromShapeMesh.C index 29eb1d917..f1f41a52c 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshFromShapeMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshFromShapeMesh.C @@ -506,8 +506,10 @@ Foam::polyMesh::polyMesh if (!found) { - FatalErrorIn("polyMesh::polyMesh(... construct from shapes...)") - << "face " << faceI << " of patch " << patchI + FatalErrorIn + ( + "polyMesh::polyMesh(... construct from shapes...)" + ) << "face " << faceI << " of patch " << patchI << " does not seem to belong to cell " << cellInside << " which, according to the addressing, " << "should be next to it." diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/derived/cohesive/cohesivePolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/derived/cohesive/cohesivePolyPatch.C index 8256dd066..e137e3208 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/derived/cohesive/cohesivePolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/derived/cohesive/cohesivePolyPatch.C @@ -136,9 +136,9 @@ bool cohesivePolyPatch::order } label oldFacesStartIndex = -1; - for(label i=0; i