Standardized cell, patch, face and processor loop index names

This commit is contained in:
Henry Weller
2016-04-25 12:00:53 +01:00
parent 43beb06018
commit 450728ea84
525 changed files with 6296 additions and 6296 deletions

View File

@ -133,7 +133,7 @@ bool writePatchField
(
const Field<Type>& pf,
const label patchi,
const label ensightPatchI,
const label ensightPatchi,
const faceSets& boundaryFaceSet,
const ensightMesh::nFacePrimitives& nfp,
ensightStream& ensightFile
@ -143,7 +143,7 @@ bool writePatchField
{
if (Pstream::master())
{
ensightFile.writePartHeader(ensightPatchI);
ensightFile.writePartHeader(ensightPatchi);
}
writeField
@ -197,7 +197,7 @@ void writePatchField
const HashTable<ensightMesh::nFacePrimitives>&
nPatchPrims = eMesh.nPatchPrims();
label ensightPatchI = eMesh.patchPartOffset();
label ensightPatchi = eMesh.patchPartOffset();
label patchi = -1;
@ -208,7 +208,7 @@ void writePatchField
patchi = i;
break;
}
ensightPatchI++;
ensightPatchi++;
}
@ -265,7 +265,7 @@ void writePatchField
(
pf,
patchi,
ensightPatchI,
ensightPatchi,
boundaryFaceSets[patchi],
nPatchPrims.find(patchName)(),
ensightFile
@ -279,7 +279,7 @@ void writePatchField
(
Field<Type>(),
-1,
ensightPatchI,
ensightPatchi,
nullFaceSets,
nPatchPrims.find(patchName)(),
ensightFile
@ -418,7 +418,7 @@ void ensightField
);
}
label ensightPatchI = eMesh.patchPartOffset();
label ensightPatchi = eMesh.patchPartOffset();
forAll(allPatchNames, patchi)
{
@ -434,14 +434,14 @@ void ensightField
(
vf.boundaryField()[patchi],
patchi,
ensightPatchI,
ensightPatchi,
boundaryFaceSets[patchi],
nPatchPrims.find(patchName)(),
ensightFile
)
)
{
ensightPatchI++;
ensightPatchi++;
}
}
}
@ -494,8 +494,8 @@ void ensightField
{
label patchi = mesh.boundaryMesh().whichPatch(facei);
const polyPatch& pp = mesh.boundaryMesh()[patchi];
label patchFaceI = pp.whichFace(facei);
Type value = sf.boundaryField()[patchi][patchFaceI];
label patchFacei = pp.whichFace(facei);
Type value = sf.boundaryField()[patchi][patchFacei];
values[j] = value;
++j;
}
@ -508,14 +508,14 @@ void ensightField
(
values,
zoneID,
ensightPatchI,
ensightPatchi,
faceZoneFaceSets[zoneID],
nFaceZonePrims.find(faceZoneName)(),
ensightFile
)
)
{
ensightPatchI++;
ensightPatchi++;
}
}
}
@ -609,7 +609,7 @@ void ensightPointField
}
label ensightPatchI = eMesh.patchPartOffset();
label ensightPatchi = eMesh.patchPartOffset();
forAll(allPatchNames, patchi)
{
@ -640,7 +640,7 @@ void ensightPointField
if (Pstream::master())
{
ensightFile.writePartHeader(ensightPatchI);
ensightFile.writePartHeader(ensightPatchi);
}
writeField
@ -650,7 +650,7 @@ void ensightPointField
ensightFile
);
ensightPatchI++;
ensightPatchi++;
}
}
}
@ -684,7 +684,7 @@ void ensightPointField
if (Pstream::master())
{
ensightFile.writePartHeader(ensightPatchI);
ensightFile.writePartHeader(ensightPatchi);
}
writeField
@ -698,7 +698,7 @@ void ensightPointField
ensightFile
);
ensightPatchI++;
ensightPatchi++;
}
}
}

View File

@ -293,10 +293,10 @@ void Foam::ensightMesh::correct()
&& !refCast<const processorPolyPatch>(pp).owner()
)
{
label bFaceI = pp.start()-mesh_.nInternalFaces();
label bFacei = pp.start()-mesh_.nInternalFaces();
forAll(pp, i)
{
boundaryFaceToBeIncluded_[bFaceI++] = 0;
boundaryFaceToBeIncluded_[bFacei++] = 0;
}
}
}
@ -1136,7 +1136,7 @@ void Foam::ensightMesh::write
}
label ensightPatchI = patchPartOffset_;
label ensightPatchi = patchPartOffset_;
forAll(allPatchNames_, patchi)
{
@ -1176,7 +1176,7 @@ void Foam::ensightMesh::write
writeAllPoints
(
ensightPatchI++,
ensightPatchi++,
patchName,
uniquePoints,
globalPointsPtr().size(),
@ -1281,7 +1281,7 @@ void Foam::ensightMesh::write
writeAllPoints
(
ensightPatchI++,
ensightPatchi++,
faceZoneName,
uniquePoints,
globalPointsPtr().size(),

View File

@ -107,8 +107,8 @@ Foam::tmp<Field<Type>> Foam::tecplotWriter::getFaceField
}
else
{
label localFaceI = facei - patches[patchi].start();
fld[i] = sfld.boundaryField()[patchi][localFaceI];
label localFacei = facei - patches[patchi].start();
fld[i] = sfld.boundaryField()[patchi][localFacei];
}
}

View File

@ -107,15 +107,15 @@ void ReadAndMapFields
else if (index < 0)
{
label facei = -index-1;
label bFaceI = facei - mesh.nInternalFaces();
if (bFaceI >= 0)
label bFacei = facei - mesh.nInternalFaces();
if (bFacei >= 0)
{
label patchi = mesh.boundaryMesh().patchID()[bFaceI];
label localFaceI = mesh.boundaryMesh()[patchi].whichFace
label patchi = mesh.boundaryMesh().patchID()[bFacei];
label localFacei = mesh.boundaryMesh()[patchi].whichFace
(
facei
);
fld[pointI] = readField.boundaryField()[patchi][localFaceI];
fld[pointI] = readField.boundaryField()[patchi][localFacei];
}
//else
//{

View File

@ -137,11 +137,11 @@ void Foam::internalWriter::writeCellIDs()
{
cellId[labelI++] = cMap[celli];
}
forAll(superCells, superCellI)
forAll(superCells, superCelli)
{
label origCellI = cMap[superCells[superCellI]];
label origCelli = cMap[superCells[superCelli]];
cellId[labelI++] = origCellI;
cellId[labelI++] = origCelli;
}
}
else
@ -150,11 +150,11 @@ void Foam::internalWriter::writeCellIDs()
{
cellId[labelI++] = celli;
}
forAll(superCells, superCellI)
forAll(superCells, superCelli)
{
label origCellI = superCells[superCellI];
label origCelli = superCells[superCelli];
cellId[labelI++] = origCellI;
cellId[labelI++] = origCelli;
}
}

View File

@ -51,8 +51,8 @@ Foam::tmp<Field<Type>> Foam::surfaceMeshWriter::getFaceField
}
else
{
label localFaceI = facei - patches[patchi].start();
fld[i] = sfld.boundaryField()[patchi][localFaceI];
label localFacei = facei - patches[patchi].start();
fld[i] = sfld.boundaryField()[patchi][localFacei];
}
}

View File

@ -87,9 +87,9 @@ Foam::vtkTopo::vtkTopo(const polyMesh& mesh)
{
const cell& cFaces = mesh_.cells()[celli];
forAll(cFaces, cFaceI)
forAll(cFaces, cFacei)
{
const face& f = mesh_.faces()[cFaces[cFaceI]];
const face& f = mesh_.faces()[cFaces[cFacei]];
label nQuads = 0;
label nTris = 0;
@ -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)
{
@ -200,10 +200,10 @@ Foam::vtkTopo::vtkTopo(const polyMesh& mesh)
bool substituteCell = true;
const labelList& cFaces = mesh_.cells()[celli];
forAll(cFaces, cFaceI)
forAll(cFaces, cFacei)
{
const face& f = mesh_.faces()[cFaces[cFaceI]];
const bool isOwner = (owner[cFaces[cFaceI]] == celli);
const face& f = mesh_.faces()[cFaces[cFacei]];
const bool isOwner = (owner[cFaces[cFacei]] == celli);
// Number of triangles and quads in decomposition
label nTris = 0;
@ -219,20 +219,20 @@ Foam::vtkTopo::vtkTopo(const polyMesh& mesh)
forAll(quadFcs, quadI)
{
label thisCellI;
label thisCelli;
if (substituteCell)
{
thisCellI = celli;
thisCelli = celli;
substituteCell = false;
}
else
{
thisCellI = mesh_.nCells() + addCellI;
superCells_[addCellI++] = celli;
thisCelli = mesh_.nCells() + addCelli;
superCells_[addCelli++] = celli;
}
labelList& addVtkVerts = vertLabels_[thisCellI];
labelList& addVtkVerts = vertLabels_[thisCelli];
addVtkVerts.setSize(5);
@ -261,26 +261,26 @@ Foam::vtkTopo::vtkTopo(const polyMesh& mesh)
}
addVtkVerts[4] = newVertexLabel;
cellTypes_[thisCellI] = VTK_PYRAMID;
cellTypes_[thisCelli] = VTK_PYRAMID;
}
forAll(triFcs, triI)
{
label thisCellI;
label thisCelli;
if (substituteCell)
{
thisCellI = celli;
thisCelli = celli;
substituteCell = false;
}
else
{
thisCellI = mesh_.nCells() + addCellI;
superCells_[addCellI++] = celli;
thisCelli = mesh_.nCells() + addCelli;
superCells_[addCelli++] = celli;
}
labelList& addVtkVerts = vertLabels_[thisCellI];
labelList& addVtkVerts = vertLabels_[thisCelli];
const face& tri = triFcs[triI];
@ -301,7 +301,7 @@ Foam::vtkTopo::vtkTopo(const polyMesh& mesh)
}
addVtkVerts[3] = newVertexLabel;
cellTypes_[thisCellI] = VTK_TETRA;
cellTypes_[thisCelli] = VTK_TETRA;
}
}
@ -318,9 +318,9 @@ Foam::vtkTopo::vtkTopo(const polyMesh& mesh)
label nData = 1 + cFaces.size();
// count total number of face points
forAll(cFaces, cFaceI)
forAll(cFaces, cFacei)
{
const face& f = mesh.faces()[cFaces[cFaceI]];
const face& f = mesh.faces()[cFaces[cFacei]];
nData += f.size(); // space for the face labels
}
@ -330,10 +330,10 @@ Foam::vtkTopo::vtkTopo(const polyMesh& mesh)
vtkVerts[nData++] = cFaces.size();
// build face stream
forAll(cFaces, cFaceI)
forAll(cFaces, cFacei)
{
const face& f = mesh.faces()[cFaces[cFaceI]];
const bool isOwner = (owner[cFaces[cFaceI]] == celli);
const face& f = mesh.faces()[cFaces[cFacei]];
const bool isOwner = (owner[cFaces[cFacei]] == celli);
// number of labels for this face
vtkVerts[nData++] = f.size();

View File

@ -61,13 +61,13 @@ void Foam::writeFaceSet
faceList setFaces(set.size());
labelList setFaceLabels(set.size());
label setFaceI = 0;
label setFacei = 0;
forAllConstIter(faceSet, set, iter)
{
setFaceLabels[setFaceI] = iter.key();
setFaces[setFaceI] = faces[iter.key()];
setFaceI++;
setFaceLabels[setFacei] = iter.key();
setFaces[setFacei] = faces[iter.key()];
setFacei++;
}
primitiveFacePatch fp(setFaces, vMesh.mesh().points());

View File

@ -81,11 +81,11 @@ void Foam::writeFuns::write
insert(vvf.internalField(), fField);
forAll(superCells, superCellI)
forAll(superCells, superCelli)
{
label origCellI = superCells[superCellI];
label origCelli = superCells[superCelli];
insert(vvf[origCellI], fField);
insert(vvf[origCelli], fField);
}
write(os, binary, fField);
}
@ -115,9 +115,9 @@ void Foam::writeFuns::write
forAll(addPointCellLabels, api)
{
label origCellI = addPointCellLabels[api];
label origCelli = addPointCellLabels[api];
insert(interpolatePointToCell(pvf, origCellI), fField);
insert(interpolatePointToCell(pvf, origCelli), fField);
}
write(os, binary, fField);
}
@ -148,9 +148,9 @@ void Foam::writeFuns::write
forAll(addPointCellLabels, api)
{
label origCellI = addPointCellLabels[api];
label origCelli = addPointCellLabels[api];
insert(vvf[origCellI], fField);
insert(vvf[origCelli], fField);
}
write(os, binary, fField);
}

View File

@ -99,9 +99,9 @@ vtkUnstructuredGrid* Foam::vtkPV3Foam::volumeVTKMesh
{
const cell& cFaces = mesh.cells()[celli];
forAll(cFaces, cFaceI)
forAll(cFaces, cFacei)
{
const face& f = mesh.faces()[cFaces[cFaceI]];
const face& f = mesh.faces()[cFaces[cFacei]];
label nQuads = 0;
label nTris = 0;
@ -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
@ -173,7 +173,7 @@ vtkUnstructuredGrid* Foam::vtkPV3Foam::volumeVTKMesh
const cellShape& cellShape = cellShapes[celli];
const cellModel& cellModel = cellShape.model();
superCells[addCellI++] = celli;
superCells[addCelli++] = celli;
if (cellModel == tet)
{
@ -280,9 +280,9 @@ vtkUnstructuredGrid* Foam::vtkPV3Foam::volumeVTKMesh
vtkIdType nLabels = nFaces;
// count size for face stream
forAll(cFaces, cFaceI)
forAll(cFaces, cFacei)
{
const face& f = mesh.faces()[cFaces[cFaceI]];
const face& f = mesh.faces()[cFaces[cFacei]];
nLabels += f.size();
}
@ -292,10 +292,10 @@ vtkUnstructuredGrid* Foam::vtkPV3Foam::volumeVTKMesh
faceStream.clear();
faceStream.reserve(nLabels + nFaces);
forAll(cFaces, cFaceI)
forAll(cFaces, cFacei)
{
const face& f = mesh.faces()[cFaces[cFaceI]];
const bool isOwner = (owner[cFaces[cFaceI]] == celli);
const face& f = mesh.faces()[cFaces[cFacei]];
const bool isOwner = (owner[cFaces[cFacei]] == celli);
const label nFacePoints = f.size();
// number of labels for this face
@ -327,9 +327,9 @@ vtkUnstructuredGrid* Foam::vtkPV3Foam::volumeVTKMesh
// establish unique node ids used
HashSet<vtkIdType, Hash<label>> hashUniqId(2*256);
forAll(cFaces, cFaceI)
forAll(cFaces, cFacei)
{
const face& f = mesh.faces()[cFaces[cFaceI]];
const face& f = mesh.faces()[cFaces[cFacei]];
forAll(f, fp)
{
@ -363,10 +363,10 @@ vtkUnstructuredGrid* Foam::vtkPV3Foam::volumeVTKMesh
bool substituteCell = true;
const labelList& cFaces = mesh.cells()[celli];
forAll(cFaces, cFaceI)
forAll(cFaces, cFacei)
{
const face& f = mesh.faces()[cFaces[cFaceI]];
const bool isOwner = (owner[cFaces[cFaceI]] == celli);
const face& f = mesh.faces()[cFaces[cFacei]];
const bool isOwner = (owner[cFaces[cFacei]] == celli);
// Number of triangles and quads in decomposition
label nTris = 0;
@ -388,7 +388,7 @@ vtkUnstructuredGrid* Foam::vtkPV3Foam::volumeVTKMesh
}
else
{
superCells[addCellI++] = celli;
superCells[addCelli++] = celli;
}
const face& quad = quadFcs[quadI];
@ -431,7 +431,7 @@ vtkUnstructuredGrid* Foam::vtkPV3Foam::volumeVTKMesh
}
else
{
superCells[addCellI++] = celli;
superCells[addCelli++] = celli;
}
const face& tri = triFcs[triI];

View File

@ -99,9 +99,9 @@ vtkUnstructuredGrid* Foam::vtkPVFoam::volumeVTKMesh
{
const cell& cFaces = mesh.cells()[celli];
forAll(cFaces, cFaceI)
forAll(cFaces, cFacei)
{
const face& f = mesh.faces()[cFaces[cFaceI]];
const face& f = mesh.faces()[cFaces[cFacei]];
label nQuads = 0;
label nTris = 0;
@ -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
@ -173,7 +173,7 @@ vtkUnstructuredGrid* Foam::vtkPVFoam::volumeVTKMesh
const cellShape& cellShape = cellShapes[celli];
const cellModel& cellModel = cellShape.model();
superCells[addCellI++] = celli;
superCells[addCelli++] = celli;
if (cellModel == tet)
{
@ -280,9 +280,9 @@ vtkUnstructuredGrid* Foam::vtkPVFoam::volumeVTKMesh
vtkIdType nLabels = nFaces;
// count size for face stream
forAll(cFaces, cFaceI)
forAll(cFaces, cFacei)
{
const face& f = mesh.faces()[cFaces[cFaceI]];
const face& f = mesh.faces()[cFaces[cFacei]];
nLabels += f.size();
}
@ -292,10 +292,10 @@ vtkUnstructuredGrid* Foam::vtkPVFoam::volumeVTKMesh
faceStream.clear();
faceStream.reserve(nLabels + nFaces);
forAll(cFaces, cFaceI)
forAll(cFaces, cFacei)
{
const face& f = mesh.faces()[cFaces[cFaceI]];
const bool isOwner = (owner[cFaces[cFaceI]] == celli);
const face& f = mesh.faces()[cFaces[cFacei]];
const bool isOwner = (owner[cFaces[cFacei]] == celli);
const label nFacePoints = f.size();
// number of labels for this face
@ -327,9 +327,9 @@ vtkUnstructuredGrid* Foam::vtkPVFoam::volumeVTKMesh
// establish unique node ids used
HashSet<vtkIdType, Hash<label>> hashUniqId(2*256);
forAll(cFaces, cFaceI)
forAll(cFaces, cFacei)
{
const face& f = mesh.faces()[cFaces[cFaceI]];
const face& f = mesh.faces()[cFaces[cFacei]];
forAll(f, fp)
{
@ -363,10 +363,10 @@ vtkUnstructuredGrid* Foam::vtkPVFoam::volumeVTKMesh
bool substituteCell = true;
const labelList& cFaces = mesh.cells()[celli];
forAll(cFaces, cFaceI)
forAll(cFaces, cFacei)
{
const face& f = mesh.faces()[cFaces[cFaceI]];
const bool isOwner = (owner[cFaces[cFaceI]] == celli);
const face& f = mesh.faces()[cFaces[cFacei]];
const bool isOwner = (owner[cFaces[cFacei]] == celli);
// Number of triangles and quads in decomposition
label nTris = 0;
@ -388,7 +388,7 @@ vtkUnstructuredGrid* Foam::vtkPVFoam::volumeVTKMesh
}
else
{
superCells[addCellI++] = celli;
superCells[addCelli++] = celli;
}
const face& quad = quadFcs[quadI];
@ -431,7 +431,7 @@ vtkUnstructuredGrid* Foam::vtkPVFoam::volumeVTKMesh
}
else
{
superCells[addCellI++] = celli;
superCells[addCelli++] = celli;
}
const face& tri = triFcs[triI];

View File

@ -103,10 +103,10 @@ int main(int argc, char *argv[])
labelList numIds = maxIds + 1;
Info<< nl << "Particle statistics:" << endl;
forAll(maxIds, procI)
forAll(maxIds, proci)
{
Info<< " Found " << numIds[procI] << " particles originating"
<< " from processor " << procI << endl;
Info<< " Found " << numIds[proci] << " particles originating"
<< " from processor " << proci << endl;
}
Info<< nl << endl;
@ -169,13 +169,13 @@ int main(int argc, char *argv[])
Info<< " Constructing tracks" << nl << endl;
if (Pstream::master())
{
forAll(allPositions, procI)
forAll(allPositions, proci)
{
forAll(allPositions[procI], i)
forAll(allPositions[proci], i)
{
label globalId =
startIds[allOrigProcs[procI][i]]
+ allOrigIds[procI][i];
startIds[allOrigProcs[proci][i]]
+ allOrigIds[proci][i];
if (globalId % sampleFrequency == 0)
{
@ -184,7 +184,7 @@ int main(int argc, char *argv[])
{
allTracks[trackId].append
(
allPositions[procI][i]
allPositions[proci][i]
);
}
}

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
@ -88,16 +88,16 @@ int main(int argc, char *argv[])
// Create the processor databases
databases.setSize(nProcs);
forAll(databases, procI)
forAll(databases, proci)
{
databases.set
(
procI,
proci,
new Time
(
Time::controlDictName,
args.rootPath(),
args.caseName()/fileName(word("processor") + name(procI))
args.caseName()/fileName(word("processor") + name(proci))
)
);
}
@ -128,11 +128,11 @@ int main(int argc, char *argv[])
{
if (args.optionFound("processor"))
{
for (label procI=0; procI<nProcs; procI++)
for (label proci=0; proci<nProcs; proci++)
{
fileName procPath
(
args.path()/(word("processor") + name(procI))
args.path()/(word("processor") + name(proci))
);
forAll(timeDirs, timeI)

View File

@ -109,9 +109,9 @@ void Foam::channelIndex::walkOppositeFaces
{
const cell& ownCell = cells[mesh.faceOwner()[facei]];
label oppositeFaceI = ownCell.opposingFaceLabel(facei, faces);
label oppositeFacei = ownCell.opposingFaceLabel(facei, faces);
if (oppositeFaceI == -1)
if (oppositeFacei == -1)
{
FatalErrorInFunction
<< "Face:" << facei << " owner cell:" << ownCell
@ -119,10 +119,10 @@ void Foam::channelIndex::walkOppositeFaces
}
else
{
if (!blockedFace[oppositeFaceI])
if (!blockedFace[oppositeFacei])
{
blockedFace[oppositeFaceI] = true;
newFrontFaces.append(oppositeFaceI);
blockedFace[oppositeFacei] = true;
newFrontFaces.append(oppositeFacei);
}
}
}
@ -131,9 +131,9 @@ void Foam::channelIndex::walkOppositeFaces
{
const cell& neiCell = mesh.cells()[mesh.faceNeighbour()[facei]];
label oppositeFaceI = neiCell.opposingFaceLabel(facei, faces);
label oppositeFacei = neiCell.opposingFaceLabel(facei, faces);
if (oppositeFaceI == -1)
if (oppositeFacei == -1)
{
FatalErrorInFunction
<< "Face:" << facei << " neighbour cell:" << neiCell
@ -141,10 +141,10 @@ void Foam::channelIndex::walkOppositeFaces
}
else
{
if (!blockedFace[oppositeFaceI])
if (!blockedFace[oppositeFacei])
{
blockedFace[oppositeFaceI] = true;
newFrontFaces.append(oppositeFaceI);
blockedFace[oppositeFacei] = true;
newFrontFaces.append(oppositeFacei);
}
}
}