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

@ -118,16 +118,16 @@ void Foam::blockMesh::createCells() const
{
const labelListList& blockCells = blocks[blockI].cells();
forAll(blockCells, blockCellI)
forAll(blockCells, blockCelli)
{
labelList cellPoints(blockCells[blockCellI].size());
labelList cellPoints(blockCells[blockCelli].size());
forAll(cellPoints, cellPointI)
{
cellPoints[cellPointI] =
mergeList_
[
blockCells[blockCellI][cellPointI]
blockCells[blockCelli][cellPointI]
+ blockOffsets_[blockI]
];
}

View File

@ -107,11 +107,11 @@ Foam::medialAxisMeshMover::getPatch
{
const polyPatch& pp = patches[patchIDs[i]];
label meshFaceI = pp.start();
label meshFacei = pp.start();
forAll(pp, i)
{
addressing[nFaces++] = meshFaceI++;
addressing[nFaces++] = meshFacei++;
}
}

View File

@ -149,15 +149,15 @@ void Foam::meshRefinement::calcNeighbourData
const vectorField::subField faceCentres = pp.faceCentres();
const vectorField::subField faceAreas = pp.faceAreas();
label bFaceI = pp.start()-mesh_.nInternalFaces();
label bFacei = pp.start()-mesh_.nInternalFaces();
if (pp.coupled())
{
forAll(faceCells, i)
{
neiLevel[bFaceI] = cellLevel[faceCells[i]];
neiCc[bFaceI] = cellCentres[faceCells[i]];
bFaceI++;
neiLevel[bFacei] = cellLevel[faceCells[i]];
neiCc[bFacei] = cellCentres[faceCells[i]];
bFacei++;
}
}
else if (addedPatchIDSet.found(patchi))
@ -184,19 +184,19 @@ void Foam::meshRefinement::calcNeighbourData
// Other cell more refined. Adjust normal distance
d *= 0.5;
}
neiLevel[bFaceI] = faceLevel;
neiLevel[bFacei] = faceLevel;
// Calculate other cell centre by extrapolation
neiCc[bFaceI] = faceCentres[i] + d*fn;
bFaceI++;
neiCc[bFacei] = faceCentres[i] + d*fn;
bFacei++;
}
}
else
{
forAll(faceCells, i)
{
neiLevel[bFaceI] = cellLevel[faceCells[i]];
neiCc[bFaceI] = faceCentres[i];
bFaceI++;
neiLevel[bFacei] = cellLevel[faceCells[i]];
neiCc[bFacei] = faceCentres[i];
bFacei++;
}
}
}
@ -799,8 +799,8 @@ Pout<< "face:" << facei << " verts:" << f
newSplitFaces.setSize(2*sz);
forAll(map().faceMap(), facei)
{
label oldFaceI = map().faceMap()[facei];
if (oldToNew[oldFaceI] != facei)
label oldFacei = map().faceMap()[facei];
if (oldToNew[oldFacei] != facei)
{
// Added face
newSplitFaces[sz++] = facei;
@ -842,7 +842,7 @@ Pout<< "face:" << facei << " verts:" << f
// // this face then through another.
//
// label celli = mesh_.faceOwner()[facei];
// label globalCellI = globalCells.toGlobal(celli);
// label globalCelli = globalCells.toGlobal(celli);
//
// Map<label>::iterator iter =
// regionToMaster.find(globalRegion[celli]);
@ -850,14 +850,14 @@ Pout<< "face:" << facei << " verts:" << f
// if (iter != regionToMaster.end())
// {
// label master = iter();
// iter() = min(master, globalCellI);
// iter() = min(master, globalCelli);
// }
// else
// {
// regionToMaster.insert
// (
// globalRegion[celli],
// globalCellI
// globalCelli
// );
// }
// }
@ -1016,13 +1016,13 @@ Pout<< "face:" << facei << " verts:" << f
// // Transfer lists.
// PtrList<HashSet<edge, Hash<edge>>> regionConnectivity
// (Pstream::nProcs());
// forAll(regionConnectivity, procI)
// forAll(regionConnectivity, proci)
// {
// if (procI != Pstream::myProcNo())
// if (proci != Pstream::myProcNo())
// {
// regionConnectivity.set
// (
// procI,
// proci,
// new HashSet<edge, Hash<edge>>
// (
// coupledRegionToShifted.size()
@ -1097,34 +1097,34 @@ Pout<< "face:" << facei << " verts:" << f
//
//
// // Send
// forAll(regionConnectivity, procI)
// forAll(regionConnectivity, proci)
// {
// if (procI != Pstream::myProcNo())
// if (proci != Pstream::myProcNo())
// {
// OPstream str(Pstream::blocking, procI);
// str << regionConnectivity[procI];
// OPstream str(Pstream::blocking, proci);
// str << regionConnectivity[proci];
// }
// }
// // Receive
// forAll(regionConnectivity, procI)
// forAll(regionConnectivity, proci)
// {
// if (procI != Pstream::myProcNo())
// if (proci != Pstream::myProcNo())
// {
// IPstream str(Pstream::blocking, procI);
// str >> regionConnectivity[procI];
// IPstream str(Pstream::blocking, proci);
// str >> regionConnectivity[proci];
// }
// }
//
// // Add to addressing.
// forAll(regionConnectivity, procI)
// forAll(regionConnectivity, proci)
// {
// if (procI != Pstream::myProcNo())
// if (proci != Pstream::myProcNo())
// {
// for
// (
// HashSet<edge, Hash<edge>>::const_iterator iter =
// regionConnectivity[procI].begin();
// iter != regionConnectivity[procI].end();
// regionConnectivity[proci].begin();
// iter != regionConnectivity[proci].end();
// ++iter
// )
// {
@ -1147,7 +1147,7 @@ Pout<< "face:" << facei << " verts:" << f
// if (!someLocal)
// {
// FatalErrorInFunction
// << "Received from processor " << procI
// << "Received from processor " << proci
// << " connection " << e
// << " where none of the elements is local to me."
// << abort(FatalError);
@ -1571,9 +1571,9 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> Foam::meshRefinement::balance
// Pstream::listCombineScatter(nProcCells);
//
// Info<< "Calculated decomposition:" << endl;
// forAll(nProcCells, procI)
// forAll(nProcCells, proci)
// {
// Info<< " " << procI << '\t' << nProcCells[procI]
// Info<< " " << proci << '\t' << nProcCells[proci]
// << endl;
// }
// Info<< endl;
@ -1627,9 +1627,9 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> Foam::meshRefinement::balance
Pstream::listCombineScatter(nProcCells);
Pout<< "Wanted resulting decomposition:" << endl;
forAll(nProcCells, procI)
forAll(nProcCells, proci)
{
Pout<< " " << procI << '\t' << nProcCells[procI] << endl;
Pout<< " " << proci << '\t' << nProcCells[proci] << endl;
}
Pout<< endl;
}
@ -1769,11 +1769,11 @@ Foam::autoPtr<Foam::indirectPrimitivePatch> Foam::meshRefinement::makePatch
{
const polyPatch& pp = patches[patchIDs[i]];
label meshFaceI = pp.start();
label meshFacei = pp.start();
forAll(pp, i)
{
addressing[nFaces++] = meshFaceI++;
addressing[nFaces++] = meshFacei++;
}
}
@ -1859,16 +1859,16 @@ void Foam::meshRefinement::checkCoupledFaceZones(const polyMesh& mesh)
Pstream::gatherList(zoneNames);
Pstream::scatterList(zoneNames);
// All have same data now. Check.
forAll(zoneNames, procI)
forAll(zoneNames, proci)
{
if (procI != Pstream::myProcNo())
if (proci != Pstream::myProcNo())
{
if (zoneNames[procI] != zoneNames[Pstream::myProcNo()])
if (zoneNames[proci] != zoneNames[Pstream::myProcNo()])
{
FatalErrorInFunction
<< "faceZones are not synchronised on processors." << nl
<< "Processor " << procI << " has faceZones "
<< zoneNames[procI] << nl
<< "Processor " << proci << " has faceZones "
<< zoneNames[proci] << nl
<< "Processor " << Pstream::myProcNo()
<< " has faceZones "
<< zoneNames[Pstream::myProcNo()] << nl
@ -1888,15 +1888,15 @@ void Foam::meshRefinement::checkCoupledFaceZones(const polyMesh& mesh)
forAll(fZone, i)
{
label bFaceI = fZone[i]-mesh.nInternalFaces();
label bFacei = fZone[i]-mesh.nInternalFaces();
if (bFaceI >= 0)
if (bFacei >= 0)
{
if (faceToZone[bFaceI] == -1)
if (faceToZone[bFacei] == -1)
{
faceToZone[bFaceI] = zoneI;
faceToZone[bFacei] = zoneI;
}
else if (faceToZone[bFaceI] == zoneI)
else if (faceToZone[bFacei] == zoneI)
{
FatalErrorInFunction
<< "Face " << fZone[i] << " in zone "
@ -1910,7 +1910,7 @@ void Foam::meshRefinement::checkCoupledFaceZones(const polyMesh& mesh)
<< "Face " << fZone[i] << " in zone "
<< fZone.name()
<< " is also in zone "
<< fZones[faceToZone[bFaceI]].name()
<< fZones[faceToZone[bFacei]].name()
<< abort(FatalError);
}
}
@ -1993,7 +1993,7 @@ void Foam::meshRefinement::calculateEdgeWeights
Foam::label Foam::meshRefinement::appendPatch
(
fvMesh& mesh,
const label insertPatchI,
const label insertPatchi,
const word& patchName,
const dictionary& patchDict
)
@ -2016,7 +2016,7 @@ Foam::label Foam::meshRefinement::appendPatch
(
patchName,
patchDict,
insertPatchI,
insertPatchi,
polyPatches
)
);
@ -2108,8 +2108,8 @@ Foam::label Foam::meshRefinement::addPatch
}
label insertPatchI = polyPatches.size();
label startFaceI = mesh.nFaces();
label insertPatchi = polyPatches.size();
label startFacei = mesh.nFaces();
forAll(polyPatches, patchi)
{
@ -2117,36 +2117,36 @@ Foam::label Foam::meshRefinement::addPatch
if (isA<processorPolyPatch>(pp))
{
insertPatchI = patchi;
startFaceI = pp.start();
insertPatchi = patchi;
startFacei = pp.start();
break;
}
}
dictionary patchDict(patchInfo);
patchDict.set("nFaces", 0);
patchDict.set("startFace", startFaceI);
patchDict.set("startFace", startFacei);
// Below is all quite a hack. Feel free to change once there is a better
// mechanism to insert and reorder patches.
label addedPatchI = appendPatch(mesh, insertPatchI, patchName, patchDict);
label addedPatchi = appendPatch(mesh, insertPatchi, patchName, patchDict);
// Create reordering list
// patches before insert position stay as is
labelList oldToNew(addedPatchI+1);
for (label i = 0; i < insertPatchI; i++)
labelList oldToNew(addedPatchi+1);
for (label i = 0; i < insertPatchi; i++)
{
oldToNew[i] = i;
}
// patches after insert position move one up
for (label i = insertPatchI; i < addedPatchI; i++)
for (label i = insertPatchi; i < addedPatchi; i++)
{
oldToNew[i] = i+1;
}
// appended patch gets moved to insert position
oldToNew[addedPatchI] = insertPatchI;
oldToNew[addedPatchi] = insertPatchi;
// Shuffle into place
polyPatches.reorder(oldToNew, true);
@ -2163,7 +2163,7 @@ Foam::label Foam::meshRefinement::addPatch
reorderPatchFields<surfaceSymmTensorField>(mesh, oldToNew);
reorderPatchFields<surfaceTensorField>(mesh, oldToNew);
return insertPatchI;
return insertPatchi;
}
@ -2524,11 +2524,11 @@ void Foam::meshRefinement::updateMesh
forAll(newFaceData, facei)
{
label oldFaceI = map.faceMap()[facei];
label oldFacei = map.faceMap()[facei];
if (oldFaceI >= 0 && map.reverseFaceMap()[oldFaceI] == facei)
if (oldFacei >= 0 && map.reverseFaceMap()[oldFacei] == facei)
{
newFaceData[facei] = data[oldFaceI];
newFaceData[facei] = data[oldFacei];
}
}
data.transfer(newFaceData);
@ -2544,14 +2544,14 @@ void Foam::meshRefinement::updateMesh
forAll(map.faceMap(), facei)
{
label oldFaceI = map.faceMap()[facei];
label oldFacei = map.faceMap()[facei];
if (oldFaceI >= 0)
if (oldFacei >= 0)
{
if (reverseFaceMap[oldFaceI] != facei)
if (reverseFaceMap[oldFacei] != facei)
{
// facei is slave face. Mark old face.
reverseFaceMap[oldFaceI] = -1;
reverseFaceMap[oldFacei] = -1;
}
}
}
@ -2560,13 +2560,13 @@ void Foam::meshRefinement::updateMesh
labelList newFaceData(map.faceMap().size(), -1);
forAll(newFaceData, facei)
{
label oldFaceI = map.faceMap()[facei];
label oldFacei = map.faceMap()[facei];
if (oldFaceI >= 0)
if (oldFacei >= 0)
{
if (reverseFaceMap[oldFaceI] == facei)
if (reverseFaceMap[oldFacei] == facei)
{
newFaceData[facei] = data[oldFaceI];
newFaceData[facei] = data[oldFacei];
}
}
}

View File

@ -237,7 +237,7 @@ private:
autoPtr<mapPolyMesh> removeInsideCells
(
const string& msg,
const label exposedPatchI
const label exposedPatchi
);
@ -901,7 +901,7 @@ public:
static label appendPatch
(
fvMesh&,
const label insertPatchI,
const label insertPatchi,
const word&,
const dictionary&
);

View File

@ -86,7 +86,7 @@ Foam::label Foam::meshRefinement::createBaffle
);
label dupFaceI = -1;
label dupFacei = -1;
if (mesh_.isInternalFace(facei))
{
@ -104,7 +104,7 @@ Foam::label Foam::meshRefinement::createBaffle
reverseFlip = !zoneFlip;
}
dupFaceI = meshMod.setAction
dupFacei = meshMod.setAction
(
polyAddFace
(
@ -121,7 +121,7 @@ Foam::label Foam::meshRefinement::createBaffle
)
);
}
return dupFaceI;
return dupFacei;
}
@ -441,11 +441,11 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::createBaffles
const labelList& faceMap = map().faceMap();
// Pick up owner side of baffle
forAll(ownPatch, oldFaceI)
forAll(ownPatch, oldFacei)
{
label facei = reverseFaceMap[oldFaceI];
label facei = reverseFaceMap[oldFacei];
if (ownPatch[oldFaceI] != -1 && facei >= 0)
if (ownPatch[oldFacei] != -1 && facei >= 0)
{
const cell& ownFaces = mesh_.cells()[mesh_.faceOwner()[facei]];
@ -458,9 +458,9 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::createBaffles
// Pick up neighbour side of baffle (added faces)
forAll(faceMap, facei)
{
label oldFaceI = faceMap[facei];
label oldFacei = faceMap[facei];
if (oldFaceI >= 0 && reverseFaceMap[oldFaceI] != facei)
if (oldFacei >= 0 && reverseFaceMap[oldFacei] != facei)
{
const cell& ownFaces = mesh_.cells()[mesh_.faceOwner()[facei]];
@ -567,20 +567,20 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::createZoneBaffles
forAll(faceMap, facei)
{
label oldFaceI = faceMap[facei];
label oldFacei = faceMap[facei];
// Does face originate from face-to-patch
Map<labelPair>::const_iterator iter = faceToPatch.find
(
oldFaceI
oldFacei
);
if (iter != faceToPatch.end())
{
label masterFaceI = reverseFaceMap[oldFaceI];
if (facei != masterFaceI)
label masterFacei = reverseFaceMap[oldFacei];
if (facei != masterFacei)
{
baffles[baffleI++] = labelPair(masterFaceI, facei);
baffles[baffleI++] = labelPair(masterFacei, facei);
}
}
}
@ -1837,9 +1837,9 @@ void Foam::meshRefinement::calcPatchNumMasterFaces
forAll(patch.addressing(), facei)
{
const label meshFaceI = patch.addressing()[facei];
const label meshFacei = patch.addressing()[facei];
if (isMasterFace[meshFaceI])
if (isMasterFace[meshFacei])
{
const labelList& fEdges = patch.faceEdges()[facei];
forAll(fEdges, fEdgeI)
@ -1928,23 +1928,23 @@ Foam::label Foam::meshRefinement::markPatchZones
break;
}
label procI = globalFaces.whichProcID(globalSeed);
label seedFaceI = globalFaces.toLocal(procI, globalSeed);
label proci = globalFaces.whichProcID(globalSeed);
label seedFacei = globalFaces.toLocal(proci, globalSeed);
//Info<< "Seeding zone " << currentZoneI
// << " from processor " << procI << " face " << seedFaceI
// << " from processor " << proci << " face " << seedFacei
// << endl;
if (procI == Pstream::myProcNo())
if (proci == Pstream::myProcNo())
{
patchEdgeFaceRegion& faceInfo = allFaceInfo[seedFaceI];
patchEdgeFaceRegion& faceInfo = allFaceInfo[seedFacei];
// Set face
faceInfo = currentZoneI;
// .. and seed its edges
const labelList& fEdges = patch.faceEdges()[seedFaceI];
const labelList& fEdges = patch.faceEdges()[seedFacei];
forAll(fEdges, fEdgeI)
{
label edgeI = fEdges[fEdgeI];
@ -1958,7 +1958,7 @@ Foam::label Foam::meshRefinement::markPatchZones
mesh_,
patch,
edgeI,
seedFaceI,
seedFacei,
faceInfo,
tol,
dummyTrackData
@ -2039,14 +2039,14 @@ void Foam::meshRefinement::consistentOrientation
forAll(patch.addressing(), facei)
{
const label meshFaceI = patch.addressing()[facei];
const label patchi = bm.whichPatch(meshFaceI);
const label meshFacei = patch.addressing()[facei];
const label patchi = bm.whichPatch(meshFacei);
if
(
patchi != -1
&& bm[patchi].coupled()
&& !isMasterFace[meshFaceI]
&& !isMasterFace[meshFacei]
)
{
// Slave side. Mark so doesn't get visited.
@ -2110,28 +2110,28 @@ void Foam::meshRefinement::consistentOrientation
break;
}
label procI = globalFaces.whichProcID(globalSeed);
label seedFaceI = globalFaces.toLocal(procI, globalSeed);
label proci = globalFaces.whichProcID(globalSeed);
label seedFacei = globalFaces.toLocal(proci, globalSeed);
//Info<< "Seeding from processor " << procI << " face " << seedFaceI
//Info<< "Seeding from processor " << proci << " face " << seedFacei
// << endl;
if (procI == Pstream::myProcNo())
if (proci == Pstream::myProcNo())
{
// Determine orientation of seedFace
patchFaceOrientation& faceInfo = allFaceInfo[seedFaceI];
patchFaceOrientation& faceInfo = allFaceInfo[seedFacei];
// Start off with correct orientation
faceInfo = orientedSurface::NOFLIP;
if (zoneToOrientation[faceToZone[seedFaceI]] < 0)
if (zoneToOrientation[faceToZone[seedFacei]] < 0)
{
faceInfo.flip();
}
const labelList& fEdges = patch.faceEdges()[seedFaceI];
const labelList& fEdges = patch.faceEdges()[seedFacei];
forAll(fEdges, fEdgeI)
{
label edgeI = fEdges[fEdgeI];
@ -2145,7 +2145,7 @@ void Foam::meshRefinement::consistentOrientation
mesh_,
patch,
edgeI,
seedFaceI,
seedFacei,
faceInfo,
tol,
dummyTrackData
@ -2194,10 +2194,10 @@ void Foam::meshRefinement::consistentOrientation
forAll(patch.addressing(), i)
{
const label meshFaceI = patch.addressing()[i];
if (!mesh_.isInternalFace(meshFaceI))
const label meshFacei = patch.addressing()[i];
if (!mesh_.isInternalFace(meshFacei))
{
neiStatus[meshFaceI-mesh_.nInternalFaces()] =
neiStatus[meshFacei-mesh_.nInternalFaces()] =
allFaceInfo[i].flipStatus();
}
}
@ -2205,31 +2205,31 @@ void Foam::meshRefinement::consistentOrientation
forAll(patch.addressing(), i)
{
const label meshFaceI = patch.addressing()[i];
const label patchi = bm.whichPatch(meshFaceI);
const label meshFacei = patch.addressing()[i];
const label patchi = bm.whichPatch(meshFacei);
if
(
patchi != -1
&& bm[patchi].coupled()
&& !isMasterFace[meshFaceI]
&& !isMasterFace[meshFacei]
)
{
// Slave side. Take flipped from neighbour
label bFaceI = meshFaceI-mesh_.nInternalFaces();
label bFacei = meshFacei-mesh_.nInternalFaces();
if (neiStatus[bFaceI] == orientedSurface::NOFLIP)
if (neiStatus[bFacei] == orientedSurface::NOFLIP)
{
allFaceInfo[i] = orientedSurface::FLIP;
}
else if (neiStatus[bFaceI] == orientedSurface::FLIP)
else if (neiStatus[bFacei] == orientedSurface::FLIP)
{
allFaceInfo[i] = orientedSurface::NOFLIP;
}
else
{
FatalErrorInFunction
<< "Incorrect status for face " << meshFaceI
<< "Incorrect status for face " << meshFacei
<< abort(FatalError);
}
}
@ -2244,21 +2244,21 @@ void Foam::meshRefinement::consistentOrientation
forAll(allFaceInfo, facei)
{
label meshFaceI = patch.addressing()[facei];
label meshFacei = patch.addressing()[facei];
if (allFaceInfo[facei] == orientedSurface::NOFLIP)
{
meshFlipMap[meshFaceI] = false;
meshFlipMap[meshFacei] = false;
}
else if (allFaceInfo[facei] == orientedSurface::FLIP)
{
meshFlipMap[meshFaceI] = true;
meshFlipMap[meshFacei] = true;
}
else
{
FatalErrorInFunction
<< "Problem : unvisited face " << facei
<< " centre:" << mesh_.faceCentres()[meshFaceI]
<< " centre:" << mesh_.faceCentres()[meshFacei]
<< abort(FatalError);
}
}
@ -2564,14 +2564,14 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::splitMesh
}
else if (ownRegion != keepRegionI && neiRegion == keepRegionI)
{
label newPatchI = neiPatch[facei];
if (newPatchI == -1)
label newPatchi = neiPatch[facei];
if (newPatchi == -1)
{
newPatchI = max(defaultPatch, ownPatch[facei]);
newPatchi = max(defaultPatch, ownPatch[facei]);
}
forAll(f, fp)
{
pointBaffle[f[fp]] = newPatchI;
pointBaffle[f[fp]] = newPatchi;
}
}
}
@ -2615,9 +2615,9 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::splitMesh
{
const labelList& pFaces = pointFaces[pointI];
forAll(pFaces, pFaceI)
forAll(pFaces, pFacei)
{
label facei = pFaces[pFaceI];
label facei = pFaces[pFacei];
if (ownPatch[facei] == -1)
{
@ -3128,10 +3128,10 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::zonify
if (!pp.coupled())
{
label bFaceI = pp.start()-mesh_.nInternalFaces();
label bFacei = pp.start()-mesh_.nInternalFaces();
forAll(pp, i)
{
neiCellZone[bFaceI++] = -1;
neiCellZone[bFacei++] = -1;
}
}
}
@ -3222,15 +3222,15 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::zonify
// flipMap into account)
forAll(patch.addressing(), facei)
{
label meshFaceI = patch.addressing()[facei];
label meshFacei = patch.addressing()[facei];
if (isMasterFace[meshFaceI])
if (isMasterFace[meshFacei])
{
label n = 1;
if
(
bool(posOrientation[meshFaceI])
== meshFlipMap[meshFaceI]
bool(posOrientation[meshFacei])
== meshFlipMap[meshFacei]
)
{
n = -1;

View File

@ -477,11 +477,11 @@ Foam::label Foam::meshRefinement::mergePatchFacesUndo
forAll(allFaceSets, setI)
{
label masterFaceI = faceCombiner.masterFace()[setI];
label masterFacei = faceCombiner.masterFace()[setI];
if (masterFaceI != -1)
if (masterFacei != -1)
{
label masterCellII = mesh_.faceOwner()[masterFaceI];
label masterCellII = mesh_.faceOwner()[masterFacei];
const cell& cFaces = mesh_.cells()[masterCellII];
@ -489,7 +489,7 @@ Foam::label Foam::meshRefinement::mergePatchFacesUndo
{
if (errorFaces.found(cFaces[i]))
{
mastersToRestore.append(masterFaceI);
mastersToRestore.append(masterFacei);
break;
}
}
@ -800,9 +800,9 @@ Foam::labelList Foam::meshRefinement::growFaceCellFace
label own = mesh_.faceOwner()[facei];
const cell& ownFaces = mesh_.cells()[own];
forAll(ownFaces, ownFaceI)
forAll(ownFaces, ownFacei)
{
selected[ownFaces[ownFaceI]] = true;
selected[ownFaces[ownFacei]] = true;
}
if (mesh_.isInternalFace(facei))
@ -810,9 +810,9 @@ Foam::labelList Foam::meshRefinement::growFaceCellFace
label nbr = mesh_.faceNeighbour()[facei];
const cell& nbrFaces = mesh_.cells()[nbr];
forAll(nbrFaces, nbrFaceI)
forAll(nbrFaces, nbrFacei)
{
selected[nbrFaces[nbrFaceI]] = true;
selected[nbrFaces[nbrFacei]] = true;
}
}
}

View File

@ -759,9 +759,9 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCells
// Count boundary faces.
label nBfaces = 0;
forAll(cFaces, cFaceI)
forAll(cFaces, cFacei)
{
if (isBoundaryFace[cFaces[cFaceI]])
if (isBoundaryFace[cFaces[cFacei]])
{
nBfaces++;
}

View File

@ -351,7 +351,7 @@ void Foam::meshRefinement::markFeatureCellLevel
const point& keepPoint = keepPoints[i];
label celli = -1;
label tetFaceI = -1;
label tetFacei = -1;
label tetPtI = -1;
@ -360,7 +360,7 @@ void Foam::meshRefinement::markFeatureCellLevel
(void)mesh_.cellTree();
if (mesh_.nCells())
{
mesh_.findCellFacePt(keepPoint, celli, tetFaceI, tetPtI);
mesh_.findCellFacePt(keepPoint, celli, tetFacei, tetPtI);
}
if (celli != -1)
@ -405,7 +405,7 @@ void Foam::meshRefinement::markFeatureCellLevel
mesh_,
keepPoint,
celli,
tetFaceI,
tetFacei,
tetPtI,
featureMesh.points()[pointI], // endpos
featureLevel, // level
@ -450,7 +450,7 @@ void Foam::meshRefinement::markFeatureCellLevel
mesh_,
keepPoint,
celli,
tetFaceI,
tetFacei,
tetPtI,
featureMesh.points()[pointI], // endpos
featureLevel, // level
@ -957,11 +957,11 @@ Foam::label Foam::meshRefinement::markSurfaceRefinement
}
else
{
label bFaceI = facei - mesh_.nInternalFaces();
label bFacei = facei - mesh_.nInternalFaces();
start[i] = cellCentres[own];
end[i] = neiCc[bFaceI];
minLevel[i] = min(cellLevel[own], neiLevel[bFaceI]);
end[i] = neiCc[bFacei];
minLevel[i] = min(cellLevel[own], neiLevel[bFacei]);
}
}
@ -1145,17 +1145,17 @@ Foam::label Foam::meshRefinement::markSurfaceCurvatureRefinement
}
else
{
label bFaceI = facei - mesh_.nInternalFaces();
label bFacei = facei - mesh_.nInternalFaces();
start[i] = cellCentres[own];
end[i] = neiCc[bFaceI];
end[i] = neiCc[bFacei];
if (!isMasterFace[facei])
{
Swap(start[i], end[i]);
}
minLevel[i] = min(cellLevel[own], neiLevel[bFaceI]);
minLevel[i] = min(cellLevel[own], neiLevel[bFacei]);
}
}
@ -1436,11 +1436,11 @@ Foam::label Foam::meshRefinement::markSurfaceCurvatureRefinement
)
{
label own = mesh_.faceOwner()[facei];
label bFaceI = facei - mesh_.nInternalFaces();
label bFacei = facei - mesh_.nInternalFaces();
const vectorList& ownNormals = cellSurfNormals[own];
const labelList& ownLevels = cellSurfLevels[own];
const vectorList& neiNormals = neiSurfaceNormals[bFaceI];
const vectorList& neiNormals = neiSurfaceNormals[bFacei];
// Special case: owner normals set is a subset of the neighbour
// normals. Do not do curvature refinement since other cell's normals
@ -1754,11 +1754,11 @@ Foam::label Foam::meshRefinement::markProximityRefinement
}
else
{
label bFaceI = facei - mesh_.nInternalFaces();
label bFacei = facei - mesh_.nInternalFaces();
start[i] = cellCentres[own];
end[i] = neiCc[bFaceI];
minLevel[i] = min(cellLevel[own], neiLevel[bFaceI]);
end[i] = neiCc[bFacei];
minLevel[i] = min(cellLevel[own], neiLevel[bFacei]);
}
}
@ -1886,12 +1886,12 @@ Foam::label Foam::meshRefinement::markProximityRefinement
for (label facei = mesh_.nInternalFaces(); facei < mesh_.nFaces(); facei++)
{
label bFaceI = facei-mesh_.nInternalFaces();
label bFacei = facei-mesh_.nInternalFaces();
label own = mesh_.faceOwner()[facei];
neiBndMaxLevel[bFaceI] = cellMaxLevel[own];
neiBndMaxLocation[bFaceI] = cellMaxLocation[own];
neiBndMaxNormal[bFaceI] = cellMaxNormal[own];
neiBndMaxLevel[bFacei] = cellMaxLevel[own];
neiBndMaxLocation[bFacei] = cellMaxLocation[own];
neiBndMaxNormal[bFacei] = cellMaxNormal[own];
}
syncTools::swapBoundaryFaceList(mesh_, neiBndMaxLevel);
syncTools::swapBoundaryFaceList(mesh_, neiBndMaxLocation);
@ -1973,9 +1973,9 @@ Foam::label Foam::meshRefinement::markProximityRefinement
for (label facei = mesh_.nInternalFaces(); facei < mesh_.nFaces(); facei++)
{
label own = mesh_.faceOwner()[facei];
label bFaceI = facei - mesh_.nInternalFaces();
label bFacei = facei - mesh_.nInternalFaces();
if (cellLevel[own] < cellMaxLevel[own] && neiBndMaxLevel[bFaceI] != -1)
if (cellLevel[own] < cellMaxLevel[own] && neiBndMaxLevel[bFacei] != -1)
{
// Have valid data on both sides. Check planarCos.
if
@ -1985,8 +1985,8 @@ Foam::label Foam::meshRefinement::markProximityRefinement
planarCos,
cellMaxLocation[own],
cellMaxNormal[own],
neiBndMaxLocation[bFaceI],
neiBndMaxNormal[bFaceI]
neiBndMaxLocation[bFacei],
neiBndMaxNormal[bFacei]
)
)
{
@ -2393,10 +2393,10 @@ Foam::meshRefinement::balanceAndRefine
// globalIndex globalCells(mesh_.nCells());
//
// Info<< "** Distribution before balancing/refining:" << endl;
// for (label procI = 0; procI < Pstream::nProcs(); procI++)
// for (label proci = 0; proci < Pstream::nProcs(); proci++)
// {
// Info<< " " << procI << '\t'
// << globalCells.localSize(procI) << endl;
// Info<< " " << proci << '\t'
// << globalCells.localSize(proci) << endl;
// }
// Info<< endl;
//}
@ -2404,10 +2404,10 @@ Foam::meshRefinement::balanceAndRefine
// globalIndex globalCells(cellsToRefine.size());
//
// Info<< "** Cells to be refined:" << endl;
// for (label procI = 0; procI < Pstream::nProcs(); procI++)
// for (label proci = 0; proci < Pstream::nProcs(); proci++)
// {
// Info<< " " << procI << '\t'
// << globalCells.localSize(procI) << endl;
// Info<< " " << proci << '\t'
// << globalCells.localSize(proci) << endl;
// }
// Info<< endl;
//}
@ -2466,10 +2466,10 @@ Foam::meshRefinement::balanceAndRefine
// globalIndex globalCells(mesh_.nCells());
//
// Info<< "** Distribution after balancing:" << endl;
// for (label procI = 0; procI < Pstream::nProcs(); procI++)
// for (label proci = 0; proci < Pstream::nProcs(); proci++)
// {
// Info<< " " << procI << '\t'
// << globalCells.localSize(procI) << endl;
// Info<< " " << proci << '\t'
// << globalCells.localSize(proci) << endl;
// }
// Info<< endl;
//}
@ -2524,10 +2524,10 @@ Foam::meshRefinement::balanceAndRefine
// globalIndex globalCells(mesh_.nCells());
//
// Info<< "** After refinement distribution:" << endl;
// for (label procI = 0; procI < Pstream::nProcs(); procI++)
// for (label proci = 0; proci < Pstream::nProcs(); proci++)
// {
// Info<< " " << procI << '\t'
// << globalCells.localSize(procI) << endl;
// Info<< " " << proci << '\t'
// << globalCells.localSize(proci) << endl;
// }
// Info<< endl;
//}

View File

@ -123,12 +123,12 @@ void Foam::meshRefinement::testSyncBoundaryFaceList
{
const polyPatch& pp = patches[patchi];
label bFaceI = pp.start() - mesh_.nInternalFaces();
label bFacei = pp.start() - mesh_.nInternalFaces();
forAll(pp, i)
{
const T& data = faceData[bFaceI];
const T& syncData = syncedFaceData[bFaceI];
const T& data = faceData[bFacei];
const T& syncData = syncedFaceData[bFacei];
if (mag(data - syncData) > tol)
{
@ -146,7 +146,7 @@ void Foam::meshRefinement::testSyncBoundaryFaceList
<< abort(FatalError);
}
bFaceI++;
bFacei++;
}
}
}

View File

@ -387,15 +387,15 @@ Foam::labelList Foam::surfaceZonesInfo::addCellZonesToMesh
Pstream::gatherList(allCellZones);
Pstream::scatterList(allCellZones);
for (label procI = 1; procI < allCellZones.size(); procI++)
for (label proci = 1; proci < allCellZones.size(); proci++)
{
if (allCellZones[procI] != allCellZones[0])
if (allCellZones[proci] != allCellZones[0])
{
FatalErrorInFunction
<< "Zones not synchronised among processors." << nl
<< " Processor0 has cellZones:" << allCellZones[0]
<< " , processor" << procI
<< " has cellZones:" << allCellZones[procI]
<< " , processor" << proci
<< " has cellZones:" << allCellZones[proci]
<< exit(FatalError);
}
}
@ -450,15 +450,15 @@ Foam::labelList Foam::surfaceZonesInfo::addFaceZonesToMesh
Pstream::gatherList(allFaceZones);
Pstream::scatterList(allFaceZones);
for (label procI = 1; procI < allFaceZones.size(); procI++)
for (label proci = 1; proci < allFaceZones.size(); proci++)
{
if (allFaceZones[procI] != allFaceZones[0])
if (allFaceZones[proci] != allFaceZones[0])
{
FatalErrorInFunction
<< "Zones not synchronised among processors." << nl
<< " Processor0 has faceZones:" << allFaceZones[0]
<< " , processor" << procI
<< " has faceZones:" << allFaceZones[procI]
<< " , processor" << proci
<< " has faceZones:" << allFaceZones[proci]
<< exit(FatalError);
}
}

View File

@ -87,18 +87,18 @@ const
{
const point& keepPoint = keepPoints_[i];
label localCellI = mesh.findCell(keepPoint);
label localCelli = mesh.findCell(keepPoint);
label globalCellI = -1;
label globalCelli = -1;
if (localCellI != -1)
if (localCelli != -1)
{
globalCellI = globalCells.toGlobal(localCellI);
globalCelli = globalCells.toGlobal(localCelli);
}
reduce(globalCellI, maxOp<label>());
reduce(globalCelli, maxOp<label>());
if (globalCellI == -1)
if (globalCelli == -1)
{
FatalErrorInFunction
<< "Point " << keepPoint
@ -108,16 +108,16 @@ const
}
label procI = globalCells.whichProcID(globalCellI);
label procCellI = globalCells.toLocal(procI, globalCellI);
label proci = globalCells.whichProcID(globalCelli);
label procCelli = globalCells.toLocal(proci, globalCelli);
Info<< "Found point " << keepPoint << " in cell " << procCellI
<< " on processor " << procI << endl;
Info<< "Found point " << keepPoint << " in cell " << procCelli
<< " on processor " << proci << endl;
if (globalCells.isLocal(globalCellI))
if (globalCells.isLocal(globalCelli))
{
cellLabels[i] = localCellI;
cellLabels[i] = localCelli;
}
else
{

View File

@ -1017,27 +1017,27 @@ void Foam::snappyLayerDriver::determineSidePatches
for (label patchi = nOldPatches; patchi < nPatches; patchi++)
{
label nbrProcI = patchToNbrProc[patchi];
label nbrProci = patchToNbrProc[patchi];
word name
(
processorPolyPatch::newName(Pstream::myProcNo(), nbrProcI)
processorPolyPatch::newName(Pstream::myProcNo(), nbrProci)
);
dictionary patchDict;
patchDict.add("type", processorPolyPatch::typeName);
patchDict.add("myProcNo", Pstream::myProcNo());
patchDict.add("neighbProcNo", nbrProcI);
patchDict.add("neighbProcNo", nbrProci);
patchDict.add("nFaces", 0);
patchDict.add("startFace", mesh.nFaces());
label procPatchI = meshRefiner_.appendPatch
label procPatchi = meshRefiner_.appendPatch
(
mesh,
mesh.boundaryMesh().size(), // new patch index
name,
patchDict
);
wantedToAddedPatch.insert(patchi, procPatchI);
wantedToAddedPatch.insert(patchi, procPatchi);
}
// Renumber sidePatchID
@ -1615,15 +1615,15 @@ void Foam::snappyLayerDriver::getPatchDisplacement
bool Foam::snappyLayerDriver::sameEdgeNeighbour
(
const labelListList& globalEdgeFaces,
const label myGlobalFaceI,
const label nbrGlobFaceI,
const label myGlobalFacei,
const label nbrGlobFacei,
const label edgeI
) const
{
const labelList& eFaces = globalEdgeFaces[edgeI];
if (eFaces.size() == 2)
{
return edge(myGlobalFaceI, nbrGlobFaceI) == edge(eFaces[0], eFaces[1]);
return edge(myGlobalFacei, nbrGlobFacei) == edge(eFaces[0], eFaces[1]);
}
else
{
@ -1638,8 +1638,8 @@ void Foam::snappyLayerDriver::getVertexString
const labelListList& globalEdgeFaces,
const label facei,
const label edgeI,
const label myGlobFaceI,
const label nbrGlobFaceI,
const label myGlobFacei,
const label nbrGlobFacei,
DynamicList<label>& vertices
) const
{
@ -1663,8 +1663,8 @@ void Foam::snappyLayerDriver::getVertexString
!sameEdgeNeighbour
(
globalEdgeFaces,
myGlobFaceI,
nbrGlobFaceI,
myGlobFacei,
nbrGlobFacei,
fEdges[prevFp]
)
)
@ -1683,8 +1683,8 @@ void Foam::snappyLayerDriver::getVertexString
!sameEdgeNeighbour
(
globalEdgeFaces,
myGlobFaceI,
nbrGlobFaceI,
myGlobFacei,
nbrGlobFacei,
fEdges[nextFp]
)
)
@ -1890,14 +1890,14 @@ Foam::label Foam::snappyLayerDriver::truncateDisplacement
if (globFaces.size() == 2)
{
label myFaceI = pp.edgeFaces()[edgeI][0];
label myGlobalFaceI = globalFaces.toGlobal
label myFacei = pp.edgeFaces()[edgeI][0];
label myGlobalFacei = globalFaces.toGlobal
(
pp.addressing()[myFaceI]
pp.addressing()[myFacei]
);
label nbrGlobalFaceI =
label nbrGlobalFacei =
(
globFaces[0] != myGlobalFaceI
globFaces[0] != myGlobalFacei
? globFaces[0]
: globFaces[1]
);
@ -1905,10 +1905,10 @@ Foam::label Foam::snappyLayerDriver::truncateDisplacement
(
pp,
edgeGlobalFaces,
myFaceI,
myFacei,
edgeI,
myGlobalFaceI,
nbrGlobalFaceI,
myGlobalFacei,
nbrGlobalFacei,
stringedVerts
);
@ -2046,15 +2046,15 @@ void Foam::snappyLayerDriver::setupLayerInfoTruncation
<< " nBufferCellsNoExtrude set to less than 0 ..." << endl;
// Face layers if any point gets extruded
forAll(pp.localFaces(), patchFaceI)
forAll(pp.localFaces(), patchFacei)
{
const face& f = pp.localFaces()[patchFaceI];
const face& f = pp.localFaces()[patchFacei];
forAll(f, fp)
{
if (patchNLayers[f[fp]] > 0)
{
nPatchFaceLayers[patchFaceI] = patchNLayers[f[fp]];
nPatchFaceLayers[patchFacei] = patchNLayers[f[fp]];
break;
}
}
@ -2062,11 +2062,11 @@ void Foam::snappyLayerDriver::setupLayerInfoTruncation
nPatchPointLayers = patchNLayers;
// Set any unset patch face layers
forAll(nPatchFaceLayers, patchFaceI)
forAll(nPatchFaceLayers, patchFacei)
{
if (nPatchFaceLayers[patchFaceI] == -1)
if (nPatchFaceLayers[patchFacei] == -1)
{
nPatchFaceLayers[patchFaceI] = 0;
nPatchFaceLayers[patchFacei] = 0;
}
}
}
@ -2075,9 +2075,9 @@ void Foam::snappyLayerDriver::setupLayerInfoTruncation
// Determine max point layers per face.
labelList maxLevel(pp.size(), 0);
forAll(pp.localFaces(), patchFaceI)
forAll(pp.localFaces(), patchFacei)
{
const face& f = pp.localFaces()[patchFaceI];
const face& f = pp.localFaces()[patchFacei];
// find patch faces where layer terminates (i.e contains extrude
// and noextrude points).
@ -2101,12 +2101,12 @@ void Foam::snappyLayerDriver::setupLayerInfoTruncation
if (noExtrude)
{
nPatchFaceLayers[patchFaceI] = 1;
maxLevel[patchFaceI] = mLevel;
nPatchFaceLayers[patchFacei] = 1;
maxLevel[patchFacei] = mLevel;
}
else
{
maxLevel[patchFaceI] = mLevel;
maxLevel[patchFacei] = mLevel;
}
}
}
@ -2142,9 +2142,9 @@ void Foam::snappyLayerDriver::setupLayerInfoTruncation
forAll(pp.meshPoints(), patchPointI)
{
forAll(pointFaces[patchPointI], pointFaceI)
forAll(pointFaces[patchPointI], pointFacei)
{
label facei = pointFaces[patchPointI][pointFaceI];
label facei = pointFaces[patchPointI][pointFacei];
if
(
@ -2171,9 +2171,9 @@ void Foam::snappyLayerDriver::setupLayerInfoTruncation
{
if (foundNeighbour[patchPointI])
{
forAll(pointFaces[patchPointI], pointFaceI)
forAll(pointFaces[patchPointI], pointFacei)
{
label facei = pointFaces[patchPointI][pointFaceI];
label facei = pointFaces[patchPointI][pointFacei];
if
(
nPatchFaceLayers[facei] == -1
@ -2190,11 +2190,11 @@ void Foam::snappyLayerDriver::setupLayerInfoTruncation
}
}
forAll(pp.localFaces(), patchFaceI)
forAll(pp.localFaces(), patchFacei)
{
if (nPatchFaceLayers[patchFaceI] == -1)
if (nPatchFaceLayers[patchFacei] == -1)
{
nPatchFaceLayers[patchFaceI] = maxLevel[patchFaceI];
nPatchFaceLayers[patchFacei] = maxLevel[patchFacei];
}
}
@ -2202,9 +2202,9 @@ void Foam::snappyLayerDriver::setupLayerInfoTruncation
{
if (extrudeStatus[patchPointI] != NOEXTRUDE)
{
forAll(pointFaces[patchPointI], pointFaceI)
forAll(pointFaces[patchPointI], pointFacei)
{
label face = pointFaces[patchPointI][pointFaceI];
label face = pointFaces[patchPointI][pointFacei];
nPatchPointLayers[patchPointI] = max
(
nPatchPointLayers[patchPointI],
@ -2241,9 +2241,9 @@ bool Foam::snappyLayerDriver::cellsUseFace
{
const cell& cFaces = mesh.cells()[cellLabels[i]];
forAll(cFaces, cFaceI)
forAll(cFaces, cFacei)
{
if (faces.found(cFaces[cFaceI]))
if (faces.found(cFaces[cFacei]))
{
return true;
}
@ -2309,11 +2309,11 @@ Foam::label Foam::snappyLayerDriver::checkAndUnmark
const label nReportMax = 10;
DynamicField<point> disabledFaceCentres(nReportMax);
forAll(addedCells, oldPatchFaceI)
forAll(addedCells, oldPatchFacei)
{
// Get the cells (in newMesh labels) per old patch face (in mesh
// labels)
const labelList& fCells = addedCells[oldPatchFaceI];
const labelList& fCells = addedCells[oldPatchFacei];
if (cellsUseFace(newMesh, fCells, wrongFaces))
{
@ -2322,7 +2322,7 @@ Foam::label Foam::snappyLayerDriver::checkAndUnmark
(
unmarkExtrusion
(
pp.localFaces()[oldPatchFaceI],
pp.localFaces()[oldPatchFacei],
patchDisp,
patchNLayers,
extrudeStatus
@ -2333,7 +2333,7 @@ Foam::label Foam::snappyLayerDriver::checkAndUnmark
{
disabledFaceCentres.append
(
pp.faceCentres()[oldPatchFaceI]
pp.faceCentres()[oldPatchFacei]
);
}
@ -2442,11 +2442,11 @@ void Foam::snappyLayerDriver::getLayerCellsFaces
// Mark all cells in the layer.
labelListList addedCells(addPatchCellLayer::addedCells(mesh, layerFaces));
forAll(addedCells, oldPatchFaceI)
forAll(addedCells, oldPatchFacei)
{
const labelList& added = addedCells[oldPatchFaceI];
const labelList& added = addedCells[oldPatchFacei];
const labelList& layer = layerFaces[oldPatchFaceI];
const labelList& layer = layerFaces[oldPatchFacei];
if (layer.size())
{
@ -2457,10 +2457,10 @@ void Foam::snappyLayerDriver::getLayerCellsFaces
}
}
forAll(layerFaces, oldPatchFaceI)
forAll(layerFaces, oldPatchFacei)
{
const labelList& layer = layerFaces[oldPatchFaceI];
const scalar realThickness = oldRealThickness[oldPatchFaceI];
const labelList& layer = layerFaces[oldPatchFacei];
const scalar realThickness = oldRealThickness[oldPatchFacei];
if (layer.size())
{

View File

@ -288,8 +288,8 @@ private:
bool sameEdgeNeighbour
(
const labelListList& globalEdgeFaces,
const label myGlobalFaceI,
const label nbrGlobFaceI,
const label myGlobalFacei,
const label nbrGlobFacei,
const label edgeI
) const;
@ -300,8 +300,8 @@ private:
const labelListList& globalEdgeFaces,
const label facei,
const label edgeI,
const label myGlobFaceI,
const label nbrGlobFaceI,
const label myGlobFacei,
const label nbrGlobFacei,
DynamicList<label>& vertices
) const;

View File

@ -408,9 +408,9 @@ Foam::label Foam::snappyRefineDriver::gapOnlyRefine
)
{
label own = mesh.faceOwner()[facei];
label bFaceI = facei-mesh.nInternalFaces();
label bFacei = facei-mesh.nInternalFaces();
if (isCandidateCell[own] != neiIsCandidateCell[bFaceI])
if (isCandidateCell[own] != neiIsCandidateCell[bFacei])
{
newIsCandidateCell[own] = true;
}
@ -560,14 +560,14 @@ Foam::label Foam::snappyRefineDriver::danglingCellRefine
label nIntFaces = 0;
forAll(cFaces, i)
{
label bFaceI = cFaces[i]-mesh.nInternalFaces();
if (bFaceI < 0)
label bFacei = cFaces[i]-mesh.nInternalFaces();
if (bFacei < 0)
{
nIntFaces++;
}
else
{
label patchi = pbm.patchID()[bFaceI];
label patchi = pbm.patchID()[bFacei];
if (pbm[patchi].coupled())
{
nIntFaces++;

View File

@ -884,9 +884,9 @@ Foam::tmp<Foam::pointField> Foam::snappySnapDriver::avgCellCentres
forAll(pFaces, pfI)
{
label facei = pFaces[pfI];
label meshFaceI = pp.addressing()[facei];
label meshFacei = pp.addressing()[facei];
label own = mesh.faceOwner()[meshFaceI];
label own = mesh.faceOwner()[meshFacei];
avgBoundary[pointI] += mesh.cellCentres()[own];
nBoundary[pointI]++;
}
@ -1919,8 +1919,8 @@ Foam::vectorField Foam::snappySnapDriver::calcNearestSurface
// {
// label globalRegionI = surfaces.globalRegion(surfI, regionI);
// // Collect master patch points
// label masterPatchI = globalToMasterPatch_[globalRegionI];
// label slavePatchI = globalToSlavePatch_[globalRegionI];
// label masterPatchi = globalToMasterPatch_[globalRegionI];
// label slavePatchi = globalToSlavePatch_[globalRegionI];
//
// labelList patchPointIndices
// (
@ -1928,7 +1928,7 @@ Foam::vectorField Foam::snappySnapDriver::calcNearestSurface
// (
// mesh,
// pp,
// pbm[masterPatchI]
// pbm[masterPatchi]
// )
// );
//
@ -1961,7 +1961,7 @@ Foam::vectorField Foam::snappySnapDriver::calcNearestSurface
// }
//
// // Slave patch
// if (slavePatchI != masterPatchI)
// if (slavePatchi != masterPatchi)
// {
// labelList patchPointIndices
// (
@ -1969,7 +1969,7 @@ Foam::vectorField Foam::snappySnapDriver::calcNearestSurface
// (
// mesh,
// pp,
// pbm[slavePatchI]
// pbm[slavePatchi]
// )
// );
//

View File

@ -529,8 +529,8 @@ void Foam::snappySnapDriver::calcNearestFacePointProperties
{
forAll(pp, i)
{
label meshFaceI = pp.start()+i;
patchID[meshFaceI-mesh.nInternalFaces()] = -1;
label meshFacei = pp.start()+i;
patchID[meshFacei-mesh.nInternalFaces()] = -1;
}
}
}
@ -538,8 +538,8 @@ void Foam::snappySnapDriver::calcNearestFacePointProperties
// Remove any meshed faces
forAll(pp.addressing(), i)
{
label meshFaceI = pp.addressing()[i];
patchID[meshFaceI-mesh.nInternalFaces()] = -1;
label meshFacei = pp.addressing()[i];
patchID[meshFacei-mesh.nInternalFaces()] = -1;
}
// See if pp point uses any non-meshed boundary faces
@ -559,17 +559,17 @@ void Foam::snappySnapDriver::calcNearestFacePointProperties
forAll(pFaces, i)
{
label meshFaceI = pFaces[i];
if (!mesh.isInternalFace(meshFaceI))
label meshFacei = pFaces[i];
if (!mesh.isInternalFace(meshFacei))
{
label patchi = patchID[meshFaceI-mesh.nInternalFaces()];
label patchi = patchID[meshFacei-mesh.nInternalFaces()];
if (patchi != -1)
{
vector fn = mesh.faceAreas()[meshFaceI];
vector fn = mesh.faceAreas()[meshFacei];
pNormals.append(fn/mag(fn));
pDisp.append(mesh.faceCentres()[meshFaceI]-pt);
pFc.append(mesh.faceCentres()[meshFaceI]);
pDisp.append(mesh.faceCentres()[meshFacei]-pt);
pFc.append(mesh.faceCentres()[meshFacei]);
pFid.append(patchi);
}
}

View File

@ -33,7 +33,7 @@ Foam::trackedParticle::trackedParticle
const polyMesh& mesh,
const vector& position,
const label celli,
const label tetFaceI,
const label tetFacei,
const label tetPtI,
const point& end,
const label level,
@ -42,7 +42,7 @@ Foam::trackedParticle::trackedParticle
const label k
)
:
particle(mesh, position, celli, tetFaceI, tetPtI),
particle(mesh, position, celli, tetFacei, tetPtI),
end_(end),
level_(level),
i_(i),

View File

@ -114,7 +114,7 @@ public:
const polyMesh& mesh,
const vector& position,
const label celli,
const label tetFaceI,
const label tetFacei,
const label tetPtI,
const point& end,
const label level,