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

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