From 429be977d327fb7a3eadf3e5a181308dea313770 Mon Sep 17 00:00:00 2001 From: Vuko Vukcevic Date: Wed, 24 Jan 2018 14:20:03 +0100 Subject: [PATCH] Bugfix in polyhedralRefinement Points must be appended (out of nothing) instead of added in terms of master point when using polyAddPoint and polyMeshModifier --- .../polyhedralRefinement/polyhedralRefinement.C | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/dynamicMesh/dynamicMesh/polyMeshModifiers/polyhedralRefinement/polyhedralRefinement.C b/src/dynamicMesh/dynamicMesh/polyMeshModifiers/polyhedralRefinement/polyhedralRefinement.C index e67f20df1..d74e5db02 100644 --- a/src/dynamicMesh/dynamicMesh/polyMeshModifiers/polyhedralRefinement/polyhedralRefinement.C +++ b/src/dynamicMesh/dynamicMesh/polyMeshModifiers/polyhedralRefinement/polyhedralRefinement.C @@ -260,7 +260,7 @@ void Foam::polyhedralRefinement::calcLevel0EdgeLength() if (debug) { - Pout<< "polyRef::getLevel0EdgeLength() :" + Pout<< "polyhedralRefinement::calcLevel0EdgeLength() :" << " Final edge lengths squared per refinementlevel:" << typEdgeLenSqr << endl; } @@ -420,15 +420,12 @@ void Foam::polyhedralRefinement::setPolyhedralRefinement // Get cell idnex const label& cellI = cellsToRefine_[i]; - // Get anchor point: first point of a first face in a cell - const label& anchorPointI = meshFaces[meshCells[cellI][0]][0]; - cellMidPoint[cellI] = ref.setAction ( polyAddPoint ( meshCellCentres[cellI], // Point to add (cell centre) - anchorPointI, // Master point + -1, // Appended point: no master ID -1, // Zone for point true // Supports a cell ) @@ -572,7 +569,7 @@ void Foam::polyhedralRefinement::setPolyhedralRefinement polyAddPoint ( edgeMids[edgeI], // Point - e[0], // Master point + -1, // Appended point, no master ID -1, // Zone for point true // Supports a cell ) @@ -782,9 +779,6 @@ void Foam::polyhedralRefinement::setPolyhedralRefinement // Face marked to be split. Add the point at face centre and // replace faceMidPoint with actual point label - // Get mesh face - const face& f = meshFaces[faceI]; - faceMidPoint[faceI] = ref.setAction ( polyAddPoint @@ -794,7 +788,7 @@ void Foam::polyhedralRefinement::setPolyhedralRefinement ? meshFaceCentres[faceI] : bFaceMids[faceI - nInternalFaces] ), // Point - f[0], // Master point + -1, // Appended point, no master ID -1, // Zone for point true // Supports a cell )