Salome HOME
Attempt of Management of profiles in spliter
[tools/medcoupling.git] / src / INTERP_KERNEL / TetraAffineTransform.cxx
index f01b160d6417a3f5ff2b2c612239ab76834bbb33..3952c4ba0c7f0a63a4888ea6fb62d38507288ea7 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2015  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2019  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -62,10 +62,14 @@ namespace INTERP_KERNEL
     calculateDeterminant();
     
     LOG(3, "determinant before inverse = " << _determinant);
+
+    double ni(1./INTERP_KERNEL::normInf(_linear_transform));
+    ni = ni*ni*ni;
     
     // check that tetra is non-planar -> determinant is not zero
+    // AGY : the check to 0. must integrate the infinite norm of _linear_transform matrix.
     // otherwise set _determinant to zero to signal caller that transformation did not work
-    if(epsilonEqual(_determinant, 0.0))
+    if(epsilonEqual(ni*_determinant, 0.0))
       {
         _determinant = 0.0;
         return;