From 582dac2913e288cb1075039629fcec51a29749f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franjo=20Jureti=C4=87?= Date: Thu, 21 Jul 2016 15:47:14 +0200 Subject: [PATCH] Changes to the updates of the DynList --- .../utilities/decomposeCells/decomposeCellsPyramids.C | 6 ++++-- .../meshUntangler/meshUntanglerCutRegion.C | 10 +++------- .../meshUntangler/meshUntanglerCutRegionTieBreak.C | 6 ++---- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/meshLibrary/utilities/decomposeCells/decomposeCellsPyramids.C b/meshLibrary/utilities/decomposeCells/decomposeCellsPyramids.C index 786532a..07f722d 100644 --- a/meshLibrary/utilities/decomposeCells/decomposeCellsPyramids.C +++ b/meshLibrary/utilities/decomposeCells/decomposeCellsPyramids.C @@ -55,8 +55,10 @@ void decomposeCells::findAddressingForCell const faceListPMG& faces = mesh_.faces(); forAll(faceEdges, feI) { - faceEdges[feI].setSize(faces[c[feI]].size()); - faceEdges[feI] = -1; + DynList& fEdges = faceEdges[feI]; + + fEdges.setSize(faces[c[feI]].size()); + fEdges = -1; } forAll(c, fI) diff --git a/meshLibrary/utilities/smoothers/geometry/meshOptimizer/tetMeshOptimisation/advancedSmoothers/meshUntangler/meshUntanglerCutRegion.C b/meshLibrary/utilities/smoothers/geometry/meshOptimizer/tetMeshOptimisation/advancedSmoothers/meshUntangler/meshUntanglerCutRegion.C index d127a9f..1d35ec5 100644 --- a/meshLibrary/utilities/smoothers/geometry/meshOptimizer/tetMeshOptimisation/advancedSmoothers/meshUntangler/meshUntanglerCutRegion.C +++ b/meshLibrary/utilities/smoothers/geometry/meshOptimizer/tetMeshOptimisation/advancedSmoothers/meshUntangler/meshUntanglerCutRegion.C @@ -214,12 +214,7 @@ void meshUntangler::cutRegion::planeCut(const plane& plane) "testSmoothing" ); - objectRegistry oR(runTime); - - polyMeshGen pmg - ( - oR - ); + polyMeshGen pmg(runTime); this->createPolyMeshFromRegion(pmg); # endif @@ -272,7 +267,8 @@ void meshUntangler::cutRegion::createPolyMeshFromRegion fEdges.append(edges[f[eI]]); Info << "Edges forming face " << fI << " are " << fEdges << endl; - labelListList sf = sortEdgesIntoChains(fEdges).sortedChains(); + sortEdgesIntoChains sorter(fEdges); + const DynList& sf = sorter.sortedChains(); if( sf.size() != 1 ) FatalErrorIn ( diff --git a/meshLibrary/utilities/smoothers/geometry/meshOptimizer/tetMeshOptimisation/advancedSmoothers/meshUntangler/meshUntanglerCutRegionTieBreak.C b/meshLibrary/utilities/smoothers/geometry/meshOptimizer/tetMeshOptimisation/advancedSmoothers/meshUntangler/meshUntanglerCutRegionTieBreak.C index bd0b305..0e8a661 100644 --- a/meshLibrary/utilities/smoothers/geometry/meshOptimizer/tetMeshOptimisation/advancedSmoothers/meshUntangler/meshUntanglerCutRegionTieBreak.C +++ b/meshLibrary/utilities/smoothers/geometry/meshOptimizer/tetMeshOptimisation/advancedSmoothers/meshUntangler/meshUntanglerCutRegionTieBreak.C @@ -56,16 +56,14 @@ void meshUntangler::cutRegion::tieBreak(const DynList& f) deleteDemandDrivenData(cEdgesPtr_); deleteDemandDrivenData(cFacesPtr_); - //- remove coincident vertices - //removeCoincidentVertices(); - const DynList& edges = *edgesPtr_; DynList faceEdges; forAll(f, eI) faceEdges.append(edges[f[eI]]); - labelListList fvertices = sortEdgesIntoChains(faceEdges).sortedChains(); + sortEdgesIntoChains sorter(faceEdges); + const DynList& fvertices = sorter.sortedChains(); if( fvertices.size() != 1 ) { valid_ = false; -- GitLab