Merge commit '9c11730d7c0af71ee29be98c803071d791dc6a6d' into nextRelease

This commit is contained in:
Hrvoje Jasak 2018-02-07 13:04:16 +00:00
commit 188651d998

View file

@ -151,7 +151,9 @@ vector eigenValues(const tensor& t)
if (R2 < Q3) if (R2 < Q3)
{ {
scalar sqrtQ = sqrt(Q); 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 m2SqrtQ = -2*sqrtQ;
scalar aBy3 = a/3; scalar aBy3 = a/3;
@ -406,7 +408,9 @@ vector eigenValues(const symmTensor& t)
if (R2 < Q3) if (R2 < Q3)
{ {
scalar sqrtQ = sqrt(Q); 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 m2SqrtQ = -2*sqrtQ;
scalar aBy3 = a/3; scalar aBy3 = a/3;