Added return when position_ == endPosition
May resolve bug-report http://www.openfoam.org/mantisbt/view.php?id=1459
This commit is contained in:
parent
c9512b7456
commit
e05b72580d
1 changed files with 3 additions and 4 deletions
|
|
@ -2,7 +2,7 @@
|
||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
|
|
@ -506,14 +506,13 @@ Foam::scalar Foam::particle::trackToFace
|
||||||
if (lambdaMin <= 1.0)
|
if (lambdaMin <= 1.0)
|
||||||
{
|
{
|
||||||
trackFraction += lambdaMin*(1 - trackFraction);
|
trackFraction += lambdaMin*(1 - trackFraction);
|
||||||
|
|
||||||
position_ += lambdaMin*(endPosition - position_);
|
position_ += lambdaMin*(endPosition - position_);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
trackFraction = 1.0;
|
|
||||||
|
|
||||||
position_ = endPosition;
|
position_ = endPosition;
|
||||||
|
|
||||||
|
return 1.0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue