Commit 8a65401d authored by Franjo's avatar Franjo

Improvements of topological cleaner

parent e8553fa6
......@@ -59,67 +59,70 @@ void topologicalCleaner::checkNonConsecutiveBoundaryVertices()
for(label faceI=start;faceI<end;++faceI)
{
const face& bf = faces[faceI];
# ifdef DEBUGCleaner
Info << "Checking boundary face " << faceI << " with vertices "
<< bf << endl;
# ifdef USE_OMP
# pragma omp task shared(decomposeFace,faces,cells,owner,faceI)
# endif
{
const face& bf = faces[faceI];
const label bfsize = bf.size();
const cell& c = cells[owner[faceI]];
# ifdef DEBUGCleaner
Info << "Checking boundary face " << faceI << " with vertices "
<< bf << endl;
# endif
forAll(c, fI)
if(
(c[fI] < nIntFaces) ||
(mesh_.faceIsInProcPatch(c[fI]) != -1)
)
{
const face& f = faces[c[fI]];
const cell& c = cells[owner[faceI]];
DynList<label> shN;
forAll(c, fI)
if(
(c[fI] < nIntFaces) ||
(mesh_.faceIsInProcPatch(c[fI]) != -1)
)
{
const face& f = faces[c[fI]];
forAll(bf, pI)
forAll(f, pJ)
if( bf[pI] == f[pJ] )
{
shN.append(pI);
}
DynList<label> shN;
# ifdef DEBUGCleaner
Info << "Shared vertices with internal face " << f
<< " are " << shN << endl;
# endif
forAll(bf, pI)
forAll(f, pJ)
if( bf[pI] == f[pJ] )
{
shN.append(pI);
}
if( shN.size() > 2 )
{
# ifdef DEBUGCleaner
Info << "1. Face has to be split" << endl;
Info << "Shared vertices with internal face " << f
<< " are " << shN << endl;
# endif
decomposeFace[faceI] = true;
decomposeCell_[owner[faceI]] = true;
changed = true;
}
else if( shN.size() == 2 )
{
if( !(
(shN[0] == ((shN[1] + 1) % bfsize)) ||
(shN[0] == ((shN[1] + bfsize - 1) % bfsize))
)
)
if( shN.size() > 2 )
{
# ifdef DEBUGCleaner
Info << "2. Face has to be split" << endl;
Info << "1. Face has to be split" << endl;
# endif
decomposeFace[faceI] = true;
decomposeCell_[owner[faceI]] = true;
changed = true;
}
else if( shN.size() == 2 )
{
if( !(
(shN[0] == bf.fcIndex(shN[1])) ||
(shN[0] == bf.rcIndex(shN[1]))
)
)
{
# ifdef DEBUGCleaner
Info << "2. Face has to be split" << endl;
# endif
decomposeFace[faceI] = true;
decomposeCell_[owner[faceI]] = true;
changed = 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