mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
Further standardization of loop index naming: pointI -> pointi, patchI -> patchi
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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)
|
||||
// {
|
||||
|
||||
Reference in New Issue
Block a user