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

@ -88,11 +88,11 @@ Foam::label Foam::meshCutter::findCutCell
{
forAll(cellLabels, labelI)
{
label cellI = cellLabels[labelI];
label celli = cellLabels[labelI];
if (cuts.cellLoops()[cellI].size())
if (cuts.cellLoops()[celli].size())
{
return cellI;
return celli;
}
}
return -1;
@ -112,9 +112,9 @@ Foam::label Foam::meshCutter::findInternalFacePoint
forAll(pFaces, pFaceI)
{
label faceI = pFaces[pFaceI];
label facei = pFaces[pFaceI];
if (mesh().isInternalFace(faceI))
if (mesh().isInternalFace(facei))
{
return pointI;
}
@ -134,7 +134,7 @@ Foam::label Foam::meshCutter::findInternalFacePoint
void Foam::meshCutter::faceCells
(
const cellCuts& cuts,
const label faceI,
const label facei,
label& own,
label& nei
) const
@ -142,9 +142,9 @@ void Foam::meshCutter::faceCells
const labelListList& anchorPts = cuts.cellAnchorPoints();
const labelListList& cellLoops = cuts.cellLoops();
const face& f = mesh().faces()[faceI];
const face& f = mesh().faces()[facei];
own = mesh().faceOwner()[faceI];
own = mesh().faceOwner()[facei];
if (cellLoops[own].size() && uses(f, anchorPts[own]))
{
@ -153,9 +153,9 @@ void Foam::meshCutter::faceCells
nei = -1;
if (mesh().isInternalFace(faceI))
if (mesh().isInternalFace(facei))
{
nei = mesh().faceNeighbour()[faceI];
nei = mesh().faceNeighbour()[facei];
if (cellLoops[nei].size() && uses(f, anchorPts[nei]))
{
@ -167,7 +167,7 @@ void Foam::meshCutter::faceCells
void Foam::meshCutter::getFaceInfo
(
const label faceI,
const label facei,
label& patchID,
label& zoneID,
label& zoneFlip
@ -175,12 +175,12 @@ void Foam::meshCutter::getFaceInfo
{
patchID = -1;
if (!mesh().isInternalFace(faceI))
if (!mesh().isInternalFace(facei))
{
patchID = mesh().boundaryMesh().whichPatch(faceI);
patchID = mesh().boundaryMesh().whichPatch(facei);
}
zoneID = mesh().faceZones().whichZone(faceI);
zoneID = mesh().faceZones().whichZone(facei);
zoneFlip = false;
@ -188,7 +188,7 @@ void Foam::meshCutter::getFaceInfo
{
const faceZone& fZone = mesh().faceZones()[zoneID];
zoneFlip = fZone.flipMap()[fZone.whichFace(faceI)];
zoneFlip = fZone.flipMap()[fZone.whichFace(facei)];
}
}
@ -196,7 +196,7 @@ void Foam::meshCutter::getFaceInfo
void Foam::meshCutter::addFace
(
polyTopoChange& meshMod,
const label faceI,
const label facei,
const face& newFace,
const label own,
const label nei
@ -204,7 +204,7 @@ void Foam::meshCutter::addFace
{
label patchID, zoneID, zoneFlip;
getFaceInfo(faceI, patchID, zoneID, zoneFlip);
getFaceInfo(facei, patchID, zoneID, zoneFlip);
if ((nei == -1) || (own < nei))
{
@ -229,7 +229,7 @@ void Foam::meshCutter::addFace
nei, // neighbour
-1, // master point
-1, // master edge
faceI, // master face for addition
facei, // master face for addition
false, // flux flip
patchID, // patch for face
zoneID, // zone for face
@ -260,7 +260,7 @@ void Foam::meshCutter::addFace
own, // neighbour
-1, // master point
-1, // master edge
faceI, // master face for addition
facei, // master face for addition
false, // flux flip
patchID, // patch for face
zoneID, // zone for face
@ -274,7 +274,7 @@ void Foam::meshCutter::addFace
void Foam::meshCutter::modFace
(
polyTopoChange& meshMod,
const label faceI,
const label facei,
const face& newFace,
const label own,
const label nei
@ -282,22 +282,22 @@ void Foam::meshCutter::modFace
{
label patchID, zoneID, zoneFlip;
getFaceInfo(faceI, patchID, zoneID, zoneFlip);
getFaceInfo(facei, patchID, zoneID, zoneFlip);
if
(
(own != mesh().faceOwner()[faceI])
(own != mesh().faceOwner()[facei])
|| (
mesh().isInternalFace(faceI)
&& (nei != mesh().faceNeighbour()[faceI])
mesh().isInternalFace(facei)
&& (nei != mesh().faceNeighbour()[facei])
)
|| (newFace != mesh().faces()[faceI])
|| (newFace != mesh().faces()[facei])
)
{
if (debug & 2)
{
Pout<< "Modifying face " << faceI
<< " old vertices:" << mesh().faces()[faceI]
Pout<< "Modifying face " << facei
<< " old vertices:" << mesh().faces()[facei]
<< " new vertices:" << newFace
<< " new owner:" << own
<< " new neighbour:" << nei
@ -313,7 +313,7 @@ void Foam::meshCutter::modFace
polyModifyFace
(
newFace, // modified face
faceI, // label of face being modified
facei, // label of face being modified
own, // owner
nei, // neighbour
false, // face flip
@ -331,7 +331,7 @@ void Foam::meshCutter::modFace
polyModifyFace
(
newFace.reverseFace(), // modified face
faceI, // label of face being modified
facei, // label of face being modified
nei, // owner
own, // neighbour
false, // face flip
@ -408,9 +408,9 @@ void Foam::meshCutter::splitFace
}
Foam::face Foam::meshCutter::addEdgeCutsToFace(const label faceI) const
Foam::face Foam::meshCutter::addEdgeCutsToFace(const label facei) const
{
const face& f = mesh().faces()[faceI];
const face& f = mesh().faces()[facei];
face newFace(2 * f.size());
@ -442,7 +442,7 @@ Foam::face Foam::meshCutter::addEdgeCutsToFace(const label faceI) const
Foam::face Foam::meshCutter::loopToFace
(
const label cellI,
const label celli,
const labelList& loop
) const
{
@ -602,9 +602,9 @@ void Foam::meshCutter::setRefinement
// Add cells (on 'anchor' side of cell)
//
forAll(cellLoops, cellI)
forAll(cellLoops, celli)
{
if (cellLoops[cellI].size())
if (cellLoops[celli].size())
{
// Add a cell to the existing cell
label addedCellI =
@ -615,17 +615,17 @@ void Foam::meshCutter::setRefinement
-1, // master point
-1, // master edge
-1, // master face
cellI, // master cell
mesh().cellZones().whichZone(cellI) // zone for cell
celli, // master cell
mesh().cellZones().whichZone(celli) // zone for cell
)
);
addedCells_.insert(cellI, addedCellI);
addedCells_.insert(celli, addedCellI);
if (debug & 2)
{
Pout<< "Added cell " << addedCells_[cellI] << " to cell "
<< cellI << endl;
Pout<< "Added cell " << addedCells_[celli] << " to cell "
<< celli << endl;
}
}
}
@ -635,19 +635,19 @@ void Foam::meshCutter::setRefinement
// For all cut cells add an internal face
//
forAll(cellLoops, cellI)
forAll(cellLoops, celli)
{
const labelList& loop = cellLoops[cellI];
const labelList& loop = cellLoops[celli];
if (loop.size())
{
// Convert loop (=list of cuts) into proper face.
// Orientation should already be ok. (done by cellCuts)
//
face newFace(loopToFace(cellI, loop));
face newFace(loopToFace(celli, loop));
// Pick any anchor point on cell
label masterPointI = findInternalFacePoint(anchorPts[cellI]);
label masterPointI = findInternalFacePoint(anchorPts[celli]);
label addedFaceI =
meshMod.setAction
@ -655,8 +655,8 @@ void Foam::meshCutter::setRefinement
polyAddFace
(
newFace, // face
cellI, // owner
addedCells_[cellI], // neighbour
celli, // owner
addedCells_[celli], // neighbour
masterPointI, // master point
-1, // master edge
-1, // master face for addition
@ -667,7 +667,7 @@ void Foam::meshCutter::setRefinement
)
);
addedFaces_.insert(cellI, addedFaceI);
addedFaces_.insert(celli, addedFaceI);
if (debug & 2)
{
@ -687,8 +687,8 @@ void Foam::meshCutter::setRefinement
Pout<< "Added splitting face " << newFace << " index:"
<< addedFaceI
<< " to owner " << cellI
<< " neighbour " << addedCells_[cellI]
<< " to owner " << celli
<< " neighbour " << addedCells_[celli]
<< " from Loop:";
writeCuts(Pout, loop, weights);
Pout<< endl;
@ -710,10 +710,10 @@ void Foam::meshCutter::setRefinement
forAllConstIter(Map<edge>, faceSplitCuts, iter)
{
label faceI = iter.key();
label facei = iter.key();
// Renumber face to include split edges.
face newFace(addEdgeCutsToFace(faceI));
face newFace(addEdgeCutsToFace(facei));
// Edge splitting the face. Convert cuts to new vertex numbering.
const edge& splitEdge = iter();
@ -747,18 +747,18 @@ void Foam::meshCutter::setRefinement
face f0, f1;
splitFace(newFace, v0, v1, f0, f1);
label own = mesh().faceOwner()[faceI];
label own = mesh().faceOwner()[facei];
label nei = -1;
if (mesh().isInternalFace(faceI))
if (mesh().isInternalFace(facei))
{
nei = mesh().faceNeighbour()[faceI];
nei = mesh().faceNeighbour()[facei];
}
if (debug & 2)
{
Pout<< "Split face " << mesh().faces()[faceI]
Pout<< "Split face " << mesh().faces()[facei]
<< " own:" << own << " nei:" << nei
<< " into f0:" << f0
<< " and f1:" << f1 << endl;
@ -772,7 +772,7 @@ void Foam::meshCutter::setRefinement
// the one that cuts it (this face cut might not be the one splitting
// the cell)
const face& f = mesh().faces()[faceI];
const face& f = mesh().faces()[facei];
label f0Owner = -1;
label f1Owner = -1;
@ -859,11 +859,11 @@ void Foam::meshCutter::setRefinement
}
// f0 is the added face, f1 the modified one
addFace(meshMod, faceI, f0, f0Owner, f0Neighbour);
addFace(meshMod, facei, f0, f0Owner, f0Neighbour);
modFace(meshMod, faceI, f1, f1Owner, f1Neighbour);
modFace(meshMod, facei, f1, f1Owner, f1Neighbour);
faceUptodate[faceI] = true;
faceUptodate[facei] = true;
}
@ -882,27 +882,27 @@ void Foam::meshCutter::setRefinement
forAll(eFaces, i)
{
label faceI = eFaces[i];
label facei = eFaces[i];
if (!faceUptodate[faceI])
if (!faceUptodate[facei])
{
// Renumber face to include split edges.
face newFace(addEdgeCutsToFace(faceI));
face newFace(addEdgeCutsToFace(facei));
if (debug & 2)
{
Pout<< "Added edge cuts to face " << faceI
<< " f:" << mesh().faces()[faceI]
Pout<< "Added edge cuts to face " << facei
<< " f:" << mesh().faces()[facei]
<< " newFace:" << newFace << endl;
}
// Get (new or original) owner and neighbour of faceI
// Get (new or original) owner and neighbour of facei
label own, nei;
faceCells(cuts, faceI, own, nei);
faceCells(cuts, facei, own, nei);
modFace(meshMod, faceI, newFace, own, nei);
modFace(meshMod, facei, newFace, own, nei);
faceUptodate[faceI] = true;
faceUptodate[facei] = true;
}
}
}
@ -913,46 +913,46 @@ void Foam::meshCutter::setRefinement
// Correct any original faces on split cell for new neighbour/owner
//
forAll(cellLoops, cellI)
forAll(cellLoops, celli)
{
if (cellLoops[cellI].size())
if (cellLoops[celli].size())
{
const labelList& cllFaces = mesh().cells()[cellI];
const labelList& cllFaces = mesh().cells()[celli];
forAll(cllFaces, cllFaceI)
{
label faceI = cllFaces[cllFaceI];
label facei = cllFaces[cllFaceI];
if (!faceUptodate[faceI])
if (!faceUptodate[facei])
{
// Update face with new owner/neighbour (if any)
const face& f = mesh().faces()[faceI];
const face& f = mesh().faces()[facei];
if (debug && (f != addEdgeCutsToFace(faceI)))
if (debug && (f != addEdgeCutsToFace(facei)))
{
FatalErrorInFunction
<< "Problem: edges added to face which does "
<< " not use a marked cut" << endl
<< "faceI:" << faceI << endl
<< "facei:" << facei << endl
<< "face:" << f << endl
<< "newFace:" << addEdgeCutsToFace(faceI)
<< "newFace:" << addEdgeCutsToFace(facei)
<< abort(FatalError);
}
// Get (new or original) owner and neighbour of faceI
// Get (new or original) owner and neighbour of facei
label own, nei;
faceCells(cuts, faceI, own, nei);
faceCells(cuts, facei, own, nei);
modFace
(
meshMod,
faceI,
facei,
f,
own,
nei
);
faceUptodate[faceI] = true;
faceUptodate[facei] = true;
}
}
}
@ -980,8 +980,8 @@ void Foam::meshCutter::updateMesh(const mapPolyMesh& morphMap)
forAllConstIter(Map<label>, addedCells_, iter)
{
label cellI = iter.key();
label newCellI = morphMap.reverseCellMap()[cellI];
label celli = iter.key();
label newCellI = morphMap.reverseCellMap()[celli];
label addedCellI = iter();
@ -992,11 +992,11 @@ void Foam::meshCutter::updateMesh(const mapPolyMesh& morphMap)
if
(
(debug & 2)
&& (newCellI != cellI || newAddedCellI != addedCellI)
&& (newCellI != celli || newAddedCellI != addedCellI)
)
{
Pout<< "meshCutter::updateMesh :"
<< " updating addedCell for cell " << cellI
<< " updating addedCell for cell " << celli
<< " from " << addedCellI
<< " to " << newAddedCellI << endl;
}
@ -1013,8 +1013,8 @@ void Foam::meshCutter::updateMesh(const mapPolyMesh& morphMap)
forAllConstIter(Map<label>, addedFaces_, iter)
{
label cellI = iter.key();
label newCellI = morphMap.reverseCellMap()[cellI];
label celli = iter.key();
label newCellI = morphMap.reverseCellMap()[celli];
label addedFaceI = iter();
@ -1025,11 +1025,11 @@ void Foam::meshCutter::updateMesh(const mapPolyMesh& morphMap)
if
(
(debug & 2)
&& (newCellI != cellI || newAddedFaceI != addedFaceI)
&& (newCellI != celli || newAddedFaceI != addedFaceI)
)
{
Pout<< "meshCutter::updateMesh :"
<< " updating addedFace for cell " << cellI
<< " updating addedFace for cell " << celli
<< " from " << addedFaceI
<< " to " << newAddedFaceI
<< endl;