Merge commit '9c11730d7c0af71ee29be98c803071d791dc6a6d'

This commit is contained in:
Hrvoje Jasak 2018-02-07 13:00:40 +00:00
commit 0af2d16958

View file

@ -151,7 +151,9 @@ vector eigenValues(const tensor& t)
if (R2 < Q3)
{
scalar sqrtQ = sqrt(Q);
scalar theta = acos(R/(Q*sqrtQ));
scalar cosTheta = R/(Q*sqrtQ);
cosTheta += (neg(cosTheta) - pos(cosTheta))*SMALL;
scalar theta = acos(cosTheta);
scalar m2SqrtQ = -2*sqrtQ;
scalar aBy3 = a/3;
@ -406,7 +408,9 @@ vector eigenValues(const symmTensor& t)
if (R2 < Q3)
{
scalar sqrtQ = sqrt(Q);
scalar theta = acos(R/(Q*sqrtQ));
scalar cosTheta = R/(Q*sqrtQ);
cosTheta += (neg(cosTheta) - pos(cosTheta))*SMALL;
scalar theta = acos(cosTheta);
scalar m2SqrtQ = -2*sqrtQ;
scalar aBy3 = a/3;