Standardized cell, patch and face loop index names

This commit is contained in:
Henry Weller
2016-04-25 10:28:32 +01:00
parent 6a27f7af46
commit 8c4f6b8fcb
849 changed files with 13266 additions and 13266 deletions

View File

@ -49,7 +49,7 @@ defineTypeNameAndDebug(boundaryCutter, 0);
void Foam::boundaryCutter::getFaceInfo
(
const label faceI,
const label facei,
label& patchID,
label& zoneID,
label& zoneFlip
@ -57,12 +57,12 @@ void Foam::boundaryCutter::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;
@ -70,7 +70,7 @@ void Foam::boundaryCutter::getFaceInfo
{
const faceZone& fZone = mesh_.faceZones()[zoneID];
zoneFlip = fZone.flipMap()[fZone.whichFace(faceI)];
zoneFlip = fZone.flipMap()[fZone.whichFace(facei)];
}
}
@ -79,13 +79,13 @@ void Foam::boundaryCutter::getFaceInfo
// are not split but still might use edge that has been cut.
Foam::face Foam::boundaryCutter::addEdgeCutsToFace
(
const label faceI,
const label facei,
const Map<labelList>& edgeToAddedPoints
) const
{
const edgeList& edges = mesh_.edges();
const face& f = mesh_.faces()[faceI];
const labelList& fEdges = mesh_.faceEdges()[faceI];
const face& f = mesh_.faces()[facei];
const labelList& fEdges = mesh_.faceEdges()[facei];
// Storage for face
DynamicList<label> newFace(2 * f.size());
@ -142,18 +142,18 @@ Foam::face Foam::boundaryCutter::addEdgeCutsToFace
void Foam::boundaryCutter::addFace
(
const label faceI,
const label facei,
const face& newFace,
bool& modifiedFace, // have we already 'used' faceI
bool& modifiedFace, // have we already 'used' facei
polyTopoChange& meshMod
) const
{
// Information about old face
label patchID, zoneID, zoneFlip;
getFaceInfo(faceI, patchID, zoneID, zoneFlip);
label own = mesh_.faceOwner()[faceI];
label masterPoint = mesh_.faces()[faceI][0];
getFaceInfo(facei, patchID, zoneID, zoneFlip);
label own = mesh_.faceOwner()[facei];
label masterPoint = mesh_.faces()[facei][0];
if (!modifiedFace)
{
@ -162,7 +162,7 @@ void Foam::boundaryCutter::addFace
polyModifyFace
(
newFace, // face
faceI,
facei,
own, // owner
-1, // neighbour
false, // flux flip
@ -201,15 +201,15 @@ void Foam::boundaryCutter::addFace
// Splits a face using the cut edges and modified points
bool Foam::boundaryCutter::splitFace
(
const label faceI,
const label facei,
const Map<point>& pointToPos,
const Map<labelList>& edgeToAddedPoints,
polyTopoChange& meshMod
) const
{
const edgeList& edges = mesh_.edges();
const face& f = mesh_.faces()[faceI];
const labelList& fEdges = mesh_.faceEdges()[faceI];
const face& f = mesh_.faces()[facei];
const labelList& fEdges = mesh_.faceEdges()[facei];
// Count number of split edges and total number of splits.
label nSplitEdges = 0;
@ -240,7 +240,7 @@ bool Foam::boundaryCutter::splitFace
if (debug)
{
Pout<< "Face:" << faceI
Pout<< "Face:" << facei
<< " nModPoints:" << nModPoints
<< " nSplitEdges:" << nSplitEdges
<< " nTotalSplits:" << nTotalSplits << endl;
@ -258,7 +258,7 @@ bool Foam::boundaryCutter::splitFace
{
// single or multiple cuts on a single edge or single modified point
// Dont cut and let caller handle this.
Warning << "Face " << faceI << " has only one edge cut " << endl;
Warning << "Face " << facei << " has only one edge cut " << endl;
return false;
}
else
@ -270,10 +270,10 @@ bool Foam::boundaryCutter::splitFace
// Information about old face
label patchID, zoneID, zoneFlip;
getFaceInfo(faceI, patchID, zoneID, zoneFlip);
getFaceInfo(facei, patchID, zoneID, zoneFlip);
// Get face with new points on cut edges for ease of looping
face extendedFace(addEdgeCutsToFace(faceI, edgeToAddedPoints));
face extendedFace(addEdgeCutsToFace(facei, edgeToAddedPoints));
// Find first added point. This is the starting vertex for splitting.
label startFp = -1;
@ -356,7 +356,7 @@ bool Foam::boundaryCutter::splitFace
tmpFace.transfer(newFace);
// Add face tmpFace
addFace(faceI, tmpFace, modifiedFace, meshMod);
addFace(facei, tmpFace, modifiedFace, meshMod);
// Starting point is also the starting point for the new face
newFace.append(extendedFace[startFp]);
@ -374,7 +374,7 @@ bool Foam::boundaryCutter::splitFace
tmpFace.transfer(newFace);
// Add face tmpFace
addFace(faceI, tmpFace, modifiedFace, meshMod);
addFace(facei, tmpFace, modifiedFace, meshMod);
}
// Split something
@ -502,23 +502,23 @@ void Foam::boundaryCutter::setRefinement
forAllConstIter(Map<point>, faceToFeaturePoint, iter)
{
label faceI = iter.key();
label facei = iter.key();
const face& f = mesh_.faces()[faceI];
const face& f = mesh_.faces()[facei];
if (faceToSplit.found(faceI))
if (faceToSplit.found(facei))
{
FatalErrorInFunction
<< "Face " << faceI << " vertices " << f
<< "Face " << facei << " vertices " << f
<< " is both marked for face-centre decomposition and"
<< " diagonal splitting."
<< abort(FatalError);
}
if (mesh_.isInternalFace(faceI))
if (mesh_.isInternalFace(facei))
{
FatalErrorInFunction
<< "Face " << faceI << " vertices " << f
<< "Face " << facei << " vertices " << f
<< " is not an external face. Cannot split it"
<< abort(FatalError);
}
@ -534,13 +534,13 @@ void Foam::boundaryCutter::setRefinement
true // supports a cell
)
);
faceAddedPoint_.insert(faceI, addedPointI);
faceAddedPoint_.insert(facei, addedPointI);
if (debug)
{
Pout<< "Added point " << addedPointI << " for feature point "
<< iter() << " on face " << faceI << " with centre "
<< mesh_.faceCentres()[faceI] << endl;
<< iter() << " on face " << facei << " with centre "
<< mesh_.faceCentres()[facei] << endl;
}
}
@ -558,18 +558,18 @@ void Foam::boundaryCutter::setRefinement
// Triangulate faces containing feature points
forAllConstIter(Map<label>, faceAddedPoint_, iter)
{
label faceI = iter.key();
label facei = iter.key();
// Get face with new points on cut edges.
face newFace(addEdgeCutsToFace(faceI, edgeToAddedPoints));
face newFace(addEdgeCutsToFace(facei, edgeToAddedPoints));
label addedPointI = iter();
// Information about old face
label patchID, zoneID, zoneFlip;
getFaceInfo(faceI, patchID, zoneID, zoneFlip);
label own = mesh_.faceOwner()[faceI];
label masterPoint = mesh_.faces()[faceI][0];
getFaceInfo(facei, patchID, zoneID, zoneFlip);
label own = mesh_.faceOwner()[facei];
label masterPoint = mesh_.faces()[facei][0];
// Triangulate face around mid point
@ -591,7 +591,7 @@ void Foam::boundaryCutter::setRefinement
polyModifyFace
(
tri, // face
faceI,
facei,
own, // owner
-1, // neighbour
false, // flux flip
@ -624,21 +624,21 @@ void Foam::boundaryCutter::setRefinement
}
}
faceUptodate[faceI] = true;
faceUptodate[facei] = true;
}
// Diagonally split faces
forAllConstIter(Map<labelPair>, faceToSplit, iter)
{
label faceI = iter.key();
label facei = iter.key();
const face& f = mesh_.faces()[faceI];
const face& f = mesh_.faces()[facei];
if (faceAddedPoint_.found(faceI))
if (faceAddedPoint_.found(facei))
{
FatalErrorInFunction
<< "Face " << faceI << " vertices " << f
<< "Face " << facei << " vertices " << f
<< " is both marked for face-centre decomposition and"
<< " diagonal splitting."
<< abort(FatalError);
@ -646,13 +646,13 @@ void Foam::boundaryCutter::setRefinement
// Get face with new points on cut edges.
face newFace(addEdgeCutsToFace(faceI, edgeToAddedPoints));
face newFace(addEdgeCutsToFace(facei, edgeToAddedPoints));
// Information about old face
label patchID, zoneID, zoneFlip;
getFaceInfo(faceI, patchID, zoneID, zoneFlip);
label own = mesh_.faceOwner()[faceI];
label masterPoint = mesh_.faces()[faceI][0];
getFaceInfo(facei, patchID, zoneID, zoneFlip);
label own = mesh_.faceOwner()[facei];
label masterPoint = mesh_.faces()[facei][0];
// Split face from one side of diagonal to other.
const labelPair& diag = iter();
@ -663,7 +663,7 @@ void Foam::boundaryCutter::setRefinement
if (fp0 == -1 || fp1 == -1 || fp0 == fp1)
{
FatalErrorInFunction
<< "Problem : Face " << faceI << " vertices " << f
<< "Problem : Face " << facei << " vertices " << f
<< " newFace:" << newFace << " diagonal:" << f[diag[0]]
<< ' ' << f[diag[1]]
<< abort(FatalError);
@ -694,7 +694,7 @@ void Foam::boundaryCutter::setRefinement
polyModifyFace
(
face(newVerts.shrink()), // face
faceI,
facei,
own, // owner
-1, // neighbour
false, // flux flip
@ -738,7 +738,7 @@ void Foam::boundaryCutter::setRefinement
)
);
faceUptodate[faceI] = true;
faceUptodate[facei] = true;
}
@ -752,15 +752,15 @@ void Foam::boundaryCutter::setRefinement
forAll(eFaces, i)
{
label faceI = eFaces[i];
label facei = eFaces[i];
if (!faceUptodate[faceI] && !mesh_.isInternalFace(faceI))
if (!faceUptodate[facei] && !mesh_.isInternalFace(facei))
{
// Is external face so split
if (splitFace(faceI, pointToPos, edgeToAddedPoints, meshMod))
if (splitFace(facei, pointToPos, edgeToAddedPoints, meshMod))
{
// Successfull split
faceUptodate[faceI] = true;
faceUptodate[facei] = true;
}
}
}
@ -778,31 +778,31 @@ void Foam::boundaryCutter::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, edgeToAddedPoints));
face newFace(addEdgeCutsToFace(facei, edgeToAddedPoints));
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];
}
label patchID, zoneID, zoneFlip;
getFaceInfo(faceI, patchID, zoneID, zoneFlip);
getFaceInfo(facei, patchID, zoneID, zoneFlip);
meshMod.setAction
(
polyModifyFace
(
newFace, // modified face
faceI, // label of face being modified
facei, // label of face being modified
own, // owner
nei, // neighbour
false, // face flip
@ -813,7 +813,7 @@ void Foam::boundaryCutter::setRefinement
)
);
faceUptodate[faceI] = true;
faceUptodate[facei] = true;
}
}
}