Standardized cell, patch, face and processor loop index names

This commit is contained in:
Henry Weller
2016-04-25 12:00:53 +01:00
parent 8c4f6b8fcb
commit a8bf4be58a
525 changed files with 6296 additions and 6296 deletions

View File

@ -244,16 +244,16 @@ int main(int argc, char *argv[])
newPatches.setSize(nRegions1 + nRegions2);
label newPatchI = 0;
label newPatchi = 0;
forAll(surface1.patches(), patchi)
{
newPatches[newPatchI++] = surface1.patches()[patchi];
newPatches[newPatchi++] = surface1.patches()[patchi];
}
forAll(surface2.patches(), patchi)
{
newPatches[newPatchI++] = surface2.patches()[patchi];
newPatches[newPatchi++] = surface2.patches()[patchi];
}
}

View File

@ -83,15 +83,15 @@ bool validTri
// Note: discards normal information - sides of baffle are merged.
forAll(fFaces, i)
{
label nbrFaceI = fFaces[i];
label nbrFacei = fFaces[i];
if (nbrFaceI <= facei)
if (nbrFacei <= facei)
{
// lower numbered faces already checked
continue;
}
const labelledTri& nbrF = surf[nbrFaceI];
const labelledTri& nbrF = surf[nbrFacei];
if
(
@ -102,7 +102,7 @@ bool validTri
{
WarningInFunction
<< "triangle " << facei << " vertices " << f
<< " has the same vertices as triangle " << nbrFaceI
<< " has the same vertices as triangle " << nbrFacei
<< " vertices " << nbrF
<< " coords:" << f.points(surf.points())
<< endl;
@ -534,9 +534,9 @@ int main(int argc, char *argv[])
if (myFaces.size() > 2)
{
forAll(myFaces, myFaceI)
forAll(myFaces, myFacei)
{
problemFaces.append(myFaces[myFaceI]);
problemFaces.append(myFaces[myFacei]);
}
nMultEdges++;

View File

@ -405,28 +405,28 @@ static void markRegion
forAll(eFaces, i)
{
label nbrFaceI = eFaces[i];
label nbrFacei = eFaces[i];
if (faceToEdge[nbrFaceI] != -1)
if (faceToEdge[nbrFacei] != -1)
{
if (collapseRegion[nbrFaceI] == -1)
if (collapseRegion[nbrFacei] == -1)
{
markRegion
(
surf,
faceToEdge,
regionI,
nbrFaceI,
nbrFacei,
collapseRegion
);
}
else if (collapseRegion[nbrFaceI] != regionI)
else if (collapseRegion[nbrFacei] != regionI)
{
FatalErrorInFunction
<< "Edge:" << edgeI << " between face " << facei
<< " with region " << regionI
<< " and face " << nbrFaceI
<< " with region " << collapseRegion[nbrFaceI]
<< " and face " << nbrFacei
<< " with region " << collapseRegion[nbrFacei]
<< endl;
}
}

View File

@ -752,9 +752,9 @@ surfaceFeatures::edgeStatus checkFlatRegionEdge
DynamicList<Foam::vector> normals(2);
DynamicList<labelList> bins(2);
forAll(eFaces, eFaceI)
forAll(eFaces, eFacei)
{
const Foam::vector& n = surf.faceNormals()[eFaces[eFaceI]];
const Foam::vector& n = surf.faceNormals()[eFaces[eFacei]];
// Find the normal in normals
label index = -1;
@ -769,7 +769,7 @@ surfaceFeatures::edgeStatus checkFlatRegionEdge
if (index != -1)
{
bins[index].append(eFaceI);
bins[index].append(eFacei);
}
else if (normals.size() >= 2)
{
@ -783,7 +783,7 @@ surfaceFeatures::edgeStatus checkFlatRegionEdge
else
{
normals.append(n);
bins.append(labelList(1, eFaceI));
bins.append(labelList(1, eFacei));
}
}

View File

@ -531,11 +531,11 @@ int main(int argc, char *argv[])
visitedFace[hitSurfI][facei] = true;
forAll(newFacesFromSplit, newFaceI)
forAll(newFacesFromSplit, newFacei)
{
const labelledTri& fN = newFacesFromSplit[newFaceI];
const labelledTri& fN = newFacesFromSplit[newFacei];
if (newFaceI == 0)
if (newFacei == 0)
{
newFaces[hitSurfI][facei] = fN;
}

View File

@ -76,19 +76,19 @@ void writeProcStats
Pstream::gatherList(nFaces);
Pstream::scatterList(nFaces);
forAll(surfBb, procI)
forAll(surfBb, proci)
{
const List<treeBoundBox>& bbs = meshBb[procI];
const List<treeBoundBox>& bbs = meshBb[proci];
Info<< "processor" << procI << nl
Info<< "processor" << proci << nl
<< "\tMesh bounds : " << bbs[0] << nl;
for (label i = 1; i < bbs.size(); i++)
{
Info<< "\t " << bbs[i]<< nl;
}
Info<< "\tSurface bounding box : " << surfBb[procI] << nl
<< "\tTriangles : " << nFaces[procI] << nl
<< "\tVertices : " << nPoints[procI]
Info<< "\tSurface bounding box : " << surfBb[proci] << nl
<< "\tTriangles : " << nFaces[proci] << nl
<< "\tVertices : " << nPoints[proci]
<< endl;
}
Info<< endl;

View File

@ -357,7 +357,7 @@ void walkSplitLine
const boolList& borderEdge,
const labelList& borderPoint,
const label startFaceI,
const label startFacei,
const label startEdgeI, // is border edge
const label startPointI, // is border point
@ -365,7 +365,7 @@ void walkSplitLine
Map<label>& faceToPoint
)
{
label facei = startFaceI;
label facei = startFacei;
label edgeI = startEdgeI;
label pointI = startPointI;
@ -446,7 +446,7 @@ void walkSplitLine
label sharedFace
(
const triSurface& surf,
const label firstFaceI,
const label firstFacei,
const label sharedEdgeI
)
{
@ -454,7 +454,7 @@ label sharedFace
const edge& e = surf.edges()[sharedEdgeI];
const triSurface::FaceType& f = surf.localFaces()[firstFaceI];
const triSurface::FaceType& f = surf.localFaces()[firstFacei];
label startIndex = findIndex(f, e.start());
@ -467,16 +467,16 @@ label sharedFace
const labelList& eFaces = surf.sortedEdgeFaces()[sharedEdgeI];
// Get position of face in sorted edge faces
label faceIndex = findIndex(eFaces, firstFaceI);
label faceIndex = findIndex(eFaces, firstFacei);
if (edgeOrder)
{
// Get face before firstFaceI
// Get face before firstFacei
return eFaces[eFaces.rcIndex(faceIndex)];
}
else
{
// Get face after firstFaceI
// Get face after firstFacei
return eFaces[eFaces.fcIndex(faceIndex)];
}
}
@ -808,17 +808,17 @@ int main(int argc, char *argv[])
// Pick any face using edge to start from.
const labelList& eFaces = surf.edgeFaces()[startEdgeI];
label firstFaceI = eFaces[0];
label firstFacei = eFaces[0];
// Find second face which is from same surface i.e. has outwards
// pointing normal as well (actually bit more complex than this)
label secondFaceI = sharedFace(surf, firstFaceI, startEdgeI);
label secondFacei = sharedFace(surf, firstFacei, startEdgeI);
Info<< "Starting local walk from:" << endl
<< " edge :" << startEdgeI << endl
<< " point:" << startPointI << endl
<< " face0:" << firstFaceI << endl
<< " face1:" << secondFaceI << endl
<< " face0:" << firstFacei << endl
<< " face1:" << secondFacei << endl
<< endl;
// From face on border edge to edge.
@ -826,7 +826,7 @@ int main(int argc, char *argv[])
// From face connected to border point (but not border edge) to point.
Map<label> faceToPoint(2*nBorderPoints);
faceToEdge.insert(firstFaceI, startEdgeI);
faceToEdge.insert(firstFacei, startEdgeI);
walkSplitLine
(
@ -834,7 +834,7 @@ int main(int argc, char *argv[])
borderEdge,
borderPoint,
firstFaceI,
firstFacei,
startEdgeI,
startPointI,
@ -842,7 +842,7 @@ int main(int argc, char *argv[])
faceToPoint
);
faceToEdge.insert(secondFaceI, startEdgeI);
faceToEdge.insert(secondFacei, startEdgeI);
walkSplitLine
(
@ -850,7 +850,7 @@ int main(int argc, char *argv[])
borderEdge,
borderPoint,
secondFaceI,
secondFacei,
startEdgeI,
startPointI,

View File

@ -112,12 +112,12 @@ bool repatchFace
{
bool changed = false;
label bFaceI = facei - mesh.nInternalFaces();
label bFacei = facei - mesh.nInternalFaces();
if (nearest[bFaceI] != -1)
if (nearest[bFacei] != -1)
{
// Use boundary mesh one.
label bMeshPatchID = bMesh.whichPatch(nearest[bFaceI]);
label bMeshPatchID = bMesh.whichPatch(nearest[bFacei]);
label patchID = surfToMeshPatch[bMeshPatchID];
@ -255,11 +255,11 @@ int main(int argc, char *argv[])
// Dump unmatched faces to faceSet for debugging.
faceSet unmatchedFaces(mesh, "unmatchedFaces", nearest.size()/100);
forAll(nearest, bFaceI)
forAll(nearest, bFacei)
{
if (nearest[bFaceI] == -1)
if (nearest[bFacei] == -1)
{
unmatchedFaces.insert(mesh.nInternalFaces() + bFaceI);
unmatchedFaces.insert(mesh.nInternalFaces() + bFacei);
}
}
@ -293,9 +293,9 @@ int main(int argc, char *argv[])
}
else
{
forAll(nearest, bFaceI)
forAll(nearest, bFacei)
{
label facei = mesh.nInternalFaces() + bFaceI;
label facei = mesh.nInternalFaces() + bFacei;
if (repatchFace(mesh, bMesh, nearest, patchMap, facei, meshMod))
{