Fixed compilation issues for removeFaces class

This commit is contained in:
Vuko Vukcevic 2018-01-18 10:21:43 +01:00
parent e6d042f28f
commit 40ec2b3644
2 changed files with 15 additions and 25 deletions

View file

@ -129,7 +129,7 @@ Foam::label Foam::removeFaces::changeFaceRegion
// - removal of faces // - removal of faces
// - removal of edges // - removal of edges
// - removal of points // - removal of points
Foam::Xfer<boolList> Foam::removeFaces::affectedFaces Foam::Xfer<Foam::boolList> Foam::removeFaces::affectedFaces
( (
const labelList& cellRegion, const labelList& cellRegion,
const labelList& cellRegionMaster, const labelList& cellRegionMaster,
@ -152,7 +152,7 @@ Foam::Xfer<boolList> Foam::removeFaces::affectedFaces
if (region != -1 && (cellI != cellRegionMaster[region])) if (region != -1 && (cellI != cellRegionMaster[region]))
{ {
// Get this cell (list of cell faces) and mark all of its faces // Get this cell (list of cell faces) and mark all of its faces
const labelList& cFaces = cellList[cellI]; const labelList& cFaces = meshCells[cellI];
forAll(cFaces, cFaceI) forAll(cFaces, cFaceI)
{ {
affectedFace[cFaces[cFaceI]] = true; affectedFace[cFaces[cFaceI]] = true;
@ -349,7 +349,7 @@ Foam::label Foam::removeFaces::compatibleRemoves
// See if owner becomes the master of the region (if its index // See if owner becomes the master of the region (if its index
// is lower than the current master of the region) // is lower than the current master of the region)
regionMaster[region1] = min(own, regionMaster[region1]); regionMaster[neiRegion] = min(own, regionMaster[neiRegion]);
} }
} }
else else
@ -450,8 +450,8 @@ Foam::label Foam::removeFaces::compatibleRemoves
( (
"removeFaces::compatibleRemoves(const labelList&" "removeFaces::compatibleRemoves(const labelList&"
", labelList&, labelList&, labelList&)" ", labelList&, labelList&, labelList&)"
) << "Region " << region ) << "Region " << regionI
<< " has only " << nCells[region] << " cell in it." << " has only " << nCells[regionI] << " cell in it."
<< abort(FatalError); << abort(FatalError);
} }
} }

View file

@ -130,7 +130,7 @@ void Foam::removeFaces::mergeFaces
if (masterIndex == -1) if (masterIndex == -1)
{ {
writeOBJ(fp, mesh_.time().path()/"facesToBeMerged.obj") writeOBJ(fp, mesh_.time().path()/"facesToBeMerged.obj");
FatalErrorIn FatalErrorIn
( (
"template<class TopoChangeEngine>" "template<class TopoChangeEngine>"
@ -204,17 +204,6 @@ void Foam::removeFaces::mergeFaces
reverse(mergedFace); reverse(mergedFace);
} }
if (debug)
{
Pout<< "Modifying masterface " << faceI
<< " from faces: " << faceLabels
<< " old verts: " << IndirectList<face>(mesh_.faces(), faceLabels)
<< " for new verts: " << mergedFace
<< " possibly new owner " << own
<< " or new neighbour " << nei
<< endl;
}
// Finally modify merged face // Finally modify merged face
modifyFace modifyFace
( (
@ -312,15 +301,16 @@ void Foam::removeFaces::setRefinement
{ {
if (debug) if (debug)
{ {
Pout<< "Writing faces to remove to faceSet " << facesToRemove.name()
<< endl;
const faceSet facesToRemove const faceSet facesToRemove
( (
mesh_, mesh_,
"facesToRemove", "facesToRemove",
labelHashSet(faceLabels) labelHashSet(faceLabels)
); );
Pout<< "Writing faces to remove to faceSet " << facesToRemove.name()
<< endl;
facesToRemove.write(); facesToRemove.write();
} }
@ -508,7 +498,7 @@ void Foam::removeFaces::setRefinement
label f0 = -1; label f0 = -1;
label f1 = -1; label f1 = -1;
const labelList& eFaces = meshEdgeFaces()[edgeI]; const labelList& eFaces = meshEdgeFaces[edgeI];
forAll(eFaces, i) forAll(eFaces, i)
{ {
@ -816,7 +806,7 @@ void Foam::removeFaces::setRefinement
for for
( (
label faceI = nInternalFaces label faceI = nInternalFaces;
faceI < nFaces; faceI < nFaces;
++faceI ++faceI
) )
@ -908,7 +898,7 @@ void Foam::removeFaces::setRefinement
// Initialise to number of edges per point // Initialise to number of edges per point
forAll(meshPointEdges, pointI) forAll(meshPointEdges, pointI)
{ {
nEdgesPerPoint[pointI] = pointEdges[pointI].size(); nEdgesPerPoint[pointI] = meshPointEdges[pointI].size();
} }
// Loop through edges to remove // Loop through edges to remove
@ -1117,8 +1107,8 @@ void Foam::removeFaces::setRefinement
// PART 6: Remaining affected faces // PART 6: Remaining affected faces
// Get necessary mesh data // Get necessary mesh data
const labelList& owner = mesh_.faceOwners(); const labelList& owner = mesh_.faceOwner();
const lableList& neighbour = mesh_.faceNeighbours(); const labelList& neighbour = mesh_.faceNeighbour();
// Check any remaining faces that have not been updated for either new // Check any remaining faces that have not been updated for either new