Standardized cell, patch and face loop index names
This commit is contained in:
@ -565,15 +565,15 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const
|
||||
|
||||
// Pout<< "curFaces: " << curFaces << endl;
|
||||
|
||||
forAll(curFaces, faceI)
|
||||
forAll(curFaces, facei)
|
||||
{
|
||||
// Pout<< "face: " << curFaces[faceI] << " "
|
||||
// << masterPatch[curFaces[faceI]]
|
||||
// Pout<< "face: " << curFaces[facei] << " "
|
||||
// << masterPatch[curFaces[facei]]
|
||||
// << " local: "
|
||||
// << masterPatch.localFaces()[curFaces[faceI]]
|
||||
// << masterPatch.localFaces()[curFaces[facei]]
|
||||
// << endl;
|
||||
|
||||
const labelList& me = masterFaceEdges[curFaces[faceI]];
|
||||
const labelList& me = masterFaceEdges[curFaces[facei]];
|
||||
|
||||
forAll(me, meI)
|
||||
{
|
||||
@ -847,13 +847,13 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const
|
||||
boolList orphanedMaster(masterPatch.size(), false);
|
||||
boolList orphanedSlave(slavePatch.size(), false);
|
||||
|
||||
forAll(cutFaces, faceI)
|
||||
forAll(cutFaces, facei)
|
||||
{
|
||||
const face& curCutFace = cutFaces[faceI];
|
||||
const label curMaster = cutFaceMaster[faceI];
|
||||
const label curSlave = cutFaceSlave[faceI];
|
||||
const face& curCutFace = cutFaces[facei];
|
||||
const label curMaster = cutFaceMaster[facei];
|
||||
const label curSlave = cutFaceSlave[facei];
|
||||
|
||||
// Pout<< "Doing insertion of face " << faceI << ": ";
|
||||
// Pout<< "Doing insertion of face " << facei << ": ";
|
||||
|
||||
// Check if the face has changed topologically
|
||||
bool insertedFace = false;
|
||||
@ -1040,7 +1040,7 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const
|
||||
else
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Face " << faceI << " in cut faces has neither a master "
|
||||
<< "Face " << facei << " in cut faces has neither a master "
|
||||
<< "nor a slave. Error in the cutting algorithm on modify."
|
||||
<< abort(FatalError);
|
||||
}
|
||||
@ -1165,7 +1165,7 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const
|
||||
else
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Face " << faceI << " in cut faces has neither a master "
|
||||
<< "Face " << facei << " in cut faces has neither a master "
|
||||
<< "nor a slave. Error in the cutting algorithm on add."
|
||||
<< abort(FatalError);
|
||||
}
|
||||
@ -1178,9 +1178,9 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const
|
||||
|
||||
label nOrphanedMasters = 0;
|
||||
|
||||
forAll(orphanedMaster, faceI)
|
||||
forAll(orphanedMaster, facei)
|
||||
{
|
||||
if (orphanedMaster[faceI])
|
||||
if (orphanedMaster[facei])
|
||||
{
|
||||
nOrphanedMasters++;
|
||||
|
||||
@ -1189,8 +1189,8 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const
|
||||
//(
|
||||
// polyModifyFace
|
||||
// (
|
||||
// masterPatch[faceI], // new face
|
||||
// masterPatchAddr[faceI], // master face index
|
||||
// masterPatch[facei], // new face
|
||||
// masterPatchAddr[facei], // master face index
|
||||
// -1, // owner
|
||||
// -1, // neighbour
|
||||
// false, // flux flip
|
||||
@ -1201,17 +1201,17 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const
|
||||
// )
|
||||
//);
|
||||
|
||||
//Pout<< "**MJ:deleting master face " << masterPatchAddr[faceI]
|
||||
// << " old verts:" << masterPatch[faceI] << endl;
|
||||
ref.setAction(polyRemoveFace(masterPatchAddr[faceI]));
|
||||
//Pout<< "**MJ:deleting master face " << masterPatchAddr[facei]
|
||||
// << " old verts:" << masterPatch[facei] << endl;
|
||||
ref.setAction(polyRemoveFace(masterPatchAddr[facei]));
|
||||
}
|
||||
}
|
||||
|
||||
label nOrphanedSlaves = 0;
|
||||
|
||||
forAll(orphanedSlave, faceI)
|
||||
forAll(orphanedSlave, facei)
|
||||
{
|
||||
if (orphanedSlave[faceI])
|
||||
if (orphanedSlave[facei])
|
||||
{
|
||||
nOrphanedSlaves++;
|
||||
|
||||
@ -1220,8 +1220,8 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const
|
||||
//(
|
||||
// polyModifyFace
|
||||
// (
|
||||
// slavePatch[faceI], // new face
|
||||
// slavePatchAddr[faceI], // slave face index
|
||||
// slavePatch[facei], // new face
|
||||
// slavePatchAddr[facei], // slave face index
|
||||
// -1, // owner
|
||||
// -1, // neighbour
|
||||
// false, // flux flip
|
||||
@ -1232,9 +1232,9 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const
|
||||
// )
|
||||
//);
|
||||
|
||||
//Pout<< "**MJ:deleting slave face " << slavePatchAddr[faceI]
|
||||
// << " old verts:" << slavePatch[faceI] << endl;
|
||||
ref.setAction(polyRemoveFace(slavePatchAddr[faceI]));
|
||||
//Pout<< "**MJ:deleting slave face " << slavePatchAddr[facei]
|
||||
// << " old verts:" << slavePatch[facei] << endl;
|
||||
ref.setAction(polyRemoveFace(slavePatchAddr[facei]));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1268,11 +1268,11 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const
|
||||
// Pout<< "masterStickOuts: " << masterStickOuts << endl;
|
||||
|
||||
// Re-create the master stick-out faces
|
||||
forAll(masterStickOuts, faceI)
|
||||
forAll(masterStickOuts, facei)
|
||||
{
|
||||
// Renumber the face and remove additional points
|
||||
|
||||
const label curFaceID = masterStickOuts[faceI];
|
||||
const label curFaceID = masterStickOuts[facei];
|
||||
|
||||
const face& oldRichFace = faces[curFaceID];
|
||||
|
||||
@ -1540,10 +1540,10 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const
|
||||
|
||||
// Re-create the slave stick-out faces
|
||||
|
||||
forAll(slaveStickOuts, faceI)
|
||||
forAll(slaveStickOuts, facei)
|
||||
{
|
||||
// Renumber the face and remove additional points
|
||||
const label curFaceID = slaveStickOuts[faceI];
|
||||
const label curFaceID = slaveStickOuts[facei];
|
||||
|
||||
const face& oldRichFace = faces[curFaceID];
|
||||
|
||||
|
||||
@ -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
|
||||
@ -82,12 +82,12 @@ void Foam::slidingInterface::decoupleInterface
|
||||
|
||||
// Recover faces in master patch
|
||||
|
||||
forAll(masterPatchAddr, faceI)
|
||||
forAll(masterPatchAddr, facei)
|
||||
{
|
||||
// Make a copy of the face and turn it if necessary
|
||||
face newFace = faces[masterPatchAddr[faceI]];
|
||||
face newFace = faces[masterPatchAddr[facei]];
|
||||
|
||||
if (masterPatchFlip[faceI])
|
||||
if (masterPatchFlip[facei])
|
||||
{
|
||||
newFace.flip();
|
||||
}
|
||||
@ -97,8 +97,8 @@ void Foam::slidingInterface::decoupleInterface
|
||||
polyModifyFace
|
||||
(
|
||||
newFace, // new face
|
||||
masterPatchAddr[faceI], // master face index
|
||||
masterFc[faceI], // owner
|
||||
masterPatchAddr[facei], // master face index
|
||||
masterFc[facei], // owner
|
||||
-1, // neighbour
|
||||
false, // flux flip
|
||||
masterPatchID_.index(), // patch ID
|
||||
@ -109,10 +109,10 @@ void Foam::slidingInterface::decoupleInterface
|
||||
);
|
||||
|
||||
// Pout<< "Modifying master patch face no "
|
||||
// << masterPatchAddr[faceI]
|
||||
// << " face: " << faces[masterPatchAddr[faceI]]
|
||||
// << " old owner: " << own[masterPatchAddr[faceI]]
|
||||
// << " new owner: " << masterFc[faceI]
|
||||
// << masterPatchAddr[facei]
|
||||
// << " face: " << faces[masterPatchAddr[facei]]
|
||||
// << " old owner: " << own[masterPatchAddr[facei]]
|
||||
// << " new owner: " << masterFc[facei]
|
||||
// << endl;
|
||||
}
|
||||
|
||||
@ -134,12 +134,12 @@ void Foam::slidingInterface::decoupleInterface
|
||||
|
||||
// Recover faces in slave patch
|
||||
|
||||
forAll(slavePatchAddr, faceI)
|
||||
forAll(slavePatchAddr, facei)
|
||||
{
|
||||
// Make a copy of face and turn it if necessary
|
||||
face newFace = faces[slavePatchAddr[faceI]];
|
||||
face newFace = faces[slavePatchAddr[facei]];
|
||||
|
||||
if (slavePatchFlip[faceI])
|
||||
if (slavePatchFlip[facei])
|
||||
{
|
||||
newFace.flip();
|
||||
}
|
||||
@ -164,8 +164,8 @@ void Foam::slidingInterface::decoupleInterface
|
||||
polyModifyFace
|
||||
(
|
||||
newFace, // new face
|
||||
slavePatchAddr[faceI], // master face index
|
||||
slaveFc[faceI], // owner
|
||||
slavePatchAddr[facei], // master face index
|
||||
slaveFc[facei], // owner
|
||||
-1, // neighbour
|
||||
false, // flux flip
|
||||
slavePatchID_.index(), // patch ID
|
||||
@ -181,11 +181,11 @@ void Foam::slidingInterface::decoupleInterface
|
||||
// Grab the list of faces in the layer
|
||||
const labelList& masterStickOuts = masterStickOutFaces();
|
||||
|
||||
forAll(masterStickOuts, faceI)
|
||||
forAll(masterStickOuts, facei)
|
||||
{
|
||||
// Renumber the face and remove additional points
|
||||
|
||||
const label curFaceID = masterStickOuts[faceI];
|
||||
const label curFaceID = masterStickOuts[facei];
|
||||
|
||||
const face& oldFace = faces[curFaceID];
|
||||
|
||||
@ -265,23 +265,23 @@ void Foam::slidingInterface::decoupleInterface
|
||||
primitiveMesh::facesPerCell_*(masterPatch.size() + slavePatch.size())
|
||||
);
|
||||
|
||||
forAll(slaveFc, faceI)
|
||||
forAll(slaveFc, facei)
|
||||
{
|
||||
const labelList& curFaces = cells[slaveFc[faceI]];
|
||||
const labelList& curFaces = cells[slaveFc[facei]];
|
||||
|
||||
forAll(curFaces, faceI)
|
||||
forAll(curFaces, facei)
|
||||
{
|
||||
// Check if the face belongs to the slave face zone; and
|
||||
// if it has been removed; if not add it
|
||||
if
|
||||
(
|
||||
mesh.faceZones().whichZone(curFaces[faceI])
|
||||
mesh.faceZones().whichZone(curFaces[facei])
|
||||
!= slaveFaceZoneID_.index()
|
||||
&& !ref.faceRemoved(curFaces[faceI])
|
||||
&& !ref.faceRemoved(curFaces[facei])
|
||||
|
||||
)
|
||||
{
|
||||
slaveLayerCellFaceMap.insert(curFaces[faceI]);
|
||||
slaveLayerCellFaceMap.insert(curFaces[facei]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -292,11 +292,11 @@ void Foam::slidingInterface::decoupleInterface
|
||||
// Grab master point mapping
|
||||
const Map<label>& masterPm = masterPatch.meshPointMap();
|
||||
|
||||
forAll(slaveStickOuts, faceI)
|
||||
forAll(slaveStickOuts, facei)
|
||||
{
|
||||
// Renumber the face and remove additional points
|
||||
|
||||
const label curFaceID = slaveStickOuts[faceI];
|
||||
const label curFaceID = slaveStickOuts[facei];
|
||||
|
||||
const face& oldFace = faces[curFaceID];
|
||||
|
||||
|
||||
@ -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
|
||||
@ -78,11 +78,11 @@ void Foam::enrichedPatch::calcLocalFaces() const
|
||||
localFacesPtr_ = new faceList(faces.size());
|
||||
faceList& lf = *localFacesPtr_;
|
||||
|
||||
forAll(faces, faceI)
|
||||
forAll(faces, facei)
|
||||
{
|
||||
const face& f = faces[faceI];
|
||||
const face& f = faces[facei];
|
||||
|
||||
face& curlf = lf[faceI];
|
||||
face& curlf = lf[facei];
|
||||
|
||||
curlf.setSize(f.size());
|
||||
|
||||
@ -225,16 +225,16 @@ bool Foam::enrichedPatch::checkSupport() const
|
||||
|
||||
bool error = false;
|
||||
|
||||
forAll(faces, faceI)
|
||||
forAll(faces, facei)
|
||||
{
|
||||
const face& curFace = faces[faceI];
|
||||
const face& curFace = faces[facei];
|
||||
|
||||
forAll(curFace, pointI)
|
||||
{
|
||||
if (!pointMap().found(curFace[pointI]))
|
||||
{
|
||||
WarningInFunction
|
||||
<< "Point " << pointI << " of face " << faceI
|
||||
<< "Point " << pointI << " of face " << facei
|
||||
<< " global point index: " << curFace[pointI]
|
||||
<< " not supported in point map. This is not allowed."
|
||||
<< endl;
|
||||
@ -261,9 +261,9 @@ void Foam::enrichedPatch::writeOBJ(const fileName& fName) const
|
||||
|
||||
const faceList& faces = localFaces();
|
||||
|
||||
forAll(faces, faceI)
|
||||
forAll(faces, facei)
|
||||
{
|
||||
const face& f = faces[faceI];
|
||||
const face& f = faces[facei];
|
||||
|
||||
str << 'f';
|
||||
forAll(f, fp)
|
||||
|
||||
@ -99,26 +99,26 @@ void Foam::enrichedPatch::calcCutFaces() const
|
||||
(pp.size()*primitiveMesh::edgesPerPoint_);
|
||||
|
||||
|
||||
forAll(lf, faceI)
|
||||
forAll(lf, facei)
|
||||
{
|
||||
const face& curLocalFace = lf[faceI];
|
||||
const face& curGlobalFace = enFaces[faceI];
|
||||
const face& curLocalFace = lf[facei];
|
||||
const face& curGlobalFace = enFaces[facei];
|
||||
|
||||
// Pout<< "Doing face " << faceI
|
||||
// Pout<< "Doing face " << facei
|
||||
// << " local: " << curLocalFace
|
||||
// << " or " << curGlobalFace
|
||||
// << endl;
|
||||
|
||||
// if (faceI < slavePatch_.size())
|
||||
// if (facei < slavePatch_.size())
|
||||
// {
|
||||
// Pout<< "original slave: " << slavePatch_[faceI]
|
||||
// << " local: " << slavePatch_.localFaces()[faceI] << endl;
|
||||
// Pout<< "original slave: " << slavePatch_[facei]
|
||||
// << " local: " << slavePatch_.localFaces()[facei] << endl;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Pout<< "original master: "
|
||||
// << masterPatch_[faceI - slavePatch_.size()] << " "
|
||||
// << masterPatch_.localFaces()[faceI - slavePatch_.size()]
|
||||
// << masterPatch_[facei - slavePatch_.size()] << " "
|
||||
// << masterPatch_.localFaces()[facei - slavePatch_.size()]
|
||||
// << endl;
|
||||
// }
|
||||
// {
|
||||
@ -332,7 +332,7 @@ void Foam::enrichedPatch::calcCutFaces() const
|
||||
if (debug)
|
||||
{
|
||||
Pout<< " local: " << cutFaceLocalPoints
|
||||
<< " one side: " << faceI;
|
||||
<< " one side: " << facei;
|
||||
}
|
||||
|
||||
// Append the face
|
||||
@ -433,7 +433,7 @@ void Foam::enrichedPatch::calcCutFaces() const
|
||||
// is the other side. If this is not the case, there is no
|
||||
// face on the other side.
|
||||
|
||||
if (faceI < slavePatch_.size())
|
||||
if (facei < slavePatch_.size())
|
||||
{
|
||||
Map<labelList>::const_iterator mpfAddrIter =
|
||||
masterPointFaceAddr.find(cutFaceGlobal[0]);
|
||||
@ -511,7 +511,7 @@ void Foam::enrichedPatch::calcCutFaces() const
|
||||
masterFacesOfPZero[pointI]
|
||||
);
|
||||
|
||||
cfSlave.append(faceI);
|
||||
cfSlave.append(facei);
|
||||
|
||||
// Reverse the face such that it
|
||||
// points out of the master patch
|
||||
@ -536,7 +536,7 @@ void Foam::enrichedPatch::calcCutFaces() const
|
||||
}
|
||||
|
||||
cfMaster.append(-1);
|
||||
cfSlave.append(faceI);
|
||||
cfSlave.append(facei);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -548,7 +548,7 @@ void Foam::enrichedPatch::calcCutFaces() const
|
||||
}
|
||||
|
||||
cfMaster.append(-1);
|
||||
cfSlave.append(faceI);
|
||||
cfSlave.append(facei);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -558,7 +558,7 @@ void Foam::enrichedPatch::calcCutFaces() const
|
||||
Pout<< " master side" << endl;
|
||||
}
|
||||
|
||||
cfMaster.append(faceI - slavePatch_.size());
|
||||
cfMaster.append(facei - slavePatch_.size());
|
||||
cfSlave.append(-1);
|
||||
}
|
||||
}
|
||||
@ -596,21 +596,21 @@ void Foam::enrichedPatch::calcCutFaces() const
|
||||
|
||||
face origFace;
|
||||
face origFaceLocal;
|
||||
if (faceI < slavePatch_.size())
|
||||
if (facei < slavePatch_.size())
|
||||
{
|
||||
origFace = slavePatch_[faceI];
|
||||
origFace = slavePatch_[facei];
|
||||
origFaceLocal =
|
||||
slavePatch_.localFaces()[faceI];
|
||||
slavePatch_.localFaces()[facei];
|
||||
}
|
||||
else
|
||||
{
|
||||
origFace =
|
||||
masterPatch_
|
||||
[faceI - slavePatch_.size()];
|
||||
[facei - slavePatch_.size()];
|
||||
|
||||
origFaceLocal =
|
||||
masterPatch_.localFaces()
|
||||
[faceI - slavePatch_.size()];
|
||||
[facei - slavePatch_.size()];
|
||||
}
|
||||
|
||||
FatalErrorInFunction
|
||||
@ -622,7 +622,7 @@ void Foam::enrichedPatch::calcCutFaces() const
|
||||
<< "Slave size: " << slavePatch_.size()
|
||||
<< " Master size: "
|
||||
<< masterPatch_.size()
|
||||
<< " index: " << faceI << ".\n"
|
||||
<< " index: " << facei << ".\n"
|
||||
<< "Face: " << curGlobalFace << nl
|
||||
<< "Cut face: " << cutFaceGlobalPoints
|
||||
<< " local: " << cutFaceLocalPoints
|
||||
@ -639,7 +639,7 @@ void Foam::enrichedPatch::calcCutFaces() const
|
||||
|
||||
if (debug)
|
||||
{
|
||||
Pout<< " Finished face " << faceI << endl;
|
||||
Pout<< " Finished face " << facei << endl;
|
||||
}
|
||||
|
||||
} // end of local faces
|
||||
|
||||
@ -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
|
||||
@ -77,12 +77,12 @@ void Foam::enrichedPatch::calcEnrichedFaces
|
||||
|
||||
// Add slave faces into the enriched faces list
|
||||
|
||||
forAll(slavePatch_, faceI)
|
||||
forAll(slavePatch_, facei)
|
||||
{
|
||||
const face oldFace = slavePatch_[faceI];
|
||||
const face oldLocalFace = slaveLocalFaces[faceI];
|
||||
// Info<< "old slave face " << faceI << ": " << oldFace << endl;
|
||||
const labelList& curEdges = slaveFaceEdges[faceI];
|
||||
const face oldFace = slavePatch_[facei];
|
||||
const face oldLocalFace = slaveLocalFaces[facei];
|
||||
// Info<< "old slave face " << facei << ": " << oldFace << endl;
|
||||
const labelList& curEdges = slaveFaceEdges[facei];
|
||||
|
||||
DynamicList<label> newFace(oldFace.size()*enrichedFaceRatio_);
|
||||
|
||||
@ -172,7 +172,7 @@ void Foam::enrichedPatch::calcEnrichedFaces
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< " not on the edge for edge " << curEdges[i]
|
||||
<< " of face " << faceI << " in slave patch." << nl
|
||||
<< " of face " << facei << " in slave patch." << nl
|
||||
<< "Min weight: " << min(edgePointWeights)
|
||||
<< " Max weight: " << max(edgePointWeights)
|
||||
<< abort(FatalError);
|
||||
@ -212,7 +212,7 @@ void Foam::enrichedPatch::calcEnrichedFaces
|
||||
}
|
||||
}
|
||||
}
|
||||
// Info<< "New slave face " << faceI << ": " << newFace << endl;
|
||||
// Info<< "New slave face " << facei << ": " << newFace << endl;
|
||||
|
||||
// Add the new face to the list
|
||||
enrichedFaces[nEnrichedFaces].transfer(newFace);
|
||||
@ -221,12 +221,12 @@ void Foam::enrichedPatch::calcEnrichedFaces
|
||||
|
||||
// Add master faces into the enriched faces list
|
||||
|
||||
forAll(masterPatch_, faceI)
|
||||
forAll(masterPatch_, facei)
|
||||
{
|
||||
const face& oldFace = masterPatch_[faceI];
|
||||
const face& oldLocalFace = masterLocalFaces[faceI];
|
||||
const face& oldFace = masterPatch_[facei];
|
||||
const face& oldLocalFace = masterLocalFaces[facei];
|
||||
// Info<< "old master face: " << oldFace << endl;
|
||||
const labelList& curEdges = masterFaceEdges[faceI];
|
||||
const labelList& curEdges = masterFaceEdges[facei];
|
||||
|
||||
DynamicList<label> newFace(oldFace.size()*enrichedFaceRatio_);
|
||||
|
||||
@ -308,7 +308,7 @@ void Foam::enrichedPatch::calcEnrichedFaces
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< " not on the edge for edge " << curEdges[i]
|
||||
<< " of face " << faceI << " in master patch." << nl
|
||||
<< " of face " << facei << " in master patch." << nl
|
||||
<< "Min weight: " << min(edgePointWeights)
|
||||
<< " Max weight: " << max(edgePointWeights)
|
||||
<< abort(FatalError);
|
||||
|
||||
@ -56,9 +56,9 @@ void Foam::enrichedPatch::calcMasterPointFaces() const
|
||||
const faceList& ef = enrichedFaces();
|
||||
|
||||
// Add the original face points
|
||||
forAll(masterPatch_, faceI)
|
||||
forAll(masterPatch_, facei)
|
||||
{
|
||||
const face& curFace = ef[faceI + slavePatch_.size()];
|
||||
const face& curFace = ef[facei + slavePatch_.size()];
|
||||
// Pout<< "Cur face in pfAddr: " << curFace << endl;
|
||||
forAll(curFace, pointI)
|
||||
{
|
||||
@ -75,11 +75,11 @@ void Foam::enrichedPatch::calcMasterPointFaces() const
|
||||
);
|
||||
|
||||
// Iterator is invalidated - have to find again
|
||||
mpf.find(curFace[pointI])().append(faceI);
|
||||
mpf.find(curFace[pointI])().append(facei);
|
||||
}
|
||||
else
|
||||
{
|
||||
mpfIter().append(faceI);
|
||||
mpfIter().append(facei);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -53,9 +53,9 @@ void Foam::enrichedPatch::calcPointPoints() const
|
||||
|
||||
bool found = false;
|
||||
|
||||
forAll(lf, faceI)
|
||||
forAll(lf, facei)
|
||||
{
|
||||
const face& curFace = lf[faceI];
|
||||
const face& curFace = lf[facei];
|
||||
|
||||
forAll(curFace, pointI)
|
||||
{
|
||||
|
||||
@ -64,15 +64,15 @@ void Foam::slidingInterface::calcAttachedAddressing() const
|
||||
masterFaceCellsPtr_ = new labelList(masterPatchFaces.size());
|
||||
labelList& mfc = *masterFaceCellsPtr_;
|
||||
|
||||
forAll(masterPatchFaces, faceI)
|
||||
forAll(masterPatchFaces, facei)
|
||||
{
|
||||
if (masterFlip[faceI])
|
||||
if (masterFlip[facei])
|
||||
{
|
||||
mfc[faceI] = nei[masterPatchFaces[faceI]];
|
||||
mfc[facei] = nei[masterPatchFaces[facei]];
|
||||
}
|
||||
else
|
||||
{
|
||||
mfc[faceI] = own[masterPatchFaces[faceI]];
|
||||
mfc[facei] = own[masterPatchFaces[facei]];
|
||||
}
|
||||
}
|
||||
|
||||
@ -90,15 +90,15 @@ void Foam::slidingInterface::calcAttachedAddressing() const
|
||||
slaveFaceCellsPtr_ = new labelList(slavePatchFaces.size());
|
||||
labelList& sfc = *slaveFaceCellsPtr_;
|
||||
|
||||
forAll(slavePatchFaces, faceI)
|
||||
forAll(slavePatchFaces, facei)
|
||||
{
|
||||
if (slaveFlip[faceI])
|
||||
if (slaveFlip[facei])
|
||||
{
|
||||
sfc[faceI] = nei[slavePatchFaces[faceI]];
|
||||
sfc[facei] = nei[slavePatchFaces[facei]];
|
||||
}
|
||||
else
|
||||
{
|
||||
sfc[faceI] = own[slavePatchFaces[faceI]];
|
||||
sfc[facei] = own[slavePatchFaces[facei]];
|
||||
}
|
||||
}
|
||||
|
||||
@ -107,27 +107,27 @@ void Foam::slidingInterface::calcAttachedAddressing() const
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
forAll(mfc, faceI)
|
||||
forAll(mfc, facei)
|
||||
{
|
||||
if (mfc[faceI] < 0)
|
||||
if (mfc[facei] < 0)
|
||||
{
|
||||
Pout<< "No cell next to master patch face " << faceI
|
||||
<< ". Global face no: " << mfc[faceI]
|
||||
<< " own: " << own[masterPatchFaces[faceI]]
|
||||
<< " nei: " << nei[masterPatchFaces[faceI]]
|
||||
<< " flip: " << masterFlip[faceI] << endl;
|
||||
Pout<< "No cell next to master patch face " << facei
|
||||
<< ". Global face no: " << mfc[facei]
|
||||
<< " own: " << own[masterPatchFaces[facei]]
|
||||
<< " nei: " << nei[masterPatchFaces[facei]]
|
||||
<< " flip: " << masterFlip[facei] << endl;
|
||||
}
|
||||
}
|
||||
|
||||
forAll(sfc, faceI)
|
||||
forAll(sfc, facei)
|
||||
{
|
||||
if (sfc[faceI] < 0)
|
||||
if (sfc[facei] < 0)
|
||||
{
|
||||
Pout<< "No cell next to slave patch face " << faceI
|
||||
<< ". Global face no: " << sfc[faceI]
|
||||
<< " own: " << own[slavePatchFaces[faceI]]
|
||||
<< " nei: " << nei[slavePatchFaces[faceI]]
|
||||
<< " flip: " << slaveFlip[faceI] << endl;
|
||||
Pout<< "No cell next to slave patch face " << facei
|
||||
<< ". Global face no: " << sfc[facei]
|
||||
<< " own: " << own[slavePatchFaces[facei]]
|
||||
<< " nei: " << nei[slavePatchFaces[facei]]
|
||||
<< " flip: " << slaveFlip[facei] << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -152,17 +152,17 @@ void Foam::slidingInterface::calcAttachedAddressing() const
|
||||
{
|
||||
const labelList& curFaces = pointFaces[masterMeshPoints[pointI]];
|
||||
|
||||
forAll(curFaces, faceI)
|
||||
forAll(curFaces, facei)
|
||||
{
|
||||
// Check if the face belongs to the master face zone;
|
||||
// if not add it
|
||||
if
|
||||
(
|
||||
faceZones.whichZone(curFaces[faceI])
|
||||
faceZones.whichZone(curFaces[facei])
|
||||
!= masterFaceZoneID_.index()
|
||||
)
|
||||
{
|
||||
masterStickOutFaceMap.insert(curFaces[faceI]);
|
||||
masterStickOutFaceMap.insert(curFaces[facei]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -181,17 +181,17 @@ void Foam::slidingInterface::calcAttachedAddressing() const
|
||||
{
|
||||
const labelList& curFaces = pointFaces[slaveMeshPoints[pointI]];
|
||||
|
||||
forAll(curFaces, faceI)
|
||||
forAll(curFaces, facei)
|
||||
{
|
||||
// Check if the face belongs to the slave face zone;
|
||||
// if not add it
|
||||
if
|
||||
(
|
||||
faceZones.whichZone(curFaces[faceI])
|
||||
faceZones.whichZone(curFaces[facei])
|
||||
!= slaveFaceZoneID_.index()
|
||||
)
|
||||
{
|
||||
slaveStickOutFaceMap.insert(curFaces[faceI]);
|
||||
slaveStickOutFaceMap.insert(curFaces[facei]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -265,13 +265,13 @@ void Foam::slidingInterface::renumberAttachedAddressing
|
||||
const labelList& mfzRenumber =
|
||||
m.faceZoneFaceMap()[masterFaceZoneID_.index()];
|
||||
|
||||
forAll(mfc, faceI)
|
||||
forAll(mfc, facei)
|
||||
{
|
||||
label newCellI = reverseCellMap[mfc[mfzRenumber[faceI]]];
|
||||
label newCellI = reverseCellMap[mfc[mfzRenumber[facei]]];
|
||||
|
||||
if (newCellI >= 0)
|
||||
{
|
||||
newMfc[faceI] = newCellI;
|
||||
newMfc[facei] = newCellI;
|
||||
}
|
||||
}
|
||||
|
||||
@ -282,13 +282,13 @@ void Foam::slidingInterface::renumberAttachedAddressing
|
||||
const labelList& sfzRenumber =
|
||||
m.faceZoneFaceMap()[slaveFaceZoneID_.index()];
|
||||
|
||||
forAll(sfc, faceI)
|
||||
forAll(sfc, facei)
|
||||
{
|
||||
label newCellI = reverseCellMap[sfc[sfzRenumber[faceI]]];
|
||||
label newCellI = reverseCellMap[sfc[sfzRenumber[facei]]];
|
||||
|
||||
if (newCellI >= 0)
|
||||
{
|
||||
newSfc[faceI] = newCellI;
|
||||
newSfc[facei] = newCellI;
|
||||
}
|
||||
}
|
||||
|
||||
@ -315,13 +315,13 @@ void Foam::slidingInterface::renumberAttachedAddressing
|
||||
labelList* newMsofPtr = new labelList(msof.size(), -1);
|
||||
labelList& newMsof = *newMsofPtr;
|
||||
|
||||
forAll(msof, faceI)
|
||||
forAll(msof, facei)
|
||||
{
|
||||
label newFaceI = reverseFaceMap[msof[faceI]];
|
||||
label newFaceI = reverseFaceMap[msof[facei]];
|
||||
|
||||
if (newFaceI >= 0)
|
||||
{
|
||||
newMsof[faceI] = newFaceI;
|
||||
newMsof[facei] = newFaceI;
|
||||
}
|
||||
}
|
||||
// Pout<< "newMsof: " << newMsof << endl;
|
||||
@ -331,13 +331,13 @@ void Foam::slidingInterface::renumberAttachedAddressing
|
||||
labelList* newSsofPtr = new labelList(ssof.size(), -1);
|
||||
labelList& newSsof = *newSsofPtr;
|
||||
|
||||
forAll(ssof, faceI)
|
||||
forAll(ssof, facei)
|
||||
{
|
||||
label newFaceI = reverseFaceMap[ssof[faceI]];
|
||||
label newFaceI = reverseFaceMap[ssof[facei]];
|
||||
|
||||
if (newFaceI >= 0)
|
||||
{
|
||||
newSsof[faceI] = newFaceI;
|
||||
newSsof[facei] = newFaceI;
|
||||
}
|
||||
}
|
||||
// Pout<< "newSsof: " << newSsof << endl;
|
||||
|
||||
@ -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
|
||||
@ -60,9 +60,9 @@ void Foam::slidingInterface::clearCouple
|
||||
const labelList& cutFaceZoneLabels =
|
||||
mesh.faceZones()[cutFaceZoneID_.index()];
|
||||
|
||||
forAll(cutFaceZoneLabels, faceI)
|
||||
forAll(cutFaceZoneLabels, facei)
|
||||
{
|
||||
ref.setAction(polyRemoveFace(cutFaceZoneLabels[faceI]));
|
||||
ref.setAction(polyRemoveFace(cutFaceZoneLabels[facei]));
|
||||
}
|
||||
|
||||
if (debug)
|
||||
|
||||
@ -151,12 +151,12 @@ bool Foam::slidingInterface::projectPoints() const
|
||||
// Do faces
|
||||
const labelList& curFaces = masterEdgeFaces[edgeI];
|
||||
|
||||
forAll(curFaces, faceI)
|
||||
forAll(curFaces, facei)
|
||||
{
|
||||
minMasterFaceLength[curFaces[faceI]] =
|
||||
minMasterFaceLength[curFaces[facei]] =
|
||||
min
|
||||
(
|
||||
minMasterFaceLength[curFaces[faceI]],
|
||||
minMasterFaceLength[curFaces[facei]],
|
||||
curLength
|
||||
);
|
||||
}
|
||||
@ -194,12 +194,12 @@ bool Foam::slidingInterface::projectPoints() const
|
||||
// Do faces
|
||||
const labelList& curFaces = slaveEdgeFaces[edgeI];
|
||||
|
||||
forAll(curFaces, faceI)
|
||||
forAll(curFaces, facei)
|
||||
{
|
||||
minSlaveFaceLength[curFaces[faceI]] =
|
||||
minSlaveFaceLength[curFaces[facei]] =
|
||||
min
|
||||
(
|
||||
minSlaveFaceLength[curFaces[faceI]],
|
||||
minSlaveFaceLength[curFaces[facei]],
|
||||
curLength
|
||||
);
|
||||
}
|
||||
@ -889,9 +889,9 @@ bool Foam::slidingInterface::projectPoints() const
|
||||
|
||||
const labelList curFaces = curFaceMap.toc();
|
||||
// Pout<< "curFaces: " << curFaces << endl;
|
||||
forAll(curFaces, faceI)
|
||||
forAll(curFaces, facei)
|
||||
{
|
||||
const face& f = masterLocalFaces[curFaces[faceI]];
|
||||
const face& f = masterLocalFaces[curFaces[facei]];
|
||||
|
||||
forAll(f, pointI)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user