Commit 60aa093a authored by Franjo's avatar Franjo
Browse files

Merge branch 'defect-checkMeshDictAdditionalRefLevels' into developmentPublicRepo

parents b73059f1 c6f9c23a
......@@ -186,7 +186,7 @@ void checkMeshDict::checkLocalRefinementLevel() const
const label nLevels =
readLabel(dict.lookup("additionalRefinementLevels"));
if( nLevels > 0 )
if( nLevels < 0 )
{
WarningIn
(
......
......@@ -469,7 +469,6 @@ void meshOptimizer::optimizeLowQualityFaces(const label maxNumIterations)
lockedPoints.append(pointI);
}
label minNumBadFaces(10 * faces.size()), minIter(-1);
do
{
labelHashSet lowQualityFaces;
......@@ -493,28 +492,18 @@ void meshOptimizer::optimizeLowQualityFaces(const label maxNumIterations)
if( nBadFaces == 0 )
break;
if( nBadFaces < minNumBadFaces )
{
minNumBadFaces = nBadFaces;
minIter = nIter;
}
partTetMesh tetMesh(mesh_, lockedPoints, lowQualityFaces, 2);
//- construct tetMeshOptimisation and improve positions
//- of points in the tet mesh
tetMeshOptimisation tmo(tetMesh);
tmo.optimiseUsingKnuppMetric();
tmo.optimiseUsingMeshUntangler();
tmo.optimiseUsingVolumeOptimizer();
//- update points in the mesh from the new coordinates in the tet mesh
tetMesh.updateOrigMesh(&changedFace);
} while( (nIter < minIter+2) && (++nIter < maxNumIterations) );
} while( ++nIter < maxNumIterations );
}
void meshOptimizer::optimizeMeshNearBoundaries
......
......@@ -230,10 +230,15 @@ bool triSurfaceCleanupDuplicates::mergeDuplicatePoints()
newTriangles.setSize(counter);
updateTriangleLabels(newTriangleLabel);
//- update the surface
triSurfModifier(surf_).facetsAccess().transfer(newTriangles);
surf_.updateFacetsSubsets(newTriangleLabel);
surf_.clearAddressing();
surf_.clearGeometry();
return true;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment