BUG: faceOnlySet sampling does not stop at 'end' (closes #745)

This commit is contained in:
Mark Olesen
2018-02-28 11:23:59 +01:00
parent 9f03511ffb
commit 628f0860c3
3 changed files with 60 additions and 2 deletions

View File

@ -54,6 +54,8 @@ bool Foam::faceOnlySet::trackToBoundary
DynamicList<scalar>& samplingCurveDist
) const
{
const vector offset = (end_ - start_);
particle::trackingData td(particleCloud);
point trackPt = singleParticle.position();
@ -75,9 +77,10 @@ bool Foam::faceOnlySet::trackToBoundary
samplingCurveDist.append(mag(trackPt - start_));
}
if (mag(trackPt - end_) < smallDist)
if (-smallDist < ((trackPt - end_) & offset))
{
// End reached
// Projected onto sampling vector
// - done when we are near or past the end of the sampling vector
return false;
}
else if (singleParticle.onBoundaryFace())