Merge commit '9c11730d7c0af71ee29be98c803071d791dc6a6d'
This commit is contained in:
commit
0af2d16958
1 changed files with 6 additions and 2 deletions
|
@ -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;
|
||||||
|
|
Reference in a new issue