Further standardization of loop index naming: pointI -> pointi, patchI -> patchi

This commit is contained in:
Henry Weller
2016-05-18 21:20:42 +01:00
parent aa4b93068b
commit 4500971827
365 changed files with 4877 additions and 4877 deletions

View File

@ -89,16 +89,16 @@ using namespace Foam;
// {
// const vectorField& faceAreas = mesh.faceAreas();
//
// forAll(meshPoints, patchPointI)
// forAll(meshPoints, patchPointi)
// {
// label meshPointI = meshPoints[patchPointI];
// Map<label>::const_iterator fnd = coupledPatchMP.find(meshPointI);
// label meshPointi = meshPoints[patchPointi];
// Map<label>::const_iterator fnd = coupledPatchMP.find(meshPointi);
// if (fnd != coupledPatchMP.end())
// {
// label coupledPointI = fnd();
// label coupledPointi = fnd();
//
// List<point>& pNormals = pointFaceNormals[coupledPointI];
// const labelList& pFaces = p.pointFaces()[patchPointI];
// List<point>& pNormals = pointFaceNormals[coupledPointi];
// const labelList& pFaces = p.pointFaces()[patchPointi];
// pNormals.setSize(pFaces.size());
// forAll(pFaces, i)
// {
@ -125,24 +125,24 @@ using namespace Foam;
//
// pointField coupledPointNormals(map.constructSize(), Zero);
//
// forAll(meshPoints, patchPointI)
// forAll(meshPoints, patchPointi)
// {
// label meshPointI = meshPoints[patchPointI];
// Map<label>::const_iterator fnd = coupledPatchMP.find(meshPointI);
// label meshPointi = meshPoints[patchPointi];
// Map<label>::const_iterator fnd = coupledPatchMP.find(meshPointi);
// if (fnd != coupledPatchMP.end())
// {
// label coupledPointI = fnd();
// const labelList& slaveSlots = slaves[coupledPointI];
// label coupledPointi = fnd();
// const labelList& slaveSlots = slaves[coupledPointi];
// const labelList& transformedSlaveSlots =
// transformedSlaves[coupledPointI];
// transformedSlaves[coupledPointi];
//
// label nFaces = slaveSlots.size()+transformedSlaveSlots.size();
// if (nFaces > 0)
// {
// // Combine
// point& n = coupledPointNormals[coupledPointI];
// point& n = coupledPointNormals[coupledPointi];
//
// n += sum(pointFaceNormals[coupledPointI]);
// n += sum(pointFaceNormals[coupledPointi]);
//
// forAll(slaveSlots, i)
// {
@ -178,14 +178,14 @@ using namespace Foam;
//
//
// // Override patch normals
// forAll(meshPoints, patchPointI)
// forAll(meshPoints, patchPointi)
// {
// label meshPointI = meshPoints[patchPointI];
// Map<label>::const_iterator fnd = coupledPatchMP.find(meshPointI);
// label meshPointi = meshPoints[patchPointi];
// Map<label>::const_iterator fnd = coupledPatchMP.find(meshPointi);
// if (fnd != coupledPatchMP.end())
// {
// label coupledPointI = fnd();
// extrudeN[patchPointI] = coupledPointNormals[coupledPointI];
// label coupledPointi = fnd();
// extrudeN[patchPointi] = coupledPointNormals[coupledPointi];
// }
// }
//
@ -242,7 +242,7 @@ int main(int argc, char *argv[])
forAll(en, patchEdgeI)
{
const edge& patchE = pp.edges()[patchEdgeI];
//str.write(pp.localPoints()[pointI], en[pointI]);
//str.write(pp.localPoints()[pointi], en[pointi]);
const point pt = patchE.centre(pp.localPoints());
str.write(linePointRef(pt, pt + 0.1*en[patchEdgeI]));
}
@ -264,9 +264,9 @@ int main(int argc, char *argv[])
// identity(pp.size())+pp.start()
// )
// );
// forAll(pn, pointI)
// forAll(pn, pointi)
// {
// str.write(linePointRef(pp.localPoints()[pointI], pn[pointI]));
// str.write(linePointRef(pp.localPoints()[pointi], pn[pointi]));
// }
// }
// {
@ -281,9 +281,9 @@ int main(int argc, char *argv[])
// identity(pp.size())+pp.start()
// )
// );
// forAll(pn, pointI)
// forAll(pn, pointi)
// {
// str.write(linePointRef(pp.localPoints()[pointI], pn[pointI]));
// str.write(linePointRef(pp.localPoints()[pointi], pn[pointi]));
// }
// }

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
@ -81,9 +81,9 @@ int main(int argc, char *argv[])
forAll(pp.meshPoints(), ppI)
{
label meshPointI = pp.meshPoints()[ppI];
wallPoints[nPoints] = meshPointI;
wallInfo[nPoints] = pointEdgePoint(mesh.points()[meshPointI], 0.0);
label meshPointi = pp.meshPoints()[ppI];
wallPoints[nPoints] = meshPointi;
wallInfo[nPoints] = pointEdgePoint(mesh.points()[meshPointi], 0.0);
nPoints++;
}
}
@ -120,9 +120,9 @@ int main(int argc, char *argv[])
dimensionedScalar("wallDist", dimLength, 0.0)
);
forAll(allPointInfo, pointI)
forAll(allPointInfo, pointi)
{
psf[pointI] = Foam::sqrt(allPointInfo[pointI].distSqr());
psf[pointi] = Foam::sqrt(allPointInfo[pointi].distSqr());
}
Info<< "Writing wallDist pointScalarField to " << runTime.value()

View File

@ -76,14 +76,14 @@ int main(int argc, char *argv[])
);
// Print
forAll(slaves, pointI)
forAll(slaves, pointi)
{
const labelList& slavePoints = slaves[pointI];
const labelList& slavePoints = slaves[pointi];
if (slavePoints.size() > 0)
{
Pout<< "Master point:" << pointI
<< " coord:" << coords[pointI]
Pout<< "Master point:" << pointi
<< " coord:" << coords[pointi]
<< " connected to untransformed slave points:" << endl;
forAll(slavePoints, i)
@ -92,12 +92,12 @@ int main(int argc, char *argv[])
}
}
const labelList& transformedSlavePoints = transformedSlaves[pointI];
const labelList& transformedSlavePoints = transformedSlaves[pointi];
if (transformedSlavePoints.size() > 0)
{
Pout<< "Master point:" << pointI
<< " coord:" << coords[pointI]
Pout<< "Master point:" << pointi
<< " coord:" << coords[pointi]
<< " connected to transformed slave points:" << endl;
forAll(transformedSlavePoints, i)
@ -204,14 +204,14 @@ int main(int argc, char *argv[])
);
// Print
forAll(slaves, pointI)
forAll(slaves, pointi)
{
const labelList& slaveFaces = slaves[pointI];
const labelList& slaveFaces = slaves[pointi];
if (slaveFaces.size() > 0)
{
Pout<< "Master point:" << pointI
<< " at:" << coupledPatch.localPoints()[pointI]
Pout<< "Master point:" << pointi
<< " at:" << coupledPatch.localPoints()[pointi]
<< " connected to " << slaveFaces.size()
<< " untransformed faces:" << endl;
@ -221,11 +221,11 @@ int main(int argc, char *argv[])
}
}
const labelList& transformedSlaveFaces = transformedSlaves[pointI];
const labelList& transformedSlaveFaces = transformedSlaves[pointi];
if (transformedSlaveFaces.size() > 0)
{
Pout<< "Master point:" << pointI
Pout<< "Master point:" << pointi
<< " connected to " << transformedSlaveFaces.size()
<< " transformed faces:" << endl;
@ -262,14 +262,14 @@ int main(int argc, char *argv[])
);
// Print
forAll(slaves, pointI)
forAll(slaves, pointi)
{
const labelList& pointCells = slaves[pointI];
const labelList& pointCells = slaves[pointi];
if (pointCells.size() > 0)
{
Pout<< "Master point:" << pointI
<< " at:" << coupledPatch.localPoints()[pointI]
Pout<< "Master point:" << pointi
<< " at:" << coupledPatch.localPoints()[pointi]
<< " connected to " << pointCells.size()
<< " untransformed boundaryCells:" << endl;
@ -279,11 +279,11 @@ int main(int argc, char *argv[])
}
}
const labelList& transformPointCells = transformedSlaves[pointI];
const labelList& transformPointCells = transformedSlaves[pointi];
if (transformPointCells.size() > 0)
{
Pout<< "Master point:" << pointI
Pout<< "Master point:" << pointi
<< " connected to " << transformPointCells.size()
<< " transformed boundaryCells:" << endl;

View File

@ -125,22 +125,22 @@ int main(int argc, char *argv[])
{
label faceRegion = allFaceInfo[facei].regions()[fp];
label pointI = f[fp];
label pointi = f[fp];
if (currentRegion[pointI] == -1)
if (currentRegion[pointi] == -1)
{
currentRegion[pointI] = faceRegion;
currentRegion[pointi] = faceRegion;
}
else if (currentRegion[pointI] != faceRegion)
else if (currentRegion[pointi] != faceRegion)
{
if (duplicateRegion[pointI] == -1)
if (duplicateRegion[pointi] == -1)
{
Pout<< "Multi region point:"
<< patch.localPoints()[pointI]
<< " with region:" << currentRegion[pointI]
<< patch.localPoints()[pointi]
<< " with region:" << currentRegion[pointi]
<< " and region:" << faceRegion
<< endl;
duplicateRegion[pointI] = currentRegion[pointI];
duplicateRegion[pointi] = currentRegion[pointi];
}
}
}

View File

@ -43,9 +43,9 @@ typedef PrimitivePatch<face, List, const pointField&> myPrimitivePatch;
void writeObj(Ostream& os,const pointField& points)
{
forAll(points, pointI)
forAll(points, pointi)
{
const point& pt = points[pointI];
const point& pt = points[pointi];
os << "v " << pt.x() << ' ' << pt.y() << ' ' << pt.z() << endl;
}

View File

@ -215,10 +215,10 @@ void testSparseData(const polyMesh& mesh, Random& rndGen)
{
const point pt = localPoints[i] + 1e-4*rndGen.vector01();
label meshPointI = allBoundary.meshPoints()[i];
label meshPointi = allBoundary.meshPoints()[i];
sparseData.insert(meshPointI, pt);
fullData[meshPointI] = pt;
sparseData.insert(meshPointi, pt);
fullData[meshPointi] = pt;
}
//Pout<< "sparseData:" << sparseData << endl;
@ -241,18 +241,18 @@ void testSparseData(const polyMesh& mesh, Random& rndGen)
// Compare.
// 1. Is all fullData also present in sparseData and same value
forAll(fullData, meshPointI)
forAll(fullData, meshPointi)
{
const point& fullPt = fullData[meshPointI];
const point& fullPt = fullData[meshPointi];
if (fullPt != point(GREAT, GREAT, GREAT))
{
const point& sparsePt = sparseData[meshPointI];
const point& sparsePt = sparseData[meshPointi];
if (fullPt != sparsePt)
{
FatalErrorInFunction
<< "point:" << meshPointI
<< "point:" << meshPointi
<< " full:" << fullPt
<< " sparse:" << sparsePt
<< exit(FatalError);
@ -264,13 +264,13 @@ void testSparseData(const polyMesh& mesh, Random& rndGen)
forAllConstIter(Map<point>, sparseData, iter)
{
const point& sparsePt = iter();
label meshPointI = iter.key();
const point& fullPt = fullData[meshPointI];
label meshPointi = iter.key();
const point& fullPt = fullData[meshPointi];
if (fullPt != sparsePt)
{
FatalErrorInFunction
<< "point:" << meshPointI
<< "point:" << meshPointi
<< " full:" << fullPt
<< " sparse:" << sparsePt
<< exit(FatalError);
@ -387,14 +387,14 @@ void testPointSync(const polyMesh& mesh, Random& rndGen)
point(GREAT, GREAT, GREAT)
);
forAll(syncedPoints, pointI)
forAll(syncedPoints, pointi)
{
if (mag(syncedPoints[pointI] - mesh.points()[pointI]) > SMALL)
if (mag(syncedPoints[pointi] - mesh.points()[pointi]) > SMALL)
{
FatalErrorInFunction
<< "Point " << pointI
<< " original location " << mesh.points()[pointI]
<< " synced location " << syncedPoints[pointI]
<< "Point " << pointi
<< " original location " << mesh.points()[pointi]
<< " synced location " << syncedPoints[pointi]
<< exit(FatalError);
}
}
@ -407,11 +407,11 @@ void testPointSync(const polyMesh& mesh, Random& rndGen)
PackedBoolList isMasterPoint(syncTools::getMasterPoints(mesh));
forAll(isMasterPoint, pointI)
forAll(isMasterPoint, pointi)
{
if (isMasterPoint[pointI])
if (isMasterPoint[pointi])
{
nMasters[pointI] = 1;
nMasters[pointi] = 1;
}
}
@ -423,14 +423,14 @@ void testPointSync(const polyMesh& mesh, Random& rndGen)
0
);
forAll(nMasters, pointI)
forAll(nMasters, pointi)
{
if (nMasters[pointI] != 1)
if (nMasters[pointi] != 1)
{
WarningInFunction
<< "Point " << pointI
<< " original location " << mesh.points()[pointI]
<< " has " << nMasters[pointI]
<< "Point " << pointi
<< " original location " << mesh.points()[pointi]
<< " has " << nMasters[pointi]
<< " masters."
<< endl;
}

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
@ -68,9 +68,9 @@ int main(int argc, char *argv[])
const point half(0.5*(meshBb.min() + meshBb.max()));
forAll(newPoints, pointI)
forAll(newPoints, pointi)
{
point& pt = newPoints[pointI];
point& pt = newPoints[pointi];
// expand around half
pt.y() += pt.y() - half.y();

View File

@ -168,7 +168,7 @@ void Foam::cellSplitter::setRefinement
label anchorPoint = mesh_.cellPoints()[celli][0];
label addedPointI =
label addedPointi =
meshMod.setAction
(
polyAddPoint
@ -179,9 +179,9 @@ void Foam::cellSplitter::setRefinement
true // supports a cell
)
);
addedPoints_.insert(celli, addedPointI);
addedPoints_.insert(celli, addedPointi);
//Pout<< "Added point " << addedPointI
//Pout<< "Added point " << addedPointi
// << iter() << " in cell " << celli << " with centre "
// << mesh_.cellCentres()[celli] << endl;
}
@ -242,7 +242,7 @@ void Foam::cellSplitter::setRefinement
{
label celli = iter.key();
label midPointI = addedPoints_[celli];
label midPointi = addedPoints_[celli];
const cell& cFaces = mesh_.cells()[celli];
@ -283,13 +283,13 @@ void Foam::cellSplitter::setRefinement
// edge used in face order.
newF[0] = e[1];
newF[1] = e[0];
newF[2] = midPointI;
newF[2] = midPointi;
}
else
{
newF[0] = e[0];
newF[1] = e[1];
newF[2] = midPointI;
newF[2] = midPointi;
}
// Now newF points away from cell0
@ -329,13 +329,13 @@ void Foam::cellSplitter::setRefinement
// edge used in face order.
newF[0] = e[1];
newF[1] = e[0];
newF[2] = midPointI;
newF[2] = midPointi;
}
else
{
newF[0] = e[0];
newF[1] = e[1];
newF[2] = midPointI;
newF[2] = midPointi;
}
// Now newF points away from cell1
@ -473,13 +473,13 @@ void Foam::cellSplitter::updateMesh(const mapPolyMesh& morphMap)
label newCelli = morphMap.reverseCellMap()[oldCelli];
label oldPointI = iter();
label oldPointi = iter();
label newPointI = morphMap.reversePointMap()[oldPointI];
label newPointi = morphMap.reversePointMap()[oldPointi];
if (newCelli >= 0 && newPointI >= 0)
if (newCelli >= 0 && newPointi >= 0)
{
newAddedPoints.insert(newCelli, newPointI);
newAddedPoints.insert(newCelli, newPointi);
}
}

View File

@ -79,9 +79,9 @@ label findPoint(const primitivePatch& pp, const point& nearPoint)
forAll(meshPoints, i)
{
label pointI = meshPoints[i];
label pointi = meshPoints[i];
scalar distSqr = magSqr(nearPoint - points[pointI]);
scalar distSqr = magSqr(nearPoint - points[pointi]);
if (distSqr < minDistSqr)
{
@ -89,12 +89,12 @@ label findPoint(const primitivePatch& pp, const point& nearPoint)
almostMinI = minI;
minDistSqr = distSqr;
minI = pointI;
minI = pointi;
}
else if (distSqr < almostMinDistSqr)
{
almostMinDistSqr = distSqr;
almostMinI = pointI;
almostMinI = pointi;
}
}
@ -292,14 +292,14 @@ label findCell(const primitiveMesh& mesh, const point& nearPoint)
forAll(cPoints, i)
{
label pointI = cPoints[i];
label pointi = cPoints[i];
scalar distSqr = magSqr(nearPoint - mesh.points()[pointI]);
scalar distSqr = magSqr(nearPoint - mesh.points()[pointi]);
if (distSqr < minDistSqr)
{
minDistSqr = distSqr;
minI = pointI;
minI = pointi;
}
}
@ -429,11 +429,11 @@ int main(int argc, char *argv[])
{
const Pair<point>& pts = pointsToMove[i];
label pointI = findPoint(allBoundary, pts.first());
label pointi = findPoint(allBoundary, pts.first());
if (pointI == -1 || !pointToPos.insert(pointI, pts.second()))
if (pointi == -1 || !pointToPos.insert(pointi, pts.second()))
{
Info<< "Could not insert mesh point " << pointI
Info<< "Could not insert mesh point " << pointi
<< " for input point " << pts.first() << nl
<< "Perhaps the point is already marked for moving?" << endl;
validInputs = false;

View File

@ -114,11 +114,11 @@ int main(int argc, char *argv[])
const polyPatch& pp = mesh.boundaryMesh()[iter.key()];
const labelList& meshPoints = pp.meshPoints();
forAll(meshPoints, pointI)
forAll(meshPoints, pointi)
{
label meshPointI = meshPoints[pointI];
label meshPointi = meshPoints[pointi];
const labelList& pCells = mesh.pointCells()[meshPointI];
const labelList& pCells = mesh.pointCells()[meshPointi];
forAll(pCells, pCelli)
{
@ -156,9 +156,9 @@ int main(int argc, char *argv[])
const polyPatch& pp = mesh.boundaryMesh()[iter.key()];
const labelList& meshPoints = pp.meshPoints();
forAll(meshPoints, pointI)
forAll(meshPoints, pointi)
{
vertOnPatch[meshPoints[pointI]] = true;
vertOnPatch[meshPoints[pointi]] = true;
}
}
@ -167,24 +167,24 @@ int main(int argc, char *argv[])
const polyPatch& pp = mesh.boundaryMesh()[iter.key()];
const labelList& meshPoints = pp.meshPoints();
forAll(meshPoints, pointI)
forAll(meshPoints, pointi)
{
label meshPointI = meshPoints[pointI];
label meshPointi = meshPoints[pointi];
const labelList& pEdges = mesh.pointEdges()[meshPointI];
const labelList& pEdges = mesh.pointEdges()[meshPointi];
forAll(pEdges, pEdgeI)
{
const label edgeI = pEdges[pEdgeI];
const edge& e = mesh.edges()[edgeI];
label otherPointI = e.otherVertex(meshPointI);
label otherPointi = e.otherVertex(meshPointi);
if (!vertOnPatch[otherPointI])
if (!vertOnPatch[otherPointi])
{
allCutEdges.append(edgeI);
if (e.start() == meshPointI)
if (e.start() == meshPointi)
{
allCutEdgeWeights.append(weight);
}

View File

@ -192,15 +192,15 @@ void cutBySurface
label nRemoved = 0;
forAll(pts, pointI)
forAll(pts, pointi)
{
const point& pt = pts[pointI];
const point& pt = pts[pointi];
pointIndexHit hitInfo = tree.findNearest(pt, sqr(nearDist));
if (hitInfo.hit())
{
const labelList& pCells = mesh.pointCells()[pointI];
const labelList& pCells = mesh.pointCells()[pointi];
forAll(pCells, i)
{
@ -218,11 +218,11 @@ void cutBySurface
//
// label nRemoved = 0;
//
// forAll(nearest, pointI)
// forAll(nearest, pointi)
// {
// if (mag(nearest[pointI] - pts[pointI]) < nearDist)
// if (mag(nearest[pointi] - pts[pointi]) < nearDist)
// {
// const labelList& pCells = mesh.pointCells()[pointI];
// const labelList& pCells = mesh.pointCells()[pointi];
//
// forAll(pCells, i)
// {

View File

@ -801,8 +801,8 @@ int main(int argc, char *argv[])
// Renumber vertex labels to Foam point labels
{
label maxCCMPointI = max(foamPointMap);
labelList toFoamPoints(invert(maxCCMPointI+1, foamPointMap));
label maxCCMPointi = max(foamPointMap);
labelList toFoamPoints(invert(maxCCMPointi+1, foamPointMap));
forAll(foamFaces, facei)
{

View File

@ -254,11 +254,11 @@ int main(int argc, char *argv[])
const labelList& blockPFacePoints =
blockPFaces[blockPFaceLabel];
forAll(blockPFacePoints, blockPFacePointI)
forAll(blockPFacePoints, blockPFacePointi)
{
forAll(blockPFacePoints, blockPFacePointI2)
forAll(blockPFacePoints, blockPFacePointi2)
{
if (blockPFacePointI != blockPFacePointI2)
if (blockPFacePointi != blockPFacePointi2)
{
sqrMergeTol =
min
@ -267,9 +267,9 @@ int main(int argc, char *argv[])
magSqr
(
blockPpoints
[blockPFacePoints[blockPFacePointI]]
[blockPFacePoints[blockPFacePointi]]
- blockPpoints
[blockPFacePoints[blockPFacePointI2]]
[blockPFacePoints[blockPFacePointi2]]
)
);
}
@ -291,7 +291,7 @@ int main(int argc, char *argv[])
labelList& cp = curPairs[blockPFaceLabel];
cp.setSize(blockPFacePoints.size());
forAll(blockPFacePoints, blockPFacePointI)
forAll(blockPFacePoints, blockPFacePointi)
{
found = false;
@ -300,16 +300,16 @@ int main(int argc, char *argv[])
const labelList& blockNFacePoints =
blockNFaces[blockNFaceLabel];
forAll(blockNFacePoints, blockNFacePointI)
forAll(blockNFacePoints, blockNFacePointi)
{
if
(
magSqr
(
blockPpoints
[blockPFacePoints[blockPFacePointI]]
[blockPFacePoints[blockPFacePointi]]
- blockNpoints
[blockNFacePoints[blockNFacePointI]]
[blockNFacePoints[blockNFacePointi]]
)
< sqrMergeTol
)
@ -317,15 +317,15 @@ int main(int argc, char *argv[])
// Found a new pair
found = true;
cp[blockPFacePointI] =
blockNFacePoints[blockNFacePointI];
cp[blockPFacePointi] =
blockNFacePoints[blockNFacePointi];
label PpointLabel =
blockPFacePoints[blockPFacePointI]
blockPFacePoints[blockPFacePointi]
+ blockOffsets[blockPlabel];
label NpointLabel =
blockNFacePoints[blockNFacePointI]
blockNFacePoints[blockNFacePointi]
+ blockOffsets[blockNlabel];
label minPN = min(PpointLabel, NpointLabel);
@ -381,14 +381,14 @@ int main(int argc, char *argv[])
const labelList& cp = curPairs[blockPFaceLabel];
forAll(cp, blockPFacePointI)
forAll(cp, blockPFacePointi)
{
label PpointLabel =
blockPFacePoints[blockPFacePointI]
blockPFacePoints[blockPFacePointi]
+ blockOffsets[blockPlabel];
label NpointLabel =
cp[blockPFacePointI]
cp[blockPFacePointi]
+ blockOffsets[blockNlabel];
if
@ -440,16 +440,16 @@ int main(int argc, char *argv[])
const labelList& blockPFacePoints
= blockPFaces[blockPFaceLabel];
forAll(blockPFacePoints, blockPFacePointI)
forAll(blockPFacePoints, blockPFacePointi)
{
label PpointLabel =
blockPFacePoints[blockPFacePointI]
blockPFacePoints[blockPFacePointi]
+ blockOffsets[blockPlabel];
if (pointMergeList[PpointLabel] == -1)
{
FatalErrorInFunction
<< "Unable to merge point " << blockPFacePointI
<< "Unable to merge point " << blockPFacePointi
<< " of face " << blockPFaceLabel
<< " of block " << blockPlabel
<< abort(FatalError);
@ -462,16 +462,16 @@ int main(int argc, char *argv[])
const labelList& blockNFacePoints
= blockNFaces[blockNFaceLabel];
forAll(blockNFacePoints, blockNFacePointI)
forAll(blockNFacePoints, blockNFacePointi)
{
label NpointLabel =
blockNFacePoints[blockNFacePointI]
blockNFacePoints[blockNFacePointi]
+ blockOffsets[blockNlabel];
if (pointMergeList[NpointLabel] == -1)
{
FatalErrorInFunction
<< "Unable to merge point " << blockNFacePointI
<< "Unable to merge point " << blockNFacePointi
<< " of face " << blockNFaceLabel
<< " of block " << blockNlabel
<< abort(FatalError);
@ -554,12 +554,12 @@ int main(int argc, char *argv[])
{
labelList cellPoints(curBlockCells[blockCelli].size());
forAll(cellPoints, pointI)
forAll(cellPoints, pointi)
{
cellPoints[pointI] =
cellPoints[pointi] =
pointMergeList
[
curBlockCells[blockCelli][pointI]
curBlockCells[blockCelli][pointi]
+ blockOffsets[blockI]
];
}
@ -618,12 +618,12 @@ int main(int argc, char *argv[])
face& newFace = renumberedPatch[oldSize + facei];
newFace.setSize(oldFace.size());
forAll(oldFace, pointI)
forAll(oldFace, pointi)
{
newFace[pointI] =
newFace[pointi] =
pointMergeList
[
oldFace[pointI]
oldFace[pointi]
+ blockOffsets[curBlock]
];
}
@ -642,12 +642,12 @@ int main(int argc, char *argv[])
face& newFace = renumberedPatch[facei];
newFace.setSize(oldFace.size());
forAll(oldFace, pointI)
forAll(oldFace, pointi)
{
newFace[pointI] =
newFace[pointi] =
pointMergeList
[
oldFace[pointI]
oldFace[pointi]
+ blockOffsets[curBlock]
];
}

View File

@ -155,9 +155,9 @@ cellShape create3DCellShape
meshFaceUsed[meshFacei] = true;
forAll(curMeshFace, pointI)
forAll(curMeshFace, pointi)
{
pointLabels[firstModelFace[pointI]] = curMeshFace[pointI];
pointLabels[firstModelFace[pointi]] = curMeshFace[pointi];
}
break;
@ -204,12 +204,12 @@ cellShape create3DCellShape
// try matching the face
label nMatchedLabels = 0;
forAll(meshFaceLabels, pointI)
forAll(meshFaceLabels, pointi)
{
if
(
pointLabels[curModelFace[pointI]]
== meshFaceLabels[pointI]
pointLabels[curModelFace[pointi]]
== meshFaceLabels[pointi]
)
{
nMatchedLabels++;
@ -225,10 +225,10 @@ cellShape create3DCellShape
if (found)
{
// match found. Insert mesh face
forAll(meshFaceLabels, pointI)
forAll(meshFaceLabels, pointi)
{
pointLabels[curModelFace[pointI]] =
meshFaceLabels[pointI];
pointLabels[curModelFace[pointi]] =
meshFaceLabels[pointi];
}
meshFaceUsed[meshFacei] = true;

View File

@ -237,7 +237,7 @@ endOfSection {space}")"{space}
%{
// Point data
label pointGroupNumberOfComponents = 3;
label pointI = 0; // index used for reading points
label pointi = 0; // index used for reading points
// Face data
label faceGroupElementType = -1;
@ -343,7 +343,7 @@ endOfSection {space}")"{space}
readHexLabel(pointGroupDataStream);
// In FOAM, indices start from zero - adjust
pointI = pointGroupStartIndex.last() - 1;
pointi = pointGroupStartIndex.last() - 1;
// reset number of components to default
pointGroupNumberOfComponents = 3;
@ -381,8 +381,8 @@ endOfSection {space}")"{space}
scalar x = readScalar(vertexXyzStream);
scalar y = readScalar(vertexXyzStream);
points[pointI] = point(x, y, 0);
pointI++;
points[pointi] = point(x, y, 0);
pointi++;
}
<readPoints3D>{spaceNl}{scalarList} {
@ -394,19 +394,19 @@ endOfSection {space}")"{space}
scalar y = readScalar(vertexXyzStream);
scalar z = readScalar(vertexXyzStream);
points[pointI] = convertToMeters*point(x, y, z);
pointI++;
points[pointi] = convertToMeters*point(x, y, z);
pointi++;
}
<readPoints2D,readPoints3D>{spaceNl}{endOfSection} {
// check read of points
if (pointI != pointGroupEndIndex.last())
if (pointi != pointGroupEndIndex.last())
{
Info<< "problem with reading points: "
<< "start index: " << pointGroupStartIndex.last()
<< " end index: " << pointGroupEndIndex.last()
<< " last points read: " << pointI << endl;
<< " last points read: " << pointi << endl;
}
yy_pop_state();
@ -986,18 +986,18 @@ int main(int argc, char *argv[])
// points given by Fluent need to represent the FRONT plane of the
// geometry. Therefore, the extrusion will be in -z direction
//
forAll(oldPoints, pointI)
forAll(oldPoints, pointi)
{
points[nNewPoints] = oldPoints[pointI];
points[nNewPoints] = oldPoints[pointi];
points[nNewPoints].z() = zOffset;
nNewPoints++;
}
forAll(oldPoints, pointI)
forAll(oldPoints, pointi)
{
points[nNewPoints] = oldPoints[pointI];
points[nNewPoints] = oldPoints[pointi];
points[nNewPoints].z() = -zOffset;

View File

@ -113,13 +113,13 @@ void Foam::fluentFvMesh::writeFluentMesh() const
const pointField& p = points();
forAll(p, pointI)
forAll(p, pointi)
{
fluentMeshFile
<< " "
<< p[pointI].x() << " "
<< p[pointI].y()
<< " " << p[pointI].z() << std::endl;
<< p[pointi].x() << " "
<< p[pointi].y()
<< " " << p[pointi].z() << std::endl;
}
fluentMeshFile

View File

@ -663,20 +663,20 @@ int main(int argc, char *argv[])
// make a point mapping array
label maxPointIndex = 0;
forAll(pointMap, pointI)
forAll(pointMap, pointi)
{
if (pointMap[pointI] > maxPointIndex)
if (pointMap[pointi] > maxPointIndex)
{
maxPointIndex = pointMap[pointI];
maxPointIndex = pointMap[pointi];
}
}
labelList pointLookup(maxPointIndex + 1, -1);
forAll(pointMap, pointI)
forAll(pointMap, pointi)
{
pointLookup[pointMap[pointI] ] = pointI;
pointLookup[pointMap[pointi] ] = pointi;
}
// make a cell mapping array

View File

@ -295,7 +295,7 @@ void readPoints(IFstream& inFile, pointField& points, Map<label>& mshToFoam)
points.setSize(nVerts);
mshToFoam.resize(2*nVerts);
for (label pointI = 0; pointI < nVerts; pointI++)
for (label pointi = 0; pointi < nVerts; pointi++)
{
label mshLabel;
scalar xVal, yVal, zVal;
@ -306,13 +306,13 @@ void readPoints(IFstream& inFile, pointField& points, Map<label>& mshToFoam)
lineStr >> mshLabel >> xVal >> yVal >> zVal;
point& pt = points[pointI];
point& pt = points[pointi];
pt.x() = xVal;
pt.y() = yVal;
pt.z() = zVal;
mshToFoam.insert(mshLabel, pointI);
mshToFoam.insert(mshLabel, pointi);
}
Info<< "Vertices read:" << mshToFoam.size() << endl;

View File

@ -212,20 +212,20 @@ void readPoints
string line;
is.getLine(line);
label pointI = readLabel(IStringStream(line.substr(0, 10))());
label pointi = readLabel(IStringStream(line.substr(0, 10))());
if (pointI == -1)
if (pointi == -1)
{
break;
}
else if (pointI != points.size()+1 && !hasWarned)
else if (pointi != points.size()+1 && !hasWarned)
{
hasWarned = true;
IOWarningInFunction
(
is
) << "Points not in order starting at point " << pointI
) << "Points not in order starting at point " << pointi
//<< " at line " << is.lineNumber()
//<< abort(FatalError);
<< endl;
@ -237,7 +237,7 @@ void readPoints
pt[1] = readUnvScalar(line.substr(25, 25));
pt[2] = readUnvScalar(line.substr(50, 25));
unvPointID.append(pointI);
unvPointID.append(pointi);
points.append(pt);
}
@ -279,9 +279,9 @@ void readCells
// Invert point numbering.
label maxUnvPoint = 0;
forAll(unvPointID, pointI)
forAll(unvPointID, pointi)
{
maxUnvPoint = max(maxUnvPoint, unvPointID[pointI]);
maxUnvPoint = max(maxUnvPoint, unvPointID[pointi]);
}
labelList unvToFoam(invert(maxUnvPoint+1, unvPointID));
@ -605,10 +605,10 @@ void readDOFS
}
IStringStream lineStr(line);
label pointI;
lineStr >> pointI;
label pointi;
lineStr >> pointi;
vertices.append(pointI);
vertices.append(pointi);
}
Info<< "For DOF set " << group
@ -781,9 +781,9 @@ int main(int argc, char *argv[])
// Invert point numbering.
label maxUnvPoint = 0;
forAll(unvPointID, pointI)
forAll(unvPointID, pointi)
{
maxUnvPoint = max(maxUnvPoint, unvPointID[pointI]);
maxUnvPoint = max(maxUnvPoint, unvPointID[pointi]);
}
labelList unvToFoam(invert(maxUnvPoint+1, unvPointID));

View File

@ -123,13 +123,13 @@ int main(int argc, char *argv[])
pointField points(nPoints);
for (label pointI = 0; pointI < nPoints; pointI++)
for (label pointi = 0; pointi < nPoints; pointi++)
{
scalar x, y, z;
mshStream >> x >> y >> z;
points[pointI] = point(x, y, z);
points[pointi] = point(x, y, z);
}

View File

@ -105,13 +105,13 @@ int main(int argc, char *argv[])
pointField points(nNodes);
forAll(points, pointI)
forAll(points, pointi)
{
scalar x,y,z;
str >> x >> y >> z;
points[pointI] = point(x, y, z);
points[pointi] = point(x, y, z);
}

View File

@ -211,12 +211,12 @@ int main(int argc, char *argv[])
{
labelList cellPoints(curBlockCells[blockCelli].size());
forAll(cellPoints, pointI)
forAll(cellPoints, pointi)
{
cellPoints[pointI] =
cellPoints[pointi] =
oldToNew
[
curBlockCells[blockCelli][pointI]
curBlockCells[blockCelli][pointi]
+ blockOffsets[blockI]
];
}

View File

@ -83,10 +83,10 @@ void Foam::sammMesh::createBoundaryFaces()
face& curFace = patchFaces[facei];
const labelList& facePoints = curFace;
forAll(facePoints, pointI)
forAll(facePoints, pointi)
{
const labelList& facePointCells =
PointCells[facePoints[pointI]];
PointCells[facePoints[pointi]];
forAll(facePointCells, celli)
{

View File

@ -59,10 +59,10 @@ void Foam::sammMesh::createPolyBoundary()
// mark it in the cellPolys_
const labelList& facePoints = curFace;
forAll(facePoints, pointI)
forAll(facePoints, pointi)
{
const labelList& facePointCells =
PointCells[facePoints[pointI]];
PointCells[facePoints[pointi]];
forAll(facePointCells, celli)
{

View File

@ -97,10 +97,10 @@ void Foam::sammMesh::createPolyCells()
const labelList& curPoints = curFace;
// For all points
forAll(curPoints, pointI)
forAll(curPoints, pointi)
{
// get the list of cells sharing this point
const labelList& curNeighbours = PointCells[curPoints[pointI]];
const labelList& curNeighbours = PointCells[curPoints[pointi]];
// For all neighbours
forAll(curNeighbours, neiI)

View File

@ -117,10 +117,10 @@ void Foam::starMesh::markBoundaryFaces()
const face& curFace = patchFaces[facei];
const labelList& facePoints = curFace;
forAll(facePoints, pointI)
forAll(facePoints, pointi)
{
const labelList& facePointCells =
PointCells[facePoints[pointI]];
PointCells[facePoints[pointi]];
forAll(facePointCells, celli)
{

View File

@ -1311,17 +1311,17 @@ void Foam::starMesh::createCoupleMatches()
// onto the master face to ensure closedness
vector pointProjectionNormal = -masterFace.normal(points_);
forAll(intersectedFace, intPointI)
forAll(intersectedFace, intPointi)
{
#ifdef DEBUG_COUPLE_PROJECTION
Info<< "Proj: old point: "
<< points_[intersectedFace[intPointI]] << endl;
<< points_[intersectedFace[intPointi]] << endl;
#endif
pointHit projHit =
masterFace.ray
(
points_[intersectedFace[intPointI]],
points_[intersectedFace[intPointi]],
pointProjectionNormal,
points_,
intersection::FULL_RAY
@ -1329,12 +1329,12 @@ void Foam::starMesh::createCoupleMatches()
if (projHit.hit())
{
points_[intersectedFace[intPointI]] =
points_[intersectedFace[intPointi]] =
projHit.hitPoint();
#ifdef DEBUG_COUPLE_PROJECTION
Info<< " new point: "
<< points_[intersectedFace[intPointI]] << endl;
<< points_[intersectedFace[intPointi]] << endl;
#endif
}
}

View File

@ -59,10 +59,10 @@ void Foam::starMesh::createPolyBoundary()
// mark it in the cellPolys_
const labelList& facePoints = curFace;
forAll(facePoints, pointI)
forAll(facePoints, pointi)
{
const labelList& facePointCells =
PointCells[facePoints[pointI]];
PointCells[facePoints[pointi]];
forAll(facePointCells, celli)
{

View File

@ -97,10 +97,10 @@ void Foam::starMesh::createPolyCells()
const labelList& curPoints = curFace;
// For all points
forAll(curPoints, pointI)
forAll(curPoints, pointi)
{
// get the list of cells sharing this point
const labelList& curNeighbours = PointCells[curPoints[pointI]];
const labelList& curNeighbours = PointCells[curPoints[pointi]];
// For all neighbours
forAll(curNeighbours, neiI)

View File

@ -234,16 +234,16 @@ void Foam::starMesh::mergeCoupleFacePoints()
// Insert the primary point renumbering into the list
// Take care of possibly unused points in the list
forAll(renumberPoints, pointI)
forAll(renumberPoints, pointi)
{
if (renumberPoints[pointI] < 0)
if (renumberPoints[pointi] < 0)
{
// point not merged
renumberPoints[pointI] = pointI;
renumberPoints[pointi] = pointi;
}
else
{
renumberPoints[pointI] = mergeSetID[renumberPoints[pointI]];
renumberPoints[pointi] = mergeSetID[renumberPoints[pointi]];
}
}
@ -262,9 +262,9 @@ void Foam::starMesh::mergeCoupleFacePoints()
face& prelimFacePoints = prelimFaces[facei];
forAll(prelimFacePoints, pointI)
forAll(prelimFacePoints, pointi)
{
if (renumberPoints[oldFacePoints[pointI]] < 0)
if (renumberPoints[oldFacePoints[pointi]] < 0)
{
FatalErrorInFunction
<< "Error in point renumbering. Old face: "
@ -273,8 +273,8 @@ void Foam::starMesh::mergeCoupleFacePoints()
<< abort(FatalError);
}
prelimFacePoints[pointI] =
renumberPoints[oldFacePoints[pointI]];
prelimFacePoints[pointi] =
renumberPoints[oldFacePoints[pointi]];
}
}
}
@ -291,9 +291,9 @@ void Foam::starMesh::mergeCoupleFacePoints()
{
const face& curFacePoints = curFaces[facei];
forAll(curFacePoints, pointI)
forAll(curFacePoints, pointi)
{
renumberPoints[curFacePoints[pointI]]++;
renumberPoints[curFacePoints[pointi]]++;
}
}
}
@ -302,16 +302,16 @@ void Foam::starMesh::mergeCoupleFacePoints()
{
const labelList& curLabels = cellShapes_[celli];
forAll(curLabels, pointI)
forAll(curLabels, pointi)
{
if (renumberPoints[curLabels[pointI]] == 0)
if (renumberPoints[curLabels[pointi]] == 0)
{
FatalErrorInFunction
<< "Error in point merging for cell "
<< celli << ". STAR index: " << starCellID_[celli]
<< ". " << endl
<< "Point index: " << curLabels[pointI] << " STAR index "
<< starPointID_[curLabels[pointI]] << endl
<< "Point index: " << curLabels[pointi] << " STAR index "
<< starPointID_[curLabels[pointi]] << endl
<< "Please check the geometry for the cell." << endl;
}
}
@ -319,22 +319,22 @@ void Foam::starMesh::mergeCoupleFacePoints()
label nUsedPoints = 0;
forAll(renumberPoints, pointI)
forAll(renumberPoints, pointi)
{
if (renumberPoints[pointI] > 0)
if (renumberPoints[pointi] > 0)
{
// This should be OK as the compressed points list will always
// have less points that the original lists. Even if there is
// no points removed, this will copy the list back onto itself
//
renumberPoints[pointI] = nUsedPoints;
points_[nUsedPoints] = points_[pointI];
renumberPoints[pointi] = nUsedPoints;
points_[nUsedPoints] = points_[pointi];
nUsedPoints++;
}
else
{
renumberPoints[pointI] = -1;
renumberPoints[pointi] = -1;
}
}
@ -356,19 +356,19 @@ void Foam::starMesh::mergeCoupleFacePoints()
face& newFacePoints = newFaces[facei];
forAll(newFacePoints, pointI)
forAll(newFacePoints, pointi)
{
if (renumberPoints[oldFacePoints[pointI]] < 0)
if (renumberPoints[oldFacePoints[pointi]] < 0)
{
FatalErrorInFunction
<< "Error in point renumbering for point "
<< oldFacePoints[pointI]
<< oldFacePoints[pointi]
<< ". Renumbering index is -1." << endl
<< "Old face: " << oldFacePoints << endl
<< "New face: " << newFacePoints << abort(FatalError);
}
newFacePoints[pointI] = renumberPoints[oldFacePoints[pointI]];
newFacePoints[pointi] = renumberPoints[oldFacePoints[pointi]];
}
}
}
@ -381,23 +381,23 @@ void Foam::starMesh::mergeCoupleFacePoints()
labelList& curLabels = cellShapes_[celli];
forAll(curLabels, pointI)
forAll(curLabels, pointi)
{
if (renumberPoints[curLabels[pointI]] < 0)
if (renumberPoints[curLabels[pointi]] < 0)
{
FatalErrorInFunction
<< "Error in point renumbering for cell "
<< celli << ". STAR index: " << starCellID_[celli]
<< ". " << endl
<< "Point index: " << curLabels[pointI] << " STAR index "
<< starPointID_[curLabels[pointI]] << " returns invalid "
<< "Point index: " << curLabels[pointi] << " STAR index "
<< starPointID_[curLabels[pointi]] << " returns invalid "
<< "renumbering index: "
<< renumberPoints[curLabels[pointI]] << "." << endl
<< renumberPoints[curLabels[pointi]] << "." << endl
<< "Old cellShape: " << oldLabels << endl
<< "New cell shape: " << curLabels << abort(FatalError);
}
curLabels[pointI] = renumberPoints[oldLabels[pointI]];
curLabels[pointi] = renumberPoints[oldLabels[pointi]];
}
}
@ -407,11 +407,11 @@ void Foam::starMesh::mergeCoupleFacePoints()
starPointID_ = -1;
forAll(starPointID_, pointI)
forAll(starPointID_, pointi)
{
if (renumberPoints[pointI] > -1)
if (renumberPoints[pointi] > -1)
{
starPointID_[renumberPoints[pointI]] = oldStarPointID[pointI];
starPointID_[renumberPoints[pointi]] = oldStarPointID[pointi];
}
}

View File

@ -191,7 +191,7 @@ int main(int argc, char *argv[])
{
labelList pointIndex(nNodes);
label pointI = 0;
label pointi = 0;
while (nodeStream.good())
{
@ -218,15 +218,15 @@ int main(int argc, char *argv[])
}
// Store point and node number.
points[pointI] = point(x, y, z);
nodeToPoint.insert(nodeI, pointI);
pointI++;
points[pointi] = point(x, y, z);
nodeToPoint.insert(nodeI, pointi);
pointi++;
}
}
if (pointI != nNodes)
if (pointi != nNodes)
{
FatalIOErrorIn(args.executable().c_str(), nodeStream)
<< "Only " << pointI << " nodes present instead of " << nNodes
<< "Only " << pointi << " nodes present instead of " << nNodes
<< " from header." << exit(FatalIOError);
}
}

View File

@ -69,9 +69,9 @@ void writePoints(const polyMesh& mesh, const fileName& timeName)
OFstream pointStream(pointFile);
forAll(mesh.points(), pointI)
forAll(mesh.points(), pointi)
{
writeOBJ(mesh.points()[pointI], pointStream);
writeOBJ(mesh.points()[pointi], pointStream);
vertI++;
}
@ -265,9 +265,9 @@ void writePatchFaces
OFstream patchFaceStream(faceFile);
forAll(pp.localPoints(), pointI)
forAll(pp.localPoints(), pointi)
{
writeOBJ(pp.localPoints()[pointI], patchFaceStream);
writeOBJ(pp.localPoints()[pointi], patchFaceStream);
}
forAll(pp.localFaces(), facei)
@ -308,9 +308,9 @@ void writePatchBoundaryEdges
OFstream patchEdgeStream(edgeFile);
forAll(pp.localPoints(), pointI)
forAll(pp.localPoints(), pointi)
{
writeOBJ(pp.localPoints()[pointI], patchEdgeStream);
writeOBJ(pp.localPoints()[pointi], patchEdgeStream);
}
for (label edgeI = pp.nInternalEdges(); edgeI < pp.nEdges(); edgeI++)
@ -329,11 +329,11 @@ void writePatchBoundaryEdges
void writePointCells
(
const polyMesh& mesh,
const label pointI,
const label pointi,
const fileName& timeName
)
{
const labelList& pCells = mesh.pointCells()[pointI];
const labelList& pCells = mesh.pointCells()[pointi];
labelHashSet allEdges(6*pCells.size());
@ -351,7 +351,7 @@ void writePointCells
fileName pFile
(
mesh.time().path()
/ "pointEdges_" + timeName + '_' + name(pointI) + ".obj"
/ "pointEdges_" + timeName + '_' + name(pointi) + ".obj"
);
Info<< "Writing pointEdges to " << pFile << endl;
@ -470,9 +470,9 @@ int main(int argc, char *argv[])
}
if (doPoint)
{
label pointI = args.optionRead<label>("point");
label pointi = args.optionRead<label>("point");
writePointCells(mesh, pointI, runTime.timeName());
writePointCells(mesh, pointi, runTime.timeName());
}
if (doFace)
{

View File

@ -581,25 +581,25 @@ int main(int argc, char *argv[])
// Determine points and extrusion
pointField layer0Points(extrudePatch.nPoints());
pointField displacement(extrudePatch.nPoints());
forAll(displacement, pointI)
forAll(displacement, pointi)
{
const vector& patchNormal = extrudePatchPointNormals[pointI];
const vector& patchNormal = extrudePatchPointNormals[pointi];
// layer0 point
layer0Points[pointI] = model()
layer0Points[pointi] = model()
(
extrudePatch.localPoints()[pointI],
extrudePatch.localPoints()[pointi],
patchNormal,
0
);
// layerN point
point extrudePt = model()
(
extrudePatch.localPoints()[pointI],
extrudePatch.localPoints()[pointi],
patchNormal,
model().nLayers()
);
displacement[pointI] = extrudePt - layer0Points[pointI];
displacement[pointi] = extrudePt - layer0Points[pointi];
}
@ -659,27 +659,27 @@ int main(int argc, char *argv[])
);
// Reset points according to extrusion model
forAll(layerExtrude.addedPoints(), pointI)
forAll(layerExtrude.addedPoints(), pointi)
{
const labelList& pPoints = layerExtrude.addedPoints()[pointI];
forAll(pPoints, pPointI)
const labelList& pPoints = layerExtrude.addedPoints()[pointi];
forAll(pPoints, pPointi)
{
label meshPointI = pPoints[pPointI];
label meshPointi = pPoints[pPointi];
point modelPt
(
model()
(
extrudePatch.localPoints()[pointI],
extrudePatchPointNormals[pointI],
pPointI+1 // layer
extrudePatch.localPoints()[pointi],
extrudePatchPointNormals[pointi],
pPointi+1 // layer
)
);
const_cast<DynamicList<point>&>
(
meshMod().points()
)[meshPointI] = modelPt;
)[meshPointi] = modelPt;
}
}

View File

@ -2440,16 +2440,16 @@ int main(int argc, char *argv[])
(
meshMod.points()
);
label meshPointI = extrudePatch.localPoints().size();
label meshPointi = extrudePatch.localPoints().size();
forAll(localRegionPoints, regionI)
{
label pointI = localRegionPoints[regionI];
point pt = extrudePatch.localPoints()[pointI];
label pointi = localRegionPoints[regionI];
point pt = extrudePatch.localPoints()[pointi];
const vector& n = localRegionNormals[regionI];
for (label layerI = 1; layerI <= model().nLayers(); layerI++)
{
newPoints[meshPointI++] = model()(pt, n, layerI);
newPoints[meshPointi++] = model()(pt, n, layerI);
}
}

View File

@ -226,13 +226,13 @@ void Foam::extrude2DMesh::setRefinement
{
label offset = layer * points.size();
forAll(points, pointI)
forAll(points, pointi)
{
// Don't need the surface normal for either linearDirection or
// wedge. Will need to add to be able to use others.
point newPoint = model_
(
points[pointI],
points[pointi],
vector(),
layer
);
@ -240,7 +240,7 @@ void Foam::extrude2DMesh::setRefinement
meshMod.addPoint
(
newPoint,
pointI + offset,
pointi + offset,
-1, // zoneID
true // inCell
);
@ -390,24 +390,24 @@ void Foam::extrude2DMesh::setRefinement
const face& f = faces[nextFacei];
label nextPointI;
label nextPointi;
if (mesh_.faceOwner()[nextFacei] == celli)
{
frontFace[0] = f[0];
nextPointI = f[1];
nextPointi = f[1];
}
else
{
frontFace[0] = f[1];
nextPointI = f[0];
nextPointi = f[0];
}
for (label i = 1; i < frontFace.size(); i++)
{
frontFace[i] = nextPointI;
frontFace[i] = nextPointi;
// Find face containing pointI
// Find face containing pointi
forAll(cFaces, cFacei)
{
label facei = cFaces[cFacei];
@ -415,15 +415,15 @@ void Foam::extrude2DMesh::setRefinement
{
const face& f = faces[facei];
if (f[0] == nextPointI)
if (f[0] == nextPointi)
{
nextPointI = f[1];
nextPointi = f[1];
nextFacei = facei;
break;
}
else if (f[1] == nextPointI)
else if (f[1] == nextPointi)
{
nextPointI = f[0];
nextPointi = f[0];
nextFacei = facei;
break;
}
@ -486,24 +486,24 @@ void Foam::extrude2DMesh::setRefinement
const face& f = faces[nextFacei];
label nextPointI;
label nextPointi;
if (mesh_.faceOwner()[nextFacei] == celli)
{
frontFace[0] = f[0];
nextPointI = f[1];
nextPointi = f[1];
}
else
{
frontFace[0] = f[1];
nextPointI = f[0];
nextPointi = f[0];
}
for (label i = 1; i < frontFace.size(); i++)
{
frontFace[i] = nextPointI;
frontFace[i] = nextPointi;
// Find face containing pointI
// Find face containing pointi
forAll(cFaces, cFacei)
{
label facei = cFaces[cFacei];
@ -511,15 +511,15 @@ void Foam::extrude2DMesh::setRefinement
{
const face& f = faces[facei];
if (f[0] == nextPointI)
if (f[0] == nextPointi)
{
nextPointI = f[1];
nextPointi = f[1];
nextFacei = facei;
break;
}
else if (f[1] == nextPointI)
else if (f[1] == nextPointi)
{
nextPointI = f[0];
nextPointi = f[0];
nextFacei = facei;
break;
}

View File

@ -78,28 +78,28 @@ static const NamedEnum<ExtrudeMode, 2> ExtrudeModeNames;
// pointField layer1Points(fMesh.nPoints());
// pointField displacement(fMesh.nPoints());
// forAll(layer0Points, pointI)
// forAll(layer0Points, pointi)
// {
// const labelList& meshPoints = fMesh.meshPoints();
// label meshPointI = meshPoints[pointI];
// label meshPointi = meshPoints[pointi];
// layer0Points[meshPointI] = model
// layer0Points[meshPointi] = model
// (
// fMesh.points()[meshPointI],
// fMesh.pointNormals()[pointI],
// fMesh.points()[meshPointi],
// fMesh.pointNormals()[pointi],
// 0
// );
// layer1Points[meshPointI] = model
// layer1Points[meshPointi] = model
// (
// fMesh.points()[meshPointI],
// fMesh.pointNormals()[pointI],
// fMesh.points()[meshPointi],
// fMesh.pointNormals()[pointi],
// 1
// );
// displacement[pointI] =
// layer1Points[meshPointI]
// - layer0Points[meshPointI];
// displacement[pointi] =
// layer1Points[meshPointi]
// - layer0Points[meshPointi];
// }
// fMesh.movePoints(layer0Points);

View File

@ -537,9 +537,9 @@ int main(int argc, char *argv[])
// Enforce the boundary conditions
const triad& fixedAlignment = fixedAlignments[pI];
forAll(pPoints, adjPointI)
forAll(pPoints, adjPointi)
{
const label adjPointIndex = pPoints[adjPointI];
const label adjPointIndex = pPoints[adjPointi];
scalar dist = mag(points[pI] - points[adjPointIndex]);

View File

@ -91,9 +91,9 @@ void Foam::DelaunayMesh<Triangulation>::addPatches
label nPatches = patchFaces.size();
patchDicts.setSize(nPatches);
forAll(patchDicts, patchI)
forAll(patchDicts, patchi)
{
patchDicts.set(patchI, new dictionary());
patchDicts.set(patchi, new dictionary());
}
label nBoundaryFaces = 0;

View File

@ -364,9 +364,9 @@ void Foam::smoothAlignmentSolver::smoothAlignments
triad& newTriad = triadAv[pI];
forAll(pPoints, adjPointI)
forAll(pPoints, adjPointi)
{
const label adjPointIndex = pPoints[adjPointI];
const label adjPointIndex = pPoints[adjPointi];
scalar dist = mag(points[pI] - points[adjPointIndex]);

View File

@ -2566,7 +2566,7 @@ void Foam::conformalVoronoiMesh::removeUnusedPoints
}
}
label pointI = 0;
label pointi = 0;
labelList oldToNew(pts.size(), label(-1));
@ -2577,7 +2577,7 @@ void Foam::conformalVoronoiMesh::removeUnusedPoints
{
if (ptUsed[ptUI] == true)
{
oldToNew[ptUI] = pointI++;
oldToNew[ptUI] = pointi++;
}
}
@ -2585,12 +2585,12 @@ void Foam::conformalVoronoiMesh::removeUnusedPoints
inplaceReorder(oldToNew, boundaryPts);
Info<< " Removing "
<< returnReduce(pts.size() - pointI, sumOp<label>())
<< returnReduce(pts.size() - pointi, sumOp<label>())
<< " unused points"
<< endl;
pts.setSize(pointI);
boundaryPts.setSize(pointI);
pts.setSize(pointi);
boundaryPts.setSize(pointi);
// Renumber the faces to use the new point numbers

View File

@ -1831,10 +1831,10 @@ Foam::conformalVoronoiMesh::nearestFeatureEdgeLocations
{
label index = elems[elemI];
const Foam::point& pointI
const Foam::point& pointi
= edgeLocationTreePtr_().shapes().shapePoints()[index];
pointIndexHit nearHit(true, pointI, index);
pointIndexHit nearHit(true, pointi, index);
dynPointHit.append(nearHit);
}

View File

@ -307,11 +307,11 @@ void Foam::conformalVoronoiMesh::writeMesh(const fileName& instance)
// )()
// );
//
// label pointI = findIndex(pointDualAddressing, -1);
// if (pointI != -1)
// label pointi = findIndex(pointDualAddressing, -1);
// if (pointi != -1)
// {
// WarningInFunction
// << "Delaunay vertex " << pointI
// << "Delaunay vertex " << pointi
// << " does not have a corresponding dual cell." << endl;
// }
//
@ -350,21 +350,21 @@ void Foam::conformalVoronoiMesh::writeMesh(const fileName& instance)
// points
// );
//
// forAll(pointDualAddressing, pointI)
// forAll(pointDualAddressing, pointi)
// {
// label index = pointDualAddressing[pointI];
// label index = pointDualAddressing[pointi];
//
// if (index > 0)
// {
// label celli = index-1;
// dualPoints[pointI] = mesh.cellCentres()[celli];
// dualPoints[pointi] = mesh.cellCentres()[celli];
// }
// else if (index < 0)
// {
// label facei = -index-1;
// if (facei >= mesh.nInternalFaces())
// {
// dualPoints[pointI] = mesh.faceCentres()[facei];
// dualPoints[pointi] = mesh.faceCentres()[facei];
// }
// }
// }
@ -1388,8 +1388,8 @@ Foam::labelHashSet Foam::conformalVoronoiMesh::findRemainingProtrusionSet
forAllConstIter(labelHashSet, protrudingBoundaryPoints, iter)
{
const label pointI = iter.key();
const labelList& pCells = mesh.pointCells()[pointI];
const label pointi = iter.key();
const labelList& pCells = mesh.pointCells()[pointi];
forAll(pCells, pCI)
{

View File

@ -276,23 +276,23 @@ Foam::labelList Foam::conformalVoronoiMesh::calcCellZones
selectInside = false;
}
forAll(volType, pointI)
forAll(volType, pointi)
{
if (cellToSurface[pointI] == -1)
if (cellToSurface[pointi] == -1)
{
if
(
(
volType[pointI] == volumeType::INSIDE
volType[pointi] == volumeType::INSIDE
&& selectInside
)
|| (
volType[pointI] == volumeType::OUTSIDE
volType[pointi] == volumeType::OUTSIDE
&& !selectInside
)
)
{
cellToSurface[pointI] = surfI;
cellToSurface[pointi] = surfI;
}
}
}

View File

@ -1112,17 +1112,17 @@ void Foam::conformationSurfaces::findEdgeNearest
);
// Update minDistSqr and arguments
forAll(hitInfo, pointI)
forAll(hitInfo, pointi)
{
if (hitInfo[pointI].hit())
if (hitInfo[pointi].hit())
{
minDistSqr[pointI] = magSqr
minDistSqr[pointi] = magSqr
(
hitInfo[pointI].hitPoint()
- samples[pointI]
hitInfo[pointi].hitPoint()
- samples[pointi]
);
edgeHits[pointI] = hitInfo[pointI];
featuresHit[pointI] = testI;
edgeHits[pointi] = hitInfo[pointi];
featuresHit[pointi] = testI;
}
}
}

View File

@ -352,14 +352,14 @@ tmp<scalarField> signedDistance
// Push back to original
forAll(volType, i)
{
label pointI = surfIndices[i];
scalar dist = mag(points[pointI] - nearest[pointI].hitPoint());
label pointi = surfIndices[i];
scalar dist = mag(points[pointi] - nearest[pointi].hitPoint());
volumeType vT = volType[i];
if (vT == volumeType::OUTSIDE)
{
fld[pointI] = dist;
fld[pointi] = dist;
}
else if (vT == volumeType::INSIDE)
{

View File

@ -206,9 +206,9 @@ public:
// return true;
//}
//const pointField points(bb.points());
//forAll(points, pointI)
//forAll(points, pointi)
//{
// scalar pointVal = signedDistance(points[pointI]) - _iso_val;
// scalar pointVal = signedDistance(points[pointi]) - _iso_val;
// if (ccVal*pointVal < 0)
// {
// return true;
@ -518,10 +518,10 @@ int main(int argc, char *argv[])
Point* vertices = mc.vertices();
pointField points(mc.nverts());
forAll(points, pointI)
forAll(points, pointi)
{
const Point& v = vertices[pointI];
points[pointI] = converter.toGlobal(v);
const Point& v = vertices[pointi];
points[pointi] = converter.toGlobal(v);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -141,7 +141,7 @@ int main(int argc, char *argv[])
// Generate points
pointField points(mc.size_x()*mc.size_y()*mc.size_z());
label pointI = 0;
label pointi = 0;
point pt;
for( int k = 0 ; k < mc.size_z() ; k++ )
@ -153,7 +153,7 @@ int main(int argc, char *argv[])
for( int i = 0 ; i < mc.size_x() ; i++ )
{
pt.x() = bb.min().x() + i*d.x();
points[pointI++] = pt;
points[pointi++] = pt;
}
}
}
@ -181,14 +181,14 @@ int main(int argc, char *argv[])
);
// Fill elements
pointI = 0;
pointi = 0;
for( int k = 0 ; k < mc.size_z() ; k++ )
{
for( int j = 0 ; j < mc.size_y() ; j++ )
{
for( int i = 0 ; i < mc.size_x() ; i++ )
{
mc.set_data(float(signedDist[pointI++]), i, j, k);
mc.set_data(float(signedDist[pointi++]), i, j, k);
}
}
}
@ -226,10 +226,10 @@ int main(int argc, char *argv[])
Vertex* vertices = mc.vertices();
pointField points(mc.nverts());
forAll(points, pointI)
forAll(points, pointi)
{
Vertex& v = vertices[pointI];
points[pointI] = point
Vertex& v = vertices[pointi];
points[pointi] = point
(
bb.min().x() + v.x*span.x()/mc.size_x(),
bb.min().y() + v.y*span.y()/mc.size_y(),

View File

@ -938,7 +938,7 @@ void Foam::CV2D::newPoints()
/*
void Foam::CV2D::moveInternalPoints(const point2DField& newPoints)
{
label pointI = 0;
label pointi = 0;
for
(
@ -949,7 +949,7 @@ void Foam::CV2D::moveInternalPoints(const point2DField& newPoints)
{
if (vit->internalPoint())
{
movePoint(vit, newPoints[pointI++]);
movePoint(vit, newPoints[pointi++]);
}
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -130,9 +130,9 @@ inline const Foam::point2D& Foam::CV2D::toPoint2D(const point& p) const
inline const Foam::point2DField Foam::CV2D::toPoint2D(const pointField& p) const
{
point2DField temp(p.size());
forAll(temp, pointI)
forAll(temp, pointi)
{
temp[pointI] = point2D(p[pointI].x(), p[pointI].y());
temp[pointi] = point2D(p[pointi].x(), p[pointi].y());
}
return temp;
}

View File

@ -433,14 +433,14 @@ Foam::shortEdgeFilter2D::filter()
// Maintain addressing from new to old point field
labelList newPtToOldPt(totalNewPoints, -1);
forAll(points, pointI)
forAll(points, pointi)
{
// If the point is NOT going to be removed.
if (pointsToRemove[pointI] == -1)
if (pointsToRemove[pointi] == -1)
{
newPoints[pointI - numberRemoved] = points[pointI];
newPointNumbers[pointI] = pointI - numberRemoved;
newPtToOldPt[pointI - numberRemoved] = pointI;
newPoints[pointi - numberRemoved] = points[pointi];
newPointNumbers[pointi] = pointi - numberRemoved;
newPtToOldPt[pointi - numberRemoved] = pointi;
}
else
{
@ -466,31 +466,31 @@ Foam::shortEdgeFilter2D::filter()
forAll(f, fp)
{
label pointI = f[fp];
label pointi = f[fp];
// If not removing the point, then add it to the new face.
if (pointsToRemove[pointI] == -1)
if (pointsToRemove[pointi] == -1)
{
newFace[newFaceSize++] = newPointNumbers[pointI];
newFace[newFaceSize++] = newPointNumbers[pointi];
}
else
{
label newPointI = pointsToRemove[pointI];
label newPointi = pointsToRemove[pointi];
// Replace deleted point with point that it is being
// collapsed to.
if
(
f.nextLabel(fp) != newPointI
&& f.prevLabel(fp) != newPointI
f.nextLabel(fp) != newPointi
&& f.prevLabel(fp) != newPointi
)
{
label pChain = newPointI;
label pChain = newPointi;
label totalChain = 0;
for (label nChain = 0; nChain <= totalChain; ++nChain)
{
if (newPointNumbers[pChain] != -1)
{
newFace[newFaceSize++] = newPointNumbers[pChain];
newPointNumbers[pointI] = newPointNumbers[pChain];
newPointNumbers[pointi] = newPointNumbers[pChain];
maxChain = max(totalChain, maxChain);
}
else
@ -498,7 +498,7 @@ Foam::shortEdgeFilter2D::filter()
WarningInFunction
<< "Point " << pChain
<< " marked for deletion as well as point "
<< pointI << nl
<< pointi << nl
<< " Incrementing maxChain by 1 from "
<< totalChain << " to " << totalChain + 1
<< endl;
@ -509,9 +509,9 @@ Foam::shortEdgeFilter2D::filter()
}
else
{
if (newPointNumbers[newPointI] != -1)
if (newPointNumbers[newPointi] != -1)
{
newPointNumbers[pointI] = newPointNumbers[newPointI];
newPointNumbers[pointi] = newPointNumbers[newPointi];
}
}
}
@ -549,12 +549,12 @@ Foam::shortEdgeFilter2D::filter()
patchSizes_
);
forAll(newPointNumbers, pointI)
forAll(newPointNumbers, pointi)
{
if (newPointNumbers[pointI] == -1)
if (newPointNumbers[pointi] == -1)
{
WarningInFunction
<< pointI << " will be deleted and " << newPointNumbers[pointI]
<< pointi << " will be deleted and " << newPointNumbers[pointi]
<< ", so it will not be replaced. "
<< "This will cause edges to be deleted." << endl;
}

View File

@ -339,12 +339,12 @@ void syncPoints
const labelList& meshPts = procPatch.meshPoints();
const labelList& nbrPts = procPatch.neighbPoints();
forAll(nbrPts, pointI)
forAll(nbrPts, pointi)
{
label nbrPointI = nbrPts[pointI];
if (nbrPointI >= 0 && nbrPointI < patchInfo.size())
label nbrPointi = nbrPts[pointi];
if (nbrPointi >= 0 && nbrPointi < patchInfo.size())
{
patchInfo[nbrPointI] = points[meshPts[pointI]];
patchInfo[nbrPointi] = points[meshPts[pointi]];
}
}
@ -397,10 +397,10 @@ void syncPoints
const labelList& meshPts = procPatch.meshPoints();
forAll(meshPts, pointI)
forAll(meshPts, pointi)
{
label meshPointI = meshPts[pointI];
points[meshPointI] = nbrPatchInfo[pointI];
label meshPointi = meshPts[pointi];
points[meshPointi] = nbrPatchInfo[pointi];
}
}
}
@ -478,9 +478,9 @@ void syncPoints
forAll(pd.sharedPointLabels(), i)
{
label meshPointI = pd.sharedPointLabels()[i];
label meshPointi = pd.sharedPointLabels()[i];
// Fill my entries in the shared points
sharedPts[pd.sharedPointAddr()[i]] = points[meshPointI];
sharedPts[pd.sharedPointAddr()[i]] = points[meshPointi];
}
// Combine on master.
@ -491,8 +491,8 @@ void syncPoints
// my local information.
forAll(pd.sharedPointLabels(), i)
{
label meshPointI = pd.sharedPointLabels()[i];
points[meshPointI] = sharedPts[pd.sharedPointAddr()[i]];
label meshPointi = pd.sharedPointLabels()[i];
points[meshPointi] = sharedPts[pd.sharedPointAddr()[i]];
}
}
}

View File

@ -76,15 +76,15 @@ int main(int argc, char *argv[])
scalar minCmptVal = bb.min()[planeNormalCmpt];
scalar maxCmptVal = bb.max()[planeNormalCmpt];
forAll(points, pointI)
forAll(points, pointi)
{
if (points[pointI][planeNormalCmpt] < midCmptVal)
if (points[pointi][planeNormalCmpt] < midCmptVal)
{
points[pointI][planeNormalCmpt] = minCmptVal;
points[pointi][planeNormalCmpt] = minCmptVal;
}
else
{
points[pointI][planeNormalCmpt] = maxCmptVal;
points[pointi][planeNormalCmpt] = maxCmptVal;
}
}

View File

@ -207,10 +207,10 @@ void Foam::mergePolyMesh::addMesh(const polyMesh& m)
pointZoneIndices[zoneI] = zoneIndex(pointZoneNames_, pz[zoneI].name());
}
forAll(p, pointI)
forAll(p, pointi)
{
// Grab zone ID. If a point is not in a zone, it will return -1
zoneID = pz.whichZone(pointI);
zoneID = pz.whichZone(pointi);
if (zoneID >= 0)
{
@ -218,15 +218,15 @@ void Foam::mergePolyMesh::addMesh(const polyMesh& m)
zoneID = pointZoneIndices[zoneID];
}
renumberPoints[pointI] =
renumberPoints[pointi] =
meshMod_.setAction
(
polyAddPoint
(
p[pointI], // Point to add
p[pointi], // Point to add
-1, // Master point (straight addition)
zoneID, // Zone for point
pointI < m.nPoints() // Is in cell?
pointi < m.nPoints() // Is in cell?
)
);
}
@ -309,9 +309,9 @@ void Foam::mergePolyMesh::addMesh(const polyMesh& m)
face newFace(curFace.size());
forAll(curFace, pointI)
forAll(curFace, pointi)
{
newFace[pointI] = renumberPoints[curFace[pointI]];
newFace[pointi] = renumberPoints[curFace[pointi]];
}
if (debug)

View File

@ -369,16 +369,16 @@ int main(int argc, char *argv[])
pointSet dupPoints(mesh, "duplicatedPoints", 100);
forAll(pointMap, pointI)
forAll(pointMap, pointi)
{
label oldPointI = pointMap[pointI];
label oldPointi = pointMap[pointi];
nDupPerPoint[oldPointI]++;
nDupPerPoint[oldPointi]++;
if (nDupPerPoint[oldPointI] > 1)
if (nDupPerPoint[oldPointi] > 1)
{
dupPoints.insert(map().reversePointMap()[oldPointI]);
dupPoints.insert(pointI);
dupPoints.insert(map().reversePointMap()[oldPointi]);
dupPoints.insert(pointi);
}
}

View File

@ -67,18 +67,18 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
labelList mirrorPointLookup(oldPoints.size(), -1);
// Grab the old points
forAll(oldPoints, pointI)
forAll(oldPoints, pointi)
{
newPoints[nNewPoints] = oldPoints[pointI];
newPoints[nNewPoints] = oldPoints[pointi];
nNewPoints++;
}
forAll(oldPoints, pointI)
forAll(oldPoints, pointi)
{
scalar alpha =
mirrorPlane.normalIntersect
(
oldPoints[pointI],
oldPoints[pointi],
mirrorPlane.normal()
);
@ -87,10 +87,10 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
{
// The point gets mirrored
newPoints[nNewPoints] =
oldPoints[pointI] + 2.0*alpha*mirrorPlane.normal();
oldPoints[pointi] + 2.0*alpha*mirrorPlane.normal();
// remember the point correspondence
mirrorPointLookup[pointI] = nNewPoints;
mirrorPointLookup[pointi] = nNewPoints;
nNewPoints++;
}
else
@ -98,9 +98,9 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
// The point is on the plane and does not get mirrored
// Adjust plane location
newPoints[nNewPoints] =
oldPoints[pointI] + alpha*mirrorPlane.normal();
oldPoints[pointi] + alpha*mirrorPlane.normal();
mirrorPointLookup[pointI] = pointI;
mirrorPointLookup[pointi] = pointi;
}
}
@ -179,9 +179,9 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
const face& origFace = curPatch[facei];
face mirrorFace(origFace.size());
forAll(mirrorFace, pointI)
forAll(mirrorFace, pointi)
{
mirrorFace[pointI] = mirrorPointLookup[origFace[pointI]];
mirrorFace[pointi] = mirrorPointLookup[origFace[pointi]];
}
if (origFace == mirrorFace)

View File

@ -94,10 +94,10 @@ void Foam::meshDualiser::dumpPolyTopoChange
const DynamicList<point>& points = meshMod.points();
forAll(points, pointI)
forAll(points, pointi)
{
meshTools::writeOBJ(str1, points[pointI]);
meshTools::writeOBJ(str2, points[pointI]);
meshTools::writeOBJ(str1, points[pointi]);
meshTools::writeOBJ(str2, points[pointi]);
}
const DynamicList<face>& faces = meshMod.faces();
@ -126,10 +126,10 @@ void Foam::meshDualiser::dumpPolyTopoChange
Foam::label Foam::meshDualiser::findDualCell
(
const label celli,
const label pointI
const label pointi
) const
{
const labelList& dualCells = pointToDualCells_[pointI];
const labelList& dualCells = pointToDualCells_[pointi];
if (dualCells.size() == 1)
{
@ -137,7 +137,7 @@ Foam::label Foam::meshDualiser::findDualCell
}
else
{
label index = findIndex(mesh_.pointCells()[pointI], celli);
label index = findIndex(mesh_.pointCells()[pointi], celli);
return dualCells[index];
}
@ -147,11 +147,11 @@ Foam::label Foam::meshDualiser::findDualCell
void Foam::meshDualiser::generateDualBoundaryEdges
(
const PackedBoolList& isBoundaryEdge,
const label pointI,
const label pointi,
polyTopoChange& meshMod
)
{
const labelList& pEdges = mesh_.pointEdges()[pointI];
const labelList& pEdges = mesh_.pointEdges()[pointi];
forAll(pEdges, pEdgeI)
{
@ -164,7 +164,7 @@ void Foam::meshDualiser::generateDualBoundaryEdges
edgeToDualPoint_[edgeI] = meshMod.addPoint
(
e.centre(mesh_.points()),
pointI, // masterPoint
pointi, // masterPoint
-1, // zoneID
true // inCell
);
@ -178,7 +178,7 @@ void Foam::meshDualiser::generateDualBoundaryEdges
bool Foam::meshDualiser::sameDualCell
(
const label facei,
const label pointI
const label pointi
) const
{
if (!mesh_.isInternalFace(facei))
@ -191,13 +191,13 @@ bool Foam::meshDualiser::sameDualCell
label own = mesh_.faceOwner()[facei];
label nei = mesh_.faceNeighbour()[facei];
return findDualCell(own, pointI) == findDualCell(nei, pointI);
return findDualCell(own, pointi) == findDualCell(nei, pointi);
}
Foam::label Foam::meshDualiser::addInternalFace
(
const label masterPointI,
const label masterPointi,
const label masterEdgeI,
const label masterFacei,
@ -261,7 +261,7 @@ Foam::label Foam::meshDualiser::addInternalFace
newFace,
dualCell0, // own
dualCell1, // nei
masterPointI, // masterPointID
masterPointi, // masterPointID
masterEdgeI, // masterEdgeID
masterFacei, // masterFaceID
false, // flipFaceFlux
@ -288,7 +288,7 @@ Foam::label Foam::meshDualiser::addInternalFace
newFace,
dualCell1, // own
dualCell0, // nei
masterPointI, // masterPointID
masterPointi, // masterPointID
masterEdgeI, // masterEdgeID
masterFacei, // masterFaceID
false, // flipFaceFlux
@ -314,7 +314,7 @@ Foam::label Foam::meshDualiser::addInternalFace
Foam::label Foam::meshDualiser::addBoundaryFace
(
const label masterPointI,
const label masterPointi,
const label masterEdgeI,
const label masterFacei,
@ -345,7 +345,7 @@ Foam::label Foam::meshDualiser::addBoundaryFace
newFace,
dualCelli, // own
-1, // nei
masterPointI, // masterPointID
masterPointi, // masterPointID
masterEdgeI, // masterEdgeID
masterFacei, // masterFaceID
false, // flipFaceFlux
@ -473,7 +473,7 @@ void Foam::meshDualiser::createFacesAroundEdge
// Close current face.
addInternalFace
(
-1, // masterPointI
-1, // masterPointi
edgeI, // masterEdgeI
-1, // masterFacei
edgeOrder,
@ -525,7 +525,7 @@ void Foam::meshDualiser::createFacesAroundEdge
verts.shrink();
addInternalFace
(
-1, // masterPointI
-1, // masterPointi
edgeI, // masterEdgeI
-1, // masterFacei
edgeOrder,
@ -619,7 +619,7 @@ void Foam::meshDualiser::createFaceFromInternalFace
verts.shrink();
addInternalFace
(
-1, // masterPointI
-1, // masterPointi
-1, // masterEdgeI
facei, // masterFacei
true, // edgeOrder,
@ -641,7 +641,7 @@ void Foam::meshDualiser::createFaceFromInternalFace
void Foam::meshDualiser::createFacesAroundBoundaryPoint
(
const label patchi,
const label patchPointI,
const label patchPointi,
const label startFacei,
polyTopoChange& meshMod,
boolList& donePFaces // pFaces visited
@ -649,12 +649,12 @@ void Foam::meshDualiser::createFacesAroundBoundaryPoint
{
const polyBoundaryMesh& patches = mesh_.boundaryMesh();
const polyPatch& pp = patches[patchi];
const labelList& pFaces = pp.pointFaces()[patchPointI];
const labelList& pFaces = pp.pointFaces()[patchPointi];
const labelList& own = mesh_.faceOwner();
label pointI = pp.meshPoints()[patchPointI];
label pointi = pp.meshPoints()[patchPointi];
if (pointToDualPoint_[pointI] == -1)
if (pointToDualPoint_[pointi] == -1)
{
// Not a feature point. Loop over all connected
// pointFaces.
@ -678,11 +678,11 @@ void Foam::meshDualiser::createFacesAroundBoundaryPoint
// Insert face centre
verts.append(faceToDualPoint_[facei]);
label dualCelli = findDualCell(own[facei], pointI);
label dualCelli = findDualCell(own[facei], pointi);
// Get the edge before the patchPointI
// Get the edge before the patchPointi
const face& f = mesh_.faces()[facei];
label fp = findIndex(f, pointI);
label fp = findIndex(f, pointi);
label prevFp = f.rcIndex(fp);
label edgeI = mesh_.faceEdges()[facei][prevFp];
@ -721,19 +721,19 @@ void Foam::meshDualiser::createFacesAroundBoundaryPoint
}
// Check if different cell.
if (dualCelli != findDualCell(own[facei], pointI))
if (dualCelli != findDualCell(own[facei], pointi))
{
FatalErrorInFunction
<< "Different dual cells but no feature edge"
<< " inbetween point:" << pointI
<< " coord:" << mesh_.points()[pointI]
<< " inbetween point:" << pointi
<< " coord:" << mesh_.points()[pointi]
<< abort(FatalError);
}
}
verts.shrink();
label dualCelli = findDualCell(own[facei], pointI);
label dualCelli = findDualCell(own[facei], pointi);
//Bit dodgy: create dualface from the last face (instead of from
// the central point). This will also use the original faceZone to
@ -741,8 +741,8 @@ void Foam::meshDualiser::createFacesAroundBoundaryPoint
addBoundaryFace
(
//pointI, // masterPointI
-1, // masterPointI
//pointi, // masterPointi
-1, // masterPointi
-1, // masterEdgeI
facei, // masterFacei
dualCelli,
@ -759,11 +759,11 @@ void Foam::meshDualiser::createFacesAroundBoundaryPoint
DynamicList<label> verts(mesh_.faces()[facei].size());
// Starting point.
verts.append(pointToDualPoint_[pointI]);
verts.append(pointToDualPoint_[pointi]);
// Find edge between pointI and next point on face.
// Find edge between pointi and next point on face.
const labelList& fEdges = mesh_.faceEdges()[facei];
label nextEdgeI = fEdges[findIndex(mesh_.faces()[facei], pointI)];
label nextEdgeI = fEdges[findIndex(mesh_.faces()[facei], pointi)];
if (edgeToDualPoint_[nextEdgeI] != -1)
{
verts.append(edgeToDualPoint_[nextEdgeI]);
@ -783,30 +783,30 @@ void Foam::meshDualiser::createFacesAroundBoundaryPoint
// Face centre
verts.append(faceToDualPoint_[facei]);
// Find edge before pointI on facei
// Find edge before pointi on facei
const labelList& fEdges = mesh_.faceEdges()[facei];
const face& f = mesh_.faces()[facei];
label prevFp = f.rcIndex(findIndex(f, pointI));
label prevFp = f.rcIndex(findIndex(f, pointi));
label edgeI = fEdges[prevFp];
if (edgeToDualPoint_[edgeI] != -1)
{
// Feature edge. Close any face so far. Note: uses face to
// create dualFace from. Could use pointI instead.
// create dualFace from. Could use pointi instead.
verts.append(edgeToDualPoint_[edgeI]);
addBoundaryFace
(
-1, // masterPointI
-1, // masterPointi
-1, // masterEdgeI
facei, // masterFacei
findDualCell(own[facei], pointI),
findDualCell(own[facei], pointi),
patchi,
verts.shrink(),
meshMod
);
verts.clear();
verts.append(pointToDualPoint_[pointI]);
verts.append(pointToDualPoint_[pointi]);
verts.append(edgeToDualPoint_[edgeI]);
}
@ -838,13 +838,13 @@ void Foam::meshDualiser::createFacesAroundBoundaryPoint
if (verts.size() > 2)
{
// Note: face created from face, not from pointI
// Note: face created from face, not from pointi
addBoundaryFace
(
-1, // masterPointI
-1, // masterPointi
-1, // masterEdgeI
startFacei, // masterFacei
findDualCell(own[facei], pointI),
findDualCell(own[facei], pointi),
patchi,
verts.shrink(),
meshMod
@ -1007,7 +1007,7 @@ void Foam::meshDualiser::setRefinement
// Dual cells (from points)
// ~~~~~~~~~~~~~~~~~~~~~~~~
// pointToDualCells_[pointI]
// pointToDualCells_[pointi]
// - single entry : all cells surrounding point all become the same
// cell.
// - multiple entries: in order of pointCells.
@ -1016,21 +1016,21 @@ void Foam::meshDualiser::setRefinement
// feature points that become single cell
forAll(singleCellFeaturePoints, i)
{
label pointI = singleCellFeaturePoints[i];
label pointi = singleCellFeaturePoints[i];
pointToDualPoint_[pointI] = meshMod.addPoint
pointToDualPoint_[pointi] = meshMod.addPoint
(
mesh_.points()[pointI],
pointI, // masterPoint
mesh_.pointZones().whichZone(pointI), // zoneID
mesh_.points()[pointi],
pointi, // masterPoint
mesh_.pointZones().whichZone(pointi), // zoneID
true // inCell
);
// Generate single cell
pointToDualCells_[pointI].setSize(1);
pointToDualCells_[pointI][0] = meshMod.addCell
pointToDualCells_[pointi].setSize(1);
pointToDualCells_[pointi][0] = meshMod.addCell
(
pointI, //masterPointID,
pointi, //masterPointID,
-1, //masterEdgeID,
-1, //masterFaceID,
-1, //masterCellID,
@ -1038,43 +1038,43 @@ void Foam::meshDualiser::setRefinement
);
if (dualCcStr.valid())
{
meshTools::writeOBJ(dualCcStr(), mesh_.points()[pointI]);
meshTools::writeOBJ(dualCcStr(), mesh_.points()[pointi]);
}
}
// feature points that become multiple cells
forAll(multiCellFeaturePoints, i)
{
label pointI = multiCellFeaturePoints[i];
label pointi = multiCellFeaturePoints[i];
if (pointToDualCells_[pointI].size() > 0)
if (pointToDualCells_[pointi].size() > 0)
{
FatalErrorInFunction
<< "Point " << pointI << " at:" << mesh_.points()[pointI]
<< "Point " << pointi << " at:" << mesh_.points()[pointi]
<< " is both in singleCellFeaturePoints"
<< " and multiCellFeaturePoints."
<< abort(FatalError);
}
pointToDualPoint_[pointI] = meshMod.addPoint
pointToDualPoint_[pointi] = meshMod.addPoint
(
mesh_.points()[pointI],
pointI, // masterPoint
mesh_.pointZones().whichZone(pointI), // zoneID
mesh_.points()[pointi],
pointi, // masterPoint
mesh_.pointZones().whichZone(pointi), // zoneID
true // inCell
);
// Create dualcell for every cell connected to dual point
const labelList& pCells = mesh_.pointCells()[pointI];
const labelList& pCells = mesh_.pointCells()[pointi];
pointToDualCells_[pointI].setSize(pCells.size());
pointToDualCells_[pointi].setSize(pCells.size());
forAll(pCells, pCelli)
{
pointToDualCells_[pointI][pCelli] = meshMod.addCell
pointToDualCells_[pointi][pCelli] = meshMod.addCell
(
pointI, //masterPointID
pointi, //masterPointID
-1, //masterEdgeID
-1, //masterFaceID
-1, //masterCellID
@ -1085,20 +1085,20 @@ void Foam::meshDualiser::setRefinement
meshTools::writeOBJ
(
dualCcStr(),
0.5*(mesh_.points()[pointI]+cellCentres[pCells[pCelli]])
0.5*(mesh_.points()[pointi]+cellCentres[pCells[pCelli]])
);
}
}
}
// Normal points
forAll(mesh_.points(), pointI)
forAll(mesh_.points(), pointi)
{
if (pointToDualCells_[pointI].empty())
if (pointToDualCells_[pointi].empty())
{
pointToDualCells_[pointI].setSize(1);
pointToDualCells_[pointI][0] = meshMod.addCell
pointToDualCells_[pointi].setSize(1);
pointToDualCells_[pointi][0] = meshMod.addCell
(
pointI, //masterPointID,
pointi, //masterPointID,
-1, //masterEdgeID,
-1, //masterFaceID,
-1, //masterCellID,
@ -1107,7 +1107,7 @@ void Foam::meshDualiser::setRefinement
if (dualCcStr.valid())
{
meshTools::writeOBJ(dualCcStr(), mesh_.points()[pointI]);
meshTools::writeOBJ(dualCcStr(), mesh_.points()[pointi]);
}
}
}
@ -1396,9 +1396,9 @@ void Foam::meshDualiser::setRefinement
const labelListList& pointFaces = pp.pointFaces();
forAll(pointFaces, patchPointI)
forAll(pointFaces, patchPointi)
{
const labelList& pFaces = pointFaces[patchPointI];
const labelList& pFaces = pointFaces[patchPointi];
boolList donePFaces(pFaces.size(), false);
@ -1409,8 +1409,8 @@ void Foam::meshDualiser::setRefinement
// Starting face
label startFacei = pp.start()+pFaces[i];
//Pout<< "Walking around point:" << pointI
// << " coord:" << mesh_.points()[pointI]
//Pout<< "Walking around point:" << pointi
// << " coord:" << mesh_.points()[pointi]
// << " on patch:" << patchi
// << " startFace:" << startFacei
// << " at:" << mesh_.faceCentres()[startFacei]
@ -1419,7 +1419,7 @@ void Foam::meshDualiser::setRefinement
createFacesAroundBoundaryPoint
(
patchi,
patchPointI,
patchPointi,
startFacei,
meshMod,
donePFaces // pFaces visited

View File

@ -94,14 +94,14 @@ class meshDualiser
static void dumpPolyTopoChange(const polyTopoChange&, const fileName&);
//- Find dual cell given point and cell
label findDualCell(const label celli, const label pointI) const;
label findDualCell(const label celli, const label pointi) const;
//- Helper function to generate dualpoints on all boundary edges
// emanating from (boundary & feature) point
void generateDualBoundaryEdges
(
const PackedBoolList&,
const label pointI,
const label pointi,
polyTopoChange&
);
@ -109,13 +109,13 @@ class meshDualiser
bool sameDualCell
(
const label facei,
const label pointI
const label pointi
) const;
//- Add internal face
label addInternalFace
(
const label masterPointI,
const label masterPointi,
const label masterEdgeI,
const label masterFacei,
@ -129,12 +129,12 @@ class meshDualiser
//- Add boundary face
label addBoundaryFace
(
const label masterPointI,
const label masterPointi,
const label masterEdgeI,
const label masterFacei,
const label dualCelli,
const label patchI,
const label patchi,
const DynamicList<label>& verts,
polyTopoChange& meshMod
) const;
@ -158,11 +158,11 @@ class meshDualiser
polyTopoChange&
) const;
//- Creates boundary faces walking around point on patchI.
//- Creates boundary faces walking around point on patchi.
void createFacesAroundBoundaryPoint
(
const label patchI,
const label patchPointI,
const label patchi,
const label patchPointi,
const label startFacei,
polyTopoChange&,
boolList& donePFaces // pFaces visited

View File

@ -69,13 +69,13 @@ Foam::label Foam::regionSide::otherEdge
const primitiveMesh& mesh,
const label facei,
const label edgeI,
const label pointI
const label pointi
)
{
const edge& e = mesh.edges()[edgeI];
// Get other point on edge.
label freePointI = e.otherVertex(pointI);
label freePointi = e.otherVertex(pointi);
const labelList& fEdges = mesh.faceEdges()[facei];
@ -87,12 +87,12 @@ Foam::label Foam::regionSide::otherEdge
if
(
(
otherE.start() == pointI
&& otherE.end() != freePointI
otherE.start() == pointi
&& otherE.end() != freePointi
)
|| (
otherE.end() == pointI
&& otherE.start() != freePointI
otherE.end() == pointi
&& otherE.start() != freePointi
)
)
{
@ -103,7 +103,7 @@ Foam::label Foam::regionSide::otherEdge
FatalErrorInFunction
<< "Cannot find other edge on face " << facei << " that uses point "
<< pointI << " but not point " << freePointI << endl
<< pointi << " but not point " << freePointi << endl
<< "Edges on face:" << fEdges
<< " verts:" << UIndirectList<edge>(mesh.edges(), fEdges)()
<< " Vertices on face:"
@ -214,7 +214,7 @@ void Foam::regionSide::visitConnectedFaces
}
// From edge on face connected to point on region (regionPointI) cross
// From edge on face connected to point on region (regionPointi) cross
// to all other edges using this point by walking across faces
// Does not cross regionEdges so stays on one side
// of region
@ -222,7 +222,7 @@ void Foam::regionSide::walkPointConnectedFaces
(
const primitiveMesh& mesh,
const labelHashSet& regionEdges,
const label regionPointI,
const label regionPointi,
const label startFacei,
const label startEdgeI,
labelHashSet& visitedEdges
@ -233,15 +233,15 @@ void Foam::regionSide::walkPointConnectedFaces
if (debug)
{
Info<< "walkPointConnectedFaces : regionPointI:" << regionPointI
Info<< "walkPointConnectedFaces : regionPointi:" << regionPointi
<< " facei:" << startFacei
<< " edgeI:" << startEdgeI << " verts:"
<< mesh.edges()[startEdgeI]
<< endl;
}
// Cross facei i.e. get edge not startEdgeI which uses regionPointI
label edgeI = otherEdge(mesh, startFacei, startEdgeI, regionPointI);
// Cross facei i.e. get edge not startEdgeI which uses regionPointi
label edgeI = otherEdge(mesh, startFacei, startEdgeI, regionPointi);
if (!regionEdges.found(edgeI))
{
@ -271,7 +271,7 @@ void Foam::regionSide::walkPointConnectedFaces
(
mesh,
regionEdges,
regionPointI,
regionPointi,
facei,
edgeI,
visitedEdges

View File

@ -79,7 +79,7 @@ class regionSide
const primitiveMesh& mesh,
const label facei,
const label edgeI,
const label pointI
const label pointi
);
//- From facei, side celli, cross to other faces/cells by
@ -94,14 +94,14 @@ class regionSide
labelHashSet& visitedFace
);
//- From edge on face connected to point on region (regionPointI) cross
//- From edge on face connected to point on region (regionPointi) cross
// to all other edges using this point by walking across faces
// Does not cross regionEdges so stays on one side of region
void walkPointConnectedFaces
(
const primitiveMesh& mesh,
const labelHashSet& regionEdges,
const label regionPointI,
const label regionPointi,
const label startFacei,
const label startEdgeI,
labelHashSet& visitedEdges

View File

@ -241,15 +241,15 @@ int main(int argc, char *argv[])
// Create mesh subsetting engine
fvMeshSubset subsetter(mesh);
label patchI = -1;
label patchi = -1;
if (args.optionFound("patch"))
{
const word patchName = args["patch"];
patchI = mesh.boundaryMesh().findPatchID(patchName);
patchi = mesh.boundaryMesh().findPatchID(patchName);
if (patchI == -1)
if (patchi == -1)
{
FatalErrorInFunction
<< nl << "Valid patches are " << mesh.boundaryMesh().names()
@ -269,7 +269,7 @@ int main(int argc, char *argv[])
cellSet currentSet(mesh, setName);
subsetter.setLargeCellSubset(currentSet, patchI, true);
subsetter.setLargeCellSubset(currentSet, patchi, true);
IOobjectList objects(mesh, runTime.timeName());

View File

@ -46,14 +46,14 @@ namespace Foam
void outputFieldList
(
const PtrList<GeoField>& fieldList,
const label patchI
const label patchi
);
template<class GeoField>
void collectFieldList
(
const PtrList<GeoField>& fieldList,
const label patchI,
const label patchi,
HashTable<word>& fieldToType
);
} // End namespace Foam

View File

@ -250,24 +250,24 @@ autoPtr<mapPolyMesh> mergeSharedPoints
forAll(constructMap, i)
{
label oldPointI = constructMap[i];
label oldPointi = constructMap[i];
// New label of point after changeMesh.
label newPointI = map().reversePointMap()[oldPointI];
label newPointi = map().reversePointMap()[oldPointi];
if (newPointI < -1)
if (newPointi < -1)
{
constructMap[i] = -newPointI-2;
constructMap[i] = -newPointi-2;
}
else if (newPointI >= 0)
else if (newPointi >= 0)
{
constructMap[i] = newPointI;
constructMap[i] = newPointi;
}
else
{
FatalErrorInFunction
<< "Problem. oldPointI:" << oldPointI
<< " newPointI:" << newPointI << abort(FatalError);
<< "Problem. oldPointi:" << oldPointi
<< " newPointi:" << newPointi << abort(FatalError);
}
}
}

View File

@ -529,9 +529,9 @@ void Foam::ensightMesh::writePrims
List<int> temp(cellPoints.size());
forAll(cellPoints, pointI)
forAll(cellPoints, pointi)
{
temp[pointI] = cellPoints[pointI] + 1;
temp[pointi] = cellPoints[pointi] + 1;
}
ensightGeometryFile.write(temp);
}
@ -548,9 +548,9 @@ void Foam::ensightMesh::writePrims
{
const cellShape& cellPoints = cellShapes[i];
forAll(cellPoints, pointI)
forAll(cellPoints, pointi)
{
temp[n] = cellPoints[pointI] + 1;
temp[n] = cellPoints[pointi] + 1;
n++;
}
}
@ -639,15 +639,15 @@ void Foam::ensightMesh::writePolysPoints
// EnSight prefers to have all the faces of an nfaced cell
// oriented in the same way.
List<int> temp(np);
forAll(f, pointI)
forAll(f, pointi)
{
if (reverseOrder)
{
temp[np-1-pointI] = f[pointI] + 1;
temp[np-1-pointi] = f[pointi] + 1;
}
else
{
temp[pointI] = f[pointI] + 1;
temp[pointi] = f[pointi] + 1;
}
}
ensightGeometryFile.write(temp);
@ -833,9 +833,9 @@ void Foam::ensightMesh::writeFacePrims
const face& patchFace = patchFaces[i];
List<int> temp(patchFace.size());
forAll(patchFace, pointI)
forAll(patchFace, pointi)
{
temp[pointI] = patchFace[pointI] + 1;
temp[pointi] = patchFace[pointi] + 1;
}
ensightGeometryFile.write(temp);

View File

@ -124,7 +124,7 @@ public:
(
const bool nearCellValue,
const GeometricField<Type, fvPatchField, volMesh>& vfld,
const label patchI
const label patchi
) const;
//- Get mixed field: fvsPatchField for boundary faces and

View File

@ -95,14 +95,14 @@ void ReadAndMapFields
// Map from read field. Set unmapped entries to nullValue.
fld.setSize(map.size(), nullValue);
forAll(map, pointI)
forAll(map, pointi)
{
label index = map[pointI];
label index = map[pointi];
if (index > 0)
{
label celli = index-1;
fld[pointI] = readField[celli];
fld[pointi] = readField[celli];
}
else if (index < 0)
{
@ -115,7 +115,7 @@ void ReadAndMapFields
(
facei
);
fld[pointI] = readField.boundaryField()[patchi][localFacei];
fld[pointi] = readField.boundaryField()[patchi][localFacei];
}
//else
//{
@ -128,8 +128,8 @@ void ReadAndMapFields
//else
//{
// WarningInFunction
// << "Point " << pointI << " at "
// << tetDualMesh.points()[pointI]
// << "Point " << pointi << " at "
// << tetDualMesh.points()[pointi]
// << " has no dual correspondence." << endl;
//}
}
@ -200,9 +200,9 @@ int main(int argc, char *argv[])
label nCells = 0;
label nPatchFaces = 0;
label nUnmapped = 0;
forAll(pointDualAddressing, pointI)
forAll(pointDualAddressing, pointi)
{
label index = pointDualAddressing[pointI];
label index = pointDualAddressing[pointi];
if (index > 0)
{

View File

@ -120,7 +120,7 @@ Foam::vtkTopo::vtkTopo(const polyMesh& mesh)
cellTypes_.setSize(cellShapes.size() + nAddCells);
// Set counters for additional points and additional cells
label addPointI = 0, addCelli = 0;
label addPointi = 0, addCelli = 0;
forAll(cellShapes, celli)
{
@ -191,10 +191,10 @@ Foam::vtkTopo::vtkTopo(const polyMesh& mesh)
// Polyhedral cell. Decompose into tets + pyramids.
// Mapping from additional point to cell
addPointCellLabels_[addPointI] = celli;
addPointCellLabels_[addPointi] = celli;
// The new vertex from the cell-centre
const label newVertexLabel = mesh_.nPoints() + addPointI;
const label newVertexLabel = mesh_.nPoints() + addPointi;
// Whether to insert cell in place of original or not.
bool substituteCell = true;
@ -305,7 +305,7 @@ Foam::vtkTopo::vtkTopo(const polyMesh& mesh)
}
}
addPointI++;
addPointi++;
}
else
{

View File

@ -158,7 +158,7 @@ vtkUnstructuredGrid* Foam::vtkPV3Foam::volumeVTKMesh
vtkmesh->Allocate(mesh.nCells() + nAddCells);
// Set counters for additional points and additional cells
label addPointI = 0, addCelli = 0;
label addPointi = 0, addCelli = 0;
// Create storage for points - needed for mapping from OpenFOAM to VTK
// data types - max 'order' = hex = 8 points
@ -353,10 +353,10 @@ vtkUnstructuredGrid* Foam::vtkPV3Foam::volumeVTKMesh
// Polyhedral cell. Decompose into tets + prisms.
// Mapping from additional point to cell
addPointCellLabels[addPointI] = celli;
addPointCellLabels[addPointi] = celli;
// The new vertex from the cell-centre
const label newVertexLabel = mesh.nPoints() + addPointI;
const label newVertexLabel = mesh.nPoints() + addPointi;
vtkInsertNextOpenFOAMPoint(vtkpoints, mesh.C()[celli]);
// Whether to insert cell in place of original or not.
@ -460,7 +460,7 @@ vtkUnstructuredGrid* Foam::vtkPV3Foam::volumeVTKMesh
}
}
addPointI++;
addPointi++;
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -54,9 +54,9 @@ vtkPolyData* Foam::vtkPV3Foam::pointZoneVTKMesh
vtkPoints* vtkpoints = vtkPoints::New();
vtkpoints->Allocate(pointLabels.size());
forAll(pointLabels, pointI)
forAll(pointLabels, pointi)
{
vtkInsertNextOpenFOAMPoint(vtkpoints, meshPoints[pointLabels[pointI]]);
vtkInsertNextOpenFOAMPoint(vtkpoints, meshPoints[pointLabels[pointi]]);
}
vtkmesh->SetPoints(vtkpoints);

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
@ -252,9 +252,9 @@ Foam::vtkPV3blockMesh::~vtkPV3blockMesh()
// Hmm. pointNumberTextActors are not getting removed
//
forAll(pointNumberTextActorsPtrs_, pointI)
forAll(pointNumberTextActorsPtrs_, pointi)
{
pointNumberTextActorsPtrs_[pointI]->Delete();
pointNumberTextActorsPtrs_[pointi]->Delete();
}
pointNumberTextActorsPtrs_.clear();
@ -420,10 +420,10 @@ void Foam::vtkPV3blockMesh::renderPointNumbers
{
// always remove old actors first
forAll(pointNumberTextActorsPtrs_, pointI)
forAll(pointNumberTextActorsPtrs_, pointi)
{
renderer->RemoveViewProp(pointNumberTextActorsPtrs_[pointI]);
pointNumberTextActorsPtrs_[pointI]->Delete();
renderer->RemoveViewProp(pointNumberTextActorsPtrs_[pointi]);
pointNumberTextActorsPtrs_[pointi]->Delete();
}
pointNumberTextActorsPtrs_.clear();
@ -433,11 +433,11 @@ void Foam::vtkPV3blockMesh::renderPointNumbers
const scalar scaleFactor = meshPtr_->scaleFactor();
pointNumberTextActorsPtrs_.setSize(cornerPts.size());
forAll(cornerPts, pointI)
forAll(cornerPts, pointi)
{
vtkTextActor* txt = vtkTextActor::New();
txt->SetInput(Foam::name(pointI).c_str());
txt->SetInput(Foam::name(pointi).c_str());
// Set text properties
vtkTextProperty* tprop = txt->GetTextProperty();
@ -454,9 +454,9 @@ void Foam::vtkPV3blockMesh::renderPointNumbers
txt->GetPositionCoordinate()->SetValue
(
cornerPts[pointI].x()*scaleFactor,
cornerPts[pointI].y()*scaleFactor,
cornerPts[pointI].z()*scaleFactor
cornerPts[pointi].x()*scaleFactor,
cornerPts[pointi].y()*scaleFactor,
cornerPts[pointi].z()*scaleFactor
);
// Add text to each renderer
@ -464,7 +464,7 @@ void Foam::vtkPV3blockMesh::renderPointNumbers
// Maintain a list of text labels added so that they can be
// removed later
pointNumberTextActorsPtrs_[pointI] = txt;
pointNumberTextActorsPtrs_[pointi] = txt;
}
}
}

View File

@ -158,7 +158,7 @@ vtkUnstructuredGrid* Foam::vtkPVFoam::volumeVTKMesh
vtkmesh->Allocate(mesh.nCells() + nAddCells);
// Set counters for additional points and additional cells
label addPointI = 0, addCelli = 0;
label addPointi = 0, addCelli = 0;
// Create storage for points - needed for mapping from OpenFOAM to VTK
// data types - max 'order' = hex = 8 points
@ -353,10 +353,10 @@ vtkUnstructuredGrid* Foam::vtkPVFoam::volumeVTKMesh
// Polyhedral cell. Decompose into tets + prisms.
// Mapping from additional point to cell
addPointCellLabels[addPointI] = celli;
addPointCellLabels[addPointi] = celli;
// The new vertex from the cell-centre
const label newVertexLabel = mesh.nPoints() + addPointI;
const label newVertexLabel = mesh.nPoints() + addPointi;
vtkInsertNextOpenFOAMPoint(vtkpoints, mesh.C()[celli]);
// Whether to insert cell in place of original or not.
@ -460,7 +460,7 @@ vtkUnstructuredGrid* Foam::vtkPVFoam::volumeVTKMesh
}
}
addPointI++;
addPointi++;
}
}

View File

@ -54,9 +54,9 @@ vtkPolyData* Foam::vtkPVFoam::pointZoneVTKMesh
vtkPoints* vtkpoints = vtkPoints::New();
vtkpoints->Allocate(pointLabels.size());
forAll(pointLabels, pointI)
forAll(pointLabels, pointi)
{
vtkInsertNextOpenFOAMPoint(vtkpoints, meshPoints[pointLabels[pointI]]);
vtkInsertNextOpenFOAMPoint(vtkpoints, meshPoints[pointLabels[pointi]]);
}
vtkmesh->SetPoints(vtkpoints);

View File

@ -252,9 +252,9 @@ Foam::vtkPVblockMesh::~vtkPVblockMesh()
// Hmm. pointNumberTextActors are not getting removed
//
forAll(pointNumberTextActorsPtrs_, pointI)
forAll(pointNumberTextActorsPtrs_, pointi)
{
pointNumberTextActorsPtrs_[pointI]->Delete();
pointNumberTextActorsPtrs_[pointi]->Delete();
}
pointNumberTextActorsPtrs_.clear();
@ -420,10 +420,10 @@ void Foam::vtkPVblockMesh::renderPointNumbers
{
// always remove old actors first
forAll(pointNumberTextActorsPtrs_, pointI)
forAll(pointNumberTextActorsPtrs_, pointi)
{
renderer->RemoveViewProp(pointNumberTextActorsPtrs_[pointI]);
pointNumberTextActorsPtrs_[pointI]->Delete();
renderer->RemoveViewProp(pointNumberTextActorsPtrs_[pointi]);
pointNumberTextActorsPtrs_[pointi]->Delete();
}
pointNumberTextActorsPtrs_.clear();
@ -433,11 +433,11 @@ void Foam::vtkPVblockMesh::renderPointNumbers
const scalar scaleFactor = meshPtr_->scaleFactor();
pointNumberTextActorsPtrs_.setSize(cornerPts.size());
forAll(cornerPts, pointI)
forAll(cornerPts, pointi)
{
vtkTextActor* txt = vtkTextActor::New();
txt->SetInput(Foam::name(pointI).c_str());
txt->SetInput(Foam::name(pointi).c_str());
// Set text properties
vtkTextProperty* tprop = txt->GetTextProperty();
@ -454,9 +454,9 @@ void Foam::vtkPVblockMesh::renderPointNumbers
txt->GetPositionCoordinate()->SetValue
(
cornerPts[pointI].x()*scaleFactor,
cornerPts[pointI].y()*scaleFactor,
cornerPts[pointI].z()*scaleFactor
cornerPts[pointi].x()*scaleFactor,
cornerPts[pointi].y()*scaleFactor,
cornerPts[pointi].z()*scaleFactor
);
// Add text to each renderer
@ -464,7 +464,7 @@ void Foam::vtkPVblockMesh::renderPointNumbers
// Maintain a list of text labels added so that they can be
// removed later
pointNumberTextActorsPtrs_[pointI] = txt;
pointNumberTextActorsPtrs_[pointi] = txt;
}
}
}

View File

@ -120,9 +120,9 @@ int main(int argc, char *argv[])
);
labelList visitedPoint(mesh.nPoints());
forAll(visitedPoint, pointI)
forAll(visitedPoint, pointi)
{
visitedPoint[pointI] = 0;
visitedPoint[pointi] = 0;
}
label nVisited = 0;
label nVisitedOld = 0;
@ -166,9 +166,9 @@ int main(int argc, char *argv[])
// Zero flux face found
found = true;
forAll(zeroPoints, pointI)
forAll(zeroPoints, pointi)
{
if (visitedPoint[zeroPoints[pointI]] == 1)
if (visitedPoint[zeroPoints[pointi]] == 1)
{
found = false;
break;
@ -180,10 +180,10 @@ int main(int argc, char *argv[])
Info<< "Zero face: patch: " << patchi
<< " face: " << facei << endl;
forAll(zeroPoints, pointI)
forAll(zeroPoints, pointi)
{
streamFunction[zeroPoints[pointI]] = 0;
visitedPoint[zeroPoints[pointI]] = 1;
streamFunction[zeroPoints[pointi]] = 0;
visitedPoint[zeroPoints[pointi]] = 1;
nVisited++;
}
@ -210,9 +210,9 @@ int main(int argc, char *argv[])
bool found = true;
forAll(zeroPoints, pointI)
forAll(zeroPoints, pointi)
{
if (visitedPoint[zeroPoints[pointI]] == 1)
if (visitedPoint[zeroPoints[pointi]] == 1)
{
found = false;
break;
@ -221,10 +221,10 @@ int main(int argc, char *argv[])
if (found)
{
forAll(zeroPoints, pointI)
forAll(zeroPoints, pointi)
{
streamFunction[zeroPoints[pointI]] = 0.0;
visitedPoint[zeroPoints[pointI]] = 1;
streamFunction[zeroPoints[pointi]] = 0.0;
visitedPoint[zeroPoints[pointi]] = 1;
nVisited++;
}
@ -261,16 +261,16 @@ int main(int argc, char *argv[])
scalar currentBStream = 0.0;
vector currentBStreamPoint(0, 0, 0);
forAll(curBPoints, pointI)
forAll(curBPoints, pointi)
{
// Check if the point has been visited
if (visitedPoint[curBPoints[pointI]] == 1)
if (visitedPoint[curBPoints[pointi]] == 1)
{
// The point has been visited
currentBStream =
streamFunction[curBPoints[pointI]];
streamFunction[curBPoints[pointi]];
currentBStreamPoint =
points[curBPoints[pointI]];
points[curBPoints[pointi]];
bPointFound = true;
@ -281,10 +281,10 @@ int main(int argc, char *argv[])
if (bPointFound)
{
// Sort out other points on the face
forAll(curBPoints, pointI)
forAll(curBPoints, pointi)
{
// Check if the point has been visited
if (visitedPoint[curBPoints[pointI]] == 0)
if (visitedPoint[curBPoints[pointi]] == 0)
{
label patchNo =
mesh.boundaryMesh().whichPatch(facei);
@ -306,7 +306,7 @@ int main(int argc, char *argv[])
.whichFace(facei);
vector edgeHat =
points[curBPoints[pointI]]
points[curBPoints[pointi]]
- currentBStreamPoint;
edgeHat.replace(slabDir, 0);
edgeHat /= mag(edgeHat);
@ -315,11 +315,11 @@ int main(int argc, char *argv[])
if (edgeHat.y() > VSMALL)
{
visitedPoint[curBPoints[pointI]] =
visitedPoint[curBPoints[pointi]] =
1;
nVisited++;
streamFunction[curBPoints[pointI]]
streamFunction[curBPoints[pointi]]
=
currentBStream
+ phi.boundaryField()
@ -328,11 +328,11 @@ int main(int argc, char *argv[])
}
else if (edgeHat.y() < -VSMALL)
{
visitedPoint[curBPoints[pointI]] =
visitedPoint[curBPoints[pointi]] =
1;
nVisited++;
streamFunction[curBPoints[pointI]]
streamFunction[curBPoints[pointi]]
=
currentBStream
- phi.boundaryField()
@ -344,11 +344,11 @@ int main(int argc, char *argv[])
if (edgeHat.x() > VSMALL)
{
visitedPoint
[curBPoints[pointI]] = 1;
[curBPoints[pointi]] = 1;
nVisited++;
streamFunction
[curBPoints[pointI]] =
[curBPoints[pointi]] =
currentBStream
+ phi.boundaryField()
[patchNo][faceNo]
@ -357,11 +357,11 @@ int main(int argc, char *argv[])
else if (edgeHat.x() < -VSMALL)
{
visitedPoint
[curBPoints[pointI]] = 1;
[curBPoints[pointi]] = 1;
nVisited++;
streamFunction
[curBPoints[pointI]] =
[curBPoints[pointi]] =
currentBStream
- phi.boundaryField()
[patchNo][faceNo]
@ -388,16 +388,16 @@ int main(int argc, char *argv[])
scalar currentStream = 0.0;
point currentStreamPoint(0, 0, 0);
forAll(curPoints, pointI)
forAll(curPoints, pointi)
{
// Check if the point has been visited
if (visitedPoint[curPoints[pointI]] == 1)
if (visitedPoint[curPoints[pointi]] == 1)
{
// The point has been visited
currentStream =
streamFunction[curPoints[pointI]];
streamFunction[curPoints[pointi]];
currentStreamPoint =
points[curPoints[pointI]];
points[curPoints[pointi]];
pointFound = true;
break;
@ -407,13 +407,13 @@ int main(int argc, char *argv[])
if (pointFound)
{
// Sort out other points on the face
forAll(curPoints, pointI)
forAll(curPoints, pointi)
{
// Check if the point has been visited
if (visitedPoint[curPoints[pointI]] == 0)
if (visitedPoint[curPoints[pointi]] == 0)
{
vector edgeHat =
points[curPoints[pointI]]
points[curPoints[pointi]]
- currentStreamPoint;
edgeHat.replace(slabDir, 0);
@ -423,19 +423,19 @@ int main(int argc, char *argv[])
if (edgeHat.y() > VSMALL)
{
visitedPoint[curPoints[pointI]] = 1;
visitedPoint[curPoints[pointi]] = 1;
nVisited++;
streamFunction[curPoints[pointI]] =
streamFunction[curPoints[pointi]] =
currentStream
+ phi[facei]*sign(nHat.x());
}
else if (edgeHat.y() < -VSMALL)
{
visitedPoint[curPoints[pointI]] = 1;
visitedPoint[curPoints[pointi]] = 1;
nVisited++;
streamFunction[curPoints[pointI]] =
streamFunction[curPoints[pointi]] =
currentStream
- phi[facei]*sign(nHat.x());
}

View File

@ -133,12 +133,12 @@ int main(int argc, char *argv[])
Info<< "Additional Points:" << extraPoints.size() << endl;
vectorField pointsAll(points1);
label pointI = pointsAll.size();
label pointi = pointsAll.size();
pointsAll.setSize(pointsAll.size() + extraPoints.size());
forAll(extraPoints, i)
{
pointsAll[pointI++] = extraPoints[i];
pointsAll[pointi++] = extraPoints[i];
}
combinedSurf = triSurface(surface1, surface1.patches(), pointsAll);

View File

@ -766,9 +766,9 @@ int main(int argc, char *argv[])
// Info<< "Writing edges of intersection to selfInter.obj" << endl;
//
// OFstream intStream("selfInter.obj");
// forAll(inter.cutPoints(), cutPointI)
// forAll(inter.cutPoints(), cutPointi)
// {
// const point& pt = inter.cutPoints()[cutPointI];
// const point& pt = inter.cutPoints()[cutPointi];
//
// intStream << "v " << pt.x() << ' ' << pt.y() << ' ' << pt.z()
// << endl;

View File

@ -70,13 +70,13 @@ int main(int argc, char *argv[])
label minIndex = -1;
scalar minDist = GREAT;
forAll(localPoints, pointI)
forAll(localPoints, pointi)
{
const scalar dist = mag(localPoints[pointI] - samplePt);
const scalar dist = mag(localPoints[pointi] - samplePt);
if (dist < minDist)
{
minDist = dist;
minIndex = pointI;
minIndex = pointi;
}
}

View File

@ -44,13 +44,13 @@ Usage
using namespace Foam;
// Split facei along edgeI at position newPointI
// Split facei along edgeI at position newPointi
void greenRefine
(
const triSurface& surf,
const label facei,
const label edgeI,
const label newPointI,
const label newPointi,
DynamicList<labelledTri>& newFaces
)
{
@ -71,7 +71,7 @@ void greenRefine
labelledTri
(
f[fp0],
newPointI,
newPointi,
f[fp2],
f.region()
)
@ -80,7 +80,7 @@ void greenRefine
(
labelledTri
(
newPointI,
newPointi,
f[fp1],
f[fp2],
f.region()
@ -94,7 +94,7 @@ void greenRefine
labelledTri
(
f[fp2],
newPointI,
newPointi,
f[fp1],
f.region()
)
@ -103,7 +103,7 @@ void greenRefine
(
labelledTri
(
newPointI,
newPointi,
f[fp0],
f[fp1],
f.region()
@ -383,14 +383,14 @@ int main(int argc, char *argv[])
const labelListList& pointEdges = surf.pointEdges();
forAll(bPointsTobEdges, bPointI)
forAll(bPointsTobEdges, bPointi)
{
pointIndexHit& nearestHit = bPointsTobEdges[bPointI];
pointIndexHit& nearestHit = bPointsTobEdges[bPointi];
const label pointI = surf.boundaryPoints()[bPointI];
const point& samplePt = surf.localPoints()[pointI];
const label pointi = surf.boundaryPoints()[bPointi];
const point& samplePt = surf.localPoints()[pointi];
const labelList& pEdges = pointEdges[pointI];
const labelList& pEdges = pointEdges[pointi];
// Add edges connected to the edge to the shapeMask
DynamicList<label> shapeMask;
@ -428,7 +428,7 @@ int main(int argc, char *argv[])
)
{
nearestHit = currentHit;
bPointsHitTree[bPointI] = treeI;
bPointsHitTree[bPointi] = treeI;
}
}
@ -441,7 +441,7 @@ int main(int argc, char *argv[])
// (
// surf,
// nearestHit.index(),
// pointI,
// pointi,
// 30
// );
@ -452,20 +452,20 @@ int main(int argc, char *argv[])
}
}
forAll(bPointsTobEdges, bPointI)
forAll(bPointsTobEdges, bPointi)
{
const pointIndexHit& eHit = bPointsTobEdges[bPointI];
const pointIndexHit& eHit = bPointsTobEdges[bPointi];
if (eHit.hit())
{
const label hitSurfI = bPointsHitTree[bPointI];
const label hitSurfI = bPointsHitTree[bPointi];
const triSurface& hitSurf = newSurfaces[hitSurfI];
const label eIndex =
treeBoundaryEdges[hitSurfI][eHit.index()];
const edge& e = hitSurf.edges()[eIndex];
const label pointI = surf.boundaryPoints()[bPointI];
const label pointi = surf.boundaryPoints()[bPointi];
const labelList& eFaces = hitSurf.edgeFaces()[eIndex];
@ -487,7 +487,7 @@ int main(int argc, char *argv[])
DynamicList<labelledTri> newFacesFromSplit(2);
const point& pt = surf.localPoints()[pointI];
const point& pt = surf.localPoints()[pointi];
if
(
@ -506,17 +506,17 @@ int main(int argc, char *argv[])
nChanged++;
label newPointI = -1;
label newPointi = -1;
// Keep the points in the same place and move the edge
if (hitSurfI == surfI)
{
newPointI = pointI;
newPointi = pointi;
}
else
{
newPoints[hitSurfI].append(newPoints[surfI][pointI]);
newPointI = newPoints[hitSurfI].size() - 1;
newPoints[hitSurfI].append(newPoints[surfI][pointi]);
newPointi = newPoints[hitSurfI].size() - 1;
}
// Split the other face.
@ -525,7 +525,7 @@ int main(int argc, char *argv[])
hitSurf,
facei,
eIndex,
newPointI,
newPointi,
newFacesFromSplit
);

View File

@ -82,11 +82,11 @@ void dumpPoints(const triSurface& surf, const labelList& borderPoint)
OFstream os(fName);
forAll(borderPoint, pointI)
forAll(borderPoint, pointi)
{
if (borderPoint[pointI] != -1)
if (borderPoint[pointi] != -1)
{
const point& pt = surf.localPoints()[pointI];
const point& pt = surf.localPoints()[pointi];
os << "v " << pt.x() << ' ' << pt.y() << ' ' << pt.z() << endl;
}
@ -211,9 +211,9 @@ label markBorderPoints
const labelListList& pointEdges = surf.pointEdges();
forAll(pointEdges, pointI)
forAll(pointEdges, pointi)
{
const labelList& pEdges = pointEdges[pointI];
const labelList& pEdges = pointEdges[pointi];
label nBorderEdges = 0;
@ -225,9 +225,9 @@ label markBorderPoints
}
}
if (nBorderEdges == 2 && borderPoint[pointI] == -1)
if (nBorderEdges == 2 && borderPoint[pointi] == -1)
{
borderPoint[pointI] = nPoints++;
borderPoint[pointi] = nPoints++;
}
}
@ -242,13 +242,13 @@ label markBorderPoints
}
// Get minumum length of edges connected to pointI
// Get minumum length of edges connected to pointi
// Serves to get some local length scale.
scalar minEdgeLen(const triSurface& surf, const label pointI)
scalar minEdgeLen(const triSurface& surf, const label pointi)
{
const pointField& points = surf.localPoints();
const labelList& pEdges = surf.pointEdges()[pointI];
const labelList& pEdges = surf.pointEdges()[pointi];
scalar minLen = GREAT;
@ -308,13 +308,13 @@ label findEdge
}
// Get the other edge connected to pointI on facei.
// Get the other edge connected to pointi on facei.
label otherEdge
(
const triSurface& surf,
const label facei,
const label otherEdgeI,
const label pointI
const label pointi
)
{
const labelList& fEdges = surf.faceEdges()[facei];
@ -329,8 +329,8 @@ label otherEdge
(
edgeI != otherEdgeI
&& (
e.start() == pointI
|| e.end() == pointI
e.start() == pointi
|| e.end() == pointi
)
)
{
@ -340,7 +340,7 @@ label otherEdge
FatalErrorInFunction
<< " verts:" << surf.localPoints()[facei]
<< " connected to point " << pointI
<< " connected to point " << pointi
<< " faceEdges:" << UIndirectList<edge>(surf.edges(), fEdges)()
<< abort(FatalError);
@ -359,7 +359,7 @@ void walkSplitLine
const label startFacei,
const label startEdgeI, // is border edge
const label startPointI, // is border point
const label startPointi, // is border point
Map<label>& faceToEdge,
Map<label>& faceToPoint
@ -367,18 +367,18 @@ void walkSplitLine
{
label facei = startFacei;
label edgeI = startEdgeI;
label pointI = startPointI;
label pointi = startPointi;
do
{
//
// Stick to pointI and walk face-edge-face until back on border edge.
// Stick to pointi and walk face-edge-face until back on border edge.
//
do
{
// Cross face to next edge.
edgeI = otherEdge(surf, facei, edgeI, pointI);
edgeI = otherEdge(surf, facei, edgeI, pointi);
if (borderEdge[edgeI])
{
@ -393,7 +393,7 @@ void walkSplitLine
break;
}
}
else if (!faceToPoint.insert(facei, pointI))
else if (!faceToPoint.insert(facei, pointi))
{
// Was already visited.
return;
@ -429,9 +429,9 @@ void walkSplitLine
// Back on border edge. Cross to other point on edge.
//
pointI = surf.edges()[edgeI].otherVertex(pointI);
pointi = surf.edges()[edgeI].otherVertex(pointi);
if (borderPoint[pointI] == -1)
if (borderPoint[pointi] == -1)
{
return;
}
@ -773,7 +773,7 @@ int main(int argc, char *argv[])
//
label startEdgeI = -1;
label startPointI = -1;
label startPointi = -1;
forAll(borderEdge, edgeI)
{
@ -784,14 +784,14 @@ int main(int argc, char *argv[])
if ((borderPoint[e[0]] != -1) && (borderPoint[e[1]] == -1))
{
startEdgeI = edgeI;
startPointI = e[0];
startPointi = e[0];
break;
}
else if ((borderPoint[e[0]] == -1) && (borderPoint[e[1]] != -1))
{
startEdgeI = edgeI;
startPointI = e[1];
startPointi = e[1];
break;
}
@ -816,7 +816,7 @@ int main(int argc, char *argv[])
Info<< "Starting local walk from:" << endl
<< " edge :" << startEdgeI << endl
<< " point:" << startPointI << endl
<< " point:" << startPointi << endl
<< " face0:" << firstFacei << endl
<< " face1:" << secondFacei << endl
<< endl;
@ -836,7 +836,7 @@ int main(int argc, char *argv[])
firstFacei,
startEdgeI,
startPointI,
startPointi,
faceToEdge,
faceToPoint
@ -852,7 +852,7 @@ int main(int argc, char *argv[])
secondFacei,
startEdgeI,
startPointI,
startPointi,
faceToEdge,
faceToPoint
@ -885,18 +885,18 @@ int main(int argc, char *argv[])
pointField newPoints(surf.localPoints());
newPoints.setSize(newPoints.size() + nBorderPoints);
forAll(borderPoint, pointI)
forAll(borderPoint, pointi)
{
label newPointI = borderPoint[pointI];
label newPointi = borderPoint[pointi];
if (newPointI != -1)
if (newPointi != -1)
{
scalar minLen = minEdgeLen(surf, pointI);
scalar minLen = minEdgeLen(surf, pointi);
vector n = borderPointVec[pointI];
vector n = borderPointVec[pointi];
n /= mag(n);
newPoints[newPointI] = newPoints[pointI] + 0.1 * minLen * n;
newPoints[newPointi] = newPoints[pointi] + 0.1 * minLen * n;
}
}

View File

@ -124,16 +124,16 @@ int main(int argc, char *argv[])
// pick up cells sharing the point
forAll(markedPoints, pointI)
forAll(markedPoints, pointi)
{
if
(
markedPoints[pointI] < 0
|| markedPoints[pointI] >= surf1.nPoints()
markedPoints[pointi] < 0
|| markedPoints[pointi] >= surf1.nPoints()
)
{
FatalErrorInFunction
<< "localPoint label " << markedPoints[pointI]
<< "localPoint label " << markedPoints[pointi]
<< "out of range."
<< " The mesh has got "
<< surf1.nPoints() << " localPoints."
@ -141,7 +141,7 @@ int main(int argc, char *argv[])
}
const labelList& curFaces =
surf1.pointFaces()[markedPoints[pointI]];
surf1.pointFaces()[markedPoints[pointi]];
forAll(curFaces, i)
{

View File

@ -435,7 +435,7 @@
Within the implementation, a loop over all patches is done:
\code
forAll(patches, patchI)
forAll(patches, patchi)
{
... // some operation
}

View File

@ -422,9 +422,9 @@ void Foam::invertManyToMany
// Number of points per edge
labelList nPointsPerEdge(nEdges, 0);
forAll(pointEdges, pointI)
forAll(pointEdges, pointi)
{
const InList& pEdges = pointEdges[pointI];
const InList& pEdges = pointEdges[pointi];
forAll(pEdges, j)
{
@ -442,15 +442,15 @@ void Foam::invertManyToMany
nPointsPerEdge = 0;
// Fill edges
forAll(pointEdges, pointI)
forAll(pointEdges, pointi)
{
const InList& pEdges = pointEdges[pointI];
const InList& pEdges = pointEdges[pointi];
forAll(pEdges, j)
{
label edgeI = pEdges[j];
edges[edgeI][nPointsPerEdge[edgeI]++] = pointI;
edges[edgeI][nPointsPerEdge[edgeI]++] = pointi;
}
}
}

View File

@ -196,9 +196,9 @@ void Foam::pointPatchField<Type>::addToInternalField
// Get the addressing
const labelList& mp = patch().meshPoints();
forAll(mp, pointI)
forAll(mp, pointi)
{
iF[mp[pointI]] += pF[pointI];
iF[mp[pointi]] += pF[pointi];
}
}
@ -236,8 +236,8 @@ void Foam::pointPatchField<Type>::addToInternalField
forAll(points, i)
{
label pointI = points[i];
iF[mp[pointI]] += pF[pointI];
label pointi = points[i];
iF[mp[pointi]] += pF[pointi];
}
}
@ -270,9 +270,9 @@ void Foam::pointPatchField<Type>::setInInternalField
<< abort(FatalError);
}
forAll(meshPoints, pointI)
forAll(meshPoints, pointi)
{
iF[meshPoints[pointI]] = pF[pointI];
iF[meshPoints[pointi]] = pF[pointi];
}
}

View File

@ -73,27 +73,27 @@ void PatchToPatchInterpolation<FromPatch, ToPatch>::calcPointAddressing() const
bool doWeights = false;
forAll(pointAddressing, pointI)
forAll(pointAddressing, pointi)
{
doWeights = false;
const typename FromPatch::FaceType& hitFace =
fromPatchFaces[proj[pointI].hitObject()];
fromPatchFaces[proj[pointi].hitObject()];
point hitPoint = Zero;
if (proj[pointI].hit())
if (proj[pointi].hit())
{
// A hit exists
doWeights = true;
pointAddressing[pointI] = proj[pointI].hitObject();
pointAddressing[pointi] = proj[pointi].hitObject();
pointHit curHit =
hitFace.ray
(
toPatchPoints[pointI],
projectionDirection[pointI],
toPatchPoints[pointi],
projectionDirection[pointi],
fromPatchPoints,
alg_,
dir_
@ -102,17 +102,17 @@ void PatchToPatchInterpolation<FromPatch, ToPatch>::calcPointAddressing() const
// Grab distance to target
if (dir_ == intersection::CONTACT_SPHERE)
{
pointDistance[pointI] =
pointDistance[pointi] =
hitFace.contactSphereDiameter
(
toPatchPoints[pointI],
projectionDirection[pointI],
toPatchPoints[pointi],
projectionDirection[pointi],
fromPatchPoints
);
}
else
{
pointDistance[pointI] = curHit.distance();
pointDistance[pointi] = curHit.distance();
}
// Grab hit point
@ -124,8 +124,8 @@ void PatchToPatchInterpolation<FromPatch, ToPatch>::calcPointAddressing() const
pointHit ph =
hitFace.ray
(
toPatchPoints[pointI],
projectionDirection[pointI],
toPatchPoints[pointi],
projectionDirection[pointi],
fromPatchPoints,
alg_,
dir_
@ -134,8 +134,8 @@ void PatchToPatchInterpolation<FromPatch, ToPatch>::calcPointAddressing() const
scalar dist =
Foam::mag
(
toPatchPoints[pointI]
+ projectionDirection[pointI]*ph.distance()
toPatchPoints[pointi]
+ projectionDirection[pointi]*ph.distance()
- ph.missPoint()
);
@ -144,7 +144,7 @@ void PatchToPatchInterpolation<FromPatch, ToPatch>::calcPointAddressing() const
// Do shortest edge of hit object
edgeList hitFaceEdges =
fromPatchFaces[proj[pointI].hitObject()].edges();
fromPatchFaces[proj[pointi].hitObject()].edges();
forAll(hitFaceEdges, edgeI)
{
@ -156,7 +156,7 @@ void PatchToPatchInterpolation<FromPatch, ToPatch>::calcPointAddressing() const
);
}
const labelList& curEdges = toPatchPointEdges[pointI];
const labelList& curEdges = toPatchPointEdges[pointi];
forAll(curEdges, edgeI)
{
@ -173,7 +173,7 @@ void PatchToPatchInterpolation<FromPatch, ToPatch>::calcPointAddressing() const
// This point is being corrected
doWeights = true;
pointAddressing[pointI] = proj[pointI].hitObject();
pointAddressing[pointi] = proj[pointi].hitObject();
// Grab nearest point on face as hit point
hitPoint = ph.missPoint();
@ -181,22 +181,22 @@ void PatchToPatchInterpolation<FromPatch, ToPatch>::calcPointAddressing() const
// Grab distance to target
if (dir_ == intersection::CONTACT_SPHERE)
{
pointDistance[pointI] =
pointDistance[pointi] =
hitFace.contactSphereDiameter
(
toPatchPoints[pointI],
projectionDirection[pointI],
toPatchPoints[pointi],
projectionDirection[pointi],
fromPatchPoints
);
}
else
{
pointDistance[pointI] =
pointDistance[pointi] =
(
projectionDirection[pointI]
/mag(projectionDirection[pointI])
projectionDirection[pointi]
/mag(projectionDirection[pointi])
)
& (hitPoint - toPatchPoints[pointI]);
& (hitPoint - toPatchPoints[pointi]);
}
}
}
@ -204,29 +204,29 @@ void PatchToPatchInterpolation<FromPatch, ToPatch>::calcPointAddressing() const
if (doWeights)
{
// Set interpolation pointWeights
pointWeights.set(pointI, new scalarField(hitFace.size()));
pointWeights.set(pointi, new scalarField(hitFace.size()));
pointField hitFacePoints = hitFace.points(fromPatchPoints);
forAll(hitFacePoints, masterPointI)
forAll(hitFacePoints, masterPointi)
{
pointWeights[pointI][masterPointI] =
pointWeights[pointi][masterPointi] =
1.0/
(
mag
(
hitFacePoints[masterPointI]
hitFacePoints[masterPointi]
- hitPoint
)
+ VSMALL
);
}
pointWeights[pointI] /= sum(pointWeights[pointI]);
pointWeights[pointi] /= sum(pointWeights[pointi]);
}
else
{
pointWeights.set(pointI, new scalarField(0));
pointWeights.set(pointi, new scalarField(0));
}
}
}

View File

@ -63,18 +63,18 @@ PatchToPatchInterpolation<FromPatch, ToPatch>::pointInterpolate
const labelList& addr = pointAddr();
forAll(result, pointI)
forAll(result, pointi)
{
const scalarField& curWeights = weights[pointI];
const scalarField& curWeights = weights[pointi];
if (addr[pointI] > -1)
if (addr[pointi] > -1)
{
const labelList& hitFacePoints =
fromPatchLocalFaces[addr[pointI]];
fromPatchLocalFaces[addr[pointi]];
forAll(curWeights, wI)
{
result[pointI] += curWeights[wI]*pf[hitFacePoints[wI]];
result[pointi] += curWeights[wI]*pf[hitFacePoints[wI]];
}
}
}

View File

@ -63,8 +63,8 @@ private:
// Private data
//- Local map from neighbour proc to patchI. Different per processor!
// -1 or patchI for connection to procID
//- Local map from neighbour proc to patchi. Different per processor!
// -1 or patchi for connection to procID
labelList procPatchMap_;
//- Order in which the patches should be initialised/evaluated

View File

@ -52,9 +52,9 @@ Foam::labelList Foam::cell::labels(const faceUList& f) const
// in the first face there is no duplicates
const labelList& first = f[faces[0]];
forAll(first, pointI)
forAll(first, pointi)
{
p[pointI] = first[pointI];
p[pointi] = first[pointi];
}
// re-use maxVert to count the real vertices
@ -67,9 +67,9 @@ Foam::labelList Foam::cell::labels(const faceUList& f) const
{
const labelList& curFace = f[faces[facei]];
forAll(curFace, pointI)
forAll(curFace, pointi)
{
const label curPoint = curFace[pointI];
const label curPoint = curFace[pointi];
bool found = false;

View File

@ -70,13 +70,13 @@ Foam::label Foam::cell::opposingFaceLabel
// Compare every vertex of the current face agains the
// vertices of the master face
forAll(curFace, pointI)
forAll(curFace, pointi)
{
const label l = curFace[pointI];
const label l = curFace[pointi];
forAll(masterFace, masterPointI)
forAll(masterFace, masterPointi)
{
if (masterFace[masterPointI] == l)
if (masterFace[masterPointi] == l)
{
sharedPoint = true;
break;
@ -149,7 +149,7 @@ Foam::oppositeFace Foam::cell::opposingFace
oppFaceLabel
);
forAll(masterFace, pointI)
forAll(masterFace, pointi)
{
// Go through the list of edges and find the edge from this vertex
// to the slave face
@ -159,19 +159,19 @@ Foam::oppositeFace Foam::cell::opposingFace
{
// Get the other vertex
label otherVertex =
e[edgeI].otherVertex(masterFace[pointI]);
e[edgeI].otherVertex(masterFace[pointi]);
if (otherVertex != -1)
{
// Found an edge coming from this vertex.
// Check all vertices of the slave to find out
// if it exists.
forAll(slaveFace, slavePointI)
forAll(slaveFace, slavePointi)
{
if (slaveFace[slavePointI] == otherVertex)
if (slaveFace[slavePointi] == otherVertex)
{
usedEdges[edgeI] = true;
oppFace[pointI] = otherVertex;
oppFace[pointi] = otherVertex;
break;
}

View File

@ -618,9 +618,9 @@ Foam::face Foam::face::reverseFace() const
newList[0] = f[0];
for (label pointI = 1; pointI < newList.size(); pointI++)
for (label pointi = 1; pointi < newList.size(); pointi++)
{
newList[pointI] = f[size() - pointI];
newList[pointi] = f[size() - pointi];
}
return face(xferMove(newList));
@ -764,9 +764,9 @@ Foam::edgeList Foam::face::edges() const
edgeList e(points.size());
for (label pointI = 0; pointI < points.size() - 1; ++pointI)
for (label pointi = 0; pointi < points.size() - 1; ++pointi)
{
e[pointI] = edge(points[pointI], points[pointI + 1]);
e[pointi] = edge(points[pointi], points[pointi + 1]);
}
// Add last edge

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
@ -73,9 +73,9 @@ Foam::label Foam::mergePoints
const Field<Type> d(points - compareOrigin);
List<scalar> magSqrD(d.size());
forAll(d, pointI)
forAll(d, pointi)
{
magSqrD[pointI] = magSqr(d[pointI]);
magSqrD[pointi] = magSqr(d[pointi]);
}
labelList order;
sortedOrder(magSqrD, order);
@ -84,42 +84,42 @@ Foam::label Foam::mergePoints
Field<scalar> sortedTol(points.size());
forAll(order, sortI)
{
label pointI = order[sortI];
label pointi = order[sortI];
// Convert to scalar precision
const point pt
(
scalar(d[pointI].x()),
scalar(d[pointI].y()),
scalar(d[pointI].z())
scalar(d[pointi].x()),
scalar(d[pointi].y()),
scalar(d[pointi].z())
);
sortedTol[sortI] = 2*mergeTol*(mag(pt.x())+mag(pt.y())+mag(pt.z()));
}
label newPointI = 0;
label newPointi = 0;
// Handle 0th point separately (is always unique)
label pointI = order[0];
pointMap[pointI] = newPointI++;
label pointi = order[0];
pointMap[pointi] = newPointi++;
for (label sortI = 1; sortI < order.size(); sortI++)
{
// Get original point index
label pointI = order[sortI];
label pointi = order[sortI];
const scalar mag2 = magSqrD[order[sortI]];
// Convert to scalar precision
const point pt
(
scalar(points[pointI].x()),
scalar(points[pointI].y()),
scalar(points[pointI].z())
scalar(points[pointi].x()),
scalar(points[pointi].y()),
scalar(points[pointi].z())
);
// Compare to previous points to find equal one.
label equalPointI = -1;
label equalPointi = -1;
for
(
@ -129,46 +129,46 @@ Foam::label Foam::mergePoints
prevSortI--
)
{
label prevPointI = order[prevSortI];
label prevPointi = order[prevSortI];
const point prevPt
(
scalar(points[prevPointI].x()),
scalar(points[prevPointI].y()),
scalar(points[prevPointI].z())
scalar(points[prevPointi].x()),
scalar(points[prevPointi].y()),
scalar(points[prevPointi].z())
);
if (magSqr(pt - prevPt) <= mergeTolSqr)
{
// Found match.
equalPointI = prevPointI;
equalPointi = prevPointi;
break;
}
}
if (equalPointI != -1)
if (equalPointi != -1)
{
// Same coordinate as equalPointI. Map to same new point.
pointMap[pointI] = pointMap[equalPointI];
// Same coordinate as equalPointi. Map to same new point.
pointMap[pointi] = pointMap[equalPointi];
if (verbose)
{
Pout<< "Foam::mergePoints : Merging points "
<< pointI << " and " << equalPointI
<< " with coordinates:" << points[pointI]
<< " and " << points[equalPointI]
<< pointi << " and " << equalPointi
<< " with coordinates:" << points[pointi]
<< " and " << points[equalPointi]
<< endl;
}
}
else
{
// Differs. Store new point.
pointMap[pointI] = newPointI++;
pointMap[pointi] = newPointi++;
}
}
return newPointI;
return newPointi;
}
@ -193,9 +193,9 @@ bool Foam::mergePoints
);
newPoints.setSize(nUnique);
forAll(pointMap, pointI)
forAll(pointMap, pointi)
{
newPoints[pointMap[pointI]] = points[pointI];
newPoints[pointMap[pointi]] = points[pointi];
}
return (nUnique != points.size());

View File

@ -60,13 +60,13 @@ void Foam::pointMapper::calcAddressing() const
label nInsertedPoints = 0;
forAll(directAddr, pointI)
forAll(directAddr, pointi)
{
if (directAddr[pointI] < 0)
if (directAddr[pointi] < 0)
{
// Found inserted point
directAddr[pointI] = 0;
insertedPoints[nInsertedPoints] = pointI;
directAddr[pointi] = 0;
insertedPoints[nInsertedPoints] = pointi;
nInsertedPoints++;
}
}
@ -91,19 +91,19 @@ void Foam::pointMapper::calcAddressing() const
// Get addressing
const labelList& mo = cfc[cfcI].masterObjects();
label pointI = cfc[cfcI].index();
label pointi = cfc[cfcI].index();
if (addr[pointI].size())
if (addr[pointi].size())
{
FatalErrorInFunction
<< "Master point " << pointI
<< "Master point " << pointi
<< " mapped from points " << mo
<< " already destination of mapping." << abort(FatalError);
}
// Map from masters, uniform weights
addr[pointI] = mo;
w[pointI] = scalarList(mo.size(), 1.0/mo.size());
addr[pointi] = mo;
w[pointi] = scalarList(mo.size(), 1.0/mo.size());
}
@ -112,13 +112,13 @@ void Foam::pointMapper::calcAddressing() const
const labelList& cm = mpm_.pointMap();
forAll(cm, pointI)
forAll(cm, pointi)
{
if (cm[pointI] > -1 && addr[pointI].empty())
if (cm[pointi] > -1 && addr[pointi].empty())
{
// Mapped from a single point
addr[pointI] = labelList(1, cm[pointI]);
w[pointI] = scalarList(1, 1.0);
addr[pointi] = labelList(1, cm[pointi]);
w[pointi] = scalarList(1, 1.0);
}
}
@ -129,15 +129,15 @@ void Foam::pointMapper::calcAddressing() const
label nInsertedPoints = 0;
forAll(addr, pointI)
forAll(addr, pointi)
{
if (addr[pointI].empty())
if (addr[pointi].empty())
{
// Mapped from a dummy point. Take point 0 with weight 1.
addr[pointI] = labelList(1, label(0));
w[pointI] = scalarList(1, 1.0);
addr[pointi] = labelList(1, label(0));
w[pointi] = scalarList(1, 1.0);
insertedPoints[nInsertedPoints] = pointI;
insertedPoints[nInsertedPoints] = pointi;
nInsertedPoints++;
}
}

View File

@ -575,12 +575,12 @@ void Foam::globalMeshData::calcPointConnectivity
// Create field with my local data
labelPairList myData(globalPointSlavesMap().constructSize());
forAll(slaves, pointI)
forAll(slaves, pointi)
{
myData[pointI] = globalIndexAndTransform::encode
myData[pointi] = globalIndexAndTransform::encode
(
Pstream::myProcNo(),
pointI,
pointi,
transforms.nullTransformIndex()
);
}
@ -594,21 +594,21 @@ void Foam::globalMeshData::calcPointConnectivity
// Pass1: do the master points since these also update local slaves
// (e.g. from local cyclics)
forAll(slaves, pointI)
forAll(slaves, pointi)
{
// Reconstruct string of connected points
const labelList& pSlaves = slaves[pointI];
const labelList& pTransformSlaves = transformedSlaves[pointI];
const labelList& pSlaves = slaves[pointi];
const labelList& pTransformSlaves = transformedSlaves[pointi];
if (pSlaves.size()+pTransformSlaves.size())
{
labelPairList& pConnectivity = allPointConnectivity[pointI];
labelPairList& pConnectivity = allPointConnectivity[pointi];
pConnectivity.setSize(1+pSlaves.size()+pTransformSlaves.size());
label connI = 0;
// Add myself
pConnectivity[connI++] = myData[pointI];
pConnectivity[connI++] = myData[pointi];
// Add untransformed points
forAll(pSlaves, i)
{
@ -648,13 +648,13 @@ void Foam::globalMeshData::calcPointConnectivity
// Pass2: see if anything is still unset (should not be the case)
forAll(slaves, pointI)
forAll(slaves, pointi)
{
labelPairList& pConnectivity = allPointConnectivity[pointI];
labelPairList& pConnectivity = allPointConnectivity[pointi];
if (pConnectivity.size() == 0)
{
pConnectivity.setSize(1, myData[pointI]);
pConnectivity.setSize(1, myData[pointi]);
}
}
@ -682,25 +682,25 @@ void Foam::globalMeshData::calcGlobalPointEdges
// Create local version
globalPointEdges.setSize(globalPointSlavesMap().constructSize());
globalPointPoints.setSize(globalPointSlavesMap().constructSize());
forAll(pointEdges, pointI)
forAll(pointEdges, pointi)
{
const labelList& pEdges = pointEdges[pointI];
labelList& globalPEdges = globalPointEdges[pointI];
const labelList& pEdges = pointEdges[pointi];
labelList& globalPEdges = globalPointEdges[pointi];
globalPEdges.setSize(pEdges.size());
forAll(pEdges, i)
{
globalPEdges[i] = globalEdgeNumbers.toGlobal(pEdges[i]);
}
labelPairList& globalPPoints = globalPointPoints[pointI];
labelPairList& globalPPoints = globalPointPoints[pointi];
globalPPoints.setSize(pEdges.size());
forAll(pEdges, i)
{
label otherPointI = edges[pEdges[i]].otherVertex(pointI);
label otherPointi = edges[pEdges[i]].otherVertex(pointi);
globalPPoints[i] = globalIndexAndTransform::encode
(
Pstream::myProcNo(),
otherPointI,
otherPointi,
globalTransforms().nullTransformIndex()
);
}
@ -710,10 +710,10 @@ void Foam::globalMeshData::calcGlobalPointEdges
globalPointSlavesMap().distribute(globalPointEdges);
globalPointSlavesMap().distribute(globalPointPoints);
// Add all pointEdges
forAll(slaves, pointI)
forAll(slaves, pointi)
{
const labelList& pSlaves = slaves[pointI];
const labelList& pTransformSlaves = transformedSlaves[pointI];
const labelList& pSlaves = slaves[pointi];
const labelList& pTransformSlaves = transformedSlaves[pointi];
label n = 0;
forAll(pSlaves, i)
@ -727,7 +727,7 @@ void Foam::globalMeshData::calcGlobalPointEdges
// Add all the point edges of the slaves to those of the (master) point
{
labelList& globalPEdges = globalPointEdges[pointI];
labelList& globalPEdges = globalPointEdges[pointi];
label sz = globalPEdges.size();
globalPEdges.setSize(sz+n);
forAll(pSlaves, i)
@ -762,7 +762,7 @@ void Foam::globalMeshData::calcGlobalPointEdges
// Same for corresponding pointPoints
{
labelPairList& globalPPoints = globalPointPoints[pointI];
labelPairList& globalPPoints = globalPointPoints[pointi];
label sz = globalPPoints.size();
globalPPoints.setSize(sz + n);
@ -842,17 +842,17 @@ Foam::label Foam::globalMeshData::findTransform
forAll(info, i)
{
label proci = globalIndexAndTransform::processor(info[i]);
label pointI = globalIndexAndTransform::index(info[i]);
label pointi = globalIndexAndTransform::index(info[i]);
label transformI = globalIndexAndTransform::transformIndex(info[i]);
if (proci == Pstream::myProcNo() && pointI == localPoint)
if (proci == Pstream::myProcNo() && pointi == localPoint)
{
localTransformI = transformI;
//Pout<< "For local :" << localPoint
// << " found transform:" << localTransformI
// << endl;
}
if (proci == remoteProci && pointI == remoteIndex)
if (proci == remoteProci && pointi == remoteIndex)
{
remoteTransformI = transformI;
//Pout<< "For remote:" << remotePoint
@ -1116,9 +1116,9 @@ void Foam::globalMeshData::calcGlobalEdgeOrientation() const
masterPoint.setSize(map.constructSize());
masterPoint = labelMax;
for (label pointI = 0; pointI < coupledPatch().nPoints(); pointI++)
for (label pointi = 0; pointi < coupledPatch().nPoints(); pointi++)
{
masterPoint[pointI] = globalPoints.toGlobal(pointI);
masterPoint[pointi] = globalPoints.toGlobal(pointi);
}
syncData
(
@ -1259,9 +1259,9 @@ void Foam::globalMeshData::calcPointBoundaryFaces
// 2. Size
pointBoundaryFaces.setSize(coupledPatch().nPoints());
forAll(nPointFaces, pointI)
forAll(nPointFaces, pointi)
{
pointBoundaryFaces[pointI].setSize(nPointFaces[pointI]);
pointBoundaryFaces[pointi].setSize(nPointFaces[pointi]);
}
nPointFaces = 0;
@ -1326,10 +1326,10 @@ void Foam::globalMeshData::calcGlobalPointBoundaryFaces() const
);
labelListList& globalPointBoundaryFaces = globalPointBoundaryFacesPtr_();
forAll(pointBoundaryFaces, pointI)
forAll(pointBoundaryFaces, pointi)
{
const labelList& bFaces = pointBoundaryFaces[pointI];
labelList& globalFaces = globalPointBoundaryFaces[pointI];
const labelList& bFaces = pointBoundaryFaces[pointi];
labelList& globalFaces = globalPointBoundaryFaces[pointi];
globalFaces.setSize(bFaces.size());
forAll(bFaces, i)
{
@ -1357,14 +1357,14 @@ void Foam::globalMeshData::calcGlobalPointBoundaryFaces() const
List<labelPairList> transformedFaces(pointSlaves.size());
forAll(pointSlaves, pointI)
forAll(pointSlaves, pointi)
{
const labelList& slaves = pointSlaves[pointI];
const labelList& transformedSlaves = pointTransformSlaves[pointI];
const labelList& slaves = pointSlaves[pointi];
const labelList& transformedSlaves = pointTransformSlaves[pointi];
if (slaves.size() > 0)
{
labelList& myBFaces = globalPointBoundaryFaces[pointI];
labelList& myBFaces = globalPointBoundaryFaces[pointi];
label sz = myBFaces.size();
// Count
@ -1399,9 +1399,9 @@ void Foam::globalMeshData::calcGlobalPointBoundaryFaces() const
if (transformedSlaves.size() > 0)
{
const labelList& untrafoFaces = globalPointBoundaryFaces[pointI];
const labelList& untrafoFaces = globalPointBoundaryFaces[pointi];
labelPairList& myBFaces = transformedFaces[pointI];
labelPairList& myBFaces = transformedFaces[pointi];
label sz = myBFaces.size();
// Count
@ -1447,7 +1447,7 @@ void Foam::globalMeshData::calcGlobalPointBoundaryFaces() const
if (slaves.size() + transformedSlaves.size() == 0)
{
globalPointBoundaryFaces[pointI].clear();
globalPointBoundaryFaces[pointi].clear();
}
}
@ -1508,12 +1508,12 @@ void Foam::globalMeshData::calcGlobalPointBoundaryCells() const
// Create addressing for point to boundary cells (local)
labelListList pointBoundaryCells(coupledPatch().nPoints());
forAll(coupledPatch().meshPoints(), pointI)
forAll(coupledPatch().meshPoints(), pointi)
{
label meshPointI = coupledPatch().meshPoints()[pointI];
const labelList& pCells = mesh_.pointCells(meshPointI);
label meshPointi = coupledPatch().meshPoints()[pointi];
const labelList& pCells = mesh_.pointCells(meshPointi);
labelList& bCells = pointBoundaryCells[pointI];
labelList& bCells = pointBoundaryCells[pointi];
bCells.setSize(pCells.size());
forAll(pCells, i)
@ -1557,10 +1557,10 @@ void Foam::globalMeshData::calcGlobalPointBoundaryCells() const
);
labelListList& globalPointBoundaryCells = globalPointBoundaryCellsPtr_();
forAll(pointBoundaryCells, pointI)
forAll(pointBoundaryCells, pointi)
{
const labelList& pCells = pointBoundaryCells[pointI];
labelList& globalCells = globalPointBoundaryCells[pointI];
const labelList& pCells = pointBoundaryCells[pointi];
labelList& globalCells = globalPointBoundaryCells[pointi];
globalCells.setSize(pCells.size());
forAll(pCells, i)
{
@ -1585,14 +1585,14 @@ void Foam::globalMeshData::calcGlobalPointBoundaryCells() const
List<labelPairList> transformedCells(pointSlaves.size());
forAll(pointSlaves, pointI)
forAll(pointSlaves, pointi)
{
const labelList& slaves = pointSlaves[pointI];
const labelList& transformedSlaves = pointTransformSlaves[pointI];
const labelList& slaves = pointSlaves[pointi];
const labelList& transformedSlaves = pointTransformSlaves[pointi];
if (slaves.size() > 0)
{
labelList& myBCells = globalPointBoundaryCells[pointI];
labelList& myBCells = globalPointBoundaryCells[pointi];
label sz = myBCells.size();
// Count
@ -1627,9 +1627,9 @@ void Foam::globalMeshData::calcGlobalPointBoundaryCells() const
if (transformedSlaves.size() > 0)
{
const labelList& untrafoCells = globalPointBoundaryCells[pointI];
const labelList& untrafoCells = globalPointBoundaryCells[pointi];
labelPairList& myBCells = transformedCells[pointI];
labelPairList& myBCells = transformedCells[pointi];
label sz = myBCells.size();
// Count
@ -1674,7 +1674,7 @@ void Foam::globalMeshData::calcGlobalPointBoundaryCells() const
if (slaves.size() + transformedSlaves.size() == 0)
{
globalPointBoundaryCells[pointI].clear();
globalPointBoundaryCells[pointi].clear();
}
}
@ -1868,10 +1868,10 @@ const Foam::labelList& Foam::globalMeshData::sharedPointGlobalLabels() const
forAll(pointLabels, i)
{
// Get my mesh point
label pointI = pointLabels[i];
label pointi = pointLabels[i];
// Map to mesh point of original mesh
sharedPointGlobalLabels[i] = pointProcAddressing[pointI];
sharedPointGlobalLabels[i] = pointProcAddressing[pointi];
}
}
else
@ -1901,9 +1901,9 @@ Foam::pointField Foam::globalMeshData::sharedPoints() const
// insert my own data first
forAll(pointLabels, i)
{
label sharedPointI = pointAddr[i];
label sharedPointi = pointAddr[i];
sharedPoints[sharedPointI] = mesh_.points()[pointLabels[i]];
sharedPoints[sharedPointi] = mesh_.points()[pointLabels[i]];
}
// Receive data from slaves and insert
@ -1922,9 +1922,9 @@ Foam::pointField Foam::globalMeshData::sharedPoints() const
forAll(nbrSharedPointAddr, i)
{
label sharedPointI = nbrSharedPointAddr[i];
label sharedPointi = nbrSharedPointAddr[i];
sharedPoints[sharedPointI] = nbrSharedPoints[i];
sharedPoints[sharedPointi] = nbrSharedPoints[i];
}
}
@ -2402,12 +2402,12 @@ Foam::autoPtr<Foam::globalIndex> Foam::globalMeshData::mergePoints
// - other (since e.g. non-collocated cyclics not connected)
labelList masterGlobalPoint(cpp.nPoints(), -1);
forAll(masterGlobalPoint, pointI)
forAll(masterGlobalPoint, pointi)
{
const labelList& slavePoints = pointSlaves[pointI];
const labelList& slavePoints = pointSlaves[pointi];
if (slavePoints.size() > 0)
{
masterGlobalPoint[pointI] = globalCoupledPoints.toGlobal(pointI);
masterGlobalPoint[pointi] = globalCoupledPoints.toGlobal(pointi);
}
}
@ -2425,17 +2425,17 @@ Foam::autoPtr<Foam::globalIndex> Foam::globalMeshData::mergePoints
// 1. Count number of masters on my processor.
label nMaster = 0;
PackedBoolList isMaster(mesh_.nPoints(), 1);
forAll(pointSlaves, pointI)
forAll(pointSlaves, pointi)
{
if (masterGlobalPoint[pointI] == -1)
if (masterGlobalPoint[pointi] == -1)
{
// unconnected point (e.g. from separated cyclic)
nMaster++;
}
else if
(
masterGlobalPoint[pointI]
== globalCoupledPoints.toGlobal(pointI)
masterGlobalPoint[pointi]
== globalCoupledPoints.toGlobal(pointi)
)
{
// connected master
@ -2444,7 +2444,7 @@ Foam::autoPtr<Foam::globalIndex> Foam::globalMeshData::mergePoints
else
{
// connected slave point
isMaster[cpp.meshPoints()[pointI]] = 0;
isMaster[cpp.meshPoints()[pointi]] = 0;
}
}
@ -2467,12 +2467,12 @@ Foam::autoPtr<Foam::globalIndex> Foam::globalMeshData::mergePoints
uniquePoints.setSize(myUniquePoints);
nMaster = 0;
forAll(isMaster, meshPointI)
forAll(isMaster, meshPointi)
{
if (isMaster[meshPointI])
if (isMaster[meshPointi])
{
pointToGlobal[meshPointI] = globalPointsPtr().toGlobal(nMaster);
uniquePoints[nMaster] = meshPointI;
pointToGlobal[meshPointi] = globalPointsPtr().toGlobal(nMaster);
uniquePoints[nMaster] = meshPointi;
nMaster++;
}
}
@ -2482,18 +2482,18 @@ Foam::autoPtr<Foam::globalIndex> Foam::globalMeshData::mergePoints
{
labelList masterToGlobal(pointSlavesMap.constructSize(), -1);
forAll(pointSlaves, pointI)
forAll(pointSlaves, pointi)
{
const labelList& slaves = pointSlaves[pointI];
const labelList& slaves = pointSlaves[pointi];
if (slaves.size() > 0)
{
// Duplicate master globalpoint into slave slots
label meshPointI = cpp.meshPoints()[pointI];
masterToGlobal[pointI] = pointToGlobal[meshPointI];
label meshPointi = cpp.meshPoints()[pointi];
masterToGlobal[pointi] = pointToGlobal[meshPointi];
forAll(slaves, i)
{
masterToGlobal[slaves[i]] = masterToGlobal[pointI];
masterToGlobal[slaves[i]] = masterToGlobal[pointi];
}
}
}
@ -2502,13 +2502,13 @@ Foam::autoPtr<Foam::globalIndex> Foam::globalMeshData::mergePoints
pointSlavesMap.reverseDistribute(cpp.nPoints(), masterToGlobal);
// On slave copy master index into overal map.
forAll(pointSlaves, pointI)
forAll(pointSlaves, pointi)
{
label meshPointI = cpp.meshPoints()[pointI];
label meshPointi = cpp.meshPoints()[pointi];
if (!isMaster[meshPointI])
if (!isMaster[meshPointi])
{
pointToGlobal[meshPointI] = masterToGlobal[pointI];
pointToGlobal[meshPointi] = masterToGlobal[pointi];
}
}
}
@ -2552,16 +2552,16 @@ Foam::autoPtr<Foam::globalIndex> Foam::globalMeshData::mergePoints
labelList coupledToGlobalPatch(pointSlavesMap.constructSize(), -1);
// Note: loop over patch since usually smaller
forAll(meshPoints, patchPointI)
forAll(meshPoints, patchPointi)
{
label meshPointI = meshPoints[patchPointI];
label meshPointi = meshPoints[patchPointi];
Map<label>::const_iterator iter = cpp.meshPointMap().find(meshPointI);
Map<label>::const_iterator iter = cpp.meshPointMap().find(meshPointi);
if (iter != cpp.meshPointMap().end())
{
patchToCoupled[patchPointI] = iter();
coupledToGlobalPatch[iter()] = globalPPoints.toGlobal(patchPointI);
patchToCoupled[patchPointi] = iter();
coupledToGlobalPatch[iter()] = globalPPoints.toGlobal(patchPointi);
nCoupled++;
}
}
@ -2580,18 +2580,18 @@ Foam::autoPtr<Foam::globalIndex> Foam::globalMeshData::mergePoints
// Get all data on master
pointSlavesMap.distribute(coupledToGlobalPatch);
forAll(pointSlaves, coupledPointI)
forAll(pointSlaves, coupledPointi)
{
const labelList& slaves = pointSlaves[coupledPointI];
const labelList& slaves = pointSlaves[coupledPointi];
if (slaves.size() > 0)
{
// I am master. What is the best candidate for patch-point master
label masterI = labelMax;
if (coupledToGlobalPatch[coupledPointI] != -1)
if (coupledToGlobalPatch[coupledPointi] != -1)
{
// I am master and on the coupled patch. Use me.
masterI = coupledToGlobalPatch[coupledPointI];
masterI = coupledToGlobalPatch[coupledPointi];
}
else
{
@ -2609,7 +2609,7 @@ Foam::autoPtr<Foam::globalIndex> Foam::globalMeshData::mergePoints
if (masterI != labelMax)
{
// Push back
coupledToGlobalPatch[coupledPointI] = masterI;
coupledToGlobalPatch[coupledPointi] = masterI;
forAll(slaves, i)
{
coupledToGlobalPatch[slaves[i]] = masterI;
@ -2627,19 +2627,19 @@ Foam::autoPtr<Foam::globalIndex> Foam::globalMeshData::mergePoints
// compact numbering.
label nMasters = 0;
forAll(meshPoints, patchPointI)
forAll(meshPoints, patchPointi)
{
if (patchToCoupled[patchPointI] == -1)
if (patchToCoupled[patchPointi] == -1)
{
nMasters++;
}
else
{
label coupledPointI = patchToCoupled[patchPointI];
label coupledPointi = patchToCoupled[patchPointi];
if
(
globalPPoints.toGlobal(patchPointI)
== coupledToGlobalPatch[coupledPointI]
globalPPoints.toGlobal(patchPointi)
== coupledToGlobalPatch[coupledPointi]
)
{
// I am the master
@ -2669,24 +2669,24 @@ Foam::autoPtr<Foam::globalIndex> Foam::globalMeshData::mergePoints
labelList globalMaster(cpp.nPoints(), -1);
nMasters = 0;
forAll(meshPoints, patchPointI)
forAll(meshPoints, patchPointi)
{
if (patchToCoupled[patchPointI] == -1)
if (patchToCoupled[patchPointi] == -1)
{
uniqueMeshPoints[nMasters++] = meshPoints[patchPointI];
uniqueMeshPoints[nMasters++] = meshPoints[patchPointi];
}
else
{
label coupledPointI = patchToCoupled[patchPointI];
label coupledPointi = patchToCoupled[patchPointi];
if
(
globalPPoints.toGlobal(patchPointI)
== coupledToGlobalPatch[coupledPointI]
globalPPoints.toGlobal(patchPointi)
== coupledToGlobalPatch[coupledPointi]
)
{
globalMaster[coupledPointI] =
globalMaster[coupledPointi] =
globalPointsPtr().toGlobal(nMasters);
uniqueMeshPoints[nMasters++] = meshPoints[patchPointI];
uniqueMeshPoints[nMasters++] = meshPoints[patchPointi];
}
}
}
@ -2706,21 +2706,21 @@ Foam::autoPtr<Foam::globalIndex> Foam::globalMeshData::mergePoints
// Now everyone has the master point in globalPointsPtr numbering. Fill
// in the pointToGlobal map.
nMasters = 0;
forAll(meshPoints, patchPointI)
forAll(meshPoints, patchPointi)
{
if (patchToCoupled[patchPointI] == -1)
if (patchToCoupled[patchPointi] == -1)
{
pointToGlobal[patchPointI] = globalPointsPtr().toGlobal(nMasters++);
pointToGlobal[patchPointi] = globalPointsPtr().toGlobal(nMasters++);
}
else
{
label coupledPointI = patchToCoupled[patchPointI];
pointToGlobal[patchPointI] = globalMaster[coupledPointI];
label coupledPointi = patchToCoupled[patchPointi];
pointToGlobal[patchPointi] = globalMaster[coupledPointi];
if
(
globalPPoints.toGlobal(patchPointI)
== coupledToGlobalPatch[coupledPointI]
globalPPoints.toGlobal(patchPointi)
== coupledToGlobalPatch[coupledPointi]
)
{
nMasters++;

View File

@ -126,7 +126,7 @@ Foam::labelPairList Foam::globalPoints::addSendTransform
void Foam::globalPoints::addToSend
(
const polyPatch& pp,
const label patchPointI,
const label patchPointi,
const labelPairList& knownInfo,
DynamicList<label>& patchFaces,
@ -138,11 +138,11 @@ void Foam::globalPoints::addToSend
// information is the patch faces using the point and the relative position
// of the point in the face)
label meshPointI = pp.meshPoints()[patchPointI];
label meshPointi = pp.meshPoints()[patchPointi];
// Add all faces using the point so we are sure we find it on the
// other side.
const labelList& pFaces = pp.pointFaces()[patchPointI];
const labelList& pFaces = pp.pointFaces()[patchPointi];
forAll(pFaces, i)
{
@ -151,7 +151,7 @@ void Foam::globalPoints::addToSend
const face& f = pp[patchFacei];
patchFaces.append(patchFacei);
indexInFace.append(findIndex(f, meshPointI));
indexInFace.append(findIndex(f, meshPointi));
// Add patch transformation
allInfo.append(addSendTransform(pp.index(), knownInfo));
@ -162,7 +162,7 @@ void Foam::globalPoints::addToSend
bool Foam::globalPoints::mergeInfo
(
const labelPairList& nbrInfo,
const label localPointI,
const label localPointi,
labelPairList& myInfo
) const
{
@ -194,7 +194,7 @@ bool Foam::globalPoints::mergeInfo
}
else
{
// Same point. So we already have a connection between localPointI
// Same point. So we already have a connection between localPointi
// and the nbrIndex. Two situations:
// - same transform
// - one transform takes two steps, the other just a single.
@ -240,14 +240,14 @@ bool Foam::globalPoints::mergeInfo
Foam::label Foam::globalPoints::meshToLocalPoint
(
const Map<label>& meshToPatchPoint, // from mesh point to local numbering
const label meshPointI
const label meshPointi
)
{
return
(
meshToPatchPoint.size() == 0
? meshPointI
: meshToPatchPoint[meshPointI]
? meshPointi
: meshToPatchPoint[meshPointi]
);
}
@ -255,14 +255,14 @@ Foam::label Foam::globalPoints::meshToLocalPoint
Foam::label Foam::globalPoints::localToMeshPoint
(
const labelList& patchToMeshPoint,
const label localPointI
const label localPointi
)
{
return
(
patchToMeshPoint.size() == 0
? localPointI
: patchToMeshPoint[localPointI]
? localPointi
: patchToMeshPoint[localPointi]
);
}
@ -270,20 +270,20 @@ Foam::label Foam::globalPoints::localToMeshPoint
bool Foam::globalPoints::mergeInfo
(
const labelPairList& nbrInfo,
const label localPointI
const label localPointi
)
{
// Updates database of current information on meshpoints with nbrInfo. Uses
// mergeInfo above. Returns true if data kept for meshPointI changed.
// mergeInfo above. Returns true if data kept for meshPointi changed.
label infoChanged = false;
// Get the index into the procPoints list.
Map<label>::iterator iter = meshToProcPoint_.find(localPointI);
Map<label>::iterator iter = meshToProcPoint_.find(localPointi);
if (iter != meshToProcPoint_.end())
{
if (mergeInfo(nbrInfo, localPointI, procPoints_[iter()]))
if (mergeInfo(nbrInfo, localPointi, procPoints_[iter()]))
{
infoChanged = true;
}
@ -297,15 +297,15 @@ bool Foam::globalPoints::mergeInfo
globalIndexAndTransform::encode
(
Pstream::myProcNo(),
localPointI,
localPointi,
globalTransforms_.nullTransformIndex()
)
);
if (mergeInfo(nbrInfo, localPointI, knownInfo))
if (mergeInfo(nbrInfo, localPointi, knownInfo))
{
// Update addressing from into procPoints
meshToProcPoint_.insert(localPointI, procPoints_.size());
meshToProcPoint_.insert(localPointi, procPoints_.size());
// Insert into list of equivalences.
procPoints_.append(knownInfo);
@ -319,20 +319,20 @@ bool Foam::globalPoints::mergeInfo
bool Foam::globalPoints::storeInitialInfo
(
const labelPairList& nbrInfo,
const label localPointI
const label localPointi
)
{
// Updates database of current information on meshpoints with nbrInfo. Uses
// mergeInfo above. Returns true if data kept for meshPointI changed.
// mergeInfo above. Returns true if data kept for meshPointi changed.
label infoChanged = false;
// Get the index into the procPoints list.
Map<label>::iterator iter = meshToProcPoint_.find(localPointI);
Map<label>::iterator iter = meshToProcPoint_.find(localPointi);
if (iter != meshToProcPoint_.end())
{
if (mergeInfo(nbrInfo, localPointI, procPoints_[iter()]))
if (mergeInfo(nbrInfo, localPointi, procPoints_[iter()]))
{
infoChanged = true;
}
@ -340,7 +340,7 @@ bool Foam::globalPoints::storeInitialInfo
else
{
// Update addressing into procPoints
meshToProcPoint_.insert(localPointI, procPoints_.size());
meshToProcPoint_.insert(localPointi, procPoints_.size());
// Insert into list of equivalences.
procPoints_.append(nbrInfo);
@ -369,8 +369,8 @@ void Foam::globalPoints::printProcPoint
if (proci == Pstream::myProcNo())
{
label meshPointI = localToMeshPoint(patchToMeshPoint, index);
Pout<< " at:" << mesh_.points()[meshPointI];
label meshPointi = localToMeshPoint(patchToMeshPoint, index);
Pout<< " at:" << mesh_.points()[meshPointi];
}
}
@ -409,13 +409,13 @@ void Foam::globalPoints::initOwnPoints
if (allPoints)
{
// All points on patch
forAll(meshPoints, patchPointI)
forAll(meshPoints, patchPointi)
{
label meshPointI = meshPoints[patchPointI];
label localPointI = meshToLocalPoint
label meshPointi = meshPoints[patchPointi];
label localPointi = meshToLocalPoint
(
meshToPatchPoint,
meshPointI
meshPointi
);
labelPairList knownInfo
@ -424,19 +424,19 @@ void Foam::globalPoints::initOwnPoints
globalIndexAndTransform::encode
(
Pstream::myProcNo(),
localPointI,
localPointi,
globalTransforms_.nullTransformIndex()
)
);
//Pout<< "For point "<< pp.points()[meshPointI]
//Pout<< "For point "<< pp.points()[meshPointi]
// << " inserting info " << knownInfo
// << endl;
// Update changedpoints info.
if (storeInitialInfo(knownInfo, localPointI))
if (storeInitialInfo(knownInfo, localPointi))
{
changedPoints.insert(localPointI);
changedPoints.insert(localPointi);
}
}
}
@ -447,11 +447,11 @@ void Foam::globalPoints::initOwnPoints
forAll(boundaryPoints, i)
{
label meshPointI = meshPoints[boundaryPoints[i]];
label localPointI = meshToLocalPoint
label meshPointi = meshPoints[boundaryPoints[i]];
label localPointi = meshToLocalPoint
(
meshToPatchPoint,
meshPointI
meshPointi
);
labelPairList knownInfo
@ -460,14 +460,14 @@ void Foam::globalPoints::initOwnPoints
globalIndexAndTransform::encode
(
Pstream::myProcNo(),
localPointI,
localPointi,
globalTransforms_.nullTransformIndex()
)
);
if (storeInitialInfo(knownInfo, localPointI))
if (storeInitialInfo(knownInfo, localPointi))
{
changedPoints.insert(localPointI);
changedPoints.insert(localPointi);
}
}
}
@ -518,27 +518,27 @@ void Foam::globalPoints::sendPatchPoints
const labelList& meshPoints = pp.meshPoints();
forAll(meshPoints, patchPointI)
forAll(meshPoints, patchPointi)
{
label meshPointI = meshPoints[patchPointI];
label localPointI = meshToLocalPoint
label meshPointi = meshPoints[patchPointi];
label localPointi = meshToLocalPoint
(
meshToPatchPoint,
meshPointI
meshPointi
);
if (changedPoints.found(localPointI))
if (changedPoints.found(localPointi))
{
label index = meshToProcPoint_[localPointI];
label index = meshToProcPoint_[localPointi];
const labelPairList& knownInfo = procPoints_[index];
// Add my information about localPointI to the
// Add my information about localPointi to the
// send buffers. Encode the transformation
addToSend
(
pp,
patchPointI,
patchPointi,
knownInfo,
patchFaces,
@ -622,17 +622,17 @@ void Foam::globalPoints::receivePatchPoints
label index = (f.size() - indexInFace[i]) % f.size();
// Get the meshpoint on my side
label meshPointI = f[index];
label meshPointi = f[index];
label localPointI = meshToLocalPoint
label localPointi = meshToLocalPoint
(
meshToPatchPoint,
meshPointI
meshPointi
);
if (mergeInfo(nbrInfo[i], localPointI))
if (mergeInfo(nbrInfo[i], localPointi))
{
changedPoints.insert(localPointI);
changedPoints.insert(localPointi);
}
}
}
@ -740,7 +740,7 @@ void Foam::globalPoints::remove
// Go through all equivalences
forAllConstIter(Map<label>, oldMeshToProcPoint, iter)
{
label localPointI = iter.key();
label localPointi = iter.key();
const labelPairList& pointInfo = oldProcPoints[iter()];
if (pointInfo.size() == 2)
@ -801,7 +801,7 @@ void Foam::globalPoints::remove
// be found if the two domains are face connected at all
// (not shown in the picture)
meshToProcPoint_.insert(localPointI, procPoints_.size());
meshToProcPoint_.insert(localPointi, procPoints_.size());
procPoints_.append(pointInfo);
}
}
@ -820,13 +820,13 @@ void Foam::globalPoints::remove
)
)
{
meshToProcPoint_.insert(localPointI, procPoints_.size());
meshToProcPoint_.insert(localPointi, procPoints_.size());
procPoints_.append(pointInfo);
}
}
else
{
meshToProcPoint_.insert(localPointI, procPoints_.size());
meshToProcPoint_.insert(localPointi, procPoints_.size());
procPoints_.append(pointInfo);
}
}
@ -972,7 +972,7 @@ void Foam::globalPoints::calculateSharedPoints
//{
// label localI = iter.key();
// const labelPairList& pointInfo = procPoints_[iter()];
// Pout<< "pointI:" << localI << " index:" << iter()
// Pout<< "pointi:" << localI << " index:" << iter()
// << " coord:"
// << mesh_.points()[localToMeshPoint(patchToMeshPoint, localI)]
// << endl;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -152,16 +152,16 @@ class globalPoints
labelPairList addSendTransform
(
const label patchI,
const label patchi,
const labelPairList& info
) const;
//- Add information about patchPointI in relative indices to send
//- Add information about patchPointi in relative indices to send
// buffers (patchFaces, indexInFace etc.)
void addToSend
(
const polyPatch&,
const label patchPointI,
const label patchPointi,
const labelPairList&,
DynamicList<label>& patchFaces,
DynamicList<label>& indexInFace,
@ -172,7 +172,7 @@ class globalPoints
bool mergeInfo
(
const labelPairList& nbrInfo,
const label localPointI,
const label localPointi,
labelPairList& myInfo
) const;
@ -181,28 +181,28 @@ class globalPoints
static label meshToLocalPoint
(
const Map<label>& meshToPatchPoint,
const label meshPointI
const label meshPointi
);
//- Opposite of meshToLocalPoint.
static label localToMeshPoint
(
const labelList& patchToMeshPoint,
const label localPointI
const label localPointi
);
//- Store (and merge) info for meshPointI
//- Store (and merge) info for meshPointi
bool storeInitialInfo
(
const labelPairList& nbrInfo,
const label localPointI
const label localPointi
);
//- Store (and merge) info for meshPointI
//- Store (and merge) info for meshPointi
bool mergeInfo
(
const labelPairList& nbrInfo,
const label localPointI
const label localPointi
);
//- Debug printing

View File

@ -52,19 +52,19 @@ Description
\par points
- unchanged:
- pointMap[pointI] contains old point label
- reversePointMap[oldPointI] contains new point label
- pointMap[pointi] contains old point label
- reversePointMap[oldPointi] contains new point label
- removed:
- reversePointMap[oldPointI] contains -1
- reversePointMap[oldPointi] contains -1
- merged into point:
- reversePointMap[oldPointI] contains <-1 : -newPointI-2
- pointMap[pointI] contains the old master point label
- pointsFromPoints gives for pointI all the old point labels
- reversePointMap[oldPointi] contains <-1 : -newPointi-2
- pointMap[pointi] contains the old master point label
- pointsFromPoints gives for pointi all the old point labels
(including the old master point!)
- added-from-same:
- pointMap[pointI] contains the old master point label
- pointMap[pointi] contains the old master point label
- appended:
- pointMap[pointI] contains -1
- pointMap[pointi] contains -1
\par faces
@ -468,9 +468,9 @@ public:
//- If point is removed return point (on new mesh) it merged
// into
label mergedPoint(const label oldPointI) const
label mergedPoint(const label oldPointi) const
{
label i = reversePointMap_[oldPointI];
label i = reversePointMap_[oldPointi];
if (i == -1)
{
@ -483,7 +483,7 @@ public:
else
{
FatalErrorInFunction
<< "old point label " << oldPointI
<< "old point label " << oldPointi
<< " has reverseMap " << i << endl
<< "Only call mergedPoint for removed points."
<< abort(FatalError);

View File

@ -1315,24 +1315,24 @@ bool Foam::polyMesh::pointInCell
forAll(f, fp)
{
label pointI;
label nextPointI;
label pointi;
label nextPointi;
if (isOwn)
{
pointI = f[fp];
nextPointI = f.nextLabel(fp);
pointi = f[fp];
nextPointi = f.nextLabel(fp);
}
else
{
pointI = f.nextLabel(fp);
nextPointI = f[fp];
pointi = f.nextLabel(fp);
nextPointi = f[fp];
}
triPointRef faceTri
(
points()[pointI],
points()[nextPointI],
points()[pointi],
points()[nextPointi],
fc
);

View File

@ -61,9 +61,9 @@ Foam::labelListList Foam::polyMesh::cellShapePointCells
labelListList pointCellAddr(pc.size());
forAll(pc, pointI)
forAll(pc, pointi)
{
pointCellAddr[pointI].transfer(pc[pointI]);
pointCellAddr[pointi].transfer(pc[pointi]);
}
return pointCellAddr;
@ -89,9 +89,9 @@ Foam::labelList Foam::polyMesh::facePatchFaceCells
const face& curFace = patchFaces[fI];
const labelList& facePoints = patchFaces[fI];
forAll(facePoints, pointI)
forAll(facePoints, pointi)
{
const labelList& facePointCells = pointCells[facePoints[pointI]];
const labelList& facePointCells = pointCells[facePoints[pointi]];
forAll(facePointCells, celli)
{
@ -203,11 +203,11 @@ void Foam::polyMesh::setTopology
const labelList& curPoints = curFace;
// For all points
forAll(curPoints, pointI)
forAll(curPoints, pointi)
{
// dGget the list of cells sharing this point
const labelList& curNeighbours =
PointCells[curPoints[pointI]];
PointCells[curPoints[pointi]];
// For all neighbours
forAll(curNeighbours, neiI)

View File

@ -82,11 +82,11 @@ void Foam::polyMesh::updateMesh(const mapPolyMesh& mpm)
// Any points created out-of-nothing get set to the current coordinate
// for lack of anything better.
forAll(mpm.pointMap(), newPointI)
forAll(mpm.pointMap(), newPointi)
{
if (mpm.pointMap()[newPointI] == -1)
if (mpm.pointMap()[newPointi] == -1)
{
newMotionPoints[newPointI] = points_[newPointI];
newMotionPoints[newPointi] = points_[newPointi];
}
}
}

View File

@ -354,15 +354,15 @@ void Foam::processorPolyPatch::initUpdateMesh(PstreamBuffers& pBufs)
labelList pointFace(nPoints());
labelList pointIndex(nPoints());
for (label patchPointI = 0; patchPointI < nPoints(); patchPointI++)
for (label patchPointi = 0; patchPointi < nPoints(); patchPointi++)
{
label facei = pointFaces()[patchPointI][0];
label facei = pointFaces()[patchPointi][0];
pointFace[patchPointI] = facei;
pointFace[patchPointi] = facei;
const face& f = localFaces()[facei];
pointIndex[patchPointI] = findIndex(f, patchPointI);
pointIndex[patchPointi] = findIndex(f, patchPointi);
}
// Express all edges as patch face and index in face.
@ -433,32 +433,32 @@ void Foam::processorPolyPatch::updateMesh(PstreamBuffers& pBufs)
neighbPointsPtr_.reset(new labelList(nPoints(), -1));
labelList& neighbPoints = neighbPointsPtr_();
forAll(nbrPointFace, nbrPointI)
forAll(nbrPointFace, nbrPointi)
{
// Find face and index in face on this side.
const face& f = localFaces()[nbrPointFace[nbrPointI]];
const face& f = localFaces()[nbrPointFace[nbrPointi]];
label index = (f.size() - nbrPointIndex[nbrPointI]) % f.size();
label patchPointI = f[index];
label index = (f.size() - nbrPointIndex[nbrPointi]) % f.size();
label patchPointi = f[index];
if (neighbPoints[patchPointI] == -1)
if (neighbPoints[patchPointi] == -1)
{
// First reference of point
neighbPoints[patchPointI] = nbrPointI;
neighbPoints[patchPointi] = nbrPointi;
}
else if (neighbPoints[patchPointI] >= 0)
else if (neighbPoints[patchPointi] >= 0)
{
// Point already visited. Mark as duplicate.
neighbPoints[patchPointI] = -2;
neighbPoints[patchPointi] = -2;
}
}
// Reset all duplicate entries to -1.
forAll(neighbPoints, patchPointI)
forAll(neighbPoints, patchPointi)
{
if (neighbPoints[patchPointI] == -2)
if (neighbPoints[patchPointi] == -2)
{
neighbPoints[patchPointI] = -1;
neighbPoints[patchPointi] = -1;
}
}

View File

@ -73,32 +73,32 @@ Foam::PackedBoolList Foam::syncTools::getMasterPoints(const polyMesh& mesh)
const labelListList& transformedSlaves =
globalData.globalPointTransformedSlaves();
forAll(meshPoints, coupledPointI)
forAll(meshPoints, coupledPointi)
{
label meshPointI = meshPoints[coupledPointI];
label meshPointi = meshPoints[coupledPointi];
if
(
(
slaves[coupledPointI].size()
+ transformedSlaves[coupledPointI].size()
slaves[coupledPointi].size()
+ transformedSlaves[coupledPointi].size()
)
> 0
)
{
isMasterPoint[meshPointI] = true;
isMasterPoint[meshPointi] = true;
}
donePoint[meshPointI] = true;
donePoint[meshPointi] = true;
}
// Do all other points
// ~~~~~~~~~~~~~~~~~~~
forAll(donePoint, pointI)
forAll(donePoint, pointi)
{
if (!donePoint[pointI])
if (!donePoint[pointi])
{
isMasterPoint[pointI] = true;
isMasterPoint[pointi] = true;
}
}

View File

@ -108,10 +108,10 @@ void Foam::syncTools::syncPointMap
// Fill my entries in the shared points
forAll(sharedPtLabels, i)
{
label meshPointI = sharedPtLabels[i];
label meshPointi = sharedPtLabels[i];
typename Map<T>::const_iterator fnd =
pointValues.find(meshPointI);
pointValues.find(meshPointi);
if (fnd != pointValues.end())
{
@ -791,9 +791,9 @@ void Foam::syncTools::syncEdgeMap
//
// forAll(pd.sharedPointLabels(), i)
// {
// label meshPointI = pd.sharedPointLabels()[i];
// label meshPointi = pd.sharedPointLabels()[i];
// // Fill my entries in the shared points
// sharedPts[pd.sharedPointAddr()[i]] = pointValues[meshPointI];
// sharedPts[pd.sharedPointAddr()[i]] = pointValues[meshPointi];
// }
// }
//
@ -820,10 +820,10 @@ void Foam::syncTools::syncEdgeMap
// const labelList& meshPts = procPatch.meshPoints();
// const labelList& nbrPts = procPatch.neighbPoints();
//
// forAll(nbrPts, pointI)
// forAll(nbrPts, pointi)
// {
// label nbrPointI = nbrPts[pointI];
// patchInfo[nbrPointI] = pointValues[meshPts[pointI]];
// label nbrPointi = nbrPts[pointi];
// patchInfo[nbrPointi] = pointValues[meshPts[pointi]];
// }
//
// UOPstream toNbr(procPatch.neighbProcNo(), pBufs);
@ -857,10 +857,10 @@ void Foam::syncTools::syncEdgeMap
//
// const labelList& meshPts = procPatch.meshPoints();
//
// forAll(meshPts, pointI)
// forAll(meshPts, pointi)
// {
// label meshPointI = meshPts[pointI];
// cop(pointValues[meshPointI], nbrPatchInfo[pointI]);
// label meshPointi = meshPts[pointi];
// cop(pointValues[meshPointi], nbrPatchInfo[pointi]);
// }
// }
// }
@ -924,8 +924,8 @@ void Foam::syncTools::syncEdgeMap
// // my local information.
// forAll(pd.sharedPointLabels(), i)
// {
// label meshPointI = pd.sharedPointLabels()[i];
// pointValues[meshPointI] = sharedPts[pd.sharedPointAddr()[i]];
// label meshPointi = pd.sharedPointLabels()[i];
// pointValues[meshPointi] = sharedPts[pd.sharedPointAddr()[i]];
// }
// }
//}
@ -1046,8 +1046,8 @@ void Foam::syncTools::syncPointList
forAll(meshPoints, i)
{
label pointI = meshPoints[i];
Map<label>::const_iterator iter = mpm.find(pointI);
label pointi = meshPoints[i];
Map<label>::const_iterator iter = mpm.find(pointi);
if (iter != mpm.end())
{
cppFld[iter()] = pointValues[i];
@ -1067,8 +1067,8 @@ void Foam::syncTools::syncPointList
forAll(meshPoints, i)
{
label pointI = meshPoints[i];
Map<label>::const_iterator iter = mpm.find(pointI);
label pointi = meshPoints[i];
Map<label>::const_iterator iter = mpm.find(pointi);
if (iter != mpm.end())
{
pointValues[i] = cppFld[iter()];
@ -1102,8 +1102,8 @@ void Foam::syncTools::syncPointList
//
// forAll(meshPoints, i)
// {
// label pointI = meshPoints[i];
// Map<label>::const_iterator iter = mpm.find(pointI);
// label pointi = meshPoints[i];
// Map<label>::const_iterator iter = mpm.find(pointi);
// if (iter != mpm.end())
// {
// cppFld[iter()] = pointValues[i];
@ -1124,8 +1124,8 @@ void Foam::syncTools::syncPointList
//
// forAll(meshPoints, i)
// {
// label pointI = meshPoints[i];
// Map<label>::const_iterator iter = mpm.find(pointI);
// label pointi = meshPoints[i];
// Map<label>::const_iterator iter = mpm.find(pointi);
// if (iter != mpm.end())
// {
// pointValues[i] = cppFld[iter()];

Some files were not shown because too many files have changed in this diff Show More