From: abn Date: Thu, 19 May 2016 14:13:26 +0000 (+0200) Subject: Remapper MappedBarycentric: completing test. X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8c2dca1112da5a04b91affe8120582582a9a8696;p=tools%2Fmedcoupling.git Remapper MappedBarycentric: completing test. --- diff --git a/src/MEDCoupling_Swig/MEDCouplingRemapperTest.py b/src/MEDCoupling_Swig/MEDCouplingRemapperTest.py index 5b4b2261f..061af89b7 100644 --- a/src/MEDCoupling_Swig/MEDCouplingRemapperTest.py +++ b/src/MEDCoupling_Swig/MEDCouplingRemapperTest.py @@ -686,9 +686,26 @@ class MEDCouplingBasicsTest(unittest.TestCase): srcField.setMesh(s); srcField.setName("field") srcField.setArray(DataArrayDouble([1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0])) tgtF = aRemapper.transferField(srcField, 1e+300) - srcField.writeVTK("/tmp/src3d.vtu") - tgtF.writeVTK("/tmp/tgt3d.vtu") - ref = [] +# print tgtF.getArray().getValues() + ref = [6.0, 6.251802698104413, 6.502397834044702, 6.7517940736426665, 7.0, 5.740554726834594, + 6.1761835575796935, 6.6052985689637564, 7.009392769824465, 7.383488834310164, + 5.487562931129931, 6.140664596972973, 6.720290674177548, 7.220534970454015, 7.651092836860121, + 5.2407867837524345, 6.125759809889516, 6.82853486793175, 7.390880823876876, 7.848445254819061, + 5.0, 6.12211344611157, 6.925740671133115, 7.529623182840827, 8.0, 5.0, 5.251802698104413, + 5.502397834044702, 5.751794073642667, 6.0, 4.740554726834594, 5.1761835575796935, + 5.6052985689637564, 6.009392769824465, 6.383488834310163, 4.487562931129931, 5.140664596972973, + 5.720290674177548, 6.220534970454015, 6.651092836860121, 4.2407867837524345, 5.125759809889516, + 5.828534867931749, 6.390880823876876, 6.848445254819061, 4.0, 5.122113446111569, 5.925740671133115, + 6.529623182840827, 7.0, 4.0, 4.251802698104413, 4.502397834044702, 4.751794073642667, 5.0, 3.740554726834594, + 4.176183557579693, 4.6052985689637564, 5.009392769824464, 5.383488834310164, 3.487562931129931, + 4.140664596972973, 4.720290674177548, 5.220534970454015, 5.651092836860121, 3.240786783752434, 4.125759809889516, 4.82853486793175, + 5.390880823876876, 5.848445254819061, 3.0, 4.122113446111569, 4.925740671133115, 5.529623182840827, 6.0, 3.0, + 3.2518026981044135, 3.502397834044702, 3.7517940736426674, 4.0, 2.7405547268345933, 3.176183557579693, + 3.6052985689637564, 4.009392769824465, 4.383488834310164, 2.487562931129931, 3.140664596972973, 3.7202906741775474, 4.220534970454015, 4.65109283686012, 2.2407867837524345, 3.1257598098895154, 3.828534867931749, + 4.390880823876876, 4.848445254819061, 2.0, 3.1221134461115687, 3.9257406711331146, 4.529623182840826, 5.0, 2.0, 2.2518026981044135, 2.502397834044702, 2.7517940736426674, 3.0, 1.7405547268345936, 2.176183557579693, 2.6052985689637564, + 3.0093927698244642, 3.3834888343101635, 1.4875629311299305, 2.1406645969729734, 2.720290674177548, + 3.2205349704540143, 3.6510928368601205, 1.2407867837524345, 2.125759809889516, 2.8285348679317495, 3.390880823876876, 3.848445254819061, 1.0, 2.1221134461115687, 2.9257406711331146, 3.529623182840827, 4.0] + val = tgtF.getArray().getValues() for i, ref_v in enumerate(ref): self.assertAlmostEqual(ref_v, val[i])