ENH: meshRefinement: do all intersections with slightly extended vector for robustness

This commit is contained in:
mattijs
2011-03-25 12:40:57 +00:00
parent 5838649e19
commit fd62307338
3 changed files with 53 additions and 0 deletions

View File

@ -213,6 +213,14 @@ void Foam::meshRefinement::updateIntersections(const labelList& changedFaces)
}
}
// Extend segments a bit
{
const vectorField smallVec(Foam::sqrt(SMALL)*(end-start));
start += smallVec;
end -= smallVec;
}
// Do tests in one go
labelList surfaceHit;
{
@ -316,6 +324,14 @@ void Foam::meshRefinement::checkData()
}
}
// Extend segments a bit
{
const vectorField smallVec(Foam::sqrt(SMALL)*(end-start));
start += smallVec;
end -= smallVec;
}
// Do tests in one go
labelList surfaceHit;
{
@ -2247,6 +2263,14 @@ void Foam::meshRefinement::dumpIntersections(const fileName& prefix) const
}
}
// Extend segments a bit
{
const vectorField smallVec(Foam::sqrt(SMALL)*(end-start));
start += smallVec;
end -= smallVec;
}
// Do tests in one go
labelList surfaceHit;
List<pointIndexHit> surfaceHitInfo;

View File

@ -283,6 +283,13 @@ void Foam::meshRefinement::getBafflePatches
}
}
// Extend segments a bit
{
const vectorField smallVec(Foam::sqrt(SMALL)*(end-start));
start += smallVec;
end -= smallVec;
}
// Do test for intersections
// ~~~~~~~~~~~~~~~~~~~~~~~~~
@ -2447,6 +2454,13 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::zonify
}
}
// Extend segments a bit
{
const vectorField smallVec(Foam::sqrt(SMALL)*(end-start));
start += smallVec;
end -= smallVec;
}
// Do test for intersections
// ~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -626,6 +626,13 @@ Foam::label Foam::meshRefinement::markSurfaceRefinement
}
}
// Extend segments a bit
{
const vectorField smallVec(Foam::sqrt(SMALL)*(end-start));
start += smallVec;
end -= smallVec;
}
// Do test for higher intersections
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -835,6 +842,14 @@ Foam::label Foam::meshRefinement::markSurfaceCurvatureRefinement
}
}
// Extend segments a bit
{
const vectorField smallVec(Foam::sqrt(SMALL)*(end-start));
start += smallVec;
end -= smallVec;
}
// Test for all intersections (with surfaces of higher max level than
// minLevel) and cache per cell the max surface level and the local normal
// on that surface.