From 072e93f46359e8e67db0c0d525a8c9b928062024 Mon Sep 17 00:00:00 2001 From: mattijs Date: Thu, 3 Apr 2014 09:11:21 +0100 Subject: [PATCH] ENH: tensor: limit calculation of small eigenvalues --- src/OpenFOAM/primitives/Tensor/tensor/tensor.C | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/OpenFOAM/primitives/Tensor/tensor/tensor.C b/src/OpenFOAM/primitives/Tensor/tensor/tensor.C index 8ddf9d29..d0d3b30b 100644 --- a/src/OpenFOAM/primitives/Tensor/tensor/tensor.C +++ b/src/OpenFOAM/primitives/Tensor/tensor/tensor.C @@ -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;