From 351e63f6d3742d1a00f5ec0666da068e8fe033fa Mon Sep 17 00:00:00 2001 From: NATHALIE GORE Date: Mon, 18 Dec 2023 09:47:54 +0100 Subject: [PATCH] add test for Nan - computeTriangleHeight --- src/MEDCoupling_Swig/MEDCouplingBasicsTest7.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/MEDCoupling_Swig/MEDCouplingBasicsTest7.py b/src/MEDCoupling_Swig/MEDCouplingBasicsTest7.py index c45f74141..2041b0b34 100644 --- a/src/MEDCoupling_Swig/MEDCouplingBasicsTest7.py +++ b/src/MEDCoupling_Swig/MEDCouplingBasicsTest7.py @@ -1209,6 +1209,16 @@ class MEDCouplingBasicsTest7(unittest.TestCase): expected2 = DataArrayDouble([sqrt(2)/2.0, sqrt(2)/2.0]) self.assertTrue( res2.minPerTuple().isEqual(expected2,1e-12) ) + def testComputeTriangleHeight1(self): + m = MEDCouplingUMesh("mesh",2) + m.setCoords(DataArrayDouble([(0,0,0),(0,0,0),(10,0,0)])) + m.allocateCells() + m.insertNextCell(NORM_TRI3, [0,1,2]) + m = MEDCoupling1SGTUMesh(m) + res = m.computeTriangleHeight() + expected = DataArrayDouble([(10,0,0)]) + self.assertTrue( res.isEqual(expected,1e-12) ) + def testDAILocateComponentId0(self): arr = DataArrayInt( [(0, 1, 2), (3, 4, 5), (6, 2, 3), (7, 8, 9), (9, 0, 10), (11, 12, 13), (14, 5, 11), (15, 16, 17)] ) valToSearchIntoTuples = DataArrayInt( [1, 4, 6, 8, 10, 12, 14, 16, 17] ) -- 2.39.2