From 14e5d789c0a4d8a981d257939573a3e76a5d22b5 Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Mon, 11 Jan 2016 07:57:10 +0100 Subject: [PATCH] One more test. --- src/MEDCoupling_Swig/MEDCouplingRemapperTest.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/MEDCoupling_Swig/MEDCouplingRemapperTest.py b/src/MEDCoupling_Swig/MEDCouplingRemapperTest.py index c5d99f89f..50157d00b 100644 --- a/src/MEDCoupling_Swig/MEDCouplingRemapperTest.py +++ b/src/MEDCoupling_Swig/MEDCouplingRemapperTest.py @@ -877,6 +877,23 @@ class MEDCouplingBasicsTest(unittest.TestCase): rem2.prepare(mt,ms,"P0P0") # reverse mt<->ms self.assertEqual(rem2.getCrudeMatrix(),[{0: 1.0}, {1: 1.0}]) pass + + def test2D1Dand1D2DPointLocator1(self): + arrX=DataArrayDouble([0,1,2]) + arrY=DataArrayDouble([0,1]) + ms=MEDCouplingCMesh() ; ms.setCoords(arrX,arrY) ; ms=ms.buildUnstructured() + mt=MEDCouplingUMesh("target",1) ; mt.setCoords(ms.getCoords()[:]) + mt.allocateCells() + mt.insertNextCell(NORM_SEG2,[0,4]) ; mt.insertNextCell(NORM_SEG2,[1,5]) + rem=MEDCouplingRemapper() + rem.setIntersectionType(PointLocator) + rem.prepare(ms,mt,"P0P0") + self.assertEqual(rem.getCrudeMatrix(),[{0:1.},{1:1.}]) + rem=MEDCouplingRemapper() + rem.setIntersectionType(PointLocator) + rem.prepare(mt,ms,"P0P0") + self.assertEqual(rem.getCrudeMatrix(),[{0:1.},{1:1.}]) + pass def build2DSourceMesh_1(self): sourceCoords=[-0.3,-0.3, 0.7,-0.3, -0.3,0.7, 0.7,0.7] -- 2.39.2