Further standardization of loop index naming: pointI -> pointi, patchI -> patchi
This commit is contained in:
@ -83,11 +83,11 @@ void Foam::PointEdgeWave<Type, TrackingData>::leaveDomain
|
||||
|
||||
forAll(patchPointLabels, i)
|
||||
{
|
||||
label patchPointI = patchPointLabels[i];
|
||||
label patchPointi = patchPointLabels[i];
|
||||
|
||||
const point& pt = patch.points()[meshPoints[patchPointI]];
|
||||
const point& pt = patch.points()[meshPoints[patchPointi]];
|
||||
|
||||
pointInfo[i].leaveDomain(patch, patchPointI, pt, td_);
|
||||
pointInfo[i].leaveDomain(patch, patchPointi, pt, td_);
|
||||
}
|
||||
}
|
||||
|
||||
@ -105,11 +105,11 @@ void Foam::PointEdgeWave<Type, TrackingData>::enterDomain
|
||||
|
||||
forAll(patchPointLabels, i)
|
||||
{
|
||||
label patchPointI = patchPointLabels[i];
|
||||
label patchPointi = patchPointLabels[i];
|
||||
|
||||
const point& pt = patch.points()[meshPoints[patchPointI]];
|
||||
const point& pt = patch.points()[meshPoints[patchPointi]];
|
||||
|
||||
pointInfo[i].enterDomain(patch, patchPointI, pt, td_);
|
||||
pointInfo[i].enterDomain(patch, patchPointi, pt, td_);
|
||||
}
|
||||
}
|
||||
|
||||
@ -148,7 +148,7 @@ void Foam::PointEdgeWave<Type, TrackingData>::transform
|
||||
}
|
||||
|
||||
|
||||
// Update info for pointI, at position pt, with information from
|
||||
// Update info for pointi, at position pt, with information from
|
||||
// neighbouring edge.
|
||||
// Updates:
|
||||
// - changedPoint_, changedPoints_, nChangedPoints_,
|
||||
@ -156,7 +156,7 @@ void Foam::PointEdgeWave<Type, TrackingData>::transform
|
||||
template<class Type, class TrackingData>
|
||||
bool Foam::PointEdgeWave<Type, TrackingData>::updatePoint
|
||||
(
|
||||
const label pointI,
|
||||
const label pointi,
|
||||
const label neighbourEdgeI,
|
||||
const Type& neighbourInfo,
|
||||
Type& pointInfo
|
||||
@ -170,7 +170,7 @@ bool Foam::PointEdgeWave<Type, TrackingData>::updatePoint
|
||||
pointInfo.updatePoint
|
||||
(
|
||||
mesh_,
|
||||
pointI,
|
||||
pointi,
|
||||
neighbourEdgeI,
|
||||
neighbourInfo,
|
||||
propagationTol_,
|
||||
@ -179,10 +179,10 @@ bool Foam::PointEdgeWave<Type, TrackingData>::updatePoint
|
||||
|
||||
if (propagate)
|
||||
{
|
||||
if (!changedPoint_[pointI])
|
||||
if (!changedPoint_[pointi])
|
||||
{
|
||||
changedPoint_[pointI] = true;
|
||||
changedPoints_[nChangedPoints_++] = pointI;
|
||||
changedPoint_[pointi] = true;
|
||||
changedPoints_[nChangedPoints_++] = pointi;
|
||||
}
|
||||
}
|
||||
|
||||
@ -195,7 +195,7 @@ bool Foam::PointEdgeWave<Type, TrackingData>::updatePoint
|
||||
}
|
||||
|
||||
|
||||
// Update info for pointI, at position pt, with information from
|
||||
// Update info for pointi, at position pt, with information from
|
||||
// same point.
|
||||
// Updates:
|
||||
// - changedPoint_, changedPoints_, nChangedPoints_,
|
||||
@ -203,7 +203,7 @@ bool Foam::PointEdgeWave<Type, TrackingData>::updatePoint
|
||||
template<class Type, class TrackingData>
|
||||
bool Foam::PointEdgeWave<Type, TrackingData>::updatePoint
|
||||
(
|
||||
const label pointI,
|
||||
const label pointi,
|
||||
const Type& neighbourInfo,
|
||||
Type& pointInfo
|
||||
)
|
||||
@ -216,7 +216,7 @@ bool Foam::PointEdgeWave<Type, TrackingData>::updatePoint
|
||||
pointInfo.updatePoint
|
||||
(
|
||||
mesh_,
|
||||
pointI,
|
||||
pointi,
|
||||
neighbourInfo,
|
||||
propagationTol_,
|
||||
td_
|
||||
@ -224,10 +224,10 @@ bool Foam::PointEdgeWave<Type, TrackingData>::updatePoint
|
||||
|
||||
if (propagate)
|
||||
{
|
||||
if (!changedPoint_[pointI])
|
||||
if (!changedPoint_[pointi])
|
||||
{
|
||||
changedPoint_[pointI] = true;
|
||||
changedPoints_[nChangedPoints_++] = pointI;
|
||||
changedPoint_[pointi] = true;
|
||||
changedPoints_[nChangedPoints_++] = pointi;
|
||||
}
|
||||
}
|
||||
|
||||
@ -249,7 +249,7 @@ template<class Type, class TrackingData>
|
||||
bool Foam::PointEdgeWave<Type, TrackingData>::updateEdge
|
||||
(
|
||||
const label edgeI,
|
||||
const label neighbourPointI,
|
||||
const label neighbourPointi,
|
||||
const Type& neighbourInfo,
|
||||
Type& edgeInfo
|
||||
)
|
||||
@ -263,7 +263,7 @@ bool Foam::PointEdgeWave<Type, TrackingData>::updateEdge
|
||||
(
|
||||
mesh_,
|
||||
edgeI,
|
||||
neighbourPointI,
|
||||
neighbourPointi,
|
||||
neighbourInfo,
|
||||
propagationTol_,
|
||||
td_
|
||||
@ -332,14 +332,14 @@ void Foam::PointEdgeWave<Type, TrackingData>::handleProcPatches()
|
||||
|
||||
// Get all changed points in reverse order
|
||||
const labelList& neighbPoints = procPatch.neighbPoints();
|
||||
forAll(neighbPoints, thisPointI)
|
||||
forAll(neighbPoints, thisPointi)
|
||||
{
|
||||
label meshPointI = procPatch.meshPoints()[thisPointI];
|
||||
if (changedPoint_[meshPointI])
|
||||
label meshPointi = procPatch.meshPoints()[thisPointi];
|
||||
if (changedPoint_[meshPointi])
|
||||
{
|
||||
patchInfo.append(allPointInfo_[meshPointI]);
|
||||
thisPoints.append(thisPointI);
|
||||
nbrPoints.append(neighbPoints[thisPointI]);
|
||||
patchInfo.append(allPointInfo_[meshPointi]);
|
||||
thisPoints.append(thisPointi);
|
||||
nbrPoints.append(neighbPoints[thisPointi]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -398,15 +398,15 @@ void Foam::PointEdgeWave<Type, TrackingData>::handleProcPatches()
|
||||
const labelList& meshPoints = procPatch.meshPoints();
|
||||
forAll(patchInfo, i)
|
||||
{
|
||||
label meshPointI = meshPoints[patchPoints[i]];
|
||||
label meshPointi = meshPoints[patchPoints[i]];
|
||||
|
||||
if (!allPointInfo_[meshPointI].equal(patchInfo[i], td_))
|
||||
if (!allPointInfo_[meshPointi].equal(patchInfo[i], td_))
|
||||
{
|
||||
updatePoint
|
||||
(
|
||||
meshPointI,
|
||||
meshPointi,
|
||||
patchInfo[i],
|
||||
allPointInfo_[meshPointI]
|
||||
allPointInfo_[meshPointi]
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -452,15 +452,15 @@ void Foam::PointEdgeWave<Type, TrackingData>::handleCyclicPatches()
|
||||
|
||||
forAll(pairs, pairI)
|
||||
{
|
||||
label thisPointI = pairs[pairI][0];
|
||||
label nbrPointI = pairs[pairI][1];
|
||||
label meshPointI = meshPoints[nbrPointI];
|
||||
label thisPointi = pairs[pairI][0];
|
||||
label nbrPointi = pairs[pairI][1];
|
||||
label meshPointi = meshPoints[nbrPointi];
|
||||
|
||||
if (changedPoint_[meshPointI])
|
||||
if (changedPoint_[meshPointi])
|
||||
{
|
||||
nbrInfo.append(allPointInfo_[meshPointI]);
|
||||
nbrPoints.append(nbrPointI);
|
||||
thisPoints.append(thisPointI);
|
||||
nbrInfo.append(allPointInfo_[meshPointi]);
|
||||
nbrPoints.append(nbrPointi);
|
||||
thisPoints.append(thisPointi);
|
||||
}
|
||||
}
|
||||
|
||||
@ -491,15 +491,15 @@ void Foam::PointEdgeWave<Type, TrackingData>::handleCyclicPatches()
|
||||
const labelList& meshPoints = cycPatch.meshPoints();
|
||||
forAll(nbrInfo, i)
|
||||
{
|
||||
label meshPointI = meshPoints[thisPoints[i]];
|
||||
label meshPointi = meshPoints[thisPoints[i]];
|
||||
|
||||
if (!allPointInfo_[meshPointI].equal(nbrInfo[i], td_))
|
||||
if (!allPointInfo_[meshPointi].equal(nbrInfo[i], td_))
|
||||
{
|
||||
updatePoint
|
||||
(
|
||||
meshPointI,
|
||||
meshPointi,
|
||||
nbrInfo[i],
|
||||
allPointInfo_[meshPointI]
|
||||
allPointInfo_[meshPointi]
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -522,9 +522,9 @@ Foam::label Foam::PointEdgeWave<Type, TrackingData>::handleCollocatedPoints()
|
||||
const labelListList& slaves = gmd.globalPointSlaves();
|
||||
|
||||
List<Type> elems(slavesMap.constructSize());
|
||||
forAll(meshPoints, pointI)
|
||||
forAll(meshPoints, pointi)
|
||||
{
|
||||
elems[pointI] = allPointInfo_[meshPoints[pointI]];
|
||||
elems[pointi] = allPointInfo_[meshPoints[pointi]];
|
||||
}
|
||||
|
||||
// Pull slave data onto master (which might or might not have any
|
||||
@ -534,11 +534,11 @@ Foam::label Foam::PointEdgeWave<Type, TrackingData>::handleCollocatedPoints()
|
||||
// Combine master data with slave data
|
||||
combineEqOp<Type, TrackingData> cop(td_);
|
||||
|
||||
forAll(slaves, pointI)
|
||||
forAll(slaves, pointi)
|
||||
{
|
||||
Type& elem = elems[pointI];
|
||||
Type& elem = elems[pointi];
|
||||
|
||||
const labelList& slavePoints = slaves[pointI];
|
||||
const labelList& slavePoints = slaves[pointi];
|
||||
|
||||
// Combine master with untransformed slave data
|
||||
forAll(slavePoints, j)
|
||||
@ -557,23 +557,23 @@ Foam::label Foam::PointEdgeWave<Type, TrackingData>::handleCollocatedPoints()
|
||||
slavesMap.reverseDistribute(elems.size(), elems, false);
|
||||
|
||||
// Extract back onto mesh
|
||||
forAll(meshPoints, pointI)
|
||||
forAll(meshPoints, pointi)
|
||||
{
|
||||
if (elems[pointI].valid(td_))
|
||||
if (elems[pointi].valid(td_))
|
||||
{
|
||||
label meshPointI = meshPoints[pointI];
|
||||
label meshPointi = meshPoints[pointi];
|
||||
|
||||
Type& elem = allPointInfo_[meshPointI];
|
||||
Type& elem = allPointInfo_[meshPointi];
|
||||
|
||||
bool wasValid = elem.valid(td_);
|
||||
|
||||
// Like updatePoint but bypass Type::updatePoint with its tolerance
|
||||
// checking
|
||||
//if (!elem.valid(td_) || !elem.equal(elems[pointI], td_))
|
||||
if (!elem.equal(elems[pointI], td_))
|
||||
//if (!elem.valid(td_) || !elem.equal(elems[pointi], td_))
|
||||
if (!elem.equal(elems[pointi], td_))
|
||||
{
|
||||
nEvals_++;
|
||||
elem = elems[pointI];
|
||||
elem = elems[pointi];
|
||||
|
||||
// See if element now valid
|
||||
if (!wasValid && elem.valid(td_))
|
||||
@ -582,10 +582,10 @@ Foam::label Foam::PointEdgeWave<Type, TrackingData>::handleCollocatedPoints()
|
||||
}
|
||||
|
||||
// Update database of changed points
|
||||
if (!changedPoint_[meshPointI])
|
||||
if (!changedPoint_[meshPointi])
|
||||
{
|
||||
changedPoint_[meshPointI] = true;
|
||||
changedPoints_[nChangedPoints_++] = meshPointI;
|
||||
changedPoint_[meshPointi] = true;
|
||||
changedPoints_[nChangedPoints_++] = meshPointi;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -735,27 +735,27 @@ void Foam::PointEdgeWave<Type, TrackingData>::setPointInfo
|
||||
const List<Type>& changedPointsInfo
|
||||
)
|
||||
{
|
||||
forAll(changedPoints, changedPointI)
|
||||
forAll(changedPoints, changedPointi)
|
||||
{
|
||||
label pointI = changedPoints[changedPointI];
|
||||
label pointi = changedPoints[changedPointi];
|
||||
|
||||
bool wasValid = allPointInfo_[pointI].valid(td_);
|
||||
bool wasValid = allPointInfo_[pointi].valid(td_);
|
||||
|
||||
// Copy info for pointI
|
||||
allPointInfo_[pointI] = changedPointsInfo[changedPointI];
|
||||
// Copy info for pointi
|
||||
allPointInfo_[pointi] = changedPointsInfo[changedPointi];
|
||||
|
||||
// Maintain count of unset points
|
||||
if (!wasValid && allPointInfo_[pointI].valid(td_))
|
||||
if (!wasValid && allPointInfo_[pointi].valid(td_))
|
||||
{
|
||||
--nUnvisitedPoints_;
|
||||
}
|
||||
|
||||
// Mark pointI as changed, both on list and on point itself.
|
||||
// Mark pointi as changed, both on list and on point itself.
|
||||
|
||||
if (!changedPoint_[pointI])
|
||||
if (!changedPoint_[pointi])
|
||||
{
|
||||
changedPoint_[pointI] = true;
|
||||
changedPoints_[nChangedPoints_++] = pointI;
|
||||
changedPoint_[pointi] = true;
|
||||
changedPoints_[nChangedPoints_++] = pointi;
|
||||
}
|
||||
}
|
||||
|
||||
@ -848,27 +848,27 @@ Foam::label Foam::PointEdgeWave<Type, TrackingData>::pointToEdge()
|
||||
|
||||
for
|
||||
(
|
||||
label changedPointI = 0;
|
||||
changedPointI < nChangedPoints_;
|
||||
changedPointI++
|
||||
label changedPointi = 0;
|
||||
changedPointi < nChangedPoints_;
|
||||
changedPointi++
|
||||
)
|
||||
{
|
||||
label pointI = changedPoints_[changedPointI];
|
||||
label pointi = changedPoints_[changedPointi];
|
||||
|
||||
if (!changedPoint_[pointI])
|
||||
if (!changedPoint_[pointi])
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Point " << pointI
|
||||
<< "Point " << pointi
|
||||
<< " not marked as having been changed" << nl
|
||||
<< "This might be caused by multiple occurences of the same"
|
||||
<< " seed point." << abort(FatalError);
|
||||
}
|
||||
|
||||
const Type& neighbourWallInfo = allPointInfo_[pointI];
|
||||
const Type& neighbourWallInfo = allPointInfo_[pointi];
|
||||
|
||||
// Evaluate all connected edges
|
||||
|
||||
const labelList& edgeLabels = pointEdges[pointI];
|
||||
const labelList& edgeLabels = pointEdges[pointi];
|
||||
forAll(edgeLabels, edgeLabelI)
|
||||
{
|
||||
label edgeI = edgeLabels[edgeLabelI];
|
||||
@ -880,7 +880,7 @@ Foam::label Foam::PointEdgeWave<Type, TrackingData>::pointToEdge()
|
||||
updateEdge
|
||||
(
|
||||
edgeI,
|
||||
pointI,
|
||||
pointi,
|
||||
neighbourWallInfo,
|
||||
currentWallInfo
|
||||
);
|
||||
@ -888,7 +888,7 @@ Foam::label Foam::PointEdgeWave<Type, TrackingData>::pointToEdge()
|
||||
}
|
||||
|
||||
// Reset status of point
|
||||
changedPoint_[pointI] = false;
|
||||
changedPoint_[pointi] = false;
|
||||
}
|
||||
|
||||
// Handled all changed points by now
|
||||
|
||||
@ -168,7 +168,7 @@ class PointEdgeWave
|
||||
// statistics.
|
||||
bool updatePoint
|
||||
(
|
||||
const label pointI,
|
||||
const label pointi,
|
||||
const label neighbourEdgeI,
|
||||
const Type& neighbourInfo,
|
||||
Type& pointInfo
|
||||
@ -178,7 +178,7 @@ class PointEdgeWave
|
||||
// statistics.
|
||||
bool updatePoint
|
||||
(
|
||||
const label pointI,
|
||||
const label pointi,
|
||||
const Type& neighbourInfo,
|
||||
Type& pointInfo
|
||||
);
|
||||
@ -188,7 +188,7 @@ class PointEdgeWave
|
||||
bool updateEdge
|
||||
(
|
||||
const label edgeI,
|
||||
const label neighbourPointI,
|
||||
const label neighbourPointi,
|
||||
const Type& neighbourInfo,
|
||||
Type& edgeInfo
|
||||
);
|
||||
|
||||
@ -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
|
||||
@ -138,7 +138,7 @@ public:
|
||||
inline void leaveDomain
|
||||
(
|
||||
const polyPatch& patch,
|
||||
const label patchPointI,
|
||||
const label patchPointi,
|
||||
const point& pos,
|
||||
TrackingData& td
|
||||
);
|
||||
@ -148,7 +148,7 @@ public:
|
||||
inline void enterDomain
|
||||
(
|
||||
const polyPatch& patch,
|
||||
const label patchPointI,
|
||||
const label patchPointi,
|
||||
const point& pos,
|
||||
TrackingData& td
|
||||
);
|
||||
@ -166,7 +166,7 @@ public:
|
||||
inline bool updatePoint
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
const label pointI,
|
||||
const label pointi,
|
||||
const label edgeI,
|
||||
const pointEdgePoint& edgeInfo,
|
||||
const scalar tol,
|
||||
@ -179,7 +179,7 @@ public:
|
||||
inline bool updatePoint
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
const label pointI,
|
||||
const label pointi,
|
||||
const pointEdgePoint& newPointInfo,
|
||||
const scalar tol,
|
||||
TrackingData& td
|
||||
@ -201,7 +201,7 @@ public:
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
const label edgeI,
|
||||
const label pointI,
|
||||
const label pointi,
|
||||
const pointEdgePoint& pointInfo,
|
||||
const scalar tol,
|
||||
TrackingData& td
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -199,7 +199,7 @@ template<class TrackingData>
|
||||
inline void Foam::pointEdgePoint::leaveDomain
|
||||
(
|
||||
const polyPatch& patch,
|
||||
const label patchPointI,
|
||||
const label patchPointi,
|
||||
const point& coord,
|
||||
TrackingData& td
|
||||
)
|
||||
@ -225,7 +225,7 @@ template<class TrackingData>
|
||||
inline void Foam::pointEdgePoint::enterDomain
|
||||
(
|
||||
const polyPatch& patch,
|
||||
const label patchPointI,
|
||||
const label patchPointi,
|
||||
const point& coord,
|
||||
TrackingData& td
|
||||
)
|
||||
@ -240,14 +240,14 @@ template<class TrackingData>
|
||||
inline bool Foam::pointEdgePoint::updatePoint
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
const label pointI,
|
||||
const label pointi,
|
||||
const label edgeI,
|
||||
const pointEdgePoint& edgeInfo,
|
||||
const scalar tol,
|
||||
TrackingData& td
|
||||
)
|
||||
{
|
||||
return update(mesh.points()[pointI], edgeInfo, tol, td);
|
||||
return update(mesh.points()[pointi], edgeInfo, tol, td);
|
||||
}
|
||||
|
||||
|
||||
@ -256,13 +256,13 @@ template<class TrackingData>
|
||||
inline bool Foam::pointEdgePoint::updatePoint
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
const label pointI,
|
||||
const label pointi,
|
||||
const pointEdgePoint& newPointInfo,
|
||||
const scalar tol,
|
||||
TrackingData& td
|
||||
)
|
||||
{
|
||||
return update(mesh.points()[pointI], newPointInfo, tol, td);
|
||||
return update(mesh.points()[pointi], newPointInfo, tol, td);
|
||||
}
|
||||
|
||||
|
||||
@ -285,7 +285,7 @@ inline bool Foam::pointEdgePoint::updateEdge
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
const label edgeI,
|
||||
const label pointI,
|
||||
const label pointi,
|
||||
const pointEdgePoint& pointInfo,
|
||||
const scalar tol,
|
||||
TrackingData& td
|
||||
|
||||
Reference in New Issue
Block a user