Commit 7b726f8a authored by Franjo's avatar Franjo

Improved mesh quality after layer refinement

parent 5efe859e
......@@ -2097,7 +2097,7 @@ label findLowQualityFaces
(
mesh,
report,
70.0,
65.0,
&badFaces,
activeFacePtr
);
......
......@@ -256,7 +256,8 @@ public:
(
const label maxNumGlobalIterations = 10,
const label maxNumIterations = 50,
const label maxNumSurfaceIterations = 2
const label maxNumSurfaceIterations = 2,
const bool relaxedCheck = false
);
//- performs optimisation of boundary layer cells
......
......@@ -57,7 +57,8 @@ void meshOptimizer::untangleMeshFV
(
const label maxNumGlobalIterations,
const label maxNumIterations,
const label maxNumSurfaceIterations
const label maxNumSurfaceIterations,
const bool relaxedCheck
)
{
Info << "Starting untangling the mesh" << endl;
......@@ -129,14 +130,28 @@ void meshOptimizer::untangleMeshFV
label minNumBadFaces(10 * faces.size()), minIter(-1);
do
{
nBadFaces =
polyMeshGenChecks::findBadFaces
(
mesh_,
badFaces,
false,
&changedFace
);
if( !relaxedCheck )
{
nBadFaces =
polyMeshGenChecks::findBadFaces
(
mesh_,
badFaces,
false,
&changedFace
);
}
else
{
nBadFaces =
polyMeshGenChecks::findBadFacesRelaxed
(
mesh_,
badFaces,
false,
&changedFace
);
}
Info << "Iteration " << nIter
<< ". Number of bad faces is " << nBadFaces << endl;
......@@ -183,14 +198,28 @@ void meshOptimizer::untangleMeshFV
while( nIter++ < maxNumSurfaceIterations );
{
nBadFaces =
polyMeshGenChecks::findBadFaces
(
mesh_,
badFaces,
false,
&changedFace
);
if( !relaxedCheck )
{
nBadFaces =
polyMeshGenChecks::findBadFaces
(
mesh_,
badFaces,
false,
&changedFace
);
}
else
{
nBadFaces =
polyMeshGenChecks::findBadFacesRelaxed
(
mesh_,
badFaces,
false,
&changedFace
);
}
Info << "Iteration " << nIter
<< ". Number of bad faces is " << nBadFaces << endl;
......@@ -421,7 +450,7 @@ void meshOptimizer::untangleBoundaryLayer()
else
{
optimizeLowQualityFaces();
untangleMeshFV();
untangleMeshFV(2, 50, 1, 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