ENH: tensor: limit calculation of small eigenvalues

This commit is contained in:
mattijs 2014-04-03 09:11:21 +01:00
parent 72e07ed568
commit 072e93f463

View file

@ -119,7 +119,7 @@ Foam::vector Foam::eigenValues(const tensor& t)
+ t.xy()*t.yx()*t.zz() + t.xx()*t.yz()*t.zy();
// If there is a zero root
if (mag(c) < ROOTVSMALL)
if (mag(c) < 1e-100)
{
scalar disc = sqr(a) - 4*b;
@ -313,7 +313,7 @@ Foam::vector Foam::eigenValues(const symmTensor& t)
+ t.xy()*t.xy()*t.zz() + t.xx()*t.yz()*t.yz();
// If there is a zero root
if (mag(c) < ROOTVSMALL)
if (mag(c) < 1e-100)
{
scalar disc = sqr(a) - 4*b;