Commit 0013284e authored by Henry Weller's avatar Henry Weller
Browse files

tensor::eigenValues: Test the magnitude of 'QQ' before dividing by it.

Resolves bug-report http://bugs.openfoam.org/view.php?id=2351
parent 9c4653e9
...@@ -123,7 +123,7 @@ Foam::vector Foam::eigenValues(const tensor& t) ...@@ -123,7 +123,7 @@ Foam::vector Foam::eigenValues(const tensor& t)
} }
// Two identical roots and one distinct root // 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 sqrtP = sqrt(P);
scalar signQ = sign(Q); scalar signQ = sign(Q);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment