From 40ec2b36443efaab9f17c6dc670ba7c5cc8ae72a Mon Sep 17 00:00:00 2001 From: Vuko Vukcevic Date: Thu, 18 Jan 2018 10:21:43 +0100 Subject: [PATCH] Fixed compilation issues for removeFaces class --- .../directActions/removeFaces.C | 10 +++---- .../directActions/removeFacesTemplates.C | 30 +++++++------------ 2 files changed, 15 insertions(+), 25 deletions(-) diff --git a/src/dynamicMesh/dynamicMesh/directTopoChange/directTopoChange/directActions/removeFaces.C b/src/dynamicMesh/dynamicMesh/directTopoChange/directTopoChange/directActions/removeFaces.C index 8eb485090..67bbaea0d 100644 --- a/src/dynamicMesh/dynamicMesh/directTopoChange/directTopoChange/directActions/removeFaces.C +++ b/src/dynamicMesh/dynamicMesh/directTopoChange/directTopoChange/directActions/removeFaces.C @@ -129,7 +129,7 @@ Foam::label Foam::removeFaces::changeFaceRegion // - removal of faces // - removal of edges // - removal of points -Foam::Xfer Foam::removeFaces::affectedFaces +Foam::Xfer Foam::removeFaces::affectedFaces ( const labelList& cellRegion, const labelList& cellRegionMaster, @@ -152,7 +152,7 @@ Foam::Xfer Foam::removeFaces::affectedFaces if (region != -1 && (cellI != cellRegionMaster[region])) { // 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) { 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 // is lower than the current master of the region) - regionMaster[region1] = min(own, regionMaster[region1]); + regionMaster[neiRegion] = min(own, regionMaster[neiRegion]); } } else @@ -450,8 +450,8 @@ Foam::label Foam::removeFaces::compatibleRemoves ( "removeFaces::compatibleRemoves(const labelList&" ", labelList&, labelList&, labelList&)" - ) << "Region " << region - << " has only " << nCells[region] << " cell in it." + ) << "Region " << regionI + << " has only " << nCells[regionI] << " cell in it." << abort(FatalError); } } diff --git a/src/dynamicMesh/dynamicMesh/directTopoChange/directTopoChange/directActions/removeFacesTemplates.C b/src/dynamicMesh/dynamicMesh/directTopoChange/directTopoChange/directActions/removeFacesTemplates.C index ef7bd65c8..879c12141 100644 --- a/src/dynamicMesh/dynamicMesh/directTopoChange/directTopoChange/directActions/removeFacesTemplates.C +++ b/src/dynamicMesh/dynamicMesh/directTopoChange/directTopoChange/directActions/removeFacesTemplates.C @@ -130,7 +130,7 @@ void Foam::removeFaces::mergeFaces if (masterIndex == -1) { - writeOBJ(fp, mesh_.time().path()/"facesToBeMerged.obj") + writeOBJ(fp, mesh_.time().path()/"facesToBeMerged.obj"); FatalErrorIn ( "template" @@ -204,17 +204,6 @@ void Foam::removeFaces::mergeFaces reverse(mergedFace); } - if (debug) - { - Pout<< "Modifying masterface " << faceI - << " from faces: " << faceLabels - << " old verts: " << IndirectList(mesh_.faces(), faceLabels) - << " for new verts: " << mergedFace - << " possibly new owner " << own - << " or new neighbour " << nei - << endl; - } - // Finally modify merged face modifyFace ( @@ -312,15 +301,16 @@ void Foam::removeFaces::setRefinement { if (debug) { - Pout<< "Writing faces to remove to faceSet " << facesToRemove.name() - << endl; - const faceSet facesToRemove ( mesh_, "facesToRemove", labelHashSet(faceLabels) ); + + Pout<< "Writing faces to remove to faceSet " << facesToRemove.name() + << endl; + facesToRemove.write(); } @@ -508,7 +498,7 @@ void Foam::removeFaces::setRefinement label f0 = -1; label f1 = -1; - const labelList& eFaces = meshEdgeFaces()[edgeI]; + const labelList& eFaces = meshEdgeFaces[edgeI]; forAll(eFaces, i) { @@ -816,7 +806,7 @@ void Foam::removeFaces::setRefinement for ( - label faceI = nInternalFaces + label faceI = nInternalFaces; faceI < nFaces; ++faceI ) @@ -908,7 +898,7 @@ void Foam::removeFaces::setRefinement // Initialise to number of edges per point forAll(meshPointEdges, pointI) { - nEdgesPerPoint[pointI] = pointEdges[pointI].size(); + nEdgesPerPoint[pointI] = meshPointEdges[pointI].size(); } // Loop through edges to remove @@ -1117,8 +1107,8 @@ void Foam::removeFaces::setRefinement // PART 6: Remaining affected faces // Get necessary mesh data - const labelList& owner = mesh_.faceOwners(); - const lableList& neighbour = mesh_.faceNeighbours(); + const labelList& owner = mesh_.faceOwner(); + const labelList& neighbour = mesh_.faceNeighbour(); // Check any remaining faces that have not been updated for either new