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 43beb06018
commit 450728ea84
525 changed files with 6296 additions and 6296 deletions

View File

@ -212,7 +212,7 @@ void Foam::attachDetach::detachInterface
);
// Add renumbered face into the slave patch
//label addedFaceI =
//label addedFacei =
ref.setAction
(
polyAddFace
@ -235,7 +235,7 @@ void Foam::attachDetach::detachInterface
// << " fc:" << ref.faces()[curFaceID].centre(newPts)
// << " next to cell: " << nei[curFaceID]
// << " and adding face: " << newFace
// << " fc:" << ref.faces()[addedFaceI].centre(newPts)
// << " fc:" << ref.faces()[addedFacei].centre(newPts)
// << " next to cell: " << own[curFaceID] << endl;
//}
}
@ -259,7 +259,7 @@ void Foam::attachDetach::detachInterface
);
// Add renumbered face into the slave patch
//label addedFaceI =
//label addedFacei =
ref.setAction
(
polyAddFace
@ -282,7 +282,7 @@ void Foam::attachDetach::detachInterface
// << " fc:" << ref.faces()[curFaceID].centre(newPts)
// << " next to cell: " << own[curFaceID]
// << " and adding face: " << newFace
// << " fc:" << ref.faces()[addedFaceI].centre(newPts)
// << " fc:" << ref.faces()[addedFacei].centre(newPts)
// << " next to cell: " << nei[curFaceID] << endl;
//}
}

View File

@ -354,9 +354,9 @@ Foam::labelList Foam::boundaryMesh::edgeToFace
const labelList& eFaces = mesh().edgeFaces()[edgeI];
forAll(eFaces, eFaceI)
forAll(eFaces, eFacei)
{
label facei = eFaces[eFaceI];
label facei = eFaces[eFacei];
if (faceRegion[facei] == -1)
{
@ -482,7 +482,7 @@ void Foam::boundaryMesh::read(const polyMesh& mesh)
meshFace_.setSize(nBFaces);
label bFaceI = 0;
label bFacei = 0;
// Collect all boundary faces.
forAll(mesh.boundaryMesh(), patchi)
@ -497,19 +497,19 @@ void Foam::boundaryMesh::read(const polyMesh& mesh)
pp.name(),
patchi,
pp.size(),
bFaceI,
bFacei,
pp.type()
)
);
// Collect all faces in global numbering.
forAll(pp, patchFaceI)
forAll(pp, patchFacei)
{
meshFace_[bFaceI] = pp.start() + patchFaceI;
meshFace_[bFacei] = pp.start() + patchFacei;
bFaces[bFaceI] = pp[patchFaceI];
bFaces[bFacei] = pp[patchFacei];
bFaceI++;
bFacei++;
}
}
@ -697,7 +697,7 @@ void Foam::boundaryMesh::readTriSurface(const fileName& fName)
meshFace_.setSize(surf.size());
label bFaceI = 0;
label bFacei = 0;
// Current region number
label surfRegion = regions[0];
@ -708,7 +708,7 @@ void Foam::boundaryMesh::readTriSurface(const fileName& fName)
// Index in bFaces of start of current patch
label startFaceI = 0;
label startFacei = 0;
forAll(indices, indexI)
{
@ -721,8 +721,8 @@ void Foam::boundaryMesh::readTriSurface(const fileName& fName)
// Change of region. We now know the size of the previous one.
boundaryPatch& bp = patches_[foamRegion];
bp.size() = bFaceI - startFaceI;
bp.start() = startFaceI;
bp.size() = bFacei - startFacei;
bp.start() = startFacei;
surfRegion = tri.region();
foamRegion = regionToBoundaryPatch[surfRegion];
@ -731,19 +731,19 @@ void Foam::boundaryMesh::readTriSurface(const fileName& fName)
<< foamRegion << " with name " << patches_[foamRegion].name()
<< endl;
startFaceI = bFaceI;
startFacei = bFacei;
}
meshFace_[bFaceI] = triI;
meshFace_[bFacei] = triI;
bFaces[bFaceI++] = face(tri);
bFaces[bFacei++] = face(tri);
}
// Final region
boundaryPatch& bp = patches_[foamRegion];
bp.size() = bFaceI - startFaceI;
bp.start() = startFaceI;
bp.size() = bFacei - startFacei;
bp.start() = startFacei;
//
// Construct single primitivePatch for all of boundary
@ -821,9 +821,9 @@ void Foam::boundaryMesh::writeTriSurface(const fileName& fName) const
{
const boundaryPatch& bp = patches_[patchi];
forAll(bp, patchFaceI)
forAll(bp, patchFacei)
{
label facei = bp.start() + patchFaceI;
label facei = bp.start() + patchFacei;
label triVertI = 3*startTri[facei];
@ -870,17 +870,17 @@ Foam::labelList Foam::boundaryMesh::getNearest
DynamicList<label> leftFaces(mesh().size()/2);
DynamicList<label> rightFaces(mesh().size()/2);
forAll(mesh(), bFaceI)
forAll(mesh(), bFacei)
{
scalar sign = mesh().faceNormals()[bFaceI] & splitNormal_;
scalar sign = mesh().faceNormals()[bFacei] & splitNormal_;
if (sign > -1e-5)
{
rightFaces.append(bFaceI);
rightFaces.append(bFacei);
}
if (sign < 1e-5)
{
leftFaces.append(bFaceI);
leftFaces.append(bFacei);
}
}
@ -976,32 +976,32 @@ Foam::labelList Foam::boundaryMesh::getNearest
// Search nearest triangle centre for every polyMesh boundary face
//
labelList nearestBFaceI(pMesh.nFaces() - pMesh.nInternalFaces());
labelList nearestBFacei(pMesh.nFaces() - pMesh.nInternalFaces());
treeBoundBox tightest;
const scalar searchDimSqr = magSqr(searchSpan);
forAll(nearestBFaceI, patchFaceI)
forAll(nearestBFacei, patchFacei)
{
label meshFaceI = pMesh.nInternalFaces() + patchFaceI;
label meshFacei = pMesh.nInternalFaces() + patchFacei;
const point& ctr = pMesh.faceCentres()[meshFaceI];
const point& ctr = pMesh.faceCentres()[meshFacei];
if (debug && (patchFaceI % 1000) == 0)
if (debug && (patchFacei % 1000) == 0)
{
Pout<< "getNearest : patchFace:" << patchFaceI
<< " meshFaceI:" << meshFaceI << " ctr:" << ctr << endl;
Pout<< "getNearest : patchFace:" << patchFacei
<< " meshFacei:" << meshFacei << " ctr:" << ctr << endl;
}
// Get normal from area vector
vector n = pMesh.faceAreas()[meshFaceI];
vector n = pMesh.faceAreas()[meshFacei];
scalar area = mag(n);
n /= area;
scalar typDim = -GREAT;
const face& f = pMesh.faces()[meshFaceI];
const face& f = pMesh.faces()[meshFacei];
forAll(f, fp)
{
@ -1020,14 +1020,14 @@ Foam::labelList Foam::boundaryMesh::getNearest
if (leftInfo.hit())
{
// Found in both trees. Compare normals.
label rightFaceI = rightFaces[rightInfo.index()];
label leftFaceI = leftFaces[leftInfo.index()];
label rightFacei = rightFaces[rightInfo.index()];
label leftFacei = leftFaces[leftInfo.index()];
label rightDist = mag(rightInfo.hitPoint()-ctr);
label leftDist = mag(leftInfo.hitPoint()-ctr);
scalar rightSign = n & ns[rightFaceI];
scalar leftSign = n & ns[leftFaceI];
scalar rightSign = n & ns[rightFacei];
scalar leftSign = n & ns[leftFacei];
if
(
@ -1038,11 +1038,11 @@ Foam::labelList Foam::boundaryMesh::getNearest
// Both same sign. Choose nearest.
if (rightDist < leftDist)
{
nearestBFaceI[patchFaceI] = rightFaceI;
nearestBFacei[patchFacei] = rightFacei;
}
else
{
nearestBFaceI[patchFaceI] = leftFaceI;
nearestBFacei[patchFacei] = leftFacei;
}
}
else
@ -1061,11 +1061,11 @@ Foam::labelList Foam::boundaryMesh::getNearest
// Different sign and nearby. Choosing matching normal
if (rightSign > 0)
{
nearestBFaceI[patchFaceI] = rightFaceI;
nearestBFacei[patchFacei] = rightFacei;
}
else
{
nearestBFaceI[patchFaceI] = leftFaceI;
nearestBFacei[patchFacei] = leftFacei;
}
}
else
@ -1073,11 +1073,11 @@ Foam::labelList Foam::boundaryMesh::getNearest
// Different sign but faraway. Choosing nearest.
if (rightDist < leftDist)
{
nearestBFaceI[patchFaceI] = rightFaceI;
nearestBFacei[patchFacei] = rightFacei;
}
else
{
nearestBFaceI[patchFaceI] = leftFaceI;
nearestBFacei[patchFacei] = leftFacei;
}
}
}
@ -1086,8 +1086,8 @@ Foam::labelList Foam::boundaryMesh::getNearest
{
// Found in right but not in left. Choose right regardless if
// correct sign. Note: do we want this?
label rightFaceI = rightFaces[rightInfo.index()];
nearestBFaceI[patchFaceI] = rightFaceI;
label rightFacei = rightFaces[rightInfo.index()];
nearestBFacei[patchFacei] = rightFacei;
}
}
else
@ -1098,17 +1098,17 @@ Foam::labelList Foam::boundaryMesh::getNearest
{
// Found in left but not in right. Choose left regardless if
// correct sign. Note: do we want this?
nearestBFaceI[patchFaceI] = leftFaces[leftInfo.index()];
nearestBFacei[patchFacei] = leftFaces[leftInfo.index()];
}
else
{
// No face found in left tree.
nearestBFaceI[patchFaceI] = -1;
nearestBFacei[patchFacei] = -1;
}
}
}
return nearestBFaceI;
return nearestBFacei;
}
@ -1132,28 +1132,28 @@ void Foam::boundaryMesh::patchify
label nNewPatches = patches_.size();
forAll(oldPatches, oldPatchI)
forAll(oldPatches, oldPatchi)
{
const polyPatch& patch = oldPatches[oldPatchI];
const label newPatchI = findPatchID(patch.name());
const polyPatch& patch = oldPatches[oldPatchi];
const label newPatchi = findPatchID(patch.name());
if (newPatchI != -1)
if (newPatchi != -1)
{
nameToIndex.insert(patch.name(), newPatchI);
indexToName.insert(newPatchI, patch.name());
nameToIndex.insert(patch.name(), newPatchi);
indexToName.insert(newPatchi, patch.name());
}
}
// Include all boundaryPatches not yet in nameToIndex (i.e. not in old
// patches)
forAll(patches_, bPatchI)
forAll(patches_, bPatchi)
{
const boundaryPatch& bp = patches_[bPatchI];
const boundaryPatch& bp = patches_[bPatchi];
if (!nameToIndex.found(bp.name()))
{
nameToIndex.insert(bp.name(), bPatchI);
indexToName.insert(bPatchI, bp.name());
nameToIndex.insert(bp.name(), bPatchi);
indexToName.insert(bPatchi, bp.name());
}
}
@ -1165,21 +1165,21 @@ void Foam::boundaryMesh::patchify
List<polyPatch*> newPatchPtrList(nNewPatches);
label meshFaceI = newMesh.nInternalFaces();
label meshFacei = newMesh.nInternalFaces();
// First patch gets all non-coupled faces
label facesToBeDone = newMesh.nFaces() - newMesh.nInternalFaces();
forAll(patches_, bPatchI)
forAll(patches_, bPatchi)
{
const boundaryPatch& bp = patches_[bPatchI];
const boundaryPatch& bp = patches_[bPatchi];
const label newPatchI = nameToIndex[bp.name()];
const label newPatchi = nameToIndex[bp.name()];
// Find corresponding patch in polyMesh
const label oldPatchI = findPatchID(oldPatches, bp.name());
const label oldPatchi = findPatchID(oldPatches, bp.name());
if (oldPatchI == -1)
if (oldPatchi == -1)
{
// Newly created patch. Gets all or zero faces.
if (debug)
@ -1188,17 +1188,17 @@ void Foam::boundaryMesh::patchify
<< " type:" << bp.physicalType() << endl;
}
newPatchPtrList[newPatchI] = polyPatch::New
newPatchPtrList[newPatchi] = polyPatch::New
(
bp.physicalType(),
bp.name(),
facesToBeDone,
meshFaceI,
newPatchI,
meshFacei,
newPatchi,
newMesh.boundaryMesh()
).ptr();
meshFaceI += facesToBeDone;
meshFacei += facesToBeDone;
// first patch gets all boundary faces; all others get 0.
facesToBeDone = 0;
@ -1206,7 +1206,7 @@ void Foam::boundaryMesh::patchify
else
{
// Existing patch. Gets all or zero faces.
const polyPatch& oldPatch = oldPatches[oldPatchI];
const polyPatch& oldPatch = oldPatches[oldPatchi];
if (debug)
{
@ -1214,15 +1214,15 @@ void Foam::boundaryMesh::patchify
<< oldPatch.name() << endl;
}
newPatchPtrList[newPatchI] = oldPatch.clone
newPatchPtrList[newPatchi] = oldPatch.clone
(
newMesh.boundaryMesh(),
newPatchI,
newPatchi,
facesToBeDone,
meshFaceI
meshFacei
).ptr();
meshFaceI += facesToBeDone;
meshFacei += facesToBeDone;
// first patch gets all boundary faces; all others get 0.
facesToBeDone = 0;
@ -1266,9 +1266,9 @@ void Foam::boundaryMesh::patchify
(newMesh.nFaces() - newMesh.nInternalFaces())
/ nNewPatches;
forAll(patchFaces, newPatchI)
forAll(patchFaces, newPatchi)
{
patchFaces[newPatchI].setCapacity(nAvgFaces);
patchFaces[newPatchi].setCapacity(nAvgFaces);
}
//
@ -1276,38 +1276,38 @@ void Foam::boundaryMesh::patchify
// since will contain all faces.
//
forAll(oldPatches, oldPatchI)
forAll(oldPatches, oldPatchi)
{
const polyPatch& patch = oldPatches[oldPatchI];
const polyPatch& patch = oldPatches[oldPatchi];
forAll(patch, patchFaceI)
forAll(patch, patchFacei)
{
// Put face into region given by nearest boundary face
label meshFaceI = patch.start() + patchFaceI;
label meshFacei = patch.start() + patchFacei;
label bFaceI = meshFaceI - newMesh.nInternalFaces();
label bFacei = meshFacei - newMesh.nInternalFaces();
patchFaces[whichPatch(nearest[bFaceI])].append(meshFaceI);
patchFaces[whichPatch(nearest[bFacei])].append(meshFacei);
}
}
forAll(patchFaces, newPatchI)
forAll(patchFaces, newPatchi)
{
patchFaces[newPatchI].shrink();
patchFaces[newPatchi].shrink();
}
// Change patch > 0. (since above we put all faces into the zeroth
// patch)
for (label newPatchI = 1; newPatchI < patchFaces.size(); newPatchI++)
for (label newPatchi = 1; newPatchi < patchFaces.size(); newPatchi++)
{
const labelList& pFaces = patchFaces[newPatchI];
const labelList& pFaces = patchFaces[newPatchi];
forAll(pFaces, pFaceI)
forAll(pFaces, pFacei)
{
polyMeshRepatcher.changePatchID(pFaces[pFaceI], newPatchI);
polyMeshRepatcher.changePatchID(pFaces[pFacei], newPatchi);
}
}
@ -1606,33 +1606,33 @@ void Foam::boundaryMesh::addPatch(const word& patchName)
void Foam::boundaryMesh::deletePatch(const word& patchName)
{
const label delPatchI = findPatchID(patchName);
const label delPatchi = findPatchID(patchName);
if (delPatchI == -1)
if (delPatchi == -1)
{
FatalErrorInFunction
<< "Can't find patch named " << patchName
<< abort(FatalError);
}
if (patches_[delPatchI].size())
if (patches_[delPatchi].size())
{
FatalErrorInFunction
<< "Trying to delete non-empty patch " << patchName
<< endl << "Current size:" << patches_[delPatchI].size()
<< endl << "Current size:" << patches_[delPatchi].size()
<< abort(FatalError);
}
PtrList<boundaryPatch> newPatches(patches_.size() - 1);
for (label patchi = 0; patchi < delPatchI; patchi++)
for (label patchi = 0; patchi < delPatchi; patchi++)
{
newPatches.set(patchi, patches_[patchi].clone());
}
// Move patches down, starting from delPatchI.
// Move patches down, starting from delPatchi.
for (label patchi = delPatchI + 1; patchi < patches_.size(); patchi++)
for (label patchi = delPatchi + 1; patchi < patches_.size(); patchi++)
{
newPatches.set(patchi - 1, patches_[patchi].clone());
}
@ -1839,7 +1839,7 @@ Foam::label Foam::boundaryMesh::getNTris(const label facei) const
Foam::label Foam::boundaryMesh::getNTris
(
const label startFaceI,
const label startFacei,
const label nFaces,
labelList& nTris
) const
@ -1850,7 +1850,7 @@ Foam::label Foam::boundaryMesh::getNTris
for (label i = 0; i < nFaces; i++)
{
label faceNTris = getNTris(startFaceI + i);
label faceNTris = getNTris(startFacei + i);
nTris[i] = faceNTris;
@ -1864,7 +1864,7 @@ Foam::label Foam::boundaryMesh::getNTris
// consecutive vertices per triangle.
void Foam::boundaryMesh::triangulate
(
const label startFaceI,
const label startFacei,
const label nFaces,
const label totalNTris,
labelList& triVerts
@ -1877,7 +1877,7 @@ void Foam::boundaryMesh::triangulate
for (label i = 0; i < nFaces; i++)
{
label facei = startFaceI + i;
label facei = startFacei + i;
const face& f = mesh()[facei];
@ -1890,9 +1890,9 @@ void Foam::boundaryMesh::triangulate
// Copy into triVerts
forAll(triFaces, triFaceI)
forAll(triFaces, triFacei)
{
const face& triF = triFaces[triFaceI];
const face& triF = triFaces[triFacei];
triVerts[vertI++] = triF[0];
triVerts[vertI++] = triF[1];
@ -1905,11 +1905,11 @@ void Foam::boundaryMesh::triangulate
// Number of local points in subset.
Foam::label Foam::boundaryMesh::getNPoints
(
const label startFaceI,
const label startFacei,
const label nFaces
) const
{
SubList<face> patchFaces(mesh(), nFaces, startFaceI);
SubList<face> patchFaces(mesh(), nFaces, startFacei);
primitivePatch patch(patchFaces, mesh().points());
@ -1920,14 +1920,14 @@ Foam::label Foam::boundaryMesh::getNPoints
// Triangulation of face subset in local coords.
void Foam::boundaryMesh::triangulateLocal
(
const label startFaceI,
const label startFacei,
const label nFaces,
const label totalNTris,
labelList& triVerts,
labelList& localToGlobal
) const
{
SubList<face> patchFaces(mesh(), nFaces, startFaceI);
SubList<face> patchFaces(mesh(), nFaces, startFacei);
primitivePatch patch(patchFaces, mesh().points());
@ -1953,9 +1953,9 @@ void Foam::boundaryMesh::triangulateLocal
// Copy into triVerts
forAll(triFaces, triFaceI)
forAll(triFaces, triFacei)
{
const face& triF = triFaces[triFaceI];
const face& triF = triFaces[triFacei];
triVerts[vertI++] = triF[0];
triVerts[vertI++] = triF[1];
@ -1968,7 +1968,7 @@ void Foam::boundaryMesh::triangulateLocal
void Foam::boundaryMesh::markFaces
(
const labelList& protectedEdges,
const label seedFaceI,
const label seedFacei,
boolList& visited
) const
{
@ -1983,8 +1983,8 @@ void Foam::boundaryMesh::markFaces
// Initialize zone for all faces to -1
labelList currentZone(mesh().size(), -1);
// Mark with 0 all faces reachable from seedFaceI
markZone(protectedEdge, seedFaceI, 0, currentZone);
// Mark with 0 all faces reachable from seedFacei
markZone(protectedEdge, seedFacei, 0, currentZone);
// Set in visited all reached ones.
visited.setSize(mesh().size());

View File

@ -341,7 +341,7 @@ public:
// of triangles, nTris is per face number of triangles.
label getNTris
(
const label startFaceI,
const label startFacei,
const label nFaces,
labelList& nTris
) const;
@ -351,20 +351,20 @@ public:
// triVerts is triangle vertices, three per triangle.
void triangulate
(
const label startFaceI,
const label startFacei,
const label nFaces,
const label totalNTris,
labelList& triVerts
) const;
//- Number of points used in face subset.
label getNPoints(const label startFaceI, const label nFaces) const;
label getNPoints(const label startFacei, const label nFaces) const;
//- Same as triangulate but in local vertex numbering.
// (Map returned).
void triangulateLocal
(
const label startFaceI,
const label startFacei,
const label nFaces,
const label totalNTris,
labelList& triVerts,

View File

@ -744,23 +744,23 @@ void Foam::createShellMesh::setRefinement
}
label minCellI = addedCells[nLayers*eFaces[0]+layerI];
label maxCellI;
label minCelli = addedCells[nLayers*eFaces[0]+layerI];
label maxCelli;
label patchI;
if (ePatches.size() == 0)
{
maxCellI = addedCells[nLayers*eFaces[1]+layerI];
if (minCellI > maxCellI)
maxCelli = addedCells[nLayers*eFaces[1]+layerI];
if (minCelli > maxCelli)
{
// Swap
Swap(minCellI, maxCellI);
Swap(minCelli, maxCelli);
newF = newF.reverseFace();
}
patchI = -1;
}
else
{
maxCellI = -1;
maxCelli = -1;
patchI = ePatches[0];
}
@ -773,8 +773,8 @@ void Foam::createShellMesh::setRefinement
// << " with new points:" << newF
// << " locations:"
// << UIndirectList<point>(meshMod.points(), newF)
// << " own:" << minCellI
// << " nei:" << maxCellI
// << " own:" << minCelli
// << " nei:" << maxCelli
// << endl;
//}
@ -783,8 +783,8 @@ void Foam::createShellMesh::setRefinement
meshMod.addFace
(
newF, // vertices
minCellI, // own
maxCellI, // nei
minCelli, // own
maxCelli, // nei
-1, // masterPointID
-1, // masterEdgeID
faceToFaceMap.size(), // masterFaceID
@ -809,10 +809,10 @@ void Foam::createShellMesh::setRefinement
for (label i = 1; i < ePatches.size(); i++)
{
// Extrude eFaces[i]
label minFaceI = eFaces[i];
label minFacei = eFaces[i];
// Make face pointing in to eFaces[0] so out of new master face
const face& f = patch_.localFaces()[minFaceI];
const face& f = patch_.localFaces()[minFacei];
const edge& e = patch_.edges()[edgeI];
label fp0 = findIndex(f, e[0]);
@ -827,8 +827,8 @@ void Foam::createShellMesh::setRefinement
face newF(4);
for (label layerI = 0; layerI < nLayers; layerI++)
{
label region0 = pointRegions_[minFaceI][fp0];
label region1 = pointRegions_[minFaceI][fp1];
label region0 = pointRegions_[minFacei][fp0];
label region1 = pointRegions_[minFacei][fp1];
if (layerI == 0)
{
@ -863,7 +863,7 @@ void Foam::createShellMesh::setRefinement
////if (ePatches.size() == 0)
//{
// Pout<< "Adding from MULTI face:"
// << patch_.faceCentres()[minFaceI]
// << patch_.faceCentres()[minFacei]
// << " from edge:"
// << patch_.localPoints()[f[fp0]]
// << patch_.localPoints()[f[fp1]]
@ -878,7 +878,7 @@ void Foam::createShellMesh::setRefinement
meshMod.addFace
(
newF, // vertices
addedCells[nLayers*minFaceI+layerI], // own
addedCells[nLayers*minFacei+layerI], // own
-1, // nei
-1, // masterPointID
-1, // masterEdgeID

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -126,7 +126,7 @@ public:
// Access
//- From region cell to patch face. Consecutively added so
// cell at layerI is at patchFaceI*nLayers+layerI
// cell at layerI is at patchFacei*nLayers+layerI
const labelList& cellToFaceMap() const
{
return cellToFaceMap_;

View File

@ -46,11 +46,11 @@ Foam::labelList Foam::fvMeshAdder::calcPatchMap
for (label i = 0; i < oldSize; i++)
{
label newFaceI = oldToNew[oldStart+i];
label newFacei = oldToNew[oldStart+i];
if (newFaceI >= newStart && newFaceI < newStart+newSize)
if (newFacei >= newStart && newFacei < newStart+newSize)
{
newToOld[newFaceI-newStart] = i;
newToOld[newFacei-newStart] = i;
}
}
return newToOld;

View File

@ -71,34 +71,34 @@ void Foam::fvMeshAdder::MapVolField
// Reorder old patches in order of new ones. Put removed patches at end.
label unusedPatchI = 0;
label unusedPatchi = 0;
forAll(oldPatchMap, patchi)
{
label newPatchI = oldPatchMap[patchi];
label newPatchi = oldPatchMap[patchi];
if (newPatchI != -1)
if (newPatchi != -1)
{
unusedPatchI++;
unusedPatchi++;
}
}
label nUsedPatches = unusedPatchI;
label nUsedPatches = unusedPatchi;
// Reorder list for patchFields
labelList oldToNew(oldPatchMap.size());
forAll(oldPatchMap, patchi)
{
label newPatchI = oldPatchMap[patchi];
label newPatchi = oldPatchMap[patchi];
if (newPatchI != -1)
if (newPatchi != -1)
{
oldToNew[patchi] = newPatchI;
oldToNew[patchi] = newPatchi;
}
else
{
oldToNew[patchi] = unusedPatchI++;
oldToNew[patchi] = unusedPatchi++;
}
}
@ -110,12 +110,12 @@ void Foam::fvMeshAdder::MapVolField
// Delete unused patches
for
(
label newPatchI = nUsedPatches;
newPatchI < bfld.size();
newPatchI++
label newPatchi = nUsedPatches;
newPatchi < bfld.size();
newPatchi++
)
{
bfld.set(newPatchI, NULL);
bfld.set(newPatchi, NULL);
}
@ -124,9 +124,9 @@ void Foam::fvMeshAdder::MapVolField
forAll(oldPatchMap, patchi)
{
label newPatchI = oldPatchMap[patchi];
label newPatchi = oldPatchMap[patchi];
if (newPatchI != -1)
if (newPatchi != -1)
{
labelList newToOld
(
@ -135,7 +135,7 @@ void Foam::fvMeshAdder::MapVolField
oldPatchStarts[patchi],
oldPatchSizes[patchi],
meshMap.oldFaceMap(),
mesh.boundaryMesh()[newPatchI],
mesh.boundaryMesh()[newPatchi],
-1 // unmapped value
)
);
@ -145,18 +145,18 @@ void Foam::fvMeshAdder::MapVolField
// Create new patchField with same type as existing one.
// Note:
// - boundaryField already in new order so access with newPatchI
// - fld.boundaryField()[newPatchI] both used for type and old
// - boundaryField already in new order so access with newPatchi
// - fld.boundaryField()[newPatchi] both used for type and old
// value
// - hope that field mapping allows aliasing since old and new
// are same memory!
bfld.set
(
newPatchI,
newPatchi,
fvPatchField<Type>::New
(
bfld[newPatchI], // old field
mesh.boundary()[newPatchI], // new fvPatch
bfld[newPatchi], // old field
mesh.boundary()[newPatchi], // new fvPatch
fld.dimensionedInternalField(), // new internal field
patchMapper // mapper (new to old)
)
@ -176,17 +176,17 @@ void Foam::fvMeshAdder::MapVolField
// Add addedMesh patches
forAll(addedPatchMap, patchi)
{
label newPatchI = addedPatchMap[patchi];
label newPatchi = addedPatchMap[patchi];
if (newPatchI != -1)
if (newPatchi != -1)
{
const polyPatch& newPatch = mesh.boundaryMesh()[newPatchI];
const polyPatch& newPatch = mesh.boundaryMesh()[newPatchi];
const polyPatch& oldPatch =
fldToAdd.mesh().boundaryMesh()[patchi];
if (!bfld(newPatchI))
if (!bfld(newPatchi))
{
// First occurrence of newPatchI. Map from existing
// First occurrence of newPatchi. Map from existing
// patchField
// From new patch faces to patch faces on added mesh.
@ -206,11 +206,11 @@ void Foam::fvMeshAdder::MapVolField
bfld.set
(
newPatchI,
newPatchi,
fvPatchField<Type>::New
(
fldToAdd.boundaryField()[patchi], // added field
mesh.boundary()[newPatchI], // new fvPatch
mesh.boundary()[newPatchi], // new fvPatch
fld.dimensionedInternalField(), // new int. field
patchMapper // mapper
)
@ -224,16 +224,16 @@ void Foam::fvMeshAdder::MapVolField
labelList addedToNew(oldPatch.size(), -1);
forAll(addedToNew, i)
{
label addedFaceI = oldPatch.start()+i;
label newFaceI = meshMap.addedFaceMap()[addedFaceI];
label patchFaceI = newFaceI-newPatch.start();
if (patchFaceI >= 0 && patchFaceI < newPatch.size())
label addedFacei = oldPatch.start()+i;
label newFacei = meshMap.addedFaceMap()[addedFacei];
label patchFacei = newFacei-newPatch.start();
if (patchFacei >= 0 && patchFacei < newPatch.size())
{
addedToNew[i] = patchFaceI;
addedToNew[i] = patchFacei;
}
}
bfld[newPatchI].rmap
bfld[newPatchi].rmap
(
fldToAdd.boundaryField()[patchi],
addedToNew
@ -359,11 +359,11 @@ void Foam::fvMeshAdder::MapSurfaceField
forAll(pf, i)
{
label newFaceI = meshMap.oldFaceMap()[start + i];
label newFacei = meshMap.oldFaceMap()[start + i];
if (newFaceI >= 0 && newFaceI < mesh.nInternalFaces())
if (newFacei >= 0 && newFacei < mesh.nInternalFaces())
{
intFld[newFaceI] = pf[i];
intFld[newFacei] = pf[i];
}
}
}
@ -379,34 +379,34 @@ void Foam::fvMeshAdder::MapSurfaceField
// Reorder old patches in order of new ones. Put removed patches at end.
label unusedPatchI = 0;
label unusedPatchi = 0;
forAll(oldPatchMap, patchi)
{
label newPatchI = oldPatchMap[patchi];
label newPatchi = oldPatchMap[patchi];
if (newPatchI != -1)
if (newPatchi != -1)
{
unusedPatchI++;
unusedPatchi++;
}
}
label nUsedPatches = unusedPatchI;
label nUsedPatches = unusedPatchi;
// Reorder list for patchFields
labelList oldToNew(oldPatchMap.size());
forAll(oldPatchMap, patchi)
{
label newPatchI = oldPatchMap[patchi];
label newPatchi = oldPatchMap[patchi];
if (newPatchI != -1)
if (newPatchi != -1)
{
oldToNew[patchi] = newPatchI;
oldToNew[patchi] = newPatchi;
}
else
{
oldToNew[patchi] = unusedPatchI++;
oldToNew[patchi] = unusedPatchi++;
}
}
@ -418,12 +418,12 @@ void Foam::fvMeshAdder::MapSurfaceField
// Delete unused patches
for
(
label newPatchI = nUsedPatches;
newPatchI < bfld.size();
newPatchI++
label newPatchi = nUsedPatches;
newPatchi < bfld.size();
newPatchi++
)
{
bfld.set(newPatchI, NULL);
bfld.set(newPatchi, NULL);
}
@ -432,9 +432,9 @@ void Foam::fvMeshAdder::MapSurfaceField
forAll(oldPatchMap, patchi)
{
label newPatchI = oldPatchMap[patchi];
label newPatchi = oldPatchMap[patchi];
if (newPatchI != -1)
if (newPatchi != -1)
{
labelList newToOld
(
@ -443,7 +443,7 @@ void Foam::fvMeshAdder::MapSurfaceField
oldPatchStarts[patchi],
oldPatchSizes[patchi],
meshMap.oldFaceMap(),
mesh.boundaryMesh()[newPatchI],
mesh.boundaryMesh()[newPatchi],
-1 // unmapped value
)
);
@ -452,18 +452,18 @@ void Foam::fvMeshAdder::MapSurfaceField
// Create new patchField with same type as existing one.
// Note:
// - boundaryField already in new order so access with newPatchI
// - bfld[newPatchI] both used for type and old
// - boundaryField already in new order so access with newPatchi
// - bfld[newPatchi] both used for type and old
// value
// - hope that field mapping allows aliasing since old and new
// are same memory!
bfld.set
(
newPatchI,
newPatchi,
fvsPatchField<Type>::New
(
bfld[newPatchI], // old field
mesh.boundary()[newPatchI], // new fvPatch
bfld[newPatchi], // old field
mesh.boundary()[newPatchi], // new fvPatch
fld.dimensionedInternalField(), // new internal field
patchMapper // mapper (new to old)
)
@ -483,17 +483,17 @@ void Foam::fvMeshAdder::MapSurfaceField
// Add addedMesh patches
forAll(addedPatchMap, patchi)
{
label newPatchI = addedPatchMap[patchi];
label newPatchi = addedPatchMap[patchi];
if (newPatchI != -1)
if (newPatchi != -1)
{
const polyPatch& newPatch = mesh.boundaryMesh()[newPatchI];
const polyPatch& newPatch = mesh.boundaryMesh()[newPatchi];
const polyPatch& oldPatch =
fldToAdd.mesh().boundaryMesh()[patchi];
if (!bfld(newPatchI))
if (!bfld(newPatchi))
{
// First occurrence of newPatchI. Map from existing
// First occurrence of newPatchi. Map from existing
// patchField
// From new patch faces to patch faces on added mesh.
@ -513,11 +513,11 @@ void Foam::fvMeshAdder::MapSurfaceField
bfld.set
(
newPatchI,
newPatchi,
fvsPatchField<Type>::New
(
fldToAdd.boundaryField()[patchi],// added field
mesh.boundary()[newPatchI], // new fvPatch
mesh.boundary()[newPatchi], // new fvPatch
fld.dimensionedInternalField(), // new int. field
patchMapper // mapper
)
@ -531,16 +531,16 @@ void Foam::fvMeshAdder::MapSurfaceField
labelList addedToNew(oldPatch.size(), -1);
forAll(addedToNew, i)
{
label addedFaceI = oldPatch.start()+i;
label newFaceI = meshMap.addedFaceMap()[addedFaceI];
label patchFaceI = newFaceI-newPatch.start();
if (patchFaceI >= 0 && patchFaceI < newPatch.size())
label addedFacei = oldPatch.start()+i;
label newFacei = meshMap.addedFaceMap()[addedFacei];
label patchFacei = newFacei-newPatch.start();
if (patchFacei >= 0 && patchFacei < newPatch.size())
{
addedToNew[i] = patchFaceI;
addedToNew[i] = patchFacei;
}
}
bfld[newPatchI].rmap
bfld[newPatchi].rmap
(
fldToAdd.boundaryField()[patchi],
addedToNew

View File

@ -94,14 +94,14 @@ void Foam::fvMeshDistribute::checkEqualWordList
Pstream::gatherList(allNames);
Pstream::scatterList(allNames);
for (label procI = 1; procI < Pstream::nProcs(); procI++)
for (label proci = 1; proci < Pstream::nProcs(); proci++)
{
if (allNames[procI] != allNames[0])
if (allNames[proci] != allNames[0])
{
FatalErrorInFunction
<< "When checking for equal " << msg.c_str() << " :" << endl
<< "processor0 has:" << allNames[0] << endl
<< "processor" << procI << " has:" << allNames[procI] << endl
<< "processor" << proci << " has:" << allNames[proci] << endl
<< msg.c_str() << " need to be synchronised on all processors."
<< exit(FatalError);
}
@ -117,11 +117,11 @@ Foam::wordList Foam::fvMeshDistribute::mergeWordList(const wordList& procNames)
Pstream::scatterList(allNames);
HashSet<word> mergedNames;
forAll(allNames, procI)
forAll(allNames, proci)
{
forAll(allNames[procI], i)
forAll(allNames[proci], i)
{
mergedNames.insert(allNames[procI][i]);
mergedNames.insert(allNames[proci][i]);
}
}
return mergedNames.toc();
@ -201,15 +201,15 @@ void Foam::fvMeshDistribute::printCoupleInfo
<< "Current coupling info:"
<< endl;
forAll(sourceFace, bFaceI)
forAll(sourceFace, bFacei)
{
label meshFaceI = mesh.nInternalFaces() + bFaceI;
label meshFacei = mesh.nInternalFaces() + bFacei;
Pout<< " meshFace:" << meshFaceI
<< " fc:" << mesh.faceCentres()[meshFaceI]
<< " connects to proc:" << sourceProc[bFaceI]
<< "/face:" << sourceFace[bFaceI]
<< " which will move to proc:" << sourceNewNbrProc[bFaceI]
Pout<< " meshFace:" << meshFacei
<< " fc:" << mesh.faceCentres()[meshFacei]
<< " connects to proc:" << sourceProc[bFacei]
<< "/face:" << sourceFace[bFacei]
<< " which will move to proc:" << sourceNewNbrProc[bFacei]
<< endl;
}
}
@ -220,7 +220,7 @@ Foam::label Foam::fvMeshDistribute::findNonEmptyPatch() const
{
const polyBoundaryMesh& patches = mesh_.boundaryMesh();
label nonEmptyPatchI = -1;
label nonEmptyPatchi = -1;
forAllReverse(patches, patchi)
{
@ -228,12 +228,12 @@ Foam::label Foam::fvMeshDistribute::findNonEmptyPatch() const
if (!isA<emptyPolyPatch>(pp) && !pp.coupled())
{
nonEmptyPatchI = patchi;
nonEmptyPatchi = patchi;
break;
}
}
if (nonEmptyPatchI == -1)
if (nonEmptyPatchi == -1)
{
FatalErrorInFunction
<< "Cannot find a patch which is neither of type empty nor"
@ -244,36 +244,36 @@ Foam::label Foam::fvMeshDistribute::findNonEmptyPatch() const
if (debug)
{
Pout<< "findNonEmptyPatch : using patch " << nonEmptyPatchI
<< " name:" << patches[nonEmptyPatchI].name()
<< " type:" << patches[nonEmptyPatchI].type()
Pout<< "findNonEmptyPatch : using patch " << nonEmptyPatchi
<< " name:" << patches[nonEmptyPatchi].name()
<< " type:" << patches[nonEmptyPatchi].type()
<< " to put exposed faces into." << endl;
}
// Do additional test for processor patches intermingled with non-proc
// patches.
label procPatchI = -1;
label procPatchi = -1;
forAll(patches, patchi)
{
if (isA<processorPolyPatch>(patches[patchi]))
{
procPatchI = patchi;
procPatchi = patchi;
}
else if (procPatchI != -1)
else if (procPatchi != -1)
{
FatalErrorInFunction
<< "Processor patches should be at end of patch list."
<< endl
<< "Have processor patch " << procPatchI
<< "Have processor patch " << procPatchi
<< " followed by non-processor patch " << patchi
<< " in patches " << patches.names()
<< abort(FatalError);
}
}
return nonEmptyPatchI;
return nonEmptyPatchi;
}
@ -359,11 +359,11 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::fvMeshDistribute::repatch
{
polyTopoChange meshMod(mesh_);
forAll(newPatchID, bFaceI)
forAll(newPatchID, bFacei)
{
if (newPatchID[bFaceI] != -1)
if (newPatchID[bFacei] != -1)
{
label facei = mesh_.nInternalFaces() + bFaceI;
label facei = mesh_.nInternalFaces() + bFacei;
label zoneID = mesh_.faceZones().whichZone(facei);
bool zoneFlip = false;
@ -383,7 +383,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::fvMeshDistribute::repatch
mesh_.faceOwner()[facei], // owner
-1, // neighbour
false, // face flip
newPatchID[bFaceI], // patch for face
newPatchID[bFacei], // patch for face
false, // remove from zone
zoneID, // zone for face
zoneFlip // face flip in zone
@ -451,9 +451,9 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::fvMeshDistribute::repatch
}
}
forAll(constructFaceMap, procI)
forAll(constructFaceMap, proci)
{
inplaceRenumber(map().reverseFaceMap(), constructFaceMap[procI]);
inplaceRenumber(map().reverseFaceMap(), constructFaceMap[proci]);
}
@ -498,9 +498,9 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::fvMeshDistribute::mergeSharedPoints
mesh_.updateMesh(map);
// Adapt constructMaps for merged points.
forAll(constructPointMap, procI)
forAll(constructPointMap, proci)
{
labelList& constructMap = constructPointMap[procI];
labelList& constructMap = constructPointMap[proci];
forAll(constructMap, i)
{
@ -699,42 +699,42 @@ void Foam::fvMeshDistribute::subsetBoundaryData
subPatch.setSize(mesh.nFaces() - mesh.nInternalFaces());
subNewNbrProc.setSize(mesh.nFaces() - mesh.nInternalFaces());
forAll(subFace, newBFaceI)
forAll(subFace, newBFacei)
{
label newFaceI = newBFaceI + mesh.nInternalFaces();
label newFacei = newBFacei + mesh.nInternalFaces();
label oldFaceI = faceMap[newFaceI];
label oldFacei = faceMap[newFacei];
// Was oldFaceI internal face? If so which side did we get.
if (oldFaceI < oldInternalFaces)
// Was oldFacei internal face? If so which side did we get.
if (oldFacei < oldInternalFaces)
{
subFace[newBFaceI] = oldFaceI;
subProc[newBFaceI] = Pstream::myProcNo();
subPatch[newBFaceI] = -1;
subFace[newBFacei] = oldFacei;
subProc[newBFacei] = Pstream::myProcNo();
subPatch[newBFacei] = -1;
label oldOwn = oldFaceOwner[oldFaceI];
label oldNei = oldFaceNeighbour[oldFaceI];
label oldOwn = oldFaceOwner[oldFacei];
label oldNei = oldFaceNeighbour[oldFacei];
if (oldOwn == cellMap[mesh.faceOwner()[newFaceI]])
if (oldOwn == cellMap[mesh.faceOwner()[newFacei]])
{
// We kept the owner side. Where does the neighbour move to?
subNewNbrProc[newBFaceI] = oldDistribution[oldNei];
subNewNbrProc[newBFacei] = oldDistribution[oldNei];
}
else
{
// We kept the neighbour side.
subNewNbrProc[newBFaceI] = oldDistribution[oldOwn];
subNewNbrProc[newBFacei] = oldDistribution[oldOwn];
}
}
else
{
// Was boundary face. Take over boundary information
label oldBFaceI = oldFaceI - oldInternalFaces;
label oldBFacei = oldFacei - oldInternalFaces;
subFace[newBFaceI] = sourceFace[oldBFaceI];
subProc[newBFaceI] = sourceProc[oldBFaceI];
subPatch[newBFaceI] = sourcePatch[oldBFaceI];
subNewNbrProc[newBFaceI] = sourceNewNbrProc[oldBFaceI];
subFace[newBFacei] = sourceFace[oldBFacei];
subProc[newBFacei] = sourceProc[oldBFacei];
subPatch[newBFacei] = sourcePatch[oldBFacei];
subNewNbrProc[newBFacei] = sourceNewNbrProc[oldBFacei];
}
}
}
@ -763,14 +763,14 @@ void Foam::fvMeshDistribute::findCouples
// with same face+proc.
HashTable<label, labelPair, labelPair::Hash<>> map(domainFace.size());
forAll(domainProc, bFaceI)
forAll(domainProc, bFacei)
{
if (domainProc[bFaceI] != -1 && domainPatch[bFaceI] == -1)
if (domainProc[bFacei] != -1 && domainPatch[bFacei] == -1)
{
map.insert
(
labelPair(domainFace[bFaceI], domainProc[bFaceI]),
bFaceI
labelPair(domainFace[bFacei], domainProc[bFacei]),
bFacei
);
}
}
@ -782,23 +782,23 @@ void Foam::fvMeshDistribute::findCouples
slaveCoupledFaces.setSize(domainFace.size());
label coupledI = 0;
forAll(sourceFace, bFaceI)
forAll(sourceFace, bFacei)
{
if (sourceProc[bFaceI] != -1 && sourcePatch[bFaceI] == -1)
if (sourceProc[bFacei] != -1 && sourcePatch[bFacei] == -1)
{
labelPair myData(sourceFace[bFaceI], sourceProc[bFaceI]);
labelPair myData(sourceFace[bFacei], sourceProc[bFacei]);
HashTable<label, labelPair, labelPair::Hash<>>::const_iterator
iter = map.find(myData);
if (iter != map.end())
{
label nbrBFaceI = iter();
label nbrBFacei = iter();
masterCoupledFaces[coupledI] = mesh.nInternalFaces() + bFaceI;
masterCoupledFaces[coupledI] = mesh.nInternalFaces() + bFacei;
slaveCoupledFaces[coupledI] =
domainMesh.nInternalFaces()
+ nbrBFaceI;
+ nbrBFacei;
coupledI++;
}
@ -828,26 +828,26 @@ Foam::labelList Foam::fvMeshDistribute::mapBoundaryData
{
labelList newBoundaryData(mesh.nFaces() - mesh.nInternalFaces());
forAll(boundaryData0, oldBFaceI)
forAll(boundaryData0, oldBFacei)
{
label newFaceI = map.oldFaceMap()[oldBFaceI + map.nOldInternalFaces()];
label newFacei = map.oldFaceMap()[oldBFacei + map.nOldInternalFaces()];
// Face still exists (is necessary?) and still boundary face
if (newFaceI >= 0 && newFaceI >= mesh.nInternalFaces())
if (newFacei >= 0 && newFacei >= mesh.nInternalFaces())
{
newBoundaryData[newFaceI - mesh.nInternalFaces()] =
boundaryData0[oldBFaceI];
newBoundaryData[newFacei - mesh.nInternalFaces()] =
boundaryData0[oldBFacei];
}
}
forAll(boundaryData1, addedBFaceI)
forAll(boundaryData1, addedBFacei)
{
label newFaceI = map.addedFaceMap()[addedBFaceI + nInternalFaces1];
label newFacei = map.addedFaceMap()[addedBFacei + nInternalFaces1];
if (newFaceI >= 0 && newFaceI >= mesh.nInternalFaces())
if (newFacei >= 0 && newFacei >= mesh.nInternalFaces())
{
newBoundaryData[newFaceI - mesh.nInternalFaces()] =
boundaryData1[addedBFaceI];
newBoundaryData[newFacei - mesh.nInternalFaces()] =
boundaryData1[addedBFacei];
}
}
@ -855,11 +855,11 @@ Foam::labelList Foam::fvMeshDistribute::mapBoundaryData
}
// Remove cells. Add all exposed faces to patch oldInternalPatchI
// Remove cells. Add all exposed faces to patch oldInternalPatchi
Foam::autoPtr<Foam::mapPolyMesh> Foam::fvMeshDistribute::doRemoveCells
(
const labelList& cellsToRemove,
const label oldInternalPatchI
const label oldInternalPatchi
)
{
// Mesh change engine
@ -877,7 +877,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::fvMeshDistribute::doRemoveCells
(
cellsToRemove,
exposedFaces,
labelList(exposedFaces.size(), oldInternalPatchI), // patch for exposed
labelList(exposedFaces.size(), oldInternalPatchi), // patch for exposed
// faces.
meshMod
);
@ -913,18 +913,18 @@ void Foam::fvMeshDistribute::addProcPatches
procPatchID.setSize(Pstream::nProcs());
forAll(nbrProc, bFaceI)
forAll(nbrProc, bFacei)
{
label procI = nbrProc[bFaceI];
label proci = nbrProc[bFacei];
if (procI != -1 && procI != Pstream::myProcNo())
if (proci != -1 && proci != Pstream::myProcNo())
{
if (!procPatchID[procI].found(referPatchID[bFaceI]))
if (!procPatchID[proci].found(referPatchID[bFacei]))
{
// No patch for neighbour yet. Is either a normal processor
// patch or a processorCyclic patch.
if (referPatchID[bFaceI] == -1)
if (referPatchID[bFacei] == -1)
{
// Ordinary processor boundary
processorPolyPatch pp
@ -934,12 +934,12 @@ void Foam::fvMeshDistribute::addProcPatches
mesh_.boundaryMesh().size(),
mesh_.boundaryMesh(),
Pstream::myProcNo(),
nbrProc[bFaceI]
nbrProc[bFacei]
);
procPatchID[procI].insert
procPatchID[proci].insert
(
referPatchID[bFaceI],
referPatchID[bFacei],
fvMeshTools::addPatch
(
mesh_,
@ -955,7 +955,7 @@ void Foam::fvMeshDistribute::addProcPatches
const coupledPolyPatch& pcPatch
= refCast<const coupledPolyPatch>
(
mesh_.boundaryMesh()[referPatchID[bFaceI]]
mesh_.boundaryMesh()[referPatchID[bFacei]]
);
processorCyclicPolyPatch pp
@ -965,14 +965,14 @@ void Foam::fvMeshDistribute::addProcPatches
mesh_.boundaryMesh().size(),
mesh_.boundaryMesh(),
Pstream::myProcNo(),
nbrProc[bFaceI],
nbrProc[bFacei],
pcPatch.name(),
pcPatch.transform()
);
procPatchID[procI].insert
procPatchID[proci].insert
(
referPatchID[bFaceI],
referPatchID[bFacei],
fvMeshTools::addPatch
(
mesh_,
@ -999,21 +999,21 @@ Foam::labelList Foam::fvMeshDistribute::getBoundaryPatch
{
labelList patchIDs(nbrProc);
forAll(nbrProc, bFaceI)
forAll(nbrProc, bFacei)
{
if (nbrProc[bFaceI] == Pstream::myProcNo())
if (nbrProc[bFacei] == Pstream::myProcNo())
{
label origPatchI = referPatchID[bFaceI];
patchIDs[bFaceI] = origPatchI;
label origPatchi = referPatchID[bFacei];
patchIDs[bFacei] = origPatchi;
}
else if (nbrProc[bFaceI] != -1)
else if (nbrProc[bFacei] != -1)
{
label origPatchI = referPatchID[bFaceI];
patchIDs[bFaceI] = procPatchID[nbrProc[bFaceI]][origPatchI];
label origPatchi = referPatchID[bFacei];
patchIDs[bFacei] = procPatchID[nbrProc[bFacei]][origPatchi];
}
else
{
patchIDs[bFaceI] = -1;
patchIDs[bFacei] = -1;
}
}
return patchIDs;
@ -1504,15 +1504,15 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> Foam::fvMeshDistribute::distribute
// Find patch to temporarily put exposed and processor faces into.
label oldInternalPatchI = findNonEmptyPatch();
label oldInternalPatchi = findNonEmptyPatch();
// Delete processor patches, starting from the back. Move all faces into
// oldInternalPatchI.
// oldInternalPatchi.
labelList repatchFaceMap;
{
autoPtr<mapPolyMesh> repatchMap = deleteProcPatches(oldInternalPatchI);
autoPtr<mapPolyMesh> repatchMap = deleteProcPatches(oldInternalPatchi);
// Store face map (only face ordering that changed)
repatchFaceMap = repatchMap().faceMap();
@ -1621,7 +1621,7 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> Foam::fvMeshDistribute::distribute
(
distribution,
recvProc,
oldInternalPatchI, // oldInternalFaces patch
oldInternalPatchi, // oldInternalFaces patch
false // no parallel sync
);
@ -1760,7 +1760,7 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> Foam::fvMeshDistribute::distribute
doRemoveCells
(
select(false, distribution, Pstream::myProcNo()),
oldInternalPatchI
oldInternalPatchi
)
);
@ -2112,15 +2112,15 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> Foam::fvMeshDistribute::distribute
const labelList& oldPointMap = map().oldPointMap();
const labelList& oldPatchMap = map().oldPatchMap();
forAll(constructPatchMap, procI)
forAll(constructPatchMap, proci)
{
if (procI != sendProc && constructPatchMap[procI].size())
if (proci != sendProc && constructPatchMap[proci].size())
{
// Processor already in mesh (either myProcNo or received)
inplaceRenumber(oldCellMap, constructCellMap[procI]);
inplaceRenumber(oldFaceMap, constructFaceMap[procI]);
inplaceRenumber(oldPointMap, constructPointMap[procI]);
inplaceRenumber(oldPatchMap, constructPatchMap[procI]);
inplaceRenumber(oldCellMap, constructCellMap[proci]);
inplaceRenumber(oldFaceMap, constructFaceMap[proci]);
inplaceRenumber(oldPointMap, constructPointMap[proci]);
inplaceRenumber(oldPatchMap, constructPatchMap[proci]);
}
}

View File

@ -219,11 +219,11 @@ class fvMeshDistribute
// Other
//- Remove cells. Add all exposed faces to patch oldInternalPatchI
//- Remove cells. Add all exposed faces to patch oldInternalPatchi
autoPtr<mapPolyMesh> doRemoveCells
(
const labelList& cellsToRemove,
const label oldInternalPatchI
const label oldInternalPatchi
);
//- Add processor patches. Changes mesh and returns per neighbour

View File

@ -127,16 +127,16 @@ void Foam::fvMeshDistribute::mapBoundaryFields
forAll(patchFld, i)
{
label oldFaceI = faceMap[facei++];
label oldFacei = faceMap[facei++];
// Find patch and local patch face oldFaceI was in.
forAll(oldPatchStarts, oldPatchI)
// Find patch and local patch face oldFacei was in.
forAll(oldPatchStarts, oldPatchi)
{
label oldLocalI = oldFaceI - oldPatchStarts[oldPatchI];
label oldLocalI = oldFacei - oldPatchStarts[oldPatchi];
if (oldLocalI >= 0 && oldLocalI < oldBfld[oldPatchI].size())
if (oldLocalI >= 0 && oldLocalI < oldBfld[oldPatchi].size())
{
patchFld[i] = oldBfld[oldPatchI][oldLocalI];
patchFld[i] = oldBfld[oldPatchi][oldLocalI];
}
}
}

View File

@ -49,8 +49,8 @@ Foam::label Foam::fvMeshTools::addPatch
// Append at end unless there are processor patches
label insertPatchI = polyPatches.size();
label startFaceI = mesh.nFaces();
label insertPatchi = polyPatches.size();
label startFacei = mesh.nFaces();
if (!isA<processorPolyPatch>(patch))
{
@ -60,8 +60,8 @@ Foam::label Foam::fvMeshTools::addPatch
if (isA<processorPolyPatch>(pp))
{
insertPatchI = patchi;
startFaceI = pp.start();
insertPatchi = patchi;
startFacei = pp.start();
break;
}
}
@ -86,9 +86,9 @@ Foam::label Foam::fvMeshTools::addPatch
patch.clone
(
polyPatches,
insertPatchI, //index
insertPatchi, //index
0, //size
startFaceI //start
startFacei //start
)
);
fvPatches.setSize(sz+1);
@ -179,17 +179,17 @@ Foam::label Foam::fvMeshTools::addPatch
// Create reordering list
// patches before insert position stay as is
labelList oldToNew(sz+1);
for (label i = 0; i < insertPatchI; i++)
for (label i = 0; i < insertPatchi; i++)
{
oldToNew[i] = i;
}
// patches after insert position move one up
for (label i = insertPatchI; i < sz; i++)
for (label i = insertPatchi; i < sz; i++)
{
oldToNew[i] = i+1;
}
// appended patch gets moved to insert position
oldToNew[sz] = insertPatchI;
oldToNew[sz] = insertPatchi;
// Shuffle into place
polyPatches.reorder(oldToNew, validBoundary);
@ -206,7 +206,7 @@ Foam::label Foam::fvMeshTools::addPatch
reorderPatchFields<surfaceSymmTensorField>(mesh, oldToNew);
reorderPatchFields<surfaceTensorField>(mesh, oldToNew);
return insertPatchI;
return insertPatchi;
}

View File

@ -229,9 +229,9 @@ Foam::label Foam::cellCuts::edgeEdgeToFace
{
const labelList& cFaces = mesh().cells()[celli];
forAll(cFaces, cFaceI)
forAll(cFaces, cFacei)
{
label facei = cFaces[cFaceI];
label facei = cFaces[cFacei];
const labelList& fEdges = mesh().faceEdges()[facei];
@ -269,9 +269,9 @@ Foam::label Foam::cellCuts::edgeVertexToFace
{
const labelList& cFaces = mesh().cells()[celli];
forAll(cFaces, cFaceI)
forAll(cFaces, cFacei)
{
label facei = cFaces[cFaceI];
label facei = cFaces[cFacei];
const face& f = mesh().faces()[facei];
@ -308,9 +308,9 @@ Foam::label Foam::cellCuts::vertexVertexToFace
{
const labelList& cFaces = mesh().cells()[celli];
forAll(cFaces, cFaceI)
forAll(cFaces, cFacei)
{
label facei = cFaces[cFaceI];
label facei = cFaces[cFacei];
const face& f = mesh().faces()[facei];
@ -508,9 +508,9 @@ Foam::label Foam::cellCuts::loopFace
{
const cell& cFaces = mesh().cells()[celli];
forAll(cFaces, cFaceI)
forAll(cFaces, cFacei)
{
label facei = cFaces[cFaceI];
label facei = cFaces[cFacei];
const labelList& fEdges = mesh().faceEdges()[facei];
const face& f = mesh().faces()[facei];
@ -569,15 +569,15 @@ bool Foam::cellCuts::walkPoint
const labelList& pFaces = mesh().pointFaces()[vertI];
forAll(pFaces, pFaceI)
forAll(pFaces, pFacei)
{
label otherFaceI = pFaces[pFaceI];
label otherFacei = pFaces[pFacei];
if
(
otherFaceI != exclude0
&& otherFaceI != exclude1
&& meshTools::faceOnCell(mesh(), celli, otherFaceI)
otherFacei != exclude0
&& otherFacei != exclude1
&& meshTools::faceOnCell(mesh(), celli, otherFacei)
)
{
label oldNVisited = nVisited;
@ -587,7 +587,7 @@ bool Foam::cellCuts::walkPoint
(
celli,
startCut,
otherFaceI,
otherFacei,
otherCut,
nVisited,
visited
@ -620,7 +620,7 @@ bool Foam::cellCuts::crossEdge
// Cross edge to other face
label edgeI = getEdge(otherCut);
label otherFaceI = meshTools::otherFace(mesh(), celli, facei, edgeI);
label otherFacei = meshTools::otherFace(mesh(), celli, facei, edgeI);
// Store old state
label oldNVisited = nVisited;
@ -631,7 +631,7 @@ bool Foam::cellCuts::crossEdge
(
celli,
startCut,
otherFaceI,
otherFacei,
otherCut,
nVisited,
visited
@ -1042,9 +1042,9 @@ void Foam::cellCuts::calcCellLoops(const labelList& cutCells)
label nVisited = 0;
// Determine the first cut face to start walking from.
forAll(cFaces, cFaceI)
forAll(cFaces, cFacei)
{
label facei = cFaces[cFaceI];
label facei = cFaces[cFacei];
const labelList& fCuts = allFaceCuts[facei];
@ -1364,21 +1364,21 @@ bool Foam::cellCuts::calcAnchors
if (iter() == 1)
{
forAll(pFaces, pFaceI)
forAll(pFaces, pFacei)
{
if (meshTools::faceOnCell(mesh(), celli, pFaces[pFaceI]))
if (meshTools::faceOnCell(mesh(), celli, pFaces[pFacei]))
{
connectedFaces.insert(pFaces[pFaceI]);
connectedFaces.insert(pFaces[pFacei]);
}
}
}
else if (iter() == 2)
{
forAll(pFaces, pFaceI)
forAll(pFaces, pFacei)
{
if (meshTools::faceOnCell(mesh(), celli, pFaces[pFaceI]))
if (meshTools::faceOnCell(mesh(), celli, pFaces[pFacei]))
{
otherFaces.insert(pFaces[pFaceI]);
otherFaces.insert(pFaces[pFacei]);
}
}
}
@ -1737,9 +1737,9 @@ bool Foam::cellCuts::conservativeValidLoop
// Check faces using this edge
const labelList& eFaces = mesh().edgeFaces()[edgeI];
forAll(eFaces, eFaceI)
forAll(eFaces, eFacei)
{
label nCuts = countFaceCuts(eFaces[eFaceI], loop);
label nCuts = countFaceCuts(eFaces[eFacei], loop);
if (nCuts > 2)
{
@ -1774,9 +1774,9 @@ bool Foam::cellCuts::conservativeValidLoop
// Check faces using vertex.
const labelList& pFaces = mesh().pointFaces()[vertI];
forAll(pFaces, pFaceI)
forAll(pFaces, pFacei)
{
label nCuts = countFaceCuts(pFaces[pFaceI], loop);
label nCuts = countFaceCuts(pFaces[pFacei], loop);
if (nCuts > 2)
{
@ -1829,7 +1829,7 @@ bool Foam::cellCuts::validLoop
label nextCut = loop[(fp+1) % loop.size()];
// Label (if any) of face cut (so cut not along existing edge)
label meshFaceI = -1;
label meshFacei = -1;
if (isEdge(cut))
{
@ -1843,9 +1843,9 @@ bool Foam::cellCuts::validLoop
label nextEdgeI = getEdge(nextCut);
// Find face and mark as to be split.
meshFaceI = edgeEdgeToFace(celli, edgeI, nextEdgeI);
meshFacei = edgeEdgeToFace(celli, edgeI, nextEdgeI);
if (meshFaceI == -1)
if (meshFacei == -1)
{
// Can't find face using both cut edges.
return false;
@ -1861,9 +1861,9 @@ bool Foam::cellCuts::validLoop
if (e.start() != nextVertI && e.end() != nextVertI)
{
// New edge. Find face and mark as to be split.
meshFaceI = edgeVertexToFace(celli, edgeI, nextVertI);
meshFacei = edgeVertexToFace(celli, edgeI, nextVertI);
if (meshFaceI == -1)
if (meshFacei == -1)
{
// Can't find face. Ilegal.
return false;
@ -1886,9 +1886,9 @@ bool Foam::cellCuts::validLoop
if (nextE.start() != vertI && nextE.end() != vertI)
{
// Should be cross cut. Find face.
meshFaceI = edgeVertexToFace(celli, nextEdgeI, vertI);
meshFacei = edgeVertexToFace(celli, nextEdgeI, vertI);
if (meshFaceI == -1)
if (meshFacei == -1)
{
return false;
}
@ -1902,9 +1902,9 @@ bool Foam::cellCuts::validLoop
if (meshTools::findEdge(mesh(), vertI, nextVertI) == -1)
{
// New edge. Find face.
meshFaceI = vertexVertexToFace(celli, vertI, nextVertI);
meshFacei = vertexVertexToFace(celli, vertI, nextVertI);
if (meshFaceI == -1)
if (meshFacei == -1)
{
return false;
}
@ -1912,18 +1912,18 @@ bool Foam::cellCuts::validLoop
}
}
if (meshFaceI != -1)
if (meshFacei != -1)
{
// meshFaceI is cut across along cut-nextCut (so not along existing
// meshFacei is cut across along cut-nextCut (so not along existing
// edge). Check if this is compatible with existing pattern.
edge cutEdge(cut, nextCut);
Map<edge>::const_iterator iter = faceSplitCut_.find(meshFaceI);
Map<edge>::const_iterator iter = faceSplitCut_.find(meshFacei);
if (iter == faceSplitCut_.end())
{
// Face not yet cut so insert.
newFaceSplitCut.insert(meshFaceI, cutEdge);
newFaceSplitCut.insert(meshFacei, cutEdge);
}
else
{
@ -2202,9 +2202,9 @@ void Foam::cellCuts::setFromCellCutter
DynamicList<scalarField> invalidCutLoopWeights(2);
forAll(refCells, refCellI)
forAll(refCells, refCelli)
{
const refineCell& refCell = refCells[refCellI];
const refineCell& refCell = refCells[refCelli];
label celli = refCell.cellNo();

View File

@ -79,11 +79,11 @@ Foam::labelList Foam::cellLooper::getVertFacesNonEdge
const labelList& pFaces = mesh().pointFaces()[vertI];
labelList vertFaces(pFaces.size());
label vertFaceI = 0;
label vertFacei = 0;
forAll(pFaces, pFaceI)
forAll(pFaces, pFacei)
{
label facei = pFaces[pFaceI];
label facei = pFaces[pFacei];
if
(
@ -92,10 +92,10 @@ Foam::labelList Foam::cellLooper::getVertFacesNonEdge
&& (meshTools::faceOnCell(mesh(), celli, facei))
)
{
vertFaces[vertFaceI++] = facei;
vertFaces[vertFacei++] = facei;
}
}
vertFaces.setSize(vertFaceI);
vertFaces.setSize(vertFacei);
return vertFaces;
}

View File

@ -49,14 +49,14 @@ addToRunTimeSelectionTable(cellLooper, hexCellLooper, word);
bool Foam::hexCellLooper::walkHex
(
const label celli,
const label startFaceI,
const label startFacei,
const label startEdgeI,
labelList& loop,
scalarField& loopWeights
) const
{
label facei = startFaceI;
label facei = startFacei;
label edgeI = startEdgeI;

View File

@ -79,7 +79,7 @@ private:
bool walkHex
(
const label celli,
const label startFaceI,
const label startFacei,
const label startEdgeI,
labelList& loop,

View File

@ -373,7 +373,7 @@ void Foam::topoCellLooper::walkSplitHex
(
const label celli,
const cellFeatures& features,
const label fromFaceI,
const label fromFacei,
const label fromEdgeI,
const label fromVertI,
@ -382,7 +382,7 @@ void Foam::topoCellLooper::walkSplitHex
) const
{
// Work vars giving position on cell
label facei = fromFaceI;
label facei = fromFacei;
label edgeI = fromEdgeI;
label vertI = fromVertI;
@ -517,17 +517,17 @@ void Foam::topoCellLooper::walkSplitHex
// Cross to other face (there is only one since no edges)
const labelList& pFaces = mesh().pointFaces()[vertI];
forAll(pFaces, pFaceI)
forAll(pFaces, pFacei)
{
label thisFaceI = pFaces[pFaceI];
label thisFacei = pFaces[pFacei];
if
(
(thisFaceI != facei)
&& meshTools::faceOnCell(mesh(), celli, thisFaceI)
(thisFacei != facei)
&& meshTools::faceOnCell(mesh(), celli, thisFacei)
)
{
facei = thisFaceI;
facei = thisFacei;
break;
}
}

View File

@ -135,7 +135,7 @@ class topoCellLooper
(
const label celli,
const cellFeatures& features,
const label fromFaceI,
const label fromFacei,
const label fromEdgeI,
const label fromVertI,

View File

@ -172,7 +172,7 @@ public:
(
const polyMesh&,
const polyPatch&,
const label patchFaceI,
const label patchFacei,
const point& faceCentre,
TrackingData& td
);
@ -183,7 +183,7 @@ public:
(
const polyMesh&,
const polyPatch&,
const label patchFaceI,
const label patchFacei,
const point& faceCentre,
TrackingData& td
);
@ -202,8 +202,8 @@ public:
inline bool updateCell
(
const polyMesh&,
const label thisCellI,
const label neighbourFaceI,
const label thisCelli,
const label neighbourFacei,
const directionInfo& neighbourInfo,
const scalar tol,
TrackingData& td
@ -214,8 +214,8 @@ public:
inline bool updateFace
(
const polyMesh&,
const label thisFaceI,
const label neighbourCellI,
const label thisFacei,
const label neighbourCelli,
const directionInfo& neighbourInfo,
const scalar tol,
TrackingData& td
@ -226,7 +226,7 @@ public:
inline bool updateFace
(
const polyMesh&,
const label thisFaceI,
const label thisFacei,
const directionInfo& neighbourInfo,
const scalar tol,
TrackingData& td

View File

@ -87,7 +87,7 @@ inline void Foam::directionInfo::leaveDomain
(
const polyMesh&,
const polyPatch& patch,
const label patchFaceI,
const label patchFacei,
const point& faceCentre,
TrackingData& td
)
@ -103,14 +103,14 @@ inline void Foam::directionInfo::enterDomain
(
const polyMesh&,
const polyPatch& patch,
const label patchFaceI,
const label patchFacei,
const point& faceCentre,
TrackingData& td
)
{
if (index_ >= 0)
{
const face& f = patch[patchFaceI];
const face& f = patch[patchFacei];
index_ = (f.size() - index_) % f.size();
}
@ -133,8 +133,8 @@ template<class TrackingData>
inline bool Foam::directionInfo::updateCell
(
const polyMesh& mesh,
const label thisCellI,
const label neighbourFaceI,
const label thisCelli,
const label neighbourFacei,
const directionInfo& neighbourInfo,
const scalar, // tol
TrackingData& td
@ -146,9 +146,9 @@ inline bool Foam::directionInfo::updateCell
return false;
}
if (hexMatcher().isA(mesh, thisCellI))
if (hexMatcher().isA(mesh, thisCelli))
{
const face& f = mesh.faces()[neighbourFaceI];
const face& f = mesh.faces()[neighbourFacei];
if (neighbourInfo.index() == -2)
{
@ -161,7 +161,7 @@ inline bool Foam::directionInfo::updateCell
// but not used in face.
// Get first edge on face.
label edgeI = mesh.faceEdges()[neighbourFaceI][0];
label edgeI = mesh.faceEdges()[neighbourFacei][0];
const edge& e = mesh.edges()[edgeI];
@ -170,8 +170,8 @@ inline bool Foam::directionInfo::updateCell
meshTools::otherFace
(
mesh,
thisCellI,
neighbourFaceI,
thisCelli,
neighbourFacei,
edgeI
);
@ -193,7 +193,7 @@ inline bool Foam::directionInfo::updateCell
label v0 = f[neighbourInfo.index()];
label v1 = f[(neighbourInfo.index() + 1) % f.size()];
index_ = findEdge(mesh, mesh.faceEdges()[neighbourFaceI], v0, v1);
index_ = findEdge(mesh, mesh.faceEdges()[neighbourFacei], v0, v1);
}
}
else
@ -214,8 +214,8 @@ template<class TrackingData>
inline bool Foam::directionInfo::updateFace
(
const polyMesh& mesh,
const label thisFaceI,
const label neighbourCellI,
const label thisFacei,
const label neighbourCelli,
const directionInfo& neighbourInfo,
const scalar, // tol
TrackingData& td
@ -240,8 +240,8 @@ inline bool Foam::directionInfo::updateFace
edgeToFaceIndex
(
mesh,
neighbourCellI,
thisFaceI,
neighbourCelli,
thisFacei,
neighbourInfo.index()
);
}
@ -263,7 +263,7 @@ template<class TrackingData>
inline bool Foam::directionInfo::updateFace
(
const polyMesh& mesh,
const label, // thisFaceI
const label, // thisFacei
const directionInfo& neighbourInfo,
const scalar, // tol
TrackingData& td

View File

@ -150,21 +150,21 @@ Foam::vectorField Foam::directions::propagateDirection
if (useTopo)
{
forAll(pp, patchFaceI)
forAll(pp, patchFacei)
{
label meshFaceI = pp.start() + patchFaceI;
label meshFacei = pp.start() + patchFacei;
label celli = mesh.faceOwner()[meshFaceI];
label celli = mesh.faceOwner()[meshFacei];
if (!hexMatcher().isA(mesh, celli))
{
FatalErrorInFunction
<< "useHexTopology specified but cell " << celli
<< " on face " << patchFaceI << " of patch " << pp.name()
<< " on face " << patchFacei << " of patch " << pp.name()
<< " is not a hex" << exit(FatalError);
}
const vector& cutDir = ppField[patchFaceI];
const vector& cutDir = ppField[patchFacei];
// Get edge(bundle) on cell most in direction of cutdir
label edgeI = meshTools::cutDirToEdge(mesh, celli, cutDir);
@ -175,13 +175,13 @@ Foam::vectorField Foam::directions::propagateDirection
(
mesh,
celli,
meshFaceI,
meshFacei,
edgeI
);
// Set initial face and direction
changedFaces[patchFaceI] = meshFaceI;
changedFacesInfo[patchFaceI] =
changedFaces[patchFacei] = meshFacei;
changedFacesInfo[patchFacei] =
directionInfo
(
faceIndex,
@ -191,14 +191,14 @@ Foam::vectorField Foam::directions::propagateDirection
}
else
{
forAll(pp, patchFaceI)
forAll(pp, patchFacei)
{
changedFaces[patchFaceI] = pp.start() + patchFaceI;
changedFacesInfo[patchFaceI] =
changedFaces[patchFacei] = pp.start() + patchFacei;
changedFacesInfo[patchFacei] =
directionInfo
(
-2, // Geometric information only
ppField[patchFaceI]
ppField[patchFacei]
);
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -44,13 +44,13 @@ void Foam::edgeVertex::updateLabels
{
const refineCell& refCell = refCells[refI];
label oldCellI = refCell.cellNo();
label oldCelli = refCell.cellNo();
label newCellI = map[oldCellI];
label newCelli = map[oldCelli];
if (newCellI != -1)
if (newCelli != -1)
{
refCells[newRefI++] = refineCell(newCellI, refCell.direction());
refCells[newRefI++] = refineCell(newCelli, refCell.direction());
}
}
refCells.setSize(newRefI);
@ -133,9 +133,9 @@ void Foam::edgeVertex::updateLabels
forAllConstIter(labelHashSet, cells, iter)
{
const label newCellI = map[iter.key()];
const label newCelli = map[iter.key()];
if (newCellI != iter.key())
if (newCelli != iter.key())
{
changed = true;
@ -150,11 +150,11 @@ void Foam::edgeVertex::updateLabels
forAllConstIter(labelHashSet, cells, iter)
{
const label newCellI = map[iter.key()];
const label newCelli = map[iter.key()];
if (newCellI != -1)
if (newCelli != -1)
{
newCells.insert(newCellI);
newCells.insert(newCelli);
}
}

View File

@ -843,17 +843,17 @@ void Foam::boundaryCutter::updateMesh(const mapPolyMesh& morphMap)
forAllConstIter(Map<label>, faceAddedPoint_, iter)
{
label oldFaceI = iter.key();
label oldFacei = iter.key();
label newFaceI = morphMap.reverseFaceMap()[oldFaceI];
label newFacei = morphMap.reverseFaceMap()[oldFacei];
label oldPointI = iter();
label newPointI = morphMap.reversePointMap()[oldPointI];
if (newFaceI >= 0 && newPointI >= 0)
if (newFacei >= 0 && newPointI >= 0)
{
newAddedPoints.insert(newFaceI, newPointI);
newAddedPoints.insert(newFacei, newPointI);
}
}

View File

@ -119,9 +119,9 @@ Foam::label Foam::meshCutAndRemove::findInternalFacePoint
const labelList& pFaces = mesh().pointFaces()[pointI];
forAll(pFaces, pFaceI)
forAll(pFaces, pFacei)
{
label facei = pFaces[pFaceI];
label facei = pFaces[pFacei];
if (mesh().isInternalFace(facei))
{
@ -143,7 +143,7 @@ Foam::label Foam::meshCutAndRemove::findInternalFacePoint
Foam::label Foam::meshCutAndRemove::findPatchFacePoint
(
const face& f,
const label exposedPatchI
const label exposedPatchi
) const
{
const labelListList& pointFaces = mesh().pointFaces();
@ -159,7 +159,7 @@ Foam::label Foam::meshCutAndRemove::findPatchFacePoint
forAll(pFaces, i)
{
if (patches.whichPatch(pFaces[i]) == exposedPatchI)
if (patches.whichPatch(pFaces[i]) == exposedPatchi)
{
return pointI;
}
@ -173,7 +173,7 @@ Foam::label Foam::meshCutAndRemove::findPatchFacePoint
void Foam::meshCutAndRemove::faceCells
(
const cellCuts& cuts,
const label exposedPatchI,
const label exposedPatchi,
const label facei,
label& own,
label& nei,
@ -210,7 +210,7 @@ void Foam::meshCutAndRemove::faceCells
if (patchID == -1 && (own == -1 || nei == -1))
{
// Face was internal but becomes external
patchID = exposedPatchI;
patchID = exposedPatchi;
}
}
@ -506,7 +506,7 @@ Foam::face Foam::meshCutAndRemove::loopToFace
{
face newFace(2*loop.size());
label newFaceI = 0;
label newFacei = 0;
forAll(loop, fp)
{
@ -520,14 +520,14 @@ Foam::face Foam::meshCutAndRemove::loopToFace
label vertI = addedPoints_[e];
newFace[newFaceI++] = vertI;
newFace[newFacei++] = vertI;
}
else
{
// cut is vertex.
label vertI = getVertex(cut);
newFace[newFaceI++] = vertI;
newFace[newFacei++] = vertI;
label nextCut = loop[loop.fcIndex(fp)];
@ -546,13 +546,13 @@ Foam::face Foam::meshCutAndRemove::loopToFace
if (fnd != addedPoints_.end())
{
newFace[newFaceI++] = fnd();
newFace[newFacei++] = fnd();
}
}
}
}
}
newFace.setSize(newFaceI);
newFace.setSize(newFacei);
return newFace;
}
@ -573,7 +573,7 @@ Foam::meshCutAndRemove::meshCutAndRemove(const polyMesh& mesh)
void Foam::meshCutAndRemove::setRefinement
(
const label exposedPatchI,
const label exposedPatchi,
const cellCuts& cuts,
const labelList& cutPatch,
polyTopoChange& meshMod
@ -595,10 +595,10 @@ void Foam::meshCutAndRemove::setRefinement
const labelListList& cellLoops = cuts.cellLoops();
const polyBoundaryMesh& patches = mesh().boundaryMesh();
if (exposedPatchI < 0 || exposedPatchI >= patches.size())
if (exposedPatchi < 0 || exposedPatchi >= patches.size())
{
FatalErrorInFunction
<< "Illegal exposed patch " << exposedPatchI
<< "Illegal exposed patch " << exposedPatchi
<< abort(FatalError);
}
@ -622,7 +622,7 @@ void Foam::meshCutAndRemove::setRefinement
<< abort(FatalError);
}
// One of the edge end points should be master point of nbCellI.
// One of the edge end points should be master point of nbCelli.
label masterPointI = e.start();
const point& v0 = mesh().points()[e.start()];
@ -790,9 +790,9 @@ void Foam::meshCutAndRemove::setRefinement
reverse(newFace);
// Pick any anchor point on cell
label masterPointI = findPatchFacePoint(newFace, exposedPatchI);
label masterPointI = findPatchFacePoint(newFace, exposedPatchi);
label addedFaceI =
label addedFacei =
meshMod.setAction
(
polyAddFace
@ -810,12 +810,12 @@ void Foam::meshCutAndRemove::setRefinement
)
);
addedFaces_.insert(celli, addedFaceI);
addedFaces_.insert(celli, addedFacei);
if (debug & 2)
{
Pout<< "Added splitting face " << newFace << " index:"
<< addedFaceI << " from masterPoint:" << masterPointI
<< addedFacei << " from masterPoint:" << masterPointI
<< " to owner " << celli << " with anchors:"
<< anchorPts[celli]
<< " from Loop:";
@ -1027,14 +1027,14 @@ void Foam::meshCutAndRemove::setRefinement
if (patchID == -1)
{
patchID = exposedPatchI;
patchID = exposedPatchi;
}
// Do as much as possible by modifying facei. Delay any remove
// face. Keep track of whether facei has been used.
bool modifiedFaceI = false;
bool modifiedFacei = false;
if (f0Own == -1)
{
@ -1042,7 +1042,7 @@ void Foam::meshCutAndRemove::setRefinement
{
// f0 becomes external face (note:modFace will reverse face)
modFace(meshMod, facei, f0, f0Own, f0Nei, patchID);
modifiedFaceI = true;
modifiedFacei = true;
}
}
else
@ -1051,13 +1051,13 @@ void Foam::meshCutAndRemove::setRefinement
{
// f0 becomes external face
modFace(meshMod, facei, f0, f0Own, f0Nei, patchID);
modifiedFaceI = true;
modifiedFacei = true;
}
else
{
// f0 stays internal face.
modFace(meshMod, facei, f0, f0Own, f0Nei, -1);
modifiedFaceI = true;
modifiedFacei = true;
}
}
@ -1073,10 +1073,10 @@ void Foam::meshCutAndRemove::setRefinement
else
{
// f1 becomes external face (note:modFace will reverse face)
if (!modifiedFaceI)
if (!modifiedFacei)
{
modFace(meshMod, facei, f1, f1Own, f1Nei, patchID);
modifiedFaceI = true;
modifiedFacei = true;
}
else
{
@ -1100,10 +1100,10 @@ void Foam::meshCutAndRemove::setRefinement
if (f1Nei == -1)
{
// f1 becomes external face
if (!modifiedFaceI)
if (!modifiedFacei)
{
modFace(meshMod, facei, f1, f1Own, f1Nei, patchID);
modifiedFaceI = true;
modifiedFacei = true;
}
else
{
@ -1124,10 +1124,10 @@ void Foam::meshCutAndRemove::setRefinement
else
{
// f1 is internal face.
if (!modifiedFaceI)
if (!modifiedFacei)
{
modFace(meshMod, facei, f1, f1Own, f1Nei, -1);
modifiedFaceI = true;
modifiedFacei = true;
}
else
{
@ -1138,7 +1138,7 @@ void Foam::meshCutAndRemove::setRefinement
}
}
if (f0Own == -1 && f0Nei == -1 && !modifiedFaceI)
if (f0Own == -1 && f0Nei == -1 && !modifiedFacei)
{
meshMod.setAction(polyRemoveFace(facei));
@ -1177,7 +1177,7 @@ void Foam::meshCutAndRemove::setRefinement
// Get (new or original) owner and neighbour of facei
label own, nei, patchID;
faceCells(cuts, exposedPatchI, facei, own, nei, patchID);
faceCells(cuts, exposedPatchi, facei, own, nei, patchID);
if (own == -1 && nei == -1)
@ -1233,7 +1233,7 @@ void Foam::meshCutAndRemove::setRefinement
{
// Get (new or original) owner and neighbour of facei
label own, nei, patchID;
faceCells(cuts, exposedPatchI, facei, own, nei, patchID);
faceCells(cuts, exposedPatchi, facei, own, nei, patchID);
if (own == -1 && nei == -1)
{
@ -1273,27 +1273,27 @@ void Foam::meshCutAndRemove::updateMesh(const mapPolyMesh& map)
forAllConstIter(Map<label>, addedFaces_, iter)
{
label celli = iter.key();
label newCellI = map.reverseCellMap()[celli];
label newCelli = map.reverseCellMap()[celli];
label addedFaceI = iter();
label addedFacei = iter();
label newAddedFaceI = map.reverseFaceMap()[addedFaceI];
label newAddedFacei = map.reverseFaceMap()[addedFacei];
if ((newCellI >= 0) && (newAddedFaceI >= 0))
if ((newCelli >= 0) && (newAddedFacei >= 0))
{
if
(
(debug & 2)
&& (newCellI != celli || newAddedFaceI != addedFaceI)
&& (newCelli != celli || newAddedFacei != addedFacei)
)
{
Pout<< "meshCutAndRemove::updateMesh :"
<< " updating addedFace for cell " << celli
<< " from " << addedFaceI
<< " to " << newAddedFaceI
<< " from " << addedFacei
<< " to " << newAddedFacei
<< endl;
}
newAddedFaces.insert(newCellI, newAddedFaceI);
newAddedFaces.insert(newCelli, newAddedFacei);
}
}

View File

@ -101,7 +101,7 @@ class meshCutAndRemove
void faceCells
(
const cellCuts& cuts,
const label exposedPatchI,
const label exposedPatchi,
const label facei,
label& own,
label& nei,
@ -204,7 +204,7 @@ public:
// exposedPatch: patch for other exposed faces
void setRefinement
(
const label exposedPatchI,
const label exposedPatchi,
const cellCuts& cuts,
const labelList& cutPatch,
polyTopoChange& meshMod

View File

@ -110,9 +110,9 @@ Foam::label Foam::meshCutter::findInternalFacePoint
const labelList& pFaces = mesh().pointFaces()[pointI];
forAll(pFaces, pFaceI)
forAll(pFaces, pFacei)
{
label facei = pFaces[pFaceI];
label facei = pFaces[pFacei];
if (mesh().isInternalFace(facei))
{
@ -448,7 +448,7 @@ Foam::face Foam::meshCutter::loopToFace
{
face newFace(2*loop.size());
label newFaceI = 0;
label newFacei = 0;
forAll(loop, fp)
{
@ -462,14 +462,14 @@ Foam::face Foam::meshCutter::loopToFace
label vertI = addedPoints_[e];
newFace[newFaceI++] = vertI;
newFace[newFacei++] = vertI;
}
else
{
// cut is vertex.
label vertI = getVertex(cut);
newFace[newFaceI++] = vertI;
newFace[newFacei++] = vertI;
label nextCut = loop[loop.fcIndex(fp)];
@ -488,13 +488,13 @@ Foam::face Foam::meshCutter::loopToFace
if (fnd != addedPoints_.end())
{
newFace[newFaceI++] = fnd();
newFace[newFacei++] = fnd();
}
}
}
}
}
newFace.setSize(newFaceI);
newFace.setSize(newFacei);
return newFace;
}
@ -563,7 +563,7 @@ void Foam::meshCutter::setRefinement
<< abort(FatalError);
}
// One of the edge end points should be master point of nbCellI.
// One of the edge end points should be master point of nbCelli.
label masterPointI = e.start();
const point& v0 = mesh().points()[e.start()];
@ -607,7 +607,7 @@ void Foam::meshCutter::setRefinement
if (cellLoops[celli].size())
{
// Add a cell to the existing cell
label addedCellI =
label addedCelli =
meshMod.setAction
(
polyAddCell
@ -620,7 +620,7 @@ void Foam::meshCutter::setRefinement
)
);
addedCells_.insert(celli, addedCellI);
addedCells_.insert(celli, addedCelli);
if (debug & 2)
{
@ -649,7 +649,7 @@ void Foam::meshCutter::setRefinement
// Pick any anchor point on cell
label masterPointI = findInternalFacePoint(anchorPts[celli]);
label addedFaceI =
label addedFacei =
meshMod.setAction
(
polyAddFace
@ -667,7 +667,7 @@ void Foam::meshCutter::setRefinement
)
);
addedFaces_.insert(celli, addedFaceI);
addedFaces_.insert(celli, addedFacei);
if (debug & 2)
{
@ -686,7 +686,7 @@ void Foam::meshCutter::setRefinement
}
Pout<< "Added splitting face " << newFace << " index:"
<< addedFaceI
<< addedFacei
<< " to owner " << celli
<< " neighbour " << addedCells_[celli]
<< " from Loop:";
@ -803,9 +803,9 @@ void Foam::meshCutter::setRefinement
// use anchorPts.
if (uses(f, anchorPts[own]))
{
label newCellI = addedCells_[own];
f0Owner = newCellI;
f1Owner = newCellI;
label newCelli = addedCells_[own];
f0Owner = newCelli;
f1Owner = newCelli;
}
else
{
@ -846,9 +846,9 @@ void Foam::meshCutter::setRefinement
// whether use anchorPts.
if (uses(f, anchorPts[nei]))
{
label newCellI = addedCells_[nei];
f0Neighbour = newCellI;
f1Neighbour = newCellI;
label newCelli = addedCells_[nei];
f0Neighbour = newCelli;
f1Neighbour = newCelli;
}
else
{
@ -919,9 +919,9 @@ void Foam::meshCutter::setRefinement
{
const labelList& cllFaces = mesh().cells()[celli];
forAll(cllFaces, cllFaceI)
forAll(cllFaces, cllFacei)
{
label facei = cllFaces[cllFaceI];
label facei = cllFaces[cllFacei];
if (!faceUptodate[facei])
{
@ -981,26 +981,26 @@ void Foam::meshCutter::updateMesh(const mapPolyMesh& morphMap)
forAllConstIter(Map<label>, addedCells_, iter)
{
label celli = iter.key();
label newCellI = morphMap.reverseCellMap()[celli];
label newCelli = morphMap.reverseCellMap()[celli];
label addedCellI = iter();
label addedCelli = iter();
label newAddedCellI = morphMap.reverseCellMap()[addedCellI];
label newAddedCelli = morphMap.reverseCellMap()[addedCelli];
if (newCellI >= 0 && newAddedCellI >= 0)
if (newCelli >= 0 && newAddedCelli >= 0)
{
if
(
(debug & 2)
&& (newCellI != celli || newAddedCellI != addedCellI)
&& (newCelli != celli || newAddedCelli != addedCelli)
)
{
Pout<< "meshCutter::updateMesh :"
<< " updating addedCell for cell " << celli
<< " from " << addedCellI
<< " to " << newAddedCellI << endl;
<< " from " << addedCelli
<< " to " << newAddedCelli << endl;
}
newAddedCells.insert(newCellI, newAddedCellI);
newAddedCells.insert(newCelli, newAddedCelli);
}
}
@ -1014,27 +1014,27 @@ void Foam::meshCutter::updateMesh(const mapPolyMesh& morphMap)
forAllConstIter(Map<label>, addedFaces_, iter)
{
label celli = iter.key();
label newCellI = morphMap.reverseCellMap()[celli];
label newCelli = morphMap.reverseCellMap()[celli];
label addedFaceI = iter();
label addedFacei = iter();
label newAddedFaceI = morphMap.reverseFaceMap()[addedFaceI];
label newAddedFacei = morphMap.reverseFaceMap()[addedFacei];
if ((newCellI >= 0) && (newAddedFaceI >= 0))
if ((newCelli >= 0) && (newAddedFacei >= 0))
{
if
(
(debug & 2)
&& (newCellI != celli || newAddedFaceI != addedFaceI)
&& (newCelli != celli || newAddedFacei != addedFacei)
)
{
Pout<< "meshCutter::updateMesh :"
<< " updating addedFace for cell " << celli
<< " from " << addedFaceI
<< " to " << newAddedFaceI
<< " from " << addedFacei
<< " to " << newAddedFacei
<< endl;
}
newAddedFaces.insert(newCellI, newAddedFaceI);
newAddedFaces.insert(newCelli, newAddedFacei);
}
}

View File

@ -104,13 +104,13 @@ void Foam::multiDirRefinement::addCells
labelList& labels
)
{
label newCellI = labels.size();
label newCelli = labels.size();
labels.setSize(labels.size() + splitMap.size());
forAllConstIter(Map<label>, splitMap, iter)
{
labels[newCellI++] = iter();
labels[newCelli++] = iter();
}
}
@ -152,7 +152,7 @@ void Foam::multiDirRefinement::addCells
forAllConstIter(Map<label>, splitMap, iter)
{
label masterI = iter.key();
label newCellI = iter();
label newCelli = iter();
while (origCell[masterI] != -1 && origCell[masterI] != masterI)
{
@ -166,7 +166,7 @@ void Foam::multiDirRefinement::addCells
<< " which is not a valid cell number" << endl
<< "This means that the mesh is not consistent with the"
<< " done refinement" << endl
<< "newCell:" << newCellI << abort(FatalError);
<< "newCell:" << newCelli << abort(FatalError);
}
labelList& added = addedCells_[masterI];
@ -175,13 +175,13 @@ void Foam::multiDirRefinement::addCells
{
added.setSize(2);
added[0] = masterI;
added[1] = newCellI;
added[1] = newCelli;
}
else if (findIndex(added, newCellI) == -1)
else if (findIndex(added, newCelli) == -1)
{
label sz = added.size();
added.setSize(sz + 1);
added[sz] = newCellI;
added[sz] = newCelli;
}
}
}
@ -350,11 +350,11 @@ void Foam::multiDirRefinement::refineHex8
forAll(cellMap, celli)
{
const label oldCellI = cellMap[celli];
const label oldCelli = cellMap[celli];
if (addedCells_[oldCellI].size())
if (addedCells_[oldCelli].size())
{
addedCells_[oldCellI][nAddedCells[oldCellI]++] = celli;
addedCells_[oldCelli][nAddedCells[oldCelli]++] = celli;
}
}
}

View File

@ -145,23 +145,23 @@ void Foam::undoableMeshCutter::updateLabels
label celli = splitPtr->cellLabel();
label newCellI = map[celli];
label newCelli = map[celli];
if (debug && (celli != newCellI))
if (debug && (celli != newCelli))
{
Pout<< "undoableMeshCutter::updateLabels :"
<< " Updating live (split)cell from " << celli
<< " to " << newCellI << endl;
<< " to " << newCelli << endl;
}
if (newCellI >= 0)
if (newCelli >= 0)
{
// Update splitCell. Can do inplace since only one celli will
// refer to this structure.
splitPtr->cellLabel() = newCellI;
splitPtr->cellLabel() = newCelli;
// Update liveSplitCells
newLiveSplitCells.insert(newCellI, splitPtr);
newLiveSplitCells.insert(newCelli, splitPtr);
}
}
liveSplitCells = newLiveSplitCells;
@ -241,10 +241,10 @@ void Foam::undoableMeshCutter::setRefinement
{
label celli = iter.key();
label addedCellI = iter();
label addedCelli = iter();
// Newly created split cell. (celli -> celli + addedCellI)
// Newly created split cell. (celli -> celli + addedCelli)
// Check if celli already part of split.
Map<splitCell*>::iterator findCell =
@ -252,7 +252,7 @@ void Foam::undoableMeshCutter::setRefinement
if (findCell == liveSplitCells_.end())
{
// CellI not yet split. It cannot be unlive split cell
// Celli not yet split. It cannot be unlive split cell
// since that would be illegal to split in the first
// place.
@ -261,7 +261,7 @@ void Foam::undoableMeshCutter::setRefinement
splitCell* masterPtr = new splitCell(celli, parentPtr);
splitCell* slavePtr = new splitCell(addedCellI, parentPtr);
splitCell* slavePtr = new splitCell(addedCelli, parentPtr);
// Store newly created cells on parent together with face
// that splits them
@ -270,15 +270,15 @@ void Foam::undoableMeshCutter::setRefinement
// Insert master and slave into live splitcell list
if (liveSplitCells_.found(addedCellI))
if (liveSplitCells_.found(addedCelli))
{
FatalErrorInFunction
<< "problem addedCell:" << addedCellI
<< "problem addedCell:" << addedCelli
<< abort(FatalError);
}
liveSplitCells_.insert(celli, masterPtr);
liveSplitCells_.insert(addedCellI, slavePtr);
liveSplitCells_.insert(addedCelli, slavePtr);
}
else
{
@ -290,7 +290,7 @@ void Foam::undoableMeshCutter::setRefinement
splitCell* masterPtr = new splitCell(celli, parentPtr);
splitCell* slavePtr = new splitCell(addedCellI, parentPtr);
splitCell* slavePtr = new splitCell(addedCelli, parentPtr);
// Store newly created cells on parent together with face
// that splits them
@ -299,15 +299,15 @@ void Foam::undoableMeshCutter::setRefinement
// Insert master and slave into live splitcell list
if (liveSplitCells_.found(addedCellI))
if (liveSplitCells_.found(addedCelli))
{
FatalErrorInFunction
<< "problem addedCell:" << addedCellI
<< "problem addedCell:" << addedCelli
<< abort(FatalError);
}
liveSplitCells_.insert(celli, masterPtr);
liveSplitCells_.insert(addedCellI, slavePtr);
liveSplitCells_.insert(addedCelli, slavePtr);
}
}
@ -379,17 +379,17 @@ Foam::labelList Foam::undoableMeshCutter::getSplitFaces() const
label celli = splitPtr->cellLabel();
label slaveCellI = slavePtr->cellLabel();
label slaveCelli = slavePtr->cellLabel();
label commonFaceI =
label commonFacei =
meshTools::getSharedFace
(
mesh(),
celli,
slaveCellI
slaveCelli
);
liveSplitFaces.append(commonFaceI);
liveSplitFaces.append(commonFacei);
}
}
}

View File

@ -45,9 +45,9 @@ bool Foam::wallLayerCells::usesCoupledPatch(const label celli) const
const cell& cFaces = mesh().cells()[celli];
forAll(cFaces, cFaceI)
forAll(cFaces, cFacei)
{
label facei = cFaces[cFaceI];
label facei = cFaces[cFacei];
label patchID = patches.whichPatch(facei);
@ -116,14 +116,14 @@ Foam::wallLayerCells::wallLayerCells
const polyPatch& pp = patches[patchi];
forAll(pp, patchFaceI)
forAll(pp, patchFacei)
{
label meshFaceI = pp.start() + patchFaceI;
label meshFacei = pp.start() + patchFacei;
changedFaces[nChangedFaces] = meshFaceI;
changedFaces[nChangedFaces] = meshFacei;
// Set transported information to the wall normal.
const vector& norm = pp.faceNormals()[patchFaceI];
const vector& norm = pp.faceNormals()[patchFacei];
changedFacesInfo[nChangedFaces] = wallNormalInfo(norm);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -112,7 +112,7 @@ public:
(
const polyMesh&,
const polyPatch&,
const label patchFaceI,
const label patchFacei,
const point& faceCentre,
TrackingData& td
);
@ -123,7 +123,7 @@ public:
(
const polyMesh&,
const polyPatch&,
const label patchFaceI,
const label patchFacei,
const point& faceCentre,
TrackingData& td
);
@ -142,8 +142,8 @@ public:
inline bool updateCell
(
const polyMesh&,
const label thisCellI,
const label neighbourFaceI,
const label thisCelli,
const label neighbourFacei,
const wallNormalInfo& neighbourInfo,
const scalar tol,
TrackingData& td
@ -154,8 +154,8 @@ public:
inline bool updateFace
(
const polyMesh&,
const label thisFaceI,
const label neighbourCellI,
const label thisFacei,
const label neighbourCelli,
const wallNormalInfo& neighbourInfo,
const scalar tol,
TrackingData& td
@ -166,7 +166,7 @@ public:
inline bool updateFace
(
const polyMesh&,
const label thisFaceI,
const label thisFacei,
const wallNormalInfo& neighbourInfo,
const scalar tol,
TrackingData& td

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -114,7 +114,7 @@ inline void Foam::wallNormalInfo::leaveDomain
(
const polyMesh&,
const polyPatch& patch,
const label patchFaceI,
const label patchFacei,
const point& faceCentre,
TrackingData& td
)
@ -138,7 +138,7 @@ inline void Foam::wallNormalInfo::enterDomain
(
const polyMesh&,
const polyPatch& patch,
const label patchFaceI,
const label patchFacei,
const point& faceCentre,
TrackingData& td
)
@ -150,8 +150,8 @@ template<class TrackingData>
inline bool Foam::wallNormalInfo::updateCell
(
const polyMesh&,
const label thisCellI,
const label neighbourFaceI,
const label thisCelli,
const label neighbourFacei,
const wallNormalInfo& neighbourWallInfo,
const scalar tol,
TrackingData& td
@ -166,8 +166,8 @@ template<class TrackingData>
inline bool Foam::wallNormalInfo::updateFace
(
const polyMesh&,
const label thisFaceI,
const label neighbourCellI,
const label thisFacei,
const label neighbourCelli,
const wallNormalInfo& neighbourWallInfo,
const scalar tol,
TrackingData& td
@ -182,7 +182,7 @@ template<class TrackingData>
inline bool Foam::wallNormalInfo::updateFace
(
const polyMesh&,
const label thisFaceI,
const label thisFacei,
const wallNormalInfo& neighbourWallInfo,
const scalar tol,
TrackingData& td

View File

@ -315,13 +315,13 @@ void Foam::motionSmootherAlgo::getAffectedFacesAndPoints
{
const labelList& pCells = mesh_.pointCells(iter.key());
forAll(pCells, pCellI)
forAll(pCells, pCelli)
{
const cell& cFaces = mesh_.cells()[pCells[pCellI]];
const cell& cFaces = mesh_.cells()[pCells[pCelli]];
forAll(cFaces, cFaceI)
forAll(cFaces, cFacei)
{
nbrFaces.insert(cFaces[cFaceI]);
nbrFaces.insert(cFaces[cFacei]);
}
}
}

View File

@ -1495,7 +1495,7 @@ bool Foam::polyMeshGeometry::checkFaceAngles
label nConcave = 0;
label errorFaceI = -1;
label errorFacei = -1;
forAll(checkFaces, i)
{
@ -1537,10 +1537,10 @@ bool Foam::polyMeshGeometry::checkFaceAngles
if ((edgeNormal & faceNormal) < SMALL)
{
if (facei != errorFaceI)
if (facei != errorFacei)
{
// Count only one error per face.
errorFaceI = facei;
errorFacei = facei;
nConcave++;
}
@ -2121,9 +2121,9 @@ bool Foam::polyMeshGeometry::checkCellDeterminant
tensor areaSum(Zero);
scalar magAreaSum = 0;
forAll(cFaces, cFaceI)
forAll(cFaces, cFacei)
{
label facei = cFaces[cFaceI];
label facei = cFaces[cFacei];
scalar magArea = mag(faceAreas[facei]);
@ -2142,9 +2142,9 @@ bool Foam::polyMeshGeometry::checkCellDeterminant
if (setPtr)
{
// Insert all faces of the cell.
forAll(cFaces, cFaceI)
forAll(cFaces, cFacei)
{
label facei = cFaces[cFaceI];
label facei = cFaces[cFacei];
setPtr->insert(facei);
}
}

View File

@ -68,9 +68,9 @@ Foam::pointField Foam::perfectInterface::calcFaceCentres
pointField ctrs(pp.size());
forAll(ctrs, patchFaceI)
forAll(ctrs, patchFacei)
{
ctrs[patchFaceI] = pp[patchFaceI].centre(points);
ctrs[patchFacei] = pp[patchFacei].centre(points);
}
return ctrs;
@ -264,9 +264,9 @@ void Foam::perfectInterface::setRefinement
{
const labelList& pFaces = mesh.pointFaces()[meshPointI];
forAll(pFaces, pFaceI)
forAll(pFaces, pFacei)
{
affectedFaces.insert(pFaces[pFaceI]);
affectedFaces.insert(pFaces[pFacei]);
}
}
}
@ -388,9 +388,9 @@ void Foam::perfectInterface::setRefinement
label own = mesh.faceOwner()[facei];
label pp1FaceI = pp1.addressing()[from0To1Faces[i]];
label pp1Facei = pp1.addressing()[from0To1Faces[i]];
label nbr = mesh.faceOwner()[pp1FaceI];
label nbr = mesh.faceOwner()[pp1Facei];
if (own < nbr)
{

View File

@ -169,22 +169,22 @@ void Foam::faceCoupleInfo::writePointsFaces() const
pointField equivMasterFaces(c.size());
forAll(cutToMasterFaces(), cutFaceI)
forAll(cutToMasterFaces(), cutFacei)
{
label masterFaceI = cutToMasterFaces()[cutFaceI];
label masterFacei = cutToMasterFaces()[cutFacei];
if (masterFaceI != -1)
if (masterFacei != -1)
{
equivMasterFaces[cutFaceI] = m[masterFaceI].centre(m.points());
equivMasterFaces[cutFacei] = m[masterFacei].centre(m.points());
}
else
{
WarningInFunction
<< "No master face for cut face " << cutFaceI
<< " at position " << c[cutFaceI].centre(c.points())
<< "No master face for cut face " << cutFacei
<< " at position " << c[cutFacei].centre(c.points())
<< endl;
equivMasterFaces[cutFaceI] = Zero;
equivMasterFaces[cutFacei] = Zero;
}
}
@ -201,11 +201,11 @@ void Foam::faceCoupleInfo::writePointsFaces() const
pointField equivSlaveFaces(c.size());
forAll(cutToSlaveFaces(), cutFaceI)
forAll(cutToSlaveFaces(), cutFacei)
{
label slaveFaceI = cutToSlaveFaces()[cutFaceI];
label slaveFacei = cutToSlaveFaces()[cutFacei];
equivSlaveFaces[cutFaceI] = s[slaveFaceI].centre(s.points());
equivSlaveFaces[cutFacei] = s[slaveFacei].centre(s.points());
}
writeOBJ
@ -350,9 +350,9 @@ bool Foam::faceCoupleInfo::regionEdge
{
label facei = eFaces[i];
label meshFaceI = slavePatch().addressing()[facei];
label meshFacei = slavePatch().addressing()[facei];
label patchI = slaveMesh.boundaryMesh().whichPatch(meshFaceI);
label patchI = slaveMesh.boundaryMesh().whichPatch(meshFacei);
if (patch0 == -1)
{
@ -731,12 +731,12 @@ bool Foam::faceCoupleInfo::matchPointsThroughFaces
labelList cutPointRegion(cutPoints.size(), -1);
DynamicList<label> cutPointRegionMaster;
forAll(patchFaces, patchFaceI)
forAll(patchFaces, patchFacei)
{
const face& patchF = patchFaces[patchFaceI];
const face& patchF = patchFaces[patchFacei];
//const face& cutF = cutFaces[patchToCutFaces[patchFaceI]];
const face& cutF = cutFaces[patchFaceI];
//const face& cutF = cutFaces[patchToCutFaces[patchFacei]];
const face& cutF = cutFaces[patchFacei];
// Do geometric matching to get position of cutF[0] in patchF
label patchFp = matchFaces
@ -1009,12 +1009,12 @@ void Foam::faceCoupleInfo::findSlavesCoveringMaster
for
(
label mesh1FaceI = mesh1.nInternalFaces();
mesh1FaceI < mesh1.nFaces();
mesh1FaceI++
label mesh1Facei = mesh1.nInternalFaces();
mesh1Facei < mesh1.nFaces();
mesh1Facei++
)
{
const face& f1 = mesh1.faces()[mesh1FaceI];
const face& f1 = mesh1.faces()[mesh1Facei];
// Generate face centre (prevent cellCentres() reconstruction)
point fc(f1.centre(mesh1.points()));
@ -1023,7 +1023,7 @@ void Foam::faceCoupleInfo::findSlavesCoveringMaster
if (nearInfo.hit())
{
label mesh0FaceI = tree.shapes().faceLabels()[nearInfo.index()];
label mesh0Facei = tree.shapes().faceLabels()[nearInfo.index()];
// Check if points of f1 actually lie on top of mesh0 face
// This is the bit that might fail since if f0 is severely warped
@ -1036,14 +1036,14 @@ void Foam::faceCoupleInfo::findSlavesCoveringMaster
(
f1,
mesh1.points(),
mesh0.faces()[mesh0FaceI],
mesh0.faces()[mesh0Facei],
mesh0.points()
);
if (dist < absTol)
{
mesh0Set.insert(mesh0FaceI);
mesh1Set.insert(mesh1FaceI);
mesh0Set.insert(mesh0Facei);
mesh1Set.insert(mesh1Facei);
}
}
}
@ -1081,17 +1081,17 @@ Foam::label Foam::faceCoupleInfo::growCutFaces
label nChanged = 0;
forAll(cutToMasterFaces_, cutFaceI)
forAll(cutToMasterFaces_, cutFacei)
{
const label masterFaceI = cutToMasterFaces_[cutFaceI];
const label masterFacei = cutToMasterFaces_[cutFacei];
if (masterFaceI != -1)
if (masterFacei != -1)
{
// We now have a cutFace for which we have already found a
// master face. Grow this masterface across any internal edge
// (internal: no corresponding master edge)
const labelList& fEdges = cutFaceEdges[cutFaceI];
const labelList& fEdges = cutFaceEdges[cutFacei];
forAll(fEdges, i)
{
@ -1102,7 +1102,7 @@ Foam::label Foam::faceCoupleInfo::growCutFaces
// So this edge:
// - internal to the cutPatch (since all region edges
// marked before)
// - on cutFaceI which corresponds to masterFace.
// - on cutFacei which corresponds to masterFace.
// Mark all connected faces with this masterFace.
const labelList& eFaces = cutEdgeFaces[cutEdgeI];
@ -1113,11 +1113,11 @@ Foam::label Foam::faceCoupleInfo::growCutFaces
if (cutToMasterFaces_[facei] == -1)
{
cutToMasterFaces_[facei] = masterFaceI;
cutToMasterFaces_[facei] = masterFacei;
candidates.erase(facei);
nChanged++;
}
else if (cutToMasterFaces_[facei] != masterFaceI)
else if (cutToMasterFaces_[facei] != masterFacei)
{
const pointField& cutPoints =
cutFaces().points();
@ -1129,7 +1129,7 @@ Foam::label Foam::faceCoupleInfo::growCutFaces
label myMaster = cutToMasterFaces_[facei];
const face& myF = masterPatch()[myMaster];
const face& nbrF = masterPatch()[masterFaceI];
const face& nbrF = masterPatch()[masterFacei];
FatalErrorInFunction
<< "Cut face "
@ -1137,8 +1137,8 @@ Foam::label Foam::faceCoupleInfo::growCutFaces
<< " has master "
<< myMaster
<< " but also connects to nbr face "
<< cutFaces()[cutFaceI].points(cutPoints)
<< " with master " << masterFaceI
<< cutFaces()[cutFacei].points(cutPoints)
<< " with master " << masterFacei
<< nl
<< "myMasterFace:"
<< myF.points(masterPoints)
@ -1190,24 +1190,24 @@ void Foam::faceCoupleInfo::checkMatch(const labelList& cutToMasterEdges) const
// Internal edge. Check that master face is same on both sides.
const labelList& cutEFaces = cutFaces().edgeFaces()[cutEdgeI];
label masterFaceI = -1;
label masterFacei = -1;
forAll(cutEFaces, i)
{
label cutFaceI = cutEFaces[i];
label cutFacei = cutEFaces[i];
if (cutToMasterFaces_[cutFaceI] != -1)
if (cutToMasterFaces_[cutFacei] != -1)
{
if (masterFaceI == -1)
if (masterFacei == -1)
{
masterFaceI = cutToMasterFaces_[cutFaceI];
masterFacei = cutToMasterFaces_[cutFacei];
}
else if (masterFaceI != cutToMasterFaces_[cutFaceI])
else if (masterFacei != cutToMasterFaces_[cutFacei])
{
label myMaster = cutToMasterFaces_[cutFaceI];
label myMaster = cutToMasterFaces_[cutFacei];
const face& myF = masterLocalFaces[myMaster];
const face& nbrF = masterLocalFaces[masterFaceI];
const face& nbrF = masterLocalFaces[masterFacei];
FatalErrorInFunction
<< "Internal CutEdge " << e
@ -1215,7 +1215,7 @@ void Foam::faceCoupleInfo::checkMatch(const labelList& cutToMasterEdges) const
<< cutLocalPoints[e[0]]
<< cutLocalPoints[e[1]]
<< " connects to master " << myMaster
<< " and to master " << masterFaceI << nl
<< " and to master " << masterFacei << nl
<< "myMasterFace:"
<< myF.points(masterLocalPoints)
<< " nbrMasterFace:"
@ -1239,7 +1239,7 @@ Foam::label Foam::faceCoupleInfo::matchEdgeFaces
// than one region edge. Updates cutToMasterFaces_ and sets candidates which
// is for every cutface on a region edge the possible master faces.
// For every unassigned cutFaceI the possible list of master faces.
// For every unassigned cutFacei the possible list of master faces.
candidates.clear();
candidates.resize(cutFaces().size());
@ -1260,24 +1260,24 @@ Foam::label Foam::faceCoupleInfo::matchEdgeFaces
forAll(cutEFaces, i)
{
label cutFaceI = cutEFaces[i];
label cutFacei = cutEFaces[i];
if (cutToMasterFaces_[cutFaceI] == -1)
if (cutToMasterFaces_[cutFacei] == -1)
{
// So this face (cutFaceI) is on an edge (cutEdgeI) that
// So this face (cutFacei) is on an edge (cutEdgeI) that
// is used by some master faces (masterEFaces). Check if
// the cutFaceI and some of these masterEFaces share more
// the cutFacei and some of these masterEFaces share more
// than one edge (which uniquely defines face)
// Combine master faces with current set of candidate
// master faces.
Map<labelList>::iterator fnd = candidates.find(cutFaceI);
Map<labelList>::iterator fnd = candidates.find(cutFacei);
if (fnd == candidates.end())
{
// No info yet for cutFaceI. Add all master faces as
// No info yet for cutFacei. Add all master faces as
// candidates
candidates.insert(cutFaceI, masterEFaces);
candidates.insert(cutFacei, masterEFaces);
}
else
{
@ -1300,8 +1300,8 @@ Foam::label Foam::faceCoupleInfo::matchEdgeFaces
{
// We found a perfect match. Delete entry from
// candidates map.
cutToMasterFaces_[cutFaceI] = newCandidates[0];
candidates.erase(cutFaceI);
cutToMasterFaces_[cutFacei] = newCandidates[0];
candidates.erase(cutFacei);
nChanged++;
}
else
@ -1357,21 +1357,21 @@ Foam::label Foam::faceCoupleInfo::geometricMatchEdgeFaces
forAllConstIter(Map<labelList>, candidates, iter)
{
label cutFaceI = iter.key();
label cutFacei = iter.key();
const face& cutF = cutFaces()[cutFaceI];
const face& cutF = cutFaces()[cutFacei];
if (cutToMasterFaces_[cutFaceI] == -1)
if (cutToMasterFaces_[cutFacei] == -1)
{
const labelList& masterFaces = iter();
// Find the best matching master face.
scalar minDist = GREAT;
label minMasterFaceI = -1;
label minMasterFacei = -1;
forAll(masterFaces, i)
{
label masterFaceI = masterFaces[i];
label masterFacei = masterFaces[i];
if (masterToCutFaces[masterFaces[i]].empty())
{
@ -1379,33 +1379,33 @@ Foam::label Foam::faceCoupleInfo::geometricMatchEdgeFaces
(
cutF,
cutPoints,
masterPatch()[masterFaceI],
masterPatch()[masterFacei],
masterPatch().points()
);
if (dist < minDist)
{
minDist = dist;
minMasterFaceI = masterFaceI;
minMasterFacei = masterFacei;
}
}
}
if (minMasterFaceI != -1)
if (minMasterFacei != -1)
{
cutToMasterFaces_[cutFaceI] = minMasterFaceI;
masterToCutFaces[minMasterFaceI] = cutFaceI;
cutToMasterFaces_[cutFacei] = minMasterFacei;
masterToCutFaces[minMasterFacei] = cutFacei;
nChanged++;
}
}
}
// (inefficiently) force candidates to be uptodate.
forAll(cutToMasterFaces_, cutFaceI)
forAll(cutToMasterFaces_, cutFacei)
{
if (cutToMasterFaces_[cutFaceI] != -1)
if (cutToMasterFaces_[cutFacei] != -1)
{
candidates.erase(cutFaceI);
candidates.erase(cutFacei);
}
}
@ -1775,7 +1775,7 @@ void Foam::faceCoupleInfo::subDivisionMatch
<< " matching (topological) cut faces to masterPatch" << endl;
}
// For every unassigned cutFaceI the possible list of master faces.
// For every unassigned cutFacei the possible list of master faces.
Map<labelList> candidates(cutFaces().size());
cutToMasterFaces_.setSize(cutFaces().size());
@ -1832,15 +1832,15 @@ void Foam::faceCoupleInfo::subDivisionMatch
// All cut faces matched?
forAll(cutToMasterFaces_, cutFaceI)
forAll(cutToMasterFaces_, cutFacei)
{
if (cutToMasterFaces_[cutFaceI] == -1)
if (cutToMasterFaces_[cutFacei] == -1)
{
const face& cutF = cutFaces()[cutFaceI];
const face& cutF = cutFaces()[cutFacei];
FatalErrorInFunction
<< "Did not match all of cutFaces to a master face" << nl
<< "First unmatched cut face:" << cutFaceI << " with points:"
<< "First unmatched cut face:" << cutFacei << " with points:"
<< UIndirectList<point>(cutFaces().points(), cutF)()
<< nl
<< "This usually means that the slave patch is not a"

View File

@ -216,7 +216,7 @@ Foam::List<Foam::polyPatch*> Foam::polyMeshAdder::combinePatches
from0ToAllPatches.setSize(patches0.size());
from0ToAllPatches = -1;
label startFaceI = nInternalFaces;
label startFacei = nInternalFaces;
// Copy patches0 with new sizes. First patches always come from
// mesh0 and will always be present.
@ -224,80 +224,80 @@ Foam::List<Foam::polyPatch*> Foam::polyMeshAdder::combinePatches
{
// Originates from mesh0. Clone with new size & filter out empty
// patch.
label filteredPatchI;
label filteredPatchi;
if (nFaces[patchi] == 0 && isA<processorPolyPatch>(patches0[patchi]))
{
//Pout<< "Removing zero sized mesh0 patch "
// << patches0[patchi].name() << endl;
filteredPatchI = -1;
filteredPatchi = -1;
}
else
{
filteredPatchI = allPatches.size();
filteredPatchi = allPatches.size();
allPatches.append
(
patches0[patchi].clone
(
allBoundaryMesh,
filteredPatchI,
filteredPatchi,
nFaces[patchi],
startFaceI
startFacei
).ptr()
);
startFaceI += nFaces[patchi];
startFacei += nFaces[patchi];
}
// Record new index in allPatches
from0ToAllPatches[patchi] = filteredPatchI;
from0ToAllPatches[patchi] = filteredPatchi;
// Check if patch was also in mesh1 and update its addressing if so.
if (fromAllTo1Patches[patchi] != -1)
{
from1ToAllPatches[fromAllTo1Patches[patchi]] = filteredPatchI;
from1ToAllPatches[fromAllTo1Patches[patchi]] = filteredPatchi;
}
}
// Copy unique patches of mesh1.
forAll(from1ToAllPatches, patchi)
{
label allPatchI = from1ToAllPatches[patchi];
label allPatchi = from1ToAllPatches[patchi];
if (allPatchI >= patches0.size())
if (allPatchi >= patches0.size())
{
// Patch has not been merged with any mesh0 patch.
label filteredPatchI;
label filteredPatchi;
if
(
nFaces[allPatchI] == 0
nFaces[allPatchi] == 0
&& isA<processorPolyPatch>(patches1[patchi])
)
{
//Pout<< "Removing zero sized mesh1 patch "
// << patches1[patchi].name() << endl;
filteredPatchI = -1;
filteredPatchi = -1;
}
else
{
filteredPatchI = allPatches.size();
filteredPatchi = allPatches.size();
allPatches.append
(
patches1[patchi].clone
(
allBoundaryMesh,
filteredPatchI,
nFaces[allPatchI],
startFaceI
filteredPatchi,
nFaces[allPatchi],
startFacei
).ptr()
);
startFaceI += nFaces[allPatchI];
startFacei += nFaces[allPatchi];
}
from1ToAllPatches[patchi] = filteredPatchI;
from1ToAllPatches[patchi] = filteredPatchi;
}
}
@ -324,7 +324,7 @@ Foam::labelList Foam::polyMeshAdder::getFaceOrder
}
// First unassigned face
label newFaceI = 0;
label newFacei = 0;
forAll(cells, celli)
{
@ -336,20 +336,20 @@ Foam::labelList Foam::polyMeshAdder::getFaceOrder
{
label facei = cFaces[i];
label nbrCellI = neighbour[facei];
label nbrCelli = neighbour[facei];
if (nbrCellI != -1)
if (nbrCelli != -1)
{
// Internal face. Get cell on other side.
if (nbrCellI == celli)
if (nbrCelli == celli)
{
nbrCellI = owner[facei];
nbrCelli = owner[facei];
}
if (celli < nbrCellI)
if (celli < nbrCelli)
{
// CellI is master
nbr[i] = nbrCellI;
// Celli is master
nbr[i] = nbrCelli;
}
else
{
@ -370,7 +370,7 @@ Foam::labelList Foam::polyMeshAdder::getFaceOrder
{
if (nbr[i] != -1)
{
oldToNew[cFaces[nbr.indices()[i]]] = newFaceI++;
oldToNew[cFaces[nbr.indices()[i]]] = newFacei++;
}
}
}
@ -614,7 +614,7 @@ void Foam::polyMeshAdder::mergePrimitives
allOwner = -1;
allNeighbour.setSize(allFaces.size());
allNeighbour = -1;
label allFaceI = 0;
label allFacei = 0;
from0ToAllFaces.setSize(mesh0.nFaces());
from0ToAllFaces = -1;
@ -624,10 +624,10 @@ void Foam::polyMeshAdder::mergePrimitives
// Copy mesh0 internal faces (always uncoupled)
for (label facei = 0; facei < mesh0.nInternalFaces(); facei++)
{
allFaces[allFaceI] = renumber(from0ToAllPoints, mesh0.faces()[facei]);
allOwner[allFaceI] = mesh0.faceOwner()[facei];
allNeighbour[allFaceI] = mesh0.faceNeighbour()[facei];
from0ToAllFaces[facei] = allFaceI++;
allFaces[allFacei] = renumber(from0ToAllPoints, mesh0.faces()[facei]);
allOwner[allFacei] = mesh0.faceOwner()[facei];
allNeighbour[allFacei] = mesh0.faceNeighbour()[facei];
from0ToAllFaces[facei] = allFacei++;
}
// Copy coupled faces. Every coupled face has an equivalent master and
@ -637,61 +637,61 @@ void Foam::polyMeshAdder::mergePrimitives
forAll(cutFaces, i)
{
label masterFaceI = cutToMasterFaces[i];
label masterFacei = cutToMasterFaces[i];
label mesh0FaceI = masterPatch.addressing()[masterFaceI];
label mesh0Facei = masterPatch.addressing()[masterFacei];
if (from0ToAllFaces[mesh0FaceI] == -1)
if (from0ToAllFaces[mesh0Facei] == -1)
{
// First occurrence of face
from0ToAllFaces[mesh0FaceI] = allFaceI;
from0ToAllFaces[mesh0Facei] = allFacei;
// External face becomes internal so uncount
label patch0 = patches0.whichPatch(mesh0FaceI);
label patch0 = patches0.whichPatch(mesh0Facei);
nFacesPerPatch[patch0]--;
}
label slaveFaceI = cutToSlaveFaces[i];
label slaveFacei = cutToSlaveFaces[i];
label mesh1FaceI = slavePatch.addressing()[slaveFaceI];
label mesh1Facei = slavePatch.addressing()[slaveFacei];
if (from1ToAllFaces[mesh1FaceI] == -1)
if (from1ToAllFaces[mesh1Facei] == -1)
{
from1ToAllFaces[mesh1FaceI] = allFaceI;
from1ToAllFaces[mesh1Facei] = allFacei;
label patch1 = patches1.whichPatch(mesh1FaceI);
label patch1 = patches1.whichPatch(mesh1Facei);
nFacesPerPatch[from1ToAllPatches[patch1]]--;
}
// Copy cut face (since cutPoints are copied first no renumbering
// necessary)
allFaces[allFaceI] = cutFaces[i];
allOwner[allFaceI] = mesh0.faceOwner()[mesh0FaceI];
allNeighbour[allFaceI] = mesh1.faceOwner()[mesh1FaceI] + mesh0.nCells();
allFaces[allFacei] = cutFaces[i];
allOwner[allFacei] = mesh0.faceOwner()[mesh0Facei];
allNeighbour[allFacei] = mesh1.faceOwner()[mesh1Facei] + mesh0.nCells();
allFaceI++;
allFacei++;
}
// Copy mesh1 internal faces (always uncoupled)
for (label facei = 0; facei < mesh1.nInternalFaces(); facei++)
{
allFaces[allFaceI] = renumber(from1ToAllPoints, mesh1.faces()[facei]);
allOwner[allFaceI] = mesh1.faceOwner()[facei] + mesh0.nCells();
allNeighbour[allFaceI] = mesh1.faceNeighbour()[facei] + mesh0.nCells();
from1ToAllFaces[facei] = allFaceI++;
allFaces[allFacei] = renumber(from1ToAllPoints, mesh1.faces()[facei]);
allOwner[allFacei] = mesh1.faceOwner()[facei] + mesh0.nCells();
allNeighbour[allFacei] = mesh1.faceNeighbour()[facei] + mesh0.nCells();
from1ToAllFaces[facei] = allFacei++;
}
nInternalFaces = allFaceI;
nInternalFaces = allFacei;
// Copy (unmarked/uncoupled) external faces in new order.
for (label allPatchI = 0; allPatchI < nAllPatches; allPatchI++)
for (label allPatchi = 0; allPatchi < nAllPatches; allPatchi++)
{
if (allPatchI < patches0.size())
if (allPatchi < patches0.size())
{
// Patch is present in mesh0
const polyPatch& pp = patches0[allPatchI];
const polyPatch& pp = patches0[allPatchi];
nFacesPerPatch[allPatchI] += pp.size();
nFacesPerPatch[allPatchi] += pp.size();
label facei = pp.start();
@ -700,25 +700,25 @@ void Foam::polyMeshAdder::mergePrimitives
if (from0ToAllFaces[facei] == -1)
{
// Is uncoupled face since has not yet been dealt with
allFaces[allFaceI] = renumber
allFaces[allFacei] = renumber
(
from0ToAllPoints,
mesh0.faces()[facei]
);
allOwner[allFaceI] = mesh0.faceOwner()[facei];
allNeighbour[allFaceI] = -1;
allOwner[allFacei] = mesh0.faceOwner()[facei];
allNeighbour[allFacei] = -1;
from0ToAllFaces[facei] = allFaceI++;
from0ToAllFaces[facei] = allFacei++;
}
facei++;
}
}
if (fromAllTo1Patches[allPatchI] != -1)
if (fromAllTo1Patches[allPatchi] != -1)
{
// Patch is present in mesh1
const polyPatch& pp = patches1[fromAllTo1Patches[allPatchI]];
const polyPatch& pp = patches1[fromAllTo1Patches[allPatchi]];
nFacesPerPatch[allPatchI] += pp.size();
nFacesPerPatch[allPatchi] += pp.size();
label facei = pp.start();
@ -727,25 +727,25 @@ void Foam::polyMeshAdder::mergePrimitives
if (from1ToAllFaces[facei] == -1)
{
// Is uncoupled face
allFaces[allFaceI] = renumber
allFaces[allFacei] = renumber
(
from1ToAllPoints,
mesh1.faces()[facei]
);
allOwner[allFaceI] =
allOwner[allFacei] =
mesh1.faceOwner()[facei]
+ mesh0.nCells();
allNeighbour[allFaceI] = -1;
allNeighbour[allFacei] = -1;
from1ToAllFaces[facei] = allFaceI++;
from1ToAllFaces[facei] = allFacei++;
}
facei++;
}
}
}
allFaces.setSize(allFaceI);
allOwner.setSize(allFaceI);
allNeighbour.setSize(allFaceI);
allFaces.setSize(allFacei);
allOwner.setSize(allFacei);
allNeighbour.setSize(allFacei);
// So now we have all ok for one-to-one mapping.
@ -767,9 +767,9 @@ void Foam::polyMeshAdder::mergePrimitives
labelHashSet masterCutFaces(cutToMasterFaces.size());
forAll(cutToMasterFaces, i)
{
label meshFaceI = masterPatch.addressing()[cutToMasterFaces[i]];
label meshFacei = masterPatch.addressing()[cutToMasterFaces[i]];
masterCutFaces.insert(meshFaceI);
masterCutFaces.insert(meshFacei);
}
DynamicList<label> workFace(100);
@ -778,7 +778,7 @@ void Foam::polyMeshAdder::mergePrimitives
{
if (!masterCutFaces.found(face0))
{
label allFaceI = from0ToAllFaces[face0];
label allFacei = from0ToAllFaces[face0];
insertVertices
(
@ -788,7 +788,7 @@ void Foam::polyMeshAdder::mergePrimitives
mesh0.faces()[face0],
workFace,
allFaces[allFaceI]
allFaces[allFacei]
);
}
}
@ -798,16 +798,16 @@ void Foam::polyMeshAdder::mergePrimitives
labelHashSet slaveCutFaces(cutToSlaveFaces.size());
forAll(cutToSlaveFaces, i)
{
label meshFaceI = slavePatch.addressing()[cutToSlaveFaces[i]];
label meshFacei = slavePatch.addressing()[cutToSlaveFaces[i]];
slaveCutFaces.insert(meshFaceI);
slaveCutFaces.insert(meshFacei);
}
forAll(from1ToAllFaces, face1)
{
if (!slaveCutFaces.found(face1))
{
label allFaceI = from1ToAllFaces[face1];
label allFacei = from1ToAllFaces[face1];
insertVertices
(
@ -817,7 +817,7 @@ void Foam::polyMeshAdder::mergePrimitives
mesh1.faces()[face1],
workFace,
allFaces[allFaceI]
allFaces[allFacei]
);
}
}
@ -1050,25 +1050,25 @@ void Foam::polyMeshAdder::mergeFaceZones
label face0 = addressing[i];
bool flip0 = flipMap[i];
label allFaceI = from0ToAllFaces[face0];
if (allFaceI != -1)
label allFacei = from0ToAllFaces[face0];
if (allFacei != -1)
{
// Check if orientation same
label allCell0 = owner0[face0];
if (allOwner[allFaceI] != allCell0)
if (allOwner[allFacei] != allCell0)
{
flip0 = !flip0;
}
if (faceToZone[allFaceI] == -1)
if (faceToZone[allFacei] == -1)
{
faceToZone[allFaceI] = zoneI;
faceToFlip[allFaceI] = flip0;
faceToZone[allFacei] = zoneI;
faceToFlip[allFacei] = flip0;
}
else if (faceToZone[allFaceI] != zoneI)
else if (faceToZone[allFacei] != zoneI)
{
labelList& fZones = addFaceToZones[allFaceI];
boolList& flipZones = addFaceToFlips[allFaceI];
labelList& fZones = addFaceToZones[allFacei];
boolList& flipZones = addFaceToFlips[allFacei];
if (findIndex(fZones, zoneI) == -1)
{
@ -1093,25 +1093,25 @@ void Foam::polyMeshAdder::mergeFaceZones
label face1 = addressing[i];
bool flip1 = flipMap[i];
label allFaceI = from1ToAllFaces[face1];
if (allFaceI != -1)
label allFacei = from1ToAllFaces[face1];
if (allFacei != -1)
{
// Check if orientation same
label allCell1 = from1ToAllCells[owner1[face1]];
if (allOwner[allFaceI] != allCell1)
if (allOwner[allFacei] != allCell1)
{
flip1 = !flip1;
}
if (faceToZone[allFaceI] == -1)
if (faceToZone[allFacei] == -1)
{
faceToZone[allFaceI] = allZoneI;
faceToFlip[allFaceI] = flip1;
faceToZone[allFacei] = allZoneI;
faceToFlip[allFacei] = flip1;
}
else if (faceToZone[allFaceI] != allZoneI)
else if (faceToZone[allFacei] != allZoneI)
{
labelList& fZones = addFaceToZones[allFaceI];
boolList& flipZones = addFaceToFlips[allFaceI];
labelList& fZones = addFaceToZones[allFacei];
boolList& flipZones = addFaceToFlips[allFacei];
if (findIndex(fZones, allZoneI) == -1)
{
@ -1128,17 +1128,17 @@ void Foam::polyMeshAdder::mergeFaceZones
// 1. Count
labelList nFaces(zoneNames.size(), 0);
forAll(faceToZone, allFaceI)
forAll(faceToZone, allFacei)
{
label zoneI = faceToZone[allFaceI];
label zoneI = faceToZone[allFacei];
if (zoneI != -1)
{
nFaces[zoneI]++;
}
}
forAll(addFaceToZones, allFaceI)
forAll(addFaceToZones, allFacei)
{
const labelList& fZones = addFaceToZones[allFaceI];
const labelList& fZones = addFaceToZones[allFacei];
forAll(fZones, i)
{
nFaces[fZones[i]]++;
@ -1153,25 +1153,25 @@ void Foam::polyMeshAdder::mergeFaceZones
fzFaces[zoneI].setCapacity(nFaces[zoneI]);
fzFlips[zoneI].setCapacity(nFaces[zoneI]);
}
forAll(faceToZone, allFaceI)
forAll(faceToZone, allFacei)
{
label zoneI = faceToZone[allFaceI];
bool flip = faceToFlip[allFaceI];
label zoneI = faceToZone[allFacei];
bool flip = faceToFlip[allFacei];
if (zoneI != -1)
{
fzFaces[zoneI].append(allFaceI);
fzFaces[zoneI].append(allFacei);
fzFlips[zoneI].append(flip);
}
}
forAll(addFaceToZones, allFaceI)
forAll(addFaceToZones, allFacei)
{
const labelList& fZones = addFaceToZones[allFaceI];
const boolList& flipZones = addFaceToFlips[allFaceI];
const labelList& fZones = addFaceToZones[allFacei];
const boolList& flipZones = addFaceToFlips[allFacei];
forAll(fZones, i)
{
label zoneI = fZones[i];
fzFaces[zoneI].append(allFaceI);
fzFaces[zoneI].append(allFacei);
fzFlips[zoneI].append(flipZones[i]);
}
}
@ -1251,15 +1251,15 @@ void Foam::polyMeshAdder::mergeCellZones
forAll(cz, i)
{
label cell1 = cz[i];
label allCellI = from1ToAllCells[cell1];
label allCelli = from1ToAllCells[cell1];
if (cellToZone[allCellI] == -1)
if (cellToZone[allCelli] == -1)
{
cellToZone[allCellI] = allZoneI;
cellToZone[allCelli] = allZoneI;
}
else if (cellToZone[allCellI] != allZoneI)
else if (cellToZone[allCelli] != allZoneI)
{
labelList& cZones = addCellToZones[allCellI];
labelList& cZones = addCellToZones[allCelli];
if (findIndex(cZones, allZoneI) == -1)
{
cZones.append(allZoneI);
@ -1272,17 +1272,17 @@ void Foam::polyMeshAdder::mergeCellZones
// 1. Count
labelList nCells(zoneNames.size(), 0);
forAll(cellToZone, allCellI)
forAll(cellToZone, allCelli)
{
label zoneI = cellToZone[allCellI];
label zoneI = cellToZone[allCelli];
if (zoneI != -1)
{
nCells[zoneI]++;
}
}
forAll(addCellToZones, allCellI)
forAll(addCellToZones, allCelli)
{
const labelList& cZones = addCellToZones[allCellI];
const labelList& cZones = addCellToZones[allCelli];
forAll(cZones, i)
{
nCells[cZones[i]]++;
@ -1295,20 +1295,20 @@ void Foam::polyMeshAdder::mergeCellZones
{
czCells[zoneI].setCapacity(nCells[zoneI]);
}
forAll(cellToZone, allCellI)
forAll(cellToZone, allCelli)
{
label zoneI = cellToZone[allCellI];
label zoneI = cellToZone[allCelli];
if (zoneI != -1)
{
czCells[zoneI].append(allCellI);
czCells[zoneI].append(allCelli);
}
}
forAll(addCellToZones, allCellI)
forAll(addCellToZones, allCelli)
{
const labelList& cZones = addCellToZones[allCellI];
const labelList& cZones = addCellToZones[allCelli];
forAll(cZones, i)
{
czCells[cZones[i]].append(allCellI);
czCells[cZones[i]].append(allCelli);
}
}
forAll(czCells, i)
@ -1819,11 +1819,11 @@ Foam::autoPtr<Foam::mapAddedPolyMesh> Foam::polyMeshAdder::add
labelList patchSizes(allPatches.size());
labelList patchStarts(allPatches.size());
label startFaceI = nInternalFaces;
label startFacei = nInternalFaces;
// Copy patches0 with new sizes. First patches always come from
// mesh0 and will always be present.
label allPatchI = 0;
label allPatchi = 0;
forAll(from0ToAllPatches, patch0)
{
@ -1848,50 +1848,50 @@ Foam::autoPtr<Foam::mapAddedPolyMesh> Foam::polyMeshAdder::add
// SubList construction in polyPatch.
allPatches.set
(
allPatchI,
allPatchi,
allPatches[patch0].clone
(
allPatches,
allPatchI,
allPatchi,
0, // dummy size
0 // dummy start
)
);
patchSizes[allPatchI] = nFaces[patch0];
patchStarts[allPatchI] = startFaceI;
patchSizes[allPatchi] = nFaces[patch0];
patchStarts[allPatchi] = startFacei;
// Record new index in allPatches
from0ToAllPatches[patch0] = allPatchI;
from0ToAllPatches[patch0] = allPatchi;
// Check if patch was also in mesh1 and update its addressing if so.
if (fromAllTo1Patches[patch0] != -1)
{
from1ToAllPatches[fromAllTo1Patches[patch0]] = allPatchI;
from1ToAllPatches[fromAllTo1Patches[patch0]] = allPatchi;
}
startFaceI += nFaces[patch0];
startFacei += nFaces[patch0];
allPatchI++;
allPatchi++;
}
}
// Copy unique patches of mesh1.
forAll(from1ToAllPatches, patch1)
{
label uncompactAllPatchI = from1ToAllPatches[patch1];
label uncompactAllPatchi = from1ToAllPatches[patch1];
if (uncompactAllPatchI >= from0ToAllPatches.size())
if (uncompactAllPatchi >= from0ToAllPatches.size())
{
// Patch has not been merged with any mesh0 patch.
if
(
nFaces[uncompactAllPatchI] == 0
nFaces[uncompactAllPatchi] == 0
&& isA<processorPolyPatch>(patches1[patch1])
)
{
//Pout<< "Removing zero sized mesh1 patch "
// << allPatchNames[uncompactAllPatchI] << endl;
// << allPatchNames[uncompactAllPatchi] << endl;
from1ToAllPatches[patch1] = -1;
}
else
@ -1899,31 +1899,31 @@ Foam::autoPtr<Foam::mapAddedPolyMesh> Foam::polyMeshAdder::add
// Clone.
allPatches.set
(
allPatchI,
allPatchi,
patches1[patch1].clone
(
allPatches,
allPatchI,
allPatchi,
0, // dummy size
0 // dummy start
)
);
patchSizes[allPatchI] = nFaces[uncompactAllPatchI];
patchStarts[allPatchI] = startFaceI;
patchSizes[allPatchi] = nFaces[uncompactAllPatchi];
patchStarts[allPatchi] = startFacei;
// Record new index in allPatches
from1ToAllPatches[patch1] = allPatchI;
from1ToAllPatches[patch1] = allPatchi;
startFaceI += nFaces[uncompactAllPatchI];
startFacei += nFaces[uncompactAllPatchi];
allPatchI++;
allPatchi++;
}
}
}
allPatches.setSize(allPatchI);
patchSizes.setSize(allPatchI);
patchStarts.setSize(allPatchI);
allPatches.setSize(allPatchi);
patchSizes.setSize(allPatchi);
patchStarts.setSize(allPatchi);
// Construct map information before changing mesh0 primitives

View File

@ -672,9 +672,9 @@ void Foam::polyMeshFilter::checkMeshFacesAndRelaxEdges
{
const labelList& eFaces = mesh_.edgeFaces()[fEdges[fEdgeI]];
forAll(eFaces, eFaceI)
forAll(eFaces, eFacei)
{
const label eFace = eFaces[eFaceI];
const label eFace = eFaces[eFacei];
const face& f = faces[eFace];
@ -838,11 +838,11 @@ void Foam::polyMeshFilter::mapOldMeshFaceFieldToNewMesh
{
scalarField tmp(newMesh.nFaces());
forAll(faceMap, newFaceI)
forAll(faceMap, newFacei)
{
const label oldFaceI = faceMap[newFaceI];
const label oldFacei = faceMap[newFacei];
tmp[newFaceI] = newMeshFaceFilterFactor[oldFaceI];
tmp[newFacei] = newMeshFaceFilterFactor[oldFacei];
}
newMeshFaceFilterFactor.transfer(tmp);

View File

@ -93,8 +93,8 @@ bool Foam::addPatchCellLayer::sameEdgeNeighbour
const indirectPrimitivePatch& pp,
const labelListList& globalEdgeFaces,
const boolList& doneEdge,
const label thisGlobalFaceI,
const label nbrGlobalFaceI,
const label thisGlobalFacei,
const label nbrGlobalFacei,
const label edgeI
) const
{
@ -107,8 +107,8 @@ bool Foam::addPatchCellLayer::sameEdgeNeighbour
|| addedPoints_[e[1]].size()
)
&& (
nbrFace(globalEdgeFaces, edgeI, thisGlobalFaceI)
== nbrGlobalFaceI // is to same neighbour
nbrFace(globalEdgeFaces, edgeI, thisGlobalFacei)
== nbrGlobalFacei // is to same neighbour
);
}
@ -121,11 +121,11 @@ Foam::labelPair Foam::addPatchCellLayer::getEdgeString
const indirectPrimitivePatch& pp,
const labelListList& globalEdgeFaces,
const boolList& doneEdge,
const label patchFaceI,
const label globalFaceI
const label patchFacei,
const label globalFacei
) const
{
const labelList& fEdges = pp.faceEdges()[patchFaceI];
const labelList& fEdges = pp.faceEdges()[patchFacei];
label startFp = -1;
label endFp = -1;
@ -151,14 +151,14 @@ Foam::labelPair Foam::addPatchCellLayer::getEdgeString
{
// We found an edge that needs extruding but hasn't been done yet.
// Now find the face on the other side
label nbrGlobalFaceI = nbrFace
label nbrGlobalFacei = nbrFace
(
globalEdgeFaces,
fEdges[startFp],
globalFaceI
globalFacei
);
if (nbrGlobalFaceI == -1)
if (nbrGlobalFacei == -1)
{
// Proper boundary edge. Only extrude single edge.
endFp = startFp;
@ -180,8 +180,8 @@ Foam::labelPair Foam::addPatchCellLayer::getEdgeString
pp,
globalEdgeFaces,
doneEdge,
globalFaceI,
nbrGlobalFaceI,
globalFacei,
nbrGlobalFacei,
fEdges[prevFp]
)
)
@ -204,8 +204,8 @@ Foam::labelPair Foam::addPatchCellLayer::getEdgeString
pp,
globalEdgeFaces,
doneEdge,
globalFaceI,
nbrGlobalFaceI,
globalFacei,
nbrGlobalFacei,
fEdges[nextFp]
)
)
@ -229,8 +229,8 @@ Foam::label Foam::addPatchCellLayer::addSideFace
const face& newFace,
const label newPatchID,
const label ownFaceI, // pp face that provides owner
const label nbrFaceI,
const label ownFacei, // pp face that provides owner
const label nbrFacei,
const label meshEdgeI, // corresponding mesh edge
const label layerI, // layer
const label numEdgeFaces, // number of layers for edge
@ -240,7 +240,7 @@ Foam::label Foam::addPatchCellLayer::addSideFace
{
// Face or edge to 'inflate' from
label inflateEdgeI = -1;
label inflateFaceI = -1;
label inflateFacei = -1;
// Check mesh faces using edge
if (addToMesh_)
@ -258,13 +258,13 @@ Foam::label Foam::addPatchCellLayer::addSideFace
// Zone info comes from any side patch face. Otherwise -1 since we
// don't know what to put it in - inherit from the extruded faces?
label zoneI = -1; //mesh_.faceZones().whichZone(meshFaceI);
label zoneI = -1; //mesh_.faceZones().whichZone(meshFacei);
bool flip = false;
label addedFaceI = -1;
label addedFacei = -1;
// Is patch edge external edge of indirectPrimitivePatch?
if (nbrFaceI == -1)
if (nbrFacei == -1)
{
// External edge so external face.
@ -274,7 +274,7 @@ Foam::label Foam::addPatchCellLayer::addSideFace
// see if we can find a face that is otherPatchID
// Get my mesh face and its zone.
label meshFaceI = pp.addressing()[ownFaceI];
label meshFacei = pp.addressing()[ownFacei];
forAll(meshFaces, k)
{
@ -282,13 +282,13 @@ Foam::label Foam::addPatchCellLayer::addSideFace
if
(
(facei != meshFaceI)
(facei != meshFacei)
&& (patches.whichPatch(facei) == newPatchID)
)
{
// Found the patch face. Use it to inflate from
inflateEdgeI = -1;
inflateFaceI = facei;
inflateFacei = facei;
zoneI = mesh_.faceZones().whichZone(facei);
if (zoneI != -1)
@ -306,9 +306,9 @@ Foam::label Foam::addPatchCellLayer::addSideFace
label layerOwn;
if (addedCells[ownFaceI].size() < numEdgeFaces)
if (addedCells[ownFacei].size() < numEdgeFaces)
{
label offset = numEdgeFaces - addedCells[ownFaceI].size();
label offset = numEdgeFaces - addedCells[ownFacei].size();
if (layerI <= offset)
{
layerOwn = 0;
@ -325,20 +325,20 @@ Foam::label Foam::addPatchCellLayer::addSideFace
//Pout<< "Added boundary face:" << newFace
// << " own:" << addedCells[ownFaceI][layerOwn]
// << " own:" << addedCells[ownFacei][layerOwn]
// << " patch:" << newPatchID
// << endl;
addedFaceI = meshMod.setAction
addedFacei = meshMod.setAction
(
polyAddFace
(
newFace, // face
addedCells[ownFaceI][layerOwn], // owner
addedCells[ownFacei][layerOwn], // owner
-1, // neighbour
-1, // master point
inflateEdgeI, // master edge
inflateFaceI, // master face
inflateFacei, // master face
false, // flux flip
newPatchID, // patch for face
zoneI, // zone for face
@ -356,10 +356,10 @@ Foam::label Foam::addPatchCellLayer::addSideFace
label layerNbr;
label layerOwn;
if (addedCells[ownFaceI].size() > addedCells[nbrFaceI].size())
if (addedCells[ownFacei].size() > addedCells[nbrFacei].size())
{
label offset =
addedCells[ownFaceI].size() - addedCells[nbrFaceI].size();
addedCells[ownFacei].size() - addedCells[nbrFacei].size();
layerOwn = layerI;
@ -372,10 +372,10 @@ Foam::label Foam::addPatchCellLayer::addSideFace
layerNbr = layerI - offset;
}
}
else if (addedCells[nbrFaceI].size() > addedCells[ownFaceI].size())
else if (addedCells[nbrFacei].size() > addedCells[ownFacei].size())
{
label offset =
addedCells[nbrFaceI].size() - addedCells[ownFaceI].size();
addedCells[nbrFacei].size() - addedCells[ownFacei].size();
layerNbr = layerI;
@ -395,13 +395,13 @@ Foam::label Foam::addPatchCellLayer::addSideFace
layerOwn = layerI;
}
addedFaceI = meshMod.setAction
addedFacei = meshMod.setAction
(
polyAddFace
(
newFace, // face
addedCells[ownFaceI][layerOwn], // owner
addedCells[nbrFaceI][layerNbr], // neighbour
addedCells[ownFacei][layerOwn], // owner
addedCells[nbrFacei][layerNbr], // neighbour
-1, // master point
inflateEdgeI, // master edge
-1, // master face
@ -413,12 +413,12 @@ Foam::label Foam::addPatchCellLayer::addSideFace
);
//Pout<< "Added internal face:" << newFace
// << " own:" << addedCells[ownFaceI][layerOwn]
// << " nei:" << addedCells[nbrFaceI][layerNbr]
// << " own:" << addedCells[ownFacei][layerOwn]
// << " nei:" << addedCells[nbrFacei][layerNbr]
// << endl;
}
return addedFaceI;
return addedFacei;
}
@ -493,13 +493,13 @@ Foam::labelListList Foam::addPatchCellLayer::addedCells
{
labelListList layerCells(layerFaces.size());
forAll(layerFaces, patchFaceI)
forAll(layerFaces, patchFacei)
{
const labelList& faceLabels = layerFaces[patchFaceI];
const labelList& faceLabels = layerFaces[patchFacei];
if (faceLabels.size())
{
labelList& added = layerCells[patchFaceI];
labelList& added = layerCells[patchFacei];
added.setSize(faceLabels.size()-1);
for (label i = 0; i < faceLabels.size()-1; i++)
@ -590,7 +590,7 @@ void Foam::addPatchCellLayer::calcSidePatch
// - what zone&orientation face should have
labelList inflateEdgeI(pp.nEdges(), -1);
labelList inflateFaceI(pp.nEdges(), -1);
labelList inflateFacei(pp.nEdges(), -1);
labelList sideZoneID(pp.nEdges(), -1);
boolList sideFlip(pp.nEdges(), false);
@ -612,33 +612,33 @@ void Foam::addPatchCellLayer::calcSidePatch
label f0 = eGlobalFaces[0];
label f1 = eGlobalFaces[1];
label otherProcI = -1;
label otherProci = -1;
if (globalFaces.isLocal(f0) && !globalFaces.isLocal(f1))
{
otherProcI = globalFaces.whichProcID(f1);
otherProci = globalFaces.whichProcID(f1);
}
else if (!globalFaces.isLocal(f0) && globalFaces.isLocal(f1))
{
otherProcI = globalFaces.whichProcID(f0);
otherProci = globalFaces.whichProcID(f0);
}
if (otherProcI != -1)
if (otherProci != -1)
{
sidePatchID[edgeI] = findProcPatch(mesh, otherProcI);
sidePatchID[edgeI] = findProcPatch(mesh, otherProci);
if (sidePatchID[edgeI] == -1)
{
// Cannot find a patch to processor. See if already
// marked for addition
if (nbrProcToPatch.found(otherProcI))
if (nbrProcToPatch.found(otherProci))
{
sidePatchID[edgeI] = nbrProcToPatch[otherProcI];
sidePatchID[edgeI] = nbrProcToPatch[otherProci];
}
else
{
sidePatchID[edgeI] = nPatches;
nbrProcToPatch.insert(otherProcI, nPatches);
patchToNbrProc.insert(nPatches, otherProcI);
nbrProcToPatch.insert(otherProci, nPatches);
patchToNbrProc.insert(nPatches, otherProci);
nPatches++;
}
}
@ -661,7 +661,7 @@ void Foam::addPatchCellLayer::calcSidePatch
{
// Proper, uncoupled patch edge.
label myFaceI = pp.addressing()[edgeFaces[edgeI][0]];
label myFacei = pp.addressing()[edgeFaces[edgeI][0]];
// Pick up any boundary face on this edge and use its properties
label meshEdgeI = meshEdges[edgeI];
@ -675,7 +675,7 @@ void Foam::addPatchCellLayer::calcSidePatch
{
label facei = meshFaces[k];
if (facei != myFaceI && !mesh.isInternalFace(facei))
if (facei != myFacei && !mesh.isInternalFace(facei))
{
setFaceProps
(
@ -686,7 +686,7 @@ void Foam::addPatchCellLayer::calcSidePatch
sideZoneID[edgeI],
sideFlip[edgeI]
);
inflateFaceI[edgeI] = facei;
inflateFacei[edgeI] = facei;
inflateEdgeI[edgeI] = -1;
break;
@ -724,12 +724,12 @@ void Foam::addPatchCellLayer::calcSidePatch
(
edgeFaces[edgeI].size() == 1
&& sidePatchID[edgeI] != -1
&& inflateFaceI[edgeI] == -1
&& inflateFacei[edgeI] == -1
)
{
// 1. Do we have a boundary face to inflate from
label myFaceI = pp.addressing()[edgeFaces[edgeI][0]];
label myFacei = pp.addressing()[edgeFaces[edgeI][0]];
// Pick up any boundary face on this edge and use its properties
label meshEdgeI = meshEdges[edgeI];
@ -743,7 +743,7 @@ void Foam::addPatchCellLayer::calcSidePatch
{
label facei = meshFaces[k];
if (facei != myFaceI)
if (facei != myFacei)
{
if (mesh.isInternalFace(facei))
{
@ -762,7 +762,7 @@ void Foam::addPatchCellLayer::calcSidePatch
sideZoneID[edgeI],
sideFlip[edgeI]
);
inflateFaceI[edgeI] = facei;
inflateFacei[edgeI] = facei;
inflateEdgeI[edgeI] = -1;
break;
@ -989,7 +989,7 @@ void Foam::addPatchCellLayer::setRefinement
<< abort(FatalError);
}
label myFaceI = pp.addressing()[eFaces[0]];
label myFacei = pp.addressing()[eFaces[0]];
label meshEdgeI = meshEdges[edgeI];
@ -999,19 +999,19 @@ void Foam::addPatchCellLayer::setRefinement
// Check that there is only one patchface using edge.
const polyBoundaryMesh& patches = mesh_.boundaryMesh();
label bFaceI = -1;
label bFacei = -1;
forAll(meshFaces, i)
{
label facei = meshFaces[i];
if (facei != myFaceI)
if (facei != myFacei)
{
if (!mesh_.isInternalFace(facei))
{
if (bFaceI == -1)
if (bFacei == -1)
{
bFaceI = facei;
bFacei = facei;
}
else
{
@ -1021,9 +1021,9 @@ void Foam::addPatchCellLayer::setRefinement
<< pp.points()[meshPoints[e[1]]]
<< " has more than two boundary faces"
<< " using it:"
<< bFaceI << " fc:"
<< mesh_.faceCentres()[bFaceI]
<< " patch:" << patches.whichPatch(bFaceI)
<< bFacei << " fc:"
<< mesh_.faceCentres()[bFacei]
<< " patch:" << patches.whichPatch(bFacei)
<< " and " << facei << " fc:"
<< mesh_.faceCentres()[facei]
<< " patch:" << patches.whichPatch(facei)
@ -1042,11 +1042,11 @@ void Foam::addPatchCellLayer::setRefinement
// Precalculated patchID for each patch face
labelList patchID(pp.size());
forAll(pp, patchFaceI)
forAll(pp, patchFacei)
{
label meshFaceI = pp.addressing()[patchFaceI];
label meshFacei = pp.addressing()[patchFacei];
patchID[patchFaceI] = patches.whichPatch(meshFaceI);
patchID[patchFacei] = patches.whichPatch(meshFacei);
}
@ -1148,31 +1148,31 @@ void Foam::addPatchCellLayer::setRefinement
labelListList addedCells(pp.size());
forAll(pp, patchFaceI)
forAll(pp, patchFacei)
{
if (nFaceLayers[patchFaceI] > 0)
if (nFaceLayers[patchFacei] > 0)
{
addedCells[patchFaceI].setSize(nFaceLayers[patchFaceI]);
addedCells[patchFacei].setSize(nFaceLayers[patchFacei]);
label meshFaceI = pp.addressing()[patchFaceI];
label meshFacei = pp.addressing()[patchFacei];
label ownZoneI = mesh_.cellZones().whichZone
(
mesh_.faceOwner()[meshFaceI]
mesh_.faceOwner()[meshFacei]
);
for (label i = 0; i < nFaceLayers[patchFaceI]; i++)
for (label i = 0; i < nFaceLayers[patchFacei]; i++)
{
// Note: add from cell (owner of patch face) or from face?
// for now add from cell so we can map easily.
addedCells[patchFaceI][i] = meshMod.setAction
addedCells[patchFacei][i] = meshMod.setAction
(
polyAddCell
(
-1, // master point
-1, // master edge
-1, // master face
(addToMesh_ ? mesh_.faceOwner()[meshFaceI] : -1),
(addToMesh_ ? mesh_.faceOwner()[meshFacei] : -1),
//master
ownZoneI // zone for cell
)
@ -1190,20 +1190,20 @@ void Foam::addPatchCellLayer::setRefinement
layerFaces_.setSize(pp.size());
forAll(pp.localFaces(), patchFaceI)
forAll(pp.localFaces(), patchFacei)
{
label meshFaceI = pp.addressing()[patchFaceI];
label meshFacei = pp.addressing()[patchFacei];
if (addedCells[patchFaceI].size())
if (addedCells[patchFacei].size())
{
layerFaces_[patchFaceI].setSize(addedCells[patchFaceI].size() + 1);
layerFaces_[patchFacei].setSize(addedCells[patchFacei].size() + 1);
// Get duplicated vertices on the patch face.
const face& f = pp.localFaces()[patchFaceI];
const face& f = pp.localFaces()[patchFacei];
face newFace(f.size());
forAll(addedCells[patchFaceI], i)
forAll(addedCells[patchFacei], i)
{
forAll(f, fp)
{
@ -1222,7 +1222,7 @@ void Foam::addPatchCellLayer::setRefinement
// Get new outside point
label offset =
addedPoints_[f[fp]].size()
- addedCells[patchFaceI].size();
- addedCells[patchFacei].size();
newFace[fp] = addedPoints_[f[fp]][i+offset];
}
}
@ -1235,36 +1235,36 @@ void Foam::addPatchCellLayer::setRefinement
bool flip = false;
if (i == addedCells[patchFaceI].size()-1)
if (i == addedCells[patchFacei].size()-1)
{
// Top layer so is patch face.
nei = -1;
patchi = patchID[patchFaceI];
zoneI = mesh_.faceZones().whichZone(meshFaceI);
patchi = patchID[patchFacei];
zoneI = mesh_.faceZones().whichZone(meshFacei);
if (zoneI != -1)
{
const faceZone& fz = mesh_.faceZones()[zoneI];
flip = fz.flipMap()[fz.whichFace(meshFaceI)];
flip = fz.flipMap()[fz.whichFace(meshFacei)];
}
}
else
{
// Internal face between layer i and i+1
nei = addedCells[patchFaceI][i+1];
nei = addedCells[patchFacei][i+1];
patchi = -1;
}
layerFaces_[patchFaceI][i+1] = meshMod.setAction
layerFaces_[patchFacei][i+1] = meshMod.setAction
(
polyAddFace
(
newFace, // face
addedCells[patchFaceI][i], // owner
addedCells[patchFacei][i], // owner
nei, // neighbour
-1, // master point
-1, // master edge
(addToMesh_ ? meshFaceI : -1), // master face
(addToMesh_ ? meshFacei : -1), // master face
false, // flux flip
patchi, // patch for face
zoneI, // zone for face
@ -1281,22 +1281,22 @@ void Foam::addPatchCellLayer::setRefinement
if (addToMesh_)
{
forAll(pp, patchFaceI)
forAll(pp, patchFacei)
{
if (addedCells[patchFaceI].size())
if (addedCells[patchFacei].size())
{
label meshFaceI = pp.addressing()[patchFaceI];
label meshFacei = pp.addressing()[patchFacei];
layerFaces_[patchFaceI][0] = meshFaceI;
layerFaces_[patchFacei][0] = meshFacei;
meshMod.setAction
(
polyModifyFace
(
pp[patchFaceI], // modified face
meshFaceI, // label of face
mesh_.faceOwner()[meshFaceI], // owner
addedCells[patchFaceI][0], // neighbour
pp[patchFacei], // modified face
meshFacei, // label of face
mesh_.faceOwner()[meshFacei], // owner
addedCells[patchFacei][0], // neighbour
false, // face flip
-1, // patch for face
true, //false, // remove from zone
@ -1311,38 +1311,38 @@ void Foam::addPatchCellLayer::setRefinement
{
// If creating new mesh: reverse original faces and put them
// in the exposed patch ID.
forAll(pp, patchFaceI)
forAll(pp, patchFacei)
{
if (nFaceLayers[patchFaceI] > 0)
if (nFaceLayers[patchFacei] > 0)
{
label meshFaceI = pp.addressing()[patchFaceI];
label zoneI = mesh_.faceZones().whichZone(meshFaceI);
label meshFacei = pp.addressing()[patchFacei];
label zoneI = mesh_.faceZones().whichZone(meshFacei);
bool zoneFlip = false;
if (zoneI != -1)
{
const faceZone& fz = mesh_.faceZones()[zoneI];
zoneFlip = !fz.flipMap()[fz.whichFace(meshFaceI)];
zoneFlip = !fz.flipMap()[fz.whichFace(meshFacei)];
}
// Reverse and renumber old patch face.
face f(pp.localFaces()[patchFaceI].reverseFace());
face f(pp.localFaces()[patchFacei].reverseFace());
forAll(f, fp)
{
f[fp] = copiedPatchPoints[f[fp]];
}
layerFaces_[patchFaceI][0] = meshMod.setAction
layerFaces_[patchFacei][0] = meshMod.setAction
(
polyAddFace
(
f, // modified face
addedCells[patchFaceI][0], // owner
addedCells[patchFacei][0], // owner
-1, // neighbour
-1, // masterPoint
-1, // masterEdge
-1, // masterFace
true, // face flip
exposedPatchID[patchFaceI], // patch for face
exposedPatchID[patchFacei], // patch for face
zoneI, // zone for face
zoneFlip // face flip in zone
)
@ -1416,9 +1416,9 @@ void Foam::addPatchCellLayer::setRefinement
// Create faces. Per face walk connected edges and find string of edges
// between the same two faces and extrude string into a single face.
forAll(pp, patchFaceI)
forAll(pp, patchFacei)
{
const labelList& fEdges = faceEdges[patchFaceI];
const labelList& fEdges = faceEdges[patchFacei];
forAll(fEdges, fp)
{
@ -1431,8 +1431,8 @@ void Foam::addPatchCellLayer::setRefinement
pp,
globalEdgeFaces,
doneEdge,
patchFaceI,
globalFaces.toGlobal(pp.addressing()[patchFaceI])
patchFacei,
globalFaces.toGlobal(pp.addressing()[patchFacei])
)
);
@ -1449,7 +1449,7 @@ void Foam::addPatchCellLayer::setRefinement
// Extrude edges from indexPair[0] up to indexPair[1]
// (note indexPair = indices of edges. There is one more vertex
// than edges)
const face& f = localFaces[patchFaceI];
const face& f = localFaces[patchFacei];
labelList stringedVerts;
if (endFp >= startFp)
@ -1474,10 +1474,10 @@ void Foam::addPatchCellLayer::setRefinement
// Now stringedVerts contains the vertices in order of face f.
// This is consistent with the order if f becomes the owner cell
// and nbrFaceI the neighbour cell. Note that the cells get
// and nbrFacei the neighbour cell. Note that the cells get
// added in order of pp so we can just use face ordering and
// because we loop in incrementing order as well we will
// always have nbrFaceI > patchFaceI.
// always have nbrFacei > patchFacei.
label startEdgeI = fEdges[startFp];
@ -1634,7 +1634,7 @@ void Foam::addPatchCellLayer::setRefinement
if (newFp >= 3)
{
// Add face inbetween faces patchFaceI and nbrFaceI
// Add face inbetween faces patchFacei and nbrFacei
// (possibly -1 for external edges)
newFace.setSize(newFp);
@ -1682,11 +1682,11 @@ void Foam::addPatchCellLayer::setRefinement
}
}
label nbrFaceI = nbrFace
label nbrFacei = nbrFace
(
pp.edgeFaces(),
startEdgeI,
patchFaceI
patchFacei
);
const labelList& meshFaces = mesh_.edgeFaces
@ -1703,8 +1703,8 @@ void Foam::addPatchCellLayer::setRefinement
newFace, // vertices of new face
sidePatchID[startEdgeI],// -1 or patch for face
patchFaceI,
nbrFaceI,
patchFacei,
nbrFacei,
meshEdgeI, // (mesh) edge to inflate
i, // layer
numEdgeSideFaces, // num layers
@ -1756,23 +1756,23 @@ void Foam::addPatchCellLayer::updateMesh
{
labelListList newLayerFaces(faceMap.size());
forAll(newLayerFaces, newFaceI)
forAll(newLayerFaces, newFacei)
{
label oldFaceI = faceMap[newFaceI];
label oldFacei = faceMap[newFacei];
const labelList& added = layerFaces_[oldFaceI];
const labelList& added = layerFaces_[oldFacei];
labelList& newAdded = newLayerFaces[newFaceI];
labelList& newAdded = newLayerFaces[newFacei];
newAdded.setSize(added.size());
label newI = 0;
forAll(added, i)
{
label newFaceI = morphMap.reverseFaceMap()[added[i]];
label newFacei = morphMap.reverseFaceMap()[added[i]];
if (newFaceI >= 0)
if (newFacei >= 0)
{
newAdded[newI++] = newFaceI;
newAdded[newI++] = newFacei;
}
}
newAdded.setSize(newI);

View File

@ -197,8 +197,8 @@ class addPatchCellLayer
const indirectPrimitivePatch& pp,
const labelListList& globalEdgeFaces,
const boolList& doneEdge,
const label thisGlobalFaceI,
const label nbrGlobalFaceI,
const label thisGlobalFacei,
const label nbrGlobalFacei,
const label edgeI
) const;
@ -207,8 +207,8 @@ class addPatchCellLayer
const indirectPrimitivePatch& pp,
const labelListList& globalEdgeFaces,
const boolList& doneEdge,
const label patchFaceI,
const label globalFaceI
const label patchFacei,
const label globalFacei
) const;
@ -221,8 +221,8 @@ class addPatchCellLayer
const face& newFace,
const label newPatchID,
const label ownFaceI,
const label nbrFaceI,
const label ownFacei,
const label nbrFacei,
const label meshEdgeI,
const label layerI,
const label numEdgeFaces,

View File

@ -229,9 +229,9 @@ bool Foam::combineFaces::faceNeighboursValid
DynamicList<label> storage;
// Test for face collapsing to edge since too many neighbours merged.
forAll(cFaces, cFaceI)
forAll(cFaces, cFacei)
{
label facei = cFaces[cFaceI];
label facei = cFaces[cFacei];
if (!faceRegion.found(facei))
{
@ -623,12 +623,12 @@ void Foam::combineFaces::setRefinement
// Modify master face
// ~~~~~~~~~~~~~~~~~~
label masterFaceI = setFaces[0];
label masterFacei = setFaces[0];
// Get outside face in mesh vertex labels
face outsideFace(getOutsideFace(bigFace));
label zoneID = mesh_.faceZones().whichZone(masterFaceI);
label zoneID = mesh_.faceZones().whichZone(masterFacei);
bool zoneFlip = false;
@ -636,18 +636,18 @@ void Foam::combineFaces::setRefinement
{
const faceZone& fZone = mesh_.faceZones()[zoneID];
zoneFlip = fZone.flipMap()[fZone.whichFace(masterFaceI)];
zoneFlip = fZone.flipMap()[fZone.whichFace(masterFacei)];
}
label patchi = mesh_.boundaryMesh().whichPatch(masterFaceI);
label patchi = mesh_.boundaryMesh().whichPatch(masterFacei);
meshMod.setAction
(
polyModifyFace
(
outsideFace, // modified face
masterFaceI, // label of face being modified
mesh_.faceOwner()[masterFaceI], // owner
masterFacei, // label of face being modified
mesh_.faceOwner()[masterFacei], // owner
-1, // neighbour
false, // face flip
patchi, // patch for face
@ -845,14 +845,14 @@ void Foam::combineFaces::setUnrefinement
forAll(masterFaces, i)
{
label masterFaceI = masterFaces[i];
label masterFacei = masterFaces[i];
Map<label>::const_iterator iter = masterToSet.find(masterFaceI);
Map<label>::const_iterator iter = masterToSet.find(masterFacei);
if (iter == masterToSet.end())
{
FatalErrorInFunction
<< "Master face " << masterFaceI
<< "Master face " << masterFacei
<< " is not the master of one of the merge sets"
<< " or has already been merged"
<< abort(FatalError);
@ -869,7 +869,7 @@ void Foam::combineFaces::setUnrefinement
if (faces.empty())
{
FatalErrorInFunction
<< "Set " << setI << " with master face " << masterFaceI
<< "Set " << setI << " with master face " << masterFacei
<< " has already been merged." << abort(FatalError);
}
@ -914,25 +914,25 @@ void Foam::combineFaces::setUnrefinement
// Restore
// ~~~~~~~
label own = mesh_.faceOwner()[masterFaceI];
label zoneID = mesh_.faceZones().whichZone(masterFaceI);
label own = mesh_.faceOwner()[masterFacei];
label zoneID = mesh_.faceZones().whichZone(masterFacei);
bool zoneFlip = false;
if (zoneID >= 0)
{
const faceZone& fZone = mesh_.faceZones()[zoneID];
zoneFlip = fZone.flipMap()[fZone.whichFace(masterFaceI)];
zoneFlip = fZone.flipMap()[fZone.whichFace(masterFacei)];
}
label patchi = mesh_.boundaryMesh().whichPatch(masterFaceI);
label patchi = mesh_.boundaryMesh().whichPatch(masterFacei);
if (mesh_.boundaryMesh()[patchi].coupled())
{
FatalErrorInFunction
<< "Master face " << masterFaceI << " is on coupled patch "
<< "Master face " << masterFacei << " is on coupled patch "
<< mesh_.boundaryMesh()[patchi].name()
<< abort(FatalError);
}
//Pout<< "Restoring new master face " << masterFaceI
//Pout<< "Restoring new master face " << masterFacei
// << " to vertices " << faces[0] << endl;
// Modify the master face.
@ -941,7 +941,7 @@ void Foam::combineFaces::setUnrefinement
polyModifyFace
(
faces[0], // original face
masterFaceI, // label of face
masterFacei, // label of face
own, // owner
-1, // neighbour
false, // face flip
@ -951,7 +951,7 @@ void Foam::combineFaces::setUnrefinement
zoneFlip // face flip in zone
)
);
restoredFaces.insert(masterFaceI, masterFaceI);
restoredFaces.insert(masterFacei, masterFacei);
// Add the previously removed faces
for (label i = 1; i < faces.size(); i++)
@ -968,14 +968,14 @@ void Foam::combineFaces::setUnrefinement
-1, // neighbour,
-1, // masterPointID,
-1, // masterEdgeID,
masterFaceI, // masterFaceID,
masterFacei, // masterFaceID,
false, // flipFaceFlux,
patchi, // patchID,
zoneID, // zoneID,
zoneFlip // zoneFlip
)
);
restoredFaces.insert(facei, masterFaceI);
restoredFaces.insert(facei, masterFacei);
}
// Clear out restored set

View File

@ -484,15 +484,15 @@ Foam::scalarField Foam::edgeCollapser::calcTargetFaceSizes() const
const label nBoundaryFaces = mesh_.nFaces() - mesh_.nInternalFaces();
// Calculate face size from cell volumes for internal faces
for (label intFaceI = 0; intFaceI < mesh_.nInternalFaces(); ++intFaceI)
for (label intFacei = 0; intFacei < mesh_.nInternalFaces(); ++intFacei)
{
const scalar cellOwnerVol = max(0.0, V[cellOwner[intFaceI]]);
const scalar cellNeighbourVol = max(0.0, V[cellNeighbour[intFaceI]]);
const scalar cellOwnerVol = max(0.0, V[cellOwner[intFacei]]);
const scalar cellNeighbourVol = max(0.0, V[cellNeighbour[intFacei]]);
scalar targetFaceSizeA = Foam::pow(cellOwnerVol, 1.0/3.0);
scalar targetFaceSizeB = Foam::pow(cellNeighbourVol, 1.0/3.0);
targetFaceSizes[intFaceI] = 0.5*(targetFaceSizeA + targetFaceSizeB);
targetFaceSizes[intFacei] = 0.5*(targetFaceSizeA + targetFaceSizeB);
}
scalarField neiCellVolumes(nBoundaryFaces, -1);
@ -502,7 +502,7 @@ Foam::scalarField Foam::edgeCollapser::calcTargetFaceSizes() const
{
const polyPatch& patch = patches[patchi];
label bFaceI = patch.start() - mesh_.nInternalFaces();
label bFacei = patch.start() - mesh_.nInternalFaces();
if (patch.coupled())
{
@ -512,19 +512,19 @@ Foam::scalarField Foam::edgeCollapser::calcTargetFaceSizes() const
forAll(faceCells, facei)
{
neiCellVolumes[bFaceI++] = max(0.0, V[faceCells[facei]]);
neiCellVolumes[bFacei++] = max(0.0, V[faceCells[facei]]);
}
}
else
{
// Normal boundary face: Just use owner cell volume to calculate
// the target face size
forAll(patch, patchFaceI)
forAll(patch, patchFacei)
{
const label extFaceI = patchFaceI + patch.start();
const scalar cellOwnerVol = max(0.0, V[cellOwner[extFaceI]]);
const label extFacei = patchFacei + patch.start();
const scalar cellOwnerVol = max(0.0, V[cellOwner[extFacei]]);
targetFaceSizes[extFaceI] = Foam::pow(cellOwnerVol, 1.0/3.0);
targetFaceSizes[extFacei] = Foam::pow(cellOwnerVol, 1.0/3.0);
}
}
}
@ -535,20 +535,20 @@ Foam::scalarField Foam::edgeCollapser::calcTargetFaceSizes() const
{
const polyPatch& patch = patches[patchi];
label bFaceI = patch.start() - mesh_.nInternalFaces();
label bFacei = patch.start() - mesh_.nInternalFaces();
if (patch.coupled())
{
forAll(patch, patchFaceI)
forAll(patch, patchFacei)
{
const label localFaceI = patchFaceI + patch.start();
const scalar cellOwnerVol = max(0.0, V[cellOwner[localFaceI]]);
const scalar cellNeighbourVol = neiCellVolumes[bFaceI++];
const label localFacei = patchFacei + patch.start();
const scalar cellOwnerVol = max(0.0, V[cellOwner[localFacei]]);
const scalar cellNeighbourVol = neiCellVolumes[bFacei++];
scalar targetFaceSizeA = Foam::pow(cellOwnerVol, 1.0/3.0);
scalar targetFaceSizeB = Foam::pow(cellNeighbourVol, 1.0/3.0);
targetFaceSizes[localFaceI]
targetFaceSizes[localFacei]
= 0.5*(targetFaceSizeA + targetFaceSizeB);
}
}
@ -1577,9 +1577,9 @@ bool Foam::edgeCollapser::setRefinement
{
const labelList& changedFaces = pointFaces[pointI];
forAll(changedFaces, changedFaceI)
forAll(changedFaces, changedFacei)
{
label facei = changedFaces[changedFaceI];
label facei = changedFaces[changedFacei];
if (!doneFace[facei])
{
@ -2108,9 +2108,9 @@ Foam::labelPair Foam::edgeCollapser::markFaceZoneEdges
//
// bool coupled = false;
//
// forAll(eFaces, eFaceI)
// forAll(eFaces, eFacei)
// {
// const label eFaceIndex = eFaces[eFaceI];
// const label eFaceIndex = eFaces[eFacei];
//
// if (mesh_.isInternalFace(eFaceIndex))
// {

View File

@ -136,12 +136,12 @@ Foam::label Foam::hexRef8::addFace
getFaceInfo(facei, patchID, zoneID, zoneFlip);
label newFaceI = -1;
label newFacei = -1;
if ((nei == -1) || (own < nei))
{
// Ordering ok.
newFaceI = meshMod.setAction
newFacei = meshMod.setAction
(
polyAddFace
(
@ -161,7 +161,7 @@ Foam::label Foam::hexRef8::addFace
else
{
// Reverse owner/neighbour
newFaceI = meshMod.setAction
newFacei = meshMod.setAction
(
polyAddFace
(
@ -178,7 +178,7 @@ Foam::label Foam::hexRef8::addFace
)
);
}
return newFaceI;
return newFacei;
}
@ -191,14 +191,14 @@ Foam::label Foam::hexRef8::addFace
Foam::label Foam::hexRef8::addInternalFace
(
polyTopoChange& meshMod,
const label meshFaceI,
const label meshFacei,
const label meshPointI,
const face& newFace,
const label own,
const label nei
) const
{
if (mesh_.isInternalFace(meshFaceI))
if (mesh_.isInternalFace(meshFacei))
{
return meshMod.setAction
(
@ -209,7 +209,7 @@ Foam::label Foam::hexRef8::addInternalFace
nei, // neighbour
-1, // master point
-1, // master edge
meshFaceI, // master face for addition
meshFacei, // master face for addition
false, // flux flip
-1, // patch for face
-1, // zone for face
@ -1337,7 +1337,7 @@ void Foam::hexRef8::createInternalFaces
edgeMidPointI = f[edgeMid];
}
label newFaceI = storeMidPointInfo
label newFacei = storeMidPointInfo
(
cellAnchorPoints,
cellAddedCells,
@ -1356,7 +1356,7 @@ void Foam::hexRef8::createInternalFaces
meshMod
);
if (newFaceI != -1)
if (newFacei != -1)
{
nFacesAdded++;
@ -1417,7 +1417,7 @@ void Foam::hexRef8::createInternalFaces
edgeMidPointI = f[edgeMid];
}
newFaceI = storeMidPointInfo
newFacei = storeMidPointInfo
(
cellAnchorPoints,
cellAddedCells,
@ -1436,7 +1436,7 @@ void Foam::hexRef8::createInternalFaces
meshMod
);
if (newFaceI != -1)
if (newFacei != -1)
{
nFacesAdded++;
@ -1875,17 +1875,17 @@ bool Foam::hexRef8::matchHexShape
{
// Collect and orient.
faceList fourFaces(pFaces.size());
forAll(pFaces, pFaceI)
forAll(pFaces, pFacei)
{
label facei = pFaces[pFaceI];
label facei = pFaces[pFacei];
const face& f = mesh_.faces()[facei];
if (mesh_.faceOwner()[facei] == celli)
{
fourFaces[pFaceI] = f;
fourFaces[pFacei] = f;
}
else
{
fourFaces[pFaceI] = f.reverseFace();
fourFaces[pFacei] = f.reverseFace();
}
}
@ -2612,9 +2612,9 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement
const labelList& pCells = mesh_.pointCells(pointI);
forAll(pCells, pCellI)
forAll(pCells, pCelli)
{
label celli = pCells[pCellI];
label celli = pCells[pCelli];
refinementData& cellInfo = allCellInfo[celli];
@ -2633,9 +2633,9 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement
// Insert faces of cell as seed faces.
const cell& cFaces = mesh_.cells()[celli];
forAll(cFaces, cFaceI)
forAll(cFaces, cFacei)
{
label facei = cFaces[cFaceI];
label facei = cFaces[cFacei];
refinementData faceData;
faceData.updateFace
@ -3684,9 +3684,9 @@ Foam::labelListList Foam::hexRef8::setRefinement
{
const labelList& pCells = mesh_.pointCells(pointI);
forAll(pCells, pCellI)
forAll(pCells, pCelli)
{
label celli = pCells[pCellI];
label celli = pCells[pCelli];
if
(
@ -4343,17 +4343,17 @@ void Foam::hexRef8::updateMesh
const labelList& cellMap = map.cellMap();
labelList newCellLevel(cellMap.size());
forAll(cellMap, newCellI)
forAll(cellMap, newCelli)
{
label oldCellI = cellMap[newCellI];
label oldCelli = cellMap[newCelli];
if (oldCellI == -1)
if (oldCelli == -1)
{
newCellLevel[newCellI] = -1;
newCellLevel[newCelli] = -1;
}
else
{
newCellLevel[newCellI] = cellLevel_[oldCellI];
newCellLevel[newCelli] = cellLevel_[oldCelli];
}
}
cellLevel_.transfer(newCellLevel);
@ -4363,20 +4363,20 @@ void Foam::hexRef8::updateMesh
// the corresponding old cell.
forAllConstIter(Map<label>, cellsToRestore, iter)
{
label newCellI = iter.key();
label storedCellI = iter();
label newCelli = iter.key();
label storedCelli = iter();
Map<label>::iterator fnd = savedCellLevel_.find(storedCellI);
Map<label>::iterator fnd = savedCellLevel_.find(storedCelli);
if (fnd == savedCellLevel_.end())
{
FatalErrorInFunction
<< "Problem : trying to restore old value for new cell "
<< newCellI << " but cannot find old cell " << storedCellI
<< newCelli << " but cannot find old cell " << storedCelli
<< " in map of stored values " << savedCellLevel_
<< abort(FatalError);
}
cellLevel_[newCellI] = fnd();
cellLevel_[newCelli] = fnd();
}
//if (findIndex(cellLevel_, -1) != -1)
@ -4512,9 +4512,9 @@ void Foam::hexRef8::subset
{
labelList newCellLevel(cellMap.size());
forAll(cellMap, newCellI)
forAll(cellMap, newCelli)
{
newCellLevel[newCellI] = cellLevel_[cellMap[newCellI]];
newCellLevel[newCelli] = cellLevel_[cellMap[newCelli]];
}
cellLevel_.transfer(newCellLevel);
@ -4640,9 +4640,9 @@ void Foam::hexRef8::checkMesh() const
forAll(pp, i)
{
label own = mesh_.faceOwner()[facei];
label bFaceI = facei-mesh_.nInternalFaces();
label bFacei = facei-mesh_.nInternalFaces();
if (!cellToFace.insert(labelPair(own, nei[bFaceI]), facei))
if (!cellToFace.insert(labelPair(own, nei[bFacei]), facei))
{
dumpCell(own);
FatalErrorInFunction
@ -4651,10 +4651,10 @@ void Foam::hexRef8::checkMesh() const
<< "Coupled face " << facei
<< " between owner " << own
<< " on patch " << pp.name()
<< " and coupled neighbour " << nei[bFaceI]
<< " and coupled neighbour " << nei[bFacei]
<< " has two faces connected to it:"
<< facei << " and "
<< cellToFace[labelPair(own, nei[bFaceI])]
<< cellToFace[labelPair(own, nei[bFacei])]
<< abort(FatalError);
}
@ -5175,9 +5175,9 @@ Foam::labelList Foam::hexRef8::getSplitPoints() const
{
label pointI = cPoints[i];
label masterCellI = splitMaster[pointI];
label masterCelli = splitMaster[pointI];
if (masterCellI == -1)
if (masterCelli == -1)
{
// First time visit of point. Store parent cell and
// level of the parent cell (with respect to celli). This
@ -5187,13 +5187,13 @@ Foam::labelList Foam::hexRef8::getSplitPoints() const
splitMaster[pointI] = parentIndex;
splitMasterLevel[pointI] = cellLevel_[celli] - 1;
}
else if (masterCellI == -2)
else if (masterCelli == -2)
{
// Already decided that point is not splitPoint
}
else if
(
(masterCellI != parentIndex)
(masterCelli != parentIndex)
|| (splitMasterLevel[pointI] != cellLevel_[celli] - 1)
)
{
@ -5675,7 +5675,7 @@ void Foam::hexRef8::setUnrefinement
// (should be guaranteed by directRemoveFaces)
//if (debug)
{
label masterCellI = min(pCells);
label masterCelli = min(pCells);
forAll(pCells, j)
{
@ -5694,7 +5694,7 @@ void Foam::hexRef8::setUnrefinement
<< abort(FatalError);
}
if (masterCellI != cellRegionMaster[region])
if (masterCelli != cellRegionMaster[region])
{
FatalErrorInFunction
<< "cell:" << celli << " on splitPoint:" << pointI
@ -5727,14 +5727,14 @@ void Foam::hexRef8::setUnrefinement
const labelList& pCells = mesh_.pointCells(pointI);
label masterCellI = min(pCells);
label masterCelli = min(pCells);
forAll(pCells, j)
{
cellLevel_[pCells[j]]--;
}
history_.combineCells(masterCellI, pCells);
history_.combineCells(masterCelli, pCells);
}
// Mark files as changed

View File

@ -128,7 +128,7 @@ class hexRef8
label addInternalFace
(
polyTopoChange& meshMod,
const label meshFaceI,
const label meshFacei,
const label meshPointI,
const face& newFace,
const label own,

View File

@ -134,13 +134,13 @@ void Foam::polyTopoChange::countMap
nMerge = 0;
nRemove = 0;
forAll(map, newCellI)
forAll(map, newCelli)
{
label oldCellI = map[newCellI];
label oldCelli = map[newCelli];
if (oldCellI >= 0)
if (oldCelli >= 0)
{
if (reverseMap[oldCellI] == newCellI)
if (reverseMap[oldCelli] == newCelli)
{
// unchanged
}
@ -150,7 +150,7 @@ void Foam::polyTopoChange::countMap
nAdd++;
}
}
else if (oldCellI == -1)
else if (oldCelli == -1)
{
// Created from nothing
nInflate++;
@ -158,26 +158,26 @@ void Foam::polyTopoChange::countMap
else
{
FatalErrorInFunction
<< " new:" << newCellI << abort(FatalError);
<< " new:" << newCelli << abort(FatalError);
}
}
forAll(reverseMap, oldCellI)
forAll(reverseMap, oldCelli)
{
label newCellI = reverseMap[oldCellI];
label newCelli = reverseMap[oldCelli];
if (newCellI >= 0)
if (newCelli >= 0)
{
// unchanged
}
else if (newCellI == -1)
else if (newCelli == -1)
{
// removed
nRemove++;
}
else
{
// merged into -newCellI-2
// merged into -newCelli-2
nMerge++;
}
}
@ -232,15 +232,15 @@ void Foam::polyTopoChange::getMergeSets
// Per new cell the number of old cells that have been merged into it
labelList nMerged(cellMap.size(), 1);
forAll(reverseCellMap, oldCellI)
forAll(reverseCellMap, oldCelli)
{
label newCellI = reverseCellMap[oldCellI];
label newCelli = reverseCellMap[oldCelli];
if (newCellI < -1)
if (newCelli < -1)
{
label mergeCellI = -newCellI-2;
label mergeCelli = -newCelli-2;
nMerged[mergeCellI]++;
nMerged[mergeCelli]++;
}
}
@ -265,38 +265,38 @@ void Foam::polyTopoChange::getMergeSets
cellsFromCells.setSize(nSets);
forAll(reverseCellMap, oldCellI)
forAll(reverseCellMap, oldCelli)
{
label newCellI = reverseCellMap[oldCellI];
label newCelli = reverseCellMap[oldCelli];
if (newCellI < -1)
if (newCelli < -1)
{
label mergeCellI = -newCellI-2;
label mergeCelli = -newCelli-2;
// oldCellI was merged into mergeCellI
// oldCelli was merged into mergeCelli
label setI = cellToMergeSet[mergeCellI];
label setI = cellToMergeSet[mergeCelli];
objectMap& mergeSet = cellsFromCells[setI];
if (mergeSet.masterObjects().empty())
{
// First occurrence of master cell mergeCellI
// First occurrence of master cell mergeCelli
mergeSet.index() = mergeCellI;
mergeSet.masterObjects().setSize(nMerged[mergeCellI]);
mergeSet.index() = mergeCelli;
mergeSet.masterObjects().setSize(nMerged[mergeCelli]);
// old master label
mergeSet.masterObjects()[0] = cellMap[mergeCellI];
mergeSet.masterObjects()[0] = cellMap[mergeCelli];
// old slave label
mergeSet.masterObjects()[1] = oldCellI;
mergeSet.masterObjects()[1] = oldCelli;
nMerged[mergeCellI] = 2;
nMerged[mergeCelli] = 2;
}
else
{
mergeSet.masterObjects()[nMerged[mergeCellI]++] = oldCellI;
mergeSet.masterObjects()[nMerged[mergeCelli]++] = oldCelli;
}
}
}
@ -713,7 +713,7 @@ void Foam::polyTopoChange::getFaceOrder
oldToNew = -1;
// First unassigned face
label newFaceI = 0;
label newFacei = 0;
labelList nbr;
labelList order;
@ -731,25 +731,25 @@ void Foam::polyTopoChange::getFaceOrder
{
label facei = cellFaces[startOfCell + i];
label nbrCellI = faceNeighbour_[facei];
label nbrCelli = faceNeighbour_[facei];
if (facei >= nActiveFaces)
{
// Retired face.
nbr[i] = -1;
}
else if (nbrCellI != -1)
else if (nbrCelli != -1)
{
// Internal face. Get cell on other side.
if (nbrCellI == celli)
if (nbrCelli == celli)
{
nbrCellI = faceOwner_[facei];
nbrCelli = faceOwner_[facei];
}
if (celli < nbrCellI)
if (celli < nbrCelli)
{
// CellI is master
nbr[i] = nbrCellI;
// Celli is master
nbr[i] = nbrCelli;
}
else
{
@ -773,7 +773,7 @@ void Foam::polyTopoChange::getFaceOrder
// if (nbr[i] != -1)
// {
// oldToNew[cellFaces[startOfCell + nbr.indices()[i]]] =
// newFaceI++;
// newFacei++;
// }
//}
forAll(order, i)
@ -781,7 +781,7 @@ void Foam::polyTopoChange::getFaceOrder
label index = order[i];
if (nbr[index] != -1)
{
oldToNew[cellFaces[startOfCell + index]] = newFaceI++;
oldToNew[cellFaces[startOfCell + index]] = newFacei++;
}
}
}
@ -795,7 +795,7 @@ void Foam::polyTopoChange::getFaceOrder
if (nPatches_ > 0)
{
patchStarts[0] = newFaceI;
patchStarts[0] = newFacei;
for (label facei = 0; facei < nActiveFaces; facei++)
{
@ -1101,40 +1101,40 @@ void Foam::polyTopoChange::compact
// Compact faces.
{
labelList localFaceMap(faces_.size(), -1);
label newFaceI = 0;
label newFacei = 0;
forAll(faces_, facei)
{
if (!faceRemoved(facei) && faceOwner_[facei] >= 0)
{
localFaceMap[facei] = newFaceI++;
localFaceMap[facei] = newFacei++;
}
}
nActiveFaces_ = newFaceI;
nActiveFaces_ = newFacei;
forAll(faces_, facei)
{
if (!faceRemoved(facei) && faceOwner_[facei] < 0)
{
// Retired face
localFaceMap[facei] = newFaceI++;
localFaceMap[facei] = newFacei++;
}
}
if (debug)
{
Pout<< "Faces : active:" << nActiveFaces_
<< " removed:" << faces_.size()-newFaceI << endl;
<< " removed:" << faces_.size()-newFacei << endl;
}
// Reorder faces.
reorderCompactFaces(newFaceI, localFaceMap);
reorderCompactFaces(newFacei, localFaceMap);
}
// Compact cells.
{
labelList localCellMap;
label newCellI;
label newCelli;
if (orderCells)
{
@ -1143,7 +1143,7 @@ void Foam::polyTopoChange::compact
makeCellCells(nActiveFaces_, cellCells);
// Cell ordering (based on bandCompression). Handles removed cells.
newCellI = getCellOrder(cellCells, localCellMap);
newCelli = getCellOrder(cellCells, localCellMap);
}
else
{
@ -1151,31 +1151,31 @@ void Foam::polyTopoChange::compact
localCellMap.setSize(cellMap_.size());
localCellMap = -1;
newCellI = 0;
newCelli = 0;
forAll(cellMap_, celli)
{
if (!cellRemoved(celli))
{
localCellMap[celli] = newCellI++;
localCellMap[celli] = newCelli++;
}
}
}
if (debug)
{
Pout<< "Cells : active:" << newCellI
<< " removed:" << cellMap_.size()-newCellI << endl;
Pout<< "Cells : active:" << newCelli
<< " removed:" << cellMap_.size()-newCelli << endl;
}
// Renumber -if cells reordered or -if cells removed
if (orderCells || (newCellI != cellMap_.size()))
if (orderCells || (newCelli != cellMap_.size()))
{
reorder(localCellMap, cellMap_);
cellMap_.setCapacity(newCellI);
cellMap_.setCapacity(newCelli);
renumberReverseMap(localCellMap, reverseCellMap_);
reorder(localCellMap, cellZone_);
cellZone_.setCapacity(newCellI);
cellZone_.setCapacity(newCelli);
renumberKey(localCellMap, cellFromPoint_);
renumberKey(localCellMap, cellFromEdge_);
@ -1381,14 +1381,14 @@ void Foam::polyTopoChange::calcFaceInflationMaps
// Collect all still existing faces connected to this point.
forAllConstIter(Map<label>, faceFromPoint_, iter)
{
label newFaceI = iter.key();
label newFacei = iter.key();
if (region_[newFaceI] == -1)
if (region_[newFacei] == -1)
{
// Get internal faces using point on old mesh
facesFromPoints[nFacesFromPoints++] = objectMap
(
newFaceI,
newFacei,
selectFaces
(
mesh,
@ -1402,7 +1402,7 @@ void Foam::polyTopoChange::calcFaceInflationMaps
// Get patch faces using point on old mesh
facesFromPoints[nFacesFromPoints++] = objectMap
(
newFaceI,
newFacei,
selectFaces
(
mesh,
@ -1427,14 +1427,14 @@ void Foam::polyTopoChange::calcFaceInflationMaps
// Collect all still existing faces connected to this edge.
forAllConstIter(Map<label>, faceFromEdge_, iter)
{
label newFaceI = iter.key();
label newFacei = iter.key();
if (region_[newFaceI] == -1)
if (region_[newFacei] == -1)
{
// Get internal faces using edge on old mesh
facesFromEdges[nFacesFromEdges++] = objectMap
(
newFaceI,
newFacei,
selectFaces
(
mesh,
@ -1448,7 +1448,7 @@ void Foam::polyTopoChange::calcFaceInflationMaps
// Get patch faces using edge on old mesh
facesFromEdges[nFacesFromEdges++] = objectMap
(
newFaceI,
newFacei,
selectFaces
(
mesh,
@ -1529,12 +1529,12 @@ void Foam::polyTopoChange::calcCellInflationMaps
// Collect all still existing faces connected to this point.
forAllConstIter(Map<label>, cellFromFace_, iter)
{
label oldFaceI = iter();
label oldFacei = iter();
if (mesh.isInternalFace(oldFaceI))
if (mesh.isInternalFace(oldFacei))
{
twoCells[0] = mesh.faceOwner()[oldFaceI];
twoCells[1] = mesh.faceNeighbour()[oldFaceI];
twoCells[0] = mesh.faceOwner()[oldFacei];
twoCells[1] = mesh.faceNeighbour()[oldFacei];
cellsFromFaces[nCellsFromFaces++] = objectMap
(
iter.key(),
@ -1546,7 +1546,7 @@ void Foam::polyTopoChange::calcCellInflationMaps
cellsFromFaces[nCellsFromFaces++] = objectMap
(
iter.key(),
labelList(1, mesh.faceOwner()[oldFaceI])
labelList(1, mesh.faceOwner()[oldFacei])
);
}
}
@ -1993,16 +1993,16 @@ void Foam::polyTopoChange::reorderCoupledFaces
// Merge patch face reordering into mesh face reordering table
label start = patchStarts[patchi];
forAll(patchFaceMap, patchFaceI)
forAll(patchFaceMap, patchFacei)
{
oldToNew[patchFaceI + start] =
start + patchFaceMap[patchFaceI];
oldToNew[patchFacei + start] =
start + patchFaceMap[patchFacei];
}
forAll(patchFaceRotation, patchFaceI)
forAll(patchFaceRotation, patchFacei)
{
rotation[patchFaceI + start] =
patchFaceRotation[patchFaceI];
rotation[patchFacei + start] =
patchFaceRotation[patchFacei];
}
anyChanged = true;
@ -2456,9 +2456,9 @@ void Foam::polyTopoChange::addMesh
<< "Are patches in incremental order?"
<< abort(FatalError);
}
forAll(pp, patchFaceI)
forAll(pp, patchFacei)
{
label facei = pp.start() + patchFaceI;
label facei = pp.start() + patchFacei;
addFace
(
@ -2896,7 +2896,7 @@ void Foam::polyTopoChange::modifyFace
}
void Foam::polyTopoChange::removeFace(const label facei, const label mergeFaceI)
void Foam::polyTopoChange::removeFace(const label facei, const label mergeFacei)
{
if (facei < 0 || facei >= faces_.size())
{
@ -2923,9 +2923,9 @@ void Foam::polyTopoChange::removeFace(const label facei, const label mergeFaceI)
faceOwner_[facei] = -1;
faceNeighbour_[facei] = -1;
faceMap_[facei] = -1;
if (mergeFaceI >= 0)
if (mergeFacei >= 0)
{
reverseFaceMap_[facei] = -mergeFaceI-2;
reverseFaceMap_[facei] = -mergeFacei-2;
}
else
{
@ -2986,7 +2986,7 @@ void Foam::polyTopoChange::modifyCell
}
void Foam::polyTopoChange::removeCell(const label celli, const label mergeCellI)
void Foam::polyTopoChange::removeCell(const label celli, const label mergeCelli)
{
if (celli < 0 || celli >= cellMap_.size())
{
@ -3005,9 +3005,9 @@ void Foam::polyTopoChange::removeCell(const label celli, const label mergeCellI)
}
cellMap_[celli] = -2;
if (mergeCellI >= 0)
if (mergeCelli >= 0)
{
reverseCellMap_[celli] = -mergeCellI-2;
reverseCellMap_[celli] = -mergeCelli-2;
}
else
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -128,7 +128,7 @@ public:
(
const polyMesh&,
const polyPatch&,
const label patchFaceI,
const label patchFacei,
const point& faceCentre,
TrackingData& td
);
@ -139,7 +139,7 @@ public:
(
const polyMesh&,
const polyPatch&,
const label patchFaceI,
const label patchFacei,
const point& faceCentre,
TrackingData& td
);
@ -158,8 +158,8 @@ public:
inline bool updateCell
(
const polyMesh&,
const label thisCellI,
const label neighbourFaceI,
const label thisCelli,
const label neighbourFacei,
const refinementData& neighbourInfo,
const scalar tol,
TrackingData& td
@ -170,8 +170,8 @@ public:
inline bool updateFace
(
const polyMesh&,
const label thisFaceI,
const label neighbourCellI,
const label thisFacei,
const label neighbourCelli,
const refinementData& neighbourInfo,
const scalar tol,
TrackingData& td
@ -182,7 +182,7 @@ public:
inline bool updateFace
(
const polyMesh&,
const label thisFaceI,
const label thisFacei,
const refinementData& neighbourInfo,
const scalar tol,
TrackingData& td

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -74,7 +74,7 @@ inline void Foam::refinementData::leaveDomain
(
const polyMesh&,
const polyPatch& patch,
const label patchFaceI,
const label patchFacei,
const point& faceCentre,
TrackingData& td
)
@ -98,7 +98,7 @@ inline void Foam::refinementData::enterDomain
(
const polyMesh&,
const polyPatch& patch,
const label patchFaceI,
const label patchFacei,
const point& faceCentre,
TrackingData& td
)
@ -110,8 +110,8 @@ template<class TrackingData>
inline bool Foam::refinementData::updateCell
(
const polyMesh&,
const label thisCellI,
const label neighbourFaceI,
const label thisCelli,
const label neighbourFacei,
const refinementData& neighbourInfo,
const scalar tol,
TrackingData& td
@ -172,8 +172,8 @@ template<class TrackingData>
inline bool Foam::refinementData::updateFace
(
const polyMesh&,
const label thisFaceI,
const label neighbourCellI,
const label thisFacei,
const label neighbourCelli,
const refinementData& neighbourInfo,
const scalar tol,
TrackingData& td
@ -207,7 +207,7 @@ template<class TrackingData>
inline bool Foam::refinementData::updateFace
(
const polyMesh&,
const label thisFaceI,
const label thisFacei,
const refinementData& neighbourInfo,
const scalar tol,
TrackingData& td

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -159,7 +159,7 @@ public:
(
const polyMesh&,
const polyPatch&,
const label patchFaceI,
const label patchFacei,
const point& faceCentre,
TrackingData&
);
@ -170,7 +170,7 @@ public:
(
const polyMesh&,
const polyPatch&,
const label patchFaceI,
const label patchFacei,
const point& faceCentre,
TrackingData&
);
@ -189,8 +189,8 @@ public:
inline bool updateCell
(
const polyMesh&,
const label thisCellI,
const label neighbourFaceI,
const label thisCelli,
const label neighbourFacei,
const refinementDistanceData& neighbourInfo,
const scalar tol,
TrackingData&
@ -201,8 +201,8 @@ public:
inline bool updateFace
(
const polyMesh&,
const label thisFaceI,
const label neighbourCellI,
const label thisFacei,
const label neighbourCelli,
const refinementDistanceData& neighbourInfo,
const scalar tol,
TrackingData&
@ -213,7 +213,7 @@ public:
inline bool updateFace
(
const polyMesh&,
const label thisFaceI,
const label thisFacei,
const refinementDistanceData& neighbourInfo,
const scalar tol,
TrackingData&

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -170,7 +170,7 @@ inline void Foam::refinementDistanceData::leaveDomain
(
const polyMesh&,
const polyPatch& patch,
const label patchFaceI,
const label patchFacei,
const point& faceCentre,
TrackingData& td
)
@ -197,7 +197,7 @@ inline void Foam::refinementDistanceData::enterDomain
(
const polyMesh&,
const polyPatch& patch,
const label patchFaceI,
const label patchFacei,
const point& faceCentre,
TrackingData& td
)
@ -212,14 +212,14 @@ template<class TrackingData>
inline bool Foam::refinementDistanceData::updateCell
(
const polyMesh& mesh,
const label thisCellI,
const label neighbourFaceI,
const label thisCelli,
const label neighbourFacei,
const refinementDistanceData& neighbourInfo,
const scalar tol,
TrackingData& td
)
{
const point& pos = mesh.cellCentres()[thisCellI];
const point& pos = mesh.cellCentres()[thisCelli];
return update(pos, neighbourInfo, tol, td);
}
@ -230,14 +230,14 @@ template<class TrackingData>
inline bool Foam::refinementDistanceData::updateFace
(
const polyMesh& mesh,
const label thisFaceI,
const label neighbourCellI,
const label thisFacei,
const label neighbourCelli,
const refinementDistanceData& neighbourInfo,
const scalar tol,
TrackingData& td
)
{
const point& pos = mesh.faceCentres()[thisFaceI];
const point& pos = mesh.faceCentres()[thisFacei];
return update(pos, neighbourInfo, tol, td);
}
@ -248,13 +248,13 @@ template<class TrackingData>
inline bool Foam::refinementDistanceData::updateFace
(
const polyMesh& mesh,
const label thisFaceI,
const label thisFacei,
const refinementDistanceData& neighbourInfo,
const scalar tol,
TrackingData& td
)
{
const point& pos = mesh.faceCentres()[thisFaceI];
const point& pos = mesh.faceCentres()[thisFacei];
return update(pos, neighbourInfo, tol, td);
}

View File

@ -544,11 +544,11 @@ void Foam::refinementHistory::updateMesh(const mapPolyMesh& map)
<< "Problem" << abort(FatalError);
}
label newCellI = reverseCellMap[celli];
label newCelli = reverseCellMap[celli];
if (newCellI >= 0)
if (newCelli >= 0)
{
newVisibleCells[newCellI] = index;
newVisibleCells[newCelli] = index;
}
}
}
@ -580,9 +580,9 @@ void Foam::refinementHistory::subset
forAll(newVisibleCells, celli)
{
label oldCellI = cellMap[celli];
label oldCelli = cellMap[celli];
label index = visibleCells_[oldCellI];
label index = visibleCells_[oldCelli];
// Check that cell is live (so its parent has no refinement)
if (index >= 0 && splitCells_[index].addedCellsPtr_.valid())
@ -686,15 +686,15 @@ void Foam::refinementHistory::distribute(const mapDistributePolyMesh& map)
const labelListList& subCellMap = map.cellMap().subMap();
forAll(subCellMap, procI)
forAll(subCellMap, proci)
{
const labelList& newToOld = subCellMap[procI];
const labelList& newToOld = subCellMap[proci];
forAll(newToOld, i)
{
label oldCellI = newToOld[i];
label oldCelli = newToOld[i];
destination[oldCellI] = procI;
destination[oldCelli] = proci;
}
}
@ -731,9 +731,9 @@ void Foam::refinementHistory::distribute(const mapDistributePolyMesh& map)
// Create subsetted refinement tree consisting of all parents that
// move in their whole to other processor.
for (label procI = 0; procI < Pstream::nProcs(); procI++)
for (label proci = 0; proci < Pstream::nProcs(); proci++)
{
//Pout<< "-- Subetting for processor " << procI << endl;
//Pout<< "-- Subetting for processor " << proci << endl;
// From uncompacted to compacted splitCells.
labelList oldToNew(splitCells_.size(), -1);
@ -751,9 +751,9 @@ void Foam::refinementHistory::distribute(const mapDistributePolyMesh& map)
// << " nCells:" << splitCellNum[index]
// << endl;
if (splitCellProc[index] == procI && splitCellNum[index] == 8)
if (splitCellProc[index] == proci && splitCellNum[index] == 8)
{
// Entry moves in its whole to procI
// Entry moves in its whole to proci
oldToNew[index] = newSplitCells.size();
newSplitCells.append(splitCells_[index]);
@ -769,13 +769,13 @@ void Foam::refinementHistory::distribute(const mapDistributePolyMesh& map)
{
label index = visibleCells_[celli];
if (index >= 0 && destination[celli] == procI)
if (index >= 0 && destination[celli] == proci)
{
label parent = splitCells_[index].parent_;
//Pout<< "Adding refined cell " << celli
// << " since moves to "
// << procI << " old parent:" << parent << endl;
// << proci << " old parent:" << parent << endl;
// Create new splitCell with parent
oldToNew[index] = newSplitCells.size();
@ -815,30 +815,30 @@ void Foam::refinementHistory::distribute(const mapDistributePolyMesh& map)
}
const labelList& subMap = subCellMap[procI];
const labelList& subMap = subCellMap[proci];
// New visible cells.
labelList newVisibleCells(subMap.size(), -1);
forAll(subMap, newCellI)
forAll(subMap, newCelli)
{
label oldCellI = subMap[newCellI];
label oldCelli = subMap[newCelli];
label oldIndex = visibleCells_[oldCellI];
label oldIndex = visibleCells_[oldCelli];
if (oldIndex >= 0)
{
newVisibleCells[newCellI] = oldToNew[oldIndex];
newVisibleCells[newCelli] = oldToNew[oldIndex];
}
}
//Pout<< nl << "--Subset for domain:" << procI << endl;
//Pout<< nl << "--Subset for domain:" << proci << endl;
//writeDebug(newVisibleCells, newSplitCells);
//Pout<< "---------" << nl << endl;
// Send to neighbours
OPstream toNbr(Pstream::blocking, procI);
OPstream toNbr(Pstream::blocking, proci);
toNbr << newSplitCells << newVisibleCells;
}
@ -852,13 +852,13 @@ void Foam::refinementHistory::distribute(const mapDistributePolyMesh& map)
visibleCells_.setSize(map.mesh().nCells());
visibleCells_ = -1;
for (label procI = 0; procI < Pstream::nProcs(); procI++)
for (label proci = 0; proci < Pstream::nProcs(); proci++)
{
IPstream fromNbr(Pstream::blocking, procI);
IPstream fromNbr(Pstream::blocking, proci);
List<splitCell8> newSplitCells(fromNbr);
labelList newVisibleCells(fromNbr);
//Pout<< nl << "--Received from domain:" << procI << endl;
//Pout<< nl << "--Received from domain:" << proci << endl;
//writeDebug(newVisibleCells, newSplitCells);
//Pout<< "---------" << nl << endl;
@ -867,7 +867,7 @@ void Foam::refinementHistory::distribute(const mapDistributePolyMesh& map)
// renumbering can be done here.
label offset = splitCells_.size();
//Pout<< "**Renumbering data from proc " << procI << " with offset "
//Pout<< "**Renumbering data from proc " << proci << " with offset "
// << offset << endl;
forAll(newSplitCells, index)
@ -896,7 +896,7 @@ void Foam::refinementHistory::distribute(const mapDistributePolyMesh& map)
// Combine visibleCell.
const labelList& constructMap = map.cellMap().constructMap()[procI];
const labelList& constructMap = map.cellMap().constructMap()[proci];
forAll(newVisibleCells, i)
{
@ -1105,23 +1105,23 @@ void Foam::refinementHistory::storeSplit
// cell they were created from (parentIndex)
forAll(addedCells, i)
{
label addedCellI = addedCells[i];
label addedCelli = addedCells[i];
// Create entries for the split off cells. All of them
// are visible.
visibleCells_[addedCellI] = allocateSplitCell(parentIndex, i);
visibleCells_[addedCelli] = allocateSplitCell(parentIndex, i);
}
}
void Foam::refinementHistory::combineCells
(
const label masterCellI,
const label masterCelli,
const labelList& combinedCells
)
{
// Save the parent structure
label parentIndex = splitCells_[visibleCells_[masterCellI]].parent_;
label parentIndex = splitCells_[visibleCells_[masterCelli]].parent_;
// Remove the information for the combined cells
forAll(combinedCells, i)
@ -1134,7 +1134,7 @@ void Foam::refinementHistory::combineCells
splitCell8& parentSplit = splitCells_[parentIndex];
parentSplit.addedCellsPtr_.reset(NULL);
visibleCells_[masterCellI] = parentIndex;
visibleCells_[masterCelli] = parentIndex;
}

View File

@ -310,7 +310,7 @@ public:
//- Store combining 8 cells into master
void combineCells
(
const label masterCellI,
const label masterCelli,
const labelList& combinedCells
);

View File

@ -293,7 +293,7 @@ void Foam::removeCells::setRefinement
<< abort(FatalError);
}
// nei is remaining cell. FaceI becomes external cell
// nei is remaining cell. Facei becomes external cell
label zoneID = faceZones.whichZone(facei);
bool zoneFlip = false;
@ -342,7 +342,7 @@ void Foam::removeCells::setRefinement
// << " fc:" << mesh_.faceCentres()[facei]
// << " into patch " << newPatchID[facei] << endl;
// own is remaining cell. FaceI becomes external cell.
// own is remaining cell. Facei becomes external cell.
label zoneID = faceZones.whichZone(facei);
bool zoneFlip = false;

View File

@ -109,16 +109,16 @@ Foam::label Foam::removeFaces::changeFaceRegion
forAll(eFaces, j)
{
label nbrFaceI = eFaces[j];
label nbrFacei = eFaces[j];
const labelList& fEdges1 = mesh_.faceEdges(nbrFaceI, fe);
const labelList& fEdges1 = mesh_.faceEdges(nbrFacei, fe);
nChanged += changeFaceRegion
(
cellRegion,
removedFace,
nFacesPerEdge,
nbrFaceI,
nbrFacei,
newRegion,
fEdges1,
faceRegion
@ -156,9 +156,9 @@ Foam::boolList Foam::removeFaces::getFacesAffected
{
const labelList& cFaces = mesh_.cells()[celli];
forAll(cFaces, cFaceI)
forAll(cFaces, cFacei)
{
affectedFace[cFaces[cFaceI]] = true;
affectedFace[cFaces[cFacei]] = true;
}
}
}
@ -174,9 +174,9 @@ Foam::boolList Foam::removeFaces::getFacesAffected
{
const labelList& eFaces = mesh_.edgeFaces(iter.key());
forAll(eFaces, eFaceI)
forAll(eFaces, eFacei)
{
affectedFace[eFaces[eFaceI]] = true;
affectedFace[eFaces[eFacei]] = true;
}
}
@ -187,9 +187,9 @@ Foam::boolList Foam::removeFaces::getFacesAffected
const labelList& pFaces = mesh_.pointFaces()[pointI];
forAll(pFaces, pFaceI)
forAll(pFaces, pFacei)
{
affectedFace[pFaces[pFaceI]] = true;
affectedFace[pFaces[pFacei]] = true;
}
}
return affectedFace;
@ -399,13 +399,13 @@ void Foam::removeFaces::mergeFaces
// Remove all but master face.
forAll(faceLabels, patchFaceI)
forAll(faceLabels, patchFacei)
{
if (patchFaceI != masterIndex)
if (patchFacei != masterIndex)
{
//Pout<< "Removing face " << faceLabels[patchFaceI] << endl;
//Pout<< "Removing face " << faceLabels[patchFacei] << endl;
meshMod.setAction(polyRemoveFace(faceLabels[patchFaceI], facei));
meshMod.setAction(polyRemoveFace(faceLabels[patchFacei], facei));
}
}
}
@ -1117,20 +1117,20 @@ void Foam::removeFaces::setRefinement
// Walk to fill faceRegion with faces that will be connected across
// edges that will be removed.
label startFaceI = 0;
label startFacei = 0;
while (true)
{
// Find unset region.
for (; startFaceI < mesh_.nFaces(); startFaceI++)
for (; startFacei < mesh_.nFaces(); startFacei++)
{
if (faceRegion[startFaceI] == -1 && !removedFace[startFaceI])
if (faceRegion[startFacei] == -1 && !removedFace[startFacei])
{
break;
}
}
if (startFaceI == mesh_.nFaces())
if (startFacei == mesh_.nFaces())
{
break;
}
@ -1143,9 +1143,9 @@ void Foam::removeFaces::setRefinement
cellRegion,
removedFace,
nFacesPerEdge,
startFaceI,
startFacei,
nRegions,
mesh_.faceEdges(startFaceI, fe),
mesh_.faceEdges(startFacei, fe),
faceRegion
);
@ -1156,7 +1156,7 @@ void Foam::removeFaces::setRefinement
else if (nRegion == 1)
{
// Reset face to be single region.
faceRegion[startFaceI] = -2;
faceRegion[startFacei] = -2;
}
else
{

View File

@ -461,16 +461,16 @@ void Foam::removePoints::updateMesh(const mapPolyMesh& map)
{
if (savedFaceLabels_[localI] >= 0)
{
label newFaceI = map.reverseFaceMap()[savedFaceLabels_[localI]];
label newFacei = map.reverseFaceMap()[savedFaceLabels_[localI]];
if (newFaceI == -1)
if (newFacei == -1)
{
FatalErrorInFunction
<< "Old face " << savedFaceLabels_[localI]
<< " seems to have dissapeared."
<< abort(FatalError);
}
savedFaceLabels_[localI] = newFaceI;
savedFaceLabels_[localI] = newFacei;
}
}
@ -651,13 +651,13 @@ void Foam::removePoints::getUnrefimentSet
// Populate with my local points-to-restore.
forAll(savedFaces_, saveI)
{
label bFaceI = savedFaceLabels_[saveI] - mesh_.nInternalFaces();
label bFacei = savedFaceLabels_[saveI] - mesh_.nInternalFaces();
if (bFaceI >= 0)
if (bFacei >= 0)
{
const face& savedFace = savedFaces_[saveI];
boolList& fRestore = faceVertexRestore[bFaceI];
boolList& fRestore = faceVertexRestore[bFacei];
fRestore.setSize(savedFace.size());
fRestore = false;
@ -693,11 +693,11 @@ void Foam::removePoints::getUnrefimentSet
forAll(savedFaces_, saveI)
{
label bFaceI = savedFaceLabels_[saveI] - mesh_.nInternalFaces();
label bFacei = savedFaceLabels_[saveI] - mesh_.nInternalFaces();
if (bFaceI >= 0)
if (bFacei >= 0)
{
const boolList& fRestore = faceVertexRestore[bFaceI];
const boolList& fRestore = faceVertexRestore[bFacei];
const face& savedFace = savedFaces_[saveI];

View File

@ -254,9 +254,9 @@ void Foam::tetDecomposer::setRefinement
EdgeMap<label> edgeToFace(8*cFaces.size());
forAll(cFaces, cFaceI)
forAll(cFaces, cFacei)
{
label facei = cFaces[cFaceI];
label facei = cFaces[cFacei];
const face& f = mesh_.faces()[facei];
// Get reference to either owner or neighbour
@ -271,7 +271,7 @@ void Foam::tetDecomposer::setRefinement
{
forAll(f, fp)
{
if (cFaceI == 0 && fp == 0)
if (cFacei == 0 && fp == 0)
{
// Reuse cell itself
added[fp] = celli;
@ -293,7 +293,7 @@ void Foam::tetDecomposer::setRefinement
{
for (label triI = 0; triI < f.size()-2; triI++)
{
if (cFaceI == 0 && triI == 0)
if (cFacei == 0 && triI == 0)
{
// Reuse cell itself
added[triI] = celli;
@ -560,9 +560,9 @@ void Foam::tetDecomposer::setRefinement
edgeToFace.clear();
forAll(cFaces, cFaceI)
forAll(cFaces, cFacei)
{
label facei = cFaces[cFaceI];
label facei = cFaces[cFacei];
label zoneI = mesh_.faceZones().whichZone(facei);
bool zoneFlip = false;
@ -588,12 +588,12 @@ void Foam::tetDecomposer::setRefinement
else
{
// Found the other face on the edge.
label otherFaceI = edgeFnd();
const face& otherF = mesh_.faces()[otherFaceI];
label otherFacei = edgeFnd();
const face& otherF = mesh_.faces()[otherFacei];
// Found the other face on the edge. Note that since
// we are looping in the same order the tets added for
// otherFaceI will be before those of facei
// otherFacei will be before those of facei
label otherFp = findIndex(otherF, p0);
if (otherF.nextLabel(otherFp) == p1)
@ -639,14 +639,14 @@ void Foam::tetDecomposer::setRefinement
thisTet = faceNeighbourCells_[facei][fp];
}
if (mesh_.faceOwner()[otherFaceI] == celli)
if (mesh_.faceOwner()[otherFacei] == celli)
{
otherTet = faceOwnerCells_[otherFaceI][otherFp];
otherTet = faceOwnerCells_[otherFacei][otherFp];
}
else
{
otherTet =
faceNeighbourCells_[otherFaceI][otherFp];
faceNeighbourCells_[otherFacei][otherFp];
}
}
else
@ -661,15 +661,15 @@ void Foam::tetDecomposer::setRefinement
thisTet = faceNeighbourCells_[facei][thisTriI];
}
label otherTriI = triIndex(otherFaceI, otherFp);
if (mesh_.faceOwner()[otherFaceI] == celli)
label otherTriI = triIndex(otherFacei, otherFp);
if (mesh_.faceOwner()[otherFacei] == celli)
{
otherTet = faceOwnerCells_[otherFaceI][otherTriI];
otherTet = faceOwnerCells_[otherFacei][otherTriI];
}
else
{
otherTet =
faceNeighbourCells_[otherFaceI][otherTriI];
faceNeighbourCells_[otherFacei][otherTriI];
}
}

View File

@ -267,11 +267,11 @@ void Foam::slidingInterface::renumberAttachedAddressing
forAll(mfc, facei)
{
label newCellI = reverseCellMap[mfc[mfzRenumber[facei]]];
label newCelli = reverseCellMap[mfc[mfzRenumber[facei]]];
if (newCellI >= 0)
if (newCelli >= 0)
{
newMfc[facei] = newCellI;
newMfc[facei] = newCelli;
}
}
@ -284,11 +284,11 @@ void Foam::slidingInterface::renumberAttachedAddressing
forAll(sfc, facei)
{
label newCellI = reverseCellMap[sfc[sfzRenumber[facei]]];
label newCelli = reverseCellMap[sfc[sfzRenumber[facei]]];
if (newCellI >= 0)
if (newCelli >= 0)
{
newSfc[facei] = newCellI;
newSfc[facei] = newCelli;
}
}
@ -317,11 +317,11 @@ void Foam::slidingInterface::renumberAttachedAddressing
forAll(msof, facei)
{
label newFaceI = reverseFaceMap[msof[facei]];
label newFacei = reverseFaceMap[msof[facei]];
if (newFaceI >= 0)
if (newFacei >= 0)
{
newMsof[facei] = newFaceI;
newMsof[facei] = newFacei;
}
}
// Pout<< "newMsof: " << newMsof << endl;
@ -333,11 +333,11 @@ void Foam::slidingInterface::renumberAttachedAddressing
forAll(ssof, facei)
{
label newFaceI = reverseFaceMap[ssof[facei]];
label newFacei = reverseFaceMap[ssof[facei]];
if (newFaceI >= 0)
if (newFacei >= 0)
{
newSsof[facei] = newFaceI;
newSsof[facei] = newFacei;
}
}
// Pout<< "newSsof: " << newSsof << endl;