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

@ -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());