tensor::eigenValues: Test the magnitude of 'QQ' before dividing by it.
Resolves bug-report http://bugs.openfoam.org/view.php?id=2351
This commit is contained in:
@ -123,7 +123,7 @@ Foam::vector Foam::eigenValues(const tensor& t)
|
||||
}
|
||||
|
||||
// Two identical roots and one distinct root
|
||||
else if (mag(PPP/QQ - 1) < SMALL)
|
||||
else if (mag(QQ) > SMALL && mag(PPP/QQ - 1) < SMALL)
|
||||
{
|
||||
scalar sqrtP = sqrt(P);
|
||||
scalar signQ = sign(Q);
|
||||
|
||||
Reference in New Issue
Block a user