Standardized cell, patch and face loop index names

This commit is contained in:
Henry Weller
2016-04-25 10:28:32 +01:00
parent 2d5ff31649
commit 43beb06018
849 changed files with 13266 additions and 13266 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -80,18 +80,18 @@ Foam::internalWriter::internalWriter
// Count total number of vertices referenced.
label nFaceVerts = 0;
forAll(vtkVertLabels, cellI)
forAll(vtkVertLabels, celli)
{
nFaceVerts += vtkVertLabels[cellI].size() + 1;
nFaceVerts += vtkVertLabels[celli].size() + 1;
}
os_ << "CELLS " << vtkVertLabels.size() << ' ' << nFaceVerts << std::endl;
DynamicList<label> vertLabels(nFaceVerts);
forAll(vtkVertLabels, cellI)
forAll(vtkVertLabels, celli)
{
const labelList& vtkVerts = vtkVertLabels[cellI];
const labelList& vtkVerts = vtkVertLabels[celli];
vertLabels.append(vtkVerts.size());
@ -133,9 +133,9 @@ void Foam::internalWriter::writeCellIDs()
{
const labelList& cMap = vMesh_.subsetter().cellMap();
forAll(mesh.cells(), cellI)
forAll(mesh.cells(), celli)
{
cellId[labelI++] = cMap[cellI];
cellId[labelI++] = cMap[celli];
}
forAll(superCells, superCellI)
{
@ -146,9 +146,9 @@ void Foam::internalWriter::writeCellIDs()
}
else
{
forAll(mesh.cells(), cellI)
forAll(mesh.cells(), celli)
{
cellId[labelI++] = cellI;
cellId[labelI++] = celli;
}
forAll(superCells, superCellI)
{

View File

@ -70,9 +70,9 @@ Foam::patchWriter::patchWriter
nPoints_ += pp.nPoints();
nFaces_ += pp.size();
forAll(pp, faceI)
forAll(pp, facei)
{
nFaceVerts += pp[faceI].size() + 1;
nFaceVerts += pp[facei].size() + 1;
}
}
@ -98,9 +98,9 @@ Foam::patchWriter::patchWriter
{
const polyPatch& pp = patches[patchIDs_[i]];
forAll(pp, faceI)
forAll(pp, facei)
{
const face& f = pp.localFaces()[faceI];
const face& f = pp.localFaces()[facei];
vertLabels.append(f.size());
writeFuns::insert(f + offset, vertLabels);

View File

@ -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
@ -49,9 +49,9 @@ Foam::surfaceMeshWriter::surfaceMeshWriter
// Write topology
label nFaceVerts = 0;
forAll(pp, faceI)
forAll(pp, facei)
{
nFaceVerts += pp[faceI].size() + 1;
nFaceVerts += pp[facei].size() + 1;
}
os_ << "POINTS " << pp.nPoints() << " float" << std::endl;
@ -65,9 +65,9 @@ Foam::surfaceMeshWriter::surfaceMeshWriter
DynamicList<label> vertLabels(nFaceVerts);
forAll(pp, faceI)
forAll(pp, facei)
{
const face& f = pp.localFaces()[faceI];
const face& f = pp.localFaces()[facei];
vertLabels.append(f.size());
writeFuns::insert(f, vertLabels);

View File

@ -41,17 +41,17 @@ Foam::tmp<Field<Type>> Foam::surfaceMeshWriter::getFaceField
forAll(pp_.addressing(), i)
{
label faceI = pp_.addressing()[i];
label facei = pp_.addressing()[i];
label patchi = patches.whichPatch(faceI);
label patchi = patches.whichPatch(facei);
if (patchi == -1)
{
fld[i] = sfld[faceI];
fld[i] = sfld[facei];
}
else
{
label localFaceI = faceI - patches[patchi].start();
label localFaceI = facei - patches[patchi].start();
fld[i] = sfld.boundaryField()[patchi][localFaceI];
}
}

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
@ -71,9 +71,9 @@ Foam::vtkTopo::vtkTopo(const polyMesh& mesh)
// and cells
if (decomposePoly)
{
forAll(cellShapes, cellI)
forAll(cellShapes, celli)
{
const cellModel& model = cellShapes[cellI].model();
const cellModel& model = cellShapes[celli].model();
if
(
@ -85,7 +85,7 @@ Foam::vtkTopo::vtkTopo(const polyMesh& mesh)
&& model != tetWedge
)
{
const cell& cFaces = mesh_.cells()[cellI];
const cell& cFaces = mesh_.cells()[celli];
forAll(cFaces, cFaceI)
{
@ -122,24 +122,24 @@ Foam::vtkTopo::vtkTopo(const polyMesh& mesh)
// Set counters for additional points and additional cells
label addPointI = 0, addCellI = 0;
forAll(cellShapes, cellI)
forAll(cellShapes, celli)
{
const cellShape& cellShape = cellShapes[cellI];
const cellShape& cellShape = cellShapes[celli];
const cellModel& cellModel = cellShape.model();
labelList& vtkVerts = vertLabels_[cellI];
labelList& vtkVerts = vertLabels_[celli];
if (cellModel == tet)
{
vtkVerts = cellShape;
cellTypes_[cellI] = VTK_TETRA;
cellTypes_[celli] = VTK_TETRA;
}
else if (cellModel == pyr)
{
vtkVerts = cellShape;
cellTypes_[cellI] = VTK_PYRAMID;
cellTypes_[celli] = VTK_PYRAMID;
}
else if (cellModel == prism)
{
@ -150,7 +150,7 @@ Foam::vtkTopo::vtkTopo(const polyMesh& mesh)
Foam::Swap(vtkVerts[1], vtkVerts[2]);
Foam::Swap(vtkVerts[4], vtkVerts[5]);
cellTypes_[cellI] = VTK_WEDGE;
cellTypes_[celli] = VTK_WEDGE;
}
else if (cellModel == tetWedge)
{
@ -163,7 +163,7 @@ Foam::vtkTopo::vtkTopo(const polyMesh& mesh)
vtkVerts[4] = cellShape[4];
vtkVerts[5] = cellShape[4];
cellTypes_[cellI] = VTK_WEDGE;
cellTypes_[celli] = VTK_WEDGE;
}
else if (cellModel == wedge)
{
@ -178,20 +178,20 @@ Foam::vtkTopo::vtkTopo(const polyMesh& mesh)
vtkVerts[6] = cellShape[5];
vtkVerts[7] = cellShape[6];
cellTypes_[cellI] = VTK_HEXAHEDRON;
cellTypes_[celli] = VTK_HEXAHEDRON;
}
else if (cellModel == hex)
{
vtkVerts = cellShape;
cellTypes_[cellI] = VTK_HEXAHEDRON;
cellTypes_[celli] = VTK_HEXAHEDRON;
}
else if (decomposePoly)
{
// 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;
@ -199,11 +199,11 @@ Foam::vtkTopo::vtkTopo(const polyMesh& mesh)
// Whether to insert cell in place of original or not.
bool substituteCell = true;
const labelList& cFaces = mesh_.cells()[cellI];
const labelList& cFaces = mesh_.cells()[celli];
forAll(cFaces, cFaceI)
{
const face& f = mesh_.faces()[cFaces[cFaceI]];
const bool isOwner = (owner[cFaces[cFaceI]] == cellI);
const bool isOwner = (owner[cFaces[cFaceI]] == celli);
// Number of triangles and quads in decomposition
label nTris = 0;
@ -223,13 +223,13 @@ Foam::vtkTopo::vtkTopo(const polyMesh& mesh)
if (substituteCell)
{
thisCellI = cellI;
thisCellI = celli;
substituteCell = false;
}
else
{
thisCellI = mesh_.nCells() + addCellI;
superCells_[addCellI++] = cellI;
superCells_[addCellI++] = celli;
}
labelList& addVtkVerts = vertLabels_[thisCellI];
@ -270,13 +270,13 @@ Foam::vtkTopo::vtkTopo(const polyMesh& mesh)
if (substituteCell)
{
thisCellI = cellI;
thisCellI = celli;
substituteCell = false;
}
else
{
thisCellI = mesh_.nCells() + addCellI;
superCells_[addCellI++] = cellI;
superCells_[addCellI++] = celli;
}
@ -310,9 +310,9 @@ Foam::vtkTopo::vtkTopo(const polyMesh& mesh)
else
{
// Polyhedral cell - not decomposed
cellTypes_[cellI] = VTK_POLYHEDRON;
cellTypes_[celli] = VTK_POLYHEDRON;
const labelList& cFaces = mesh_.cells()[cellI];
const labelList& cFaces = mesh_.cells()[celli];
// space for the number of faces and size of each face
label nData = 1 + cFaces.size();
@ -333,7 +333,7 @@ Foam::vtkTopo::vtkTopo(const polyMesh& mesh)
forAll(cFaces, cFaceI)
{
const face& f = mesh.faces()[cFaces[cFaceI]];
const bool isOwner = (owner[cFaces[cFaceI]] == cellI);
const bool isOwner = (owner[cFaces[cFaceI]] == celli);
// number of labels for this face
vtkVerts[nData++] = f.size();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -85,18 +85,18 @@ void Foam::writeFaceSet
label nFaceVerts = 0;
forAll(fp.localFaces(), faceI)
forAll(fp.localFaces(), facei)
{
nFaceVerts += fp.localFaces()[faceI].size() + 1;
nFaceVerts += fp.localFaces()[facei].size() + 1;
}
ostr<< "POLYGONS " << fp.size() << ' ' << nFaceVerts << std::endl;
DynamicList<label> vertLabels(nFaceVerts);
forAll(fp.localFaces(), faceI)
forAll(fp.localFaces(), facei)
{
const face& f = fp.localFaces()[faceI];
const face& f = fp.localFaces()[facei];
vertLabels.append(f.size());

View File

@ -64,9 +64,9 @@ void writeSurfFields
DynamicList<floatScalar> pField(3*mesh.nFaces());
for (label faceI = 0; faceI < mesh.nFaces(); faceI++)
for (label facei = 0; facei < mesh.nFaces(); facei++)
{
writeFuns::insert(fc[faceI], pField);
writeFuns::insert(fc[facei], pField);
}
writeFuns::write(str, binary, pField);
@ -84,9 +84,9 @@ void writeSurfFields
DynamicList<floatScalar> fField(3*mesh.nFaces());
for (label faceI = 0; faceI < mesh.nInternalFaces(); faceI++)
for (label facei = 0; facei < mesh.nInternalFaces(); facei++)
{
writeFuns::insert(svf[faceI], fField);
writeFuns::insert(svf[facei], fField);
}
forAll(svf.boundaryField(), patchi)