not do points that are not to be split but are on multiple faces that are to be split

This commit is contained in:
mattijs
2008-07-25 12:45:53 +01:00
parent 30512ec12d
commit e8a706fcc5
2 changed files with 39 additions and 28 deletions

View File

@ -110,6 +110,7 @@ bool Foam::localPointRegion::isDuplicate
void Foam::localPointRegion::countPointRegions void Foam::localPointRegion::countPointRegions
( (
const polyMesh& mesh, const polyMesh& mesh,
const boolList& candidatePoint,
const Map<label>& candidateFace, const Map<label>& candidateFace,
faceList& minRegion faceList& minRegion
) )
@ -144,6 +145,12 @@ void Foam::localPointRegion::countPointRegions
forAll(f, fp) forAll(f, fp)
{ {
label pointI = f[fp]; label pointI = f[fp];
// Even points which were not candidates for splitting might
// be on multiple baffles that are being split so check.
if (candidatePoint[pointI])
{
label region = minRegion[faceI][fp]; label region = minRegion[faceI][fp];
if (minPointRegion[pointI] == -1) if (minPointRegion[pointI] == -1)
@ -180,6 +187,7 @@ void Foam::localPointRegion::countPointRegions
} }
} }
} }
}
minPointRegion.clear(); minPointRegion.clear();
// Add internal faces that use any duplicated point. Can only have one // Add internal faces that use any duplicated point. Can only have one
@ -194,7 +202,9 @@ void Foam::localPointRegion::countPointRegions
forAll(f, fp) forAll(f, fp)
{ {
if (meshPointMap_.found(f[fp])) // Note: candidatePoint test not really necessary but
// speeds up rejection.
if (candidatePoint[f[fp]] && meshPointMap_.found(f[fp]))
{ {
label meshFaceMapI = meshFaceMap_.size(); label meshFaceMapI = meshFaceMap_.size();
meshFaceMap_.insert(faceI, meshFaceMapI); meshFaceMap_.insert(faceI, meshFaceMapI);
@ -421,7 +431,7 @@ void Foam::localPointRegion::calcPointRegions
// Count regions per point // Count regions per point
countPointRegions(mesh, candidateFace, minRegion); countPointRegions(mesh, candidatePoint, candidateFace, minRegion);
minRegion.clear(); minRegion.clear();

View File

@ -92,6 +92,7 @@ class localPointRegion
void countPointRegions void countPointRegions
( (
const polyMesh& mesh, const polyMesh& mesh,
const boolList& candidatePoint,
const Map<label>& candidateFace, const Map<label>& candidateFace,
faceList& minRegion faceList& minRegion
); );