Skip to content
Snippets Groups Projects
Commit 0013284e authored by Henry Weller's avatar Henry Weller
Browse files

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

parent 9c4653e9
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment