From 7eba97017b5ddd13211fd590f8100a48a4d6a4aa Mon Sep 17 00:00:00 2001 From: ageay Date: Wed, 4 Dec 2013 18:04:42 +0000 Subject: [PATCH] Final tuning with polyhedron --- src/MEDLoader/MEDFileFieldOverView.cxx | 4 ++-- src/MEDLoader/Swig/MEDLoaderTest4.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/MEDLoader/MEDFileFieldOverView.cxx b/src/MEDLoader/MEDFileFieldOverView.cxx index bae076b9c..a99d451bb 100644 --- a/src/MEDLoader/MEDFileFieldOverView.cxx +++ b/src/MEDLoader/MEDFileFieldOverView.cxx @@ -799,7 +799,7 @@ bool MEDUMeshMultiLev::buildVTUArrays(DataArrayDouble *& coords, DataArrayByte * { *dPtr++=connIPtr[1]-connIPtr[0]; dPtr=std::copy(connPtr+connIPtr[0],connPtr+connIPtr[1],dPtr); - *cPtr=k+connIPtr[1]-connIPtr[0]; k=*cPtr++; + *cPtr++=k; k+=connIPtr[1]-connIPtr[0]; } } else @@ -809,7 +809,7 @@ bool MEDUMeshMultiLev::buildVTUArrays(DataArrayDouble *& coords, DataArrayByte * std::set s(connPtr+connIPtr[0],connPtr+connIPtr[1]); s.erase(-1); *dPtr++=(int)s.size(); dPtr=std::copy(s.begin(),s.end(),dPtr); - *cPtr=k+(int)s.size(); k=*cPtr++; + *cPtr++=k; k+=(int)s.size()+1; } } if(isPolyh) diff --git a/src/MEDLoader/Swig/MEDLoaderTest4.py b/src/MEDLoader/Swig/MEDLoaderTest4.py index b68e04e8d..58a08df5d 100644 --- a/src/MEDLoader/Swig/MEDLoaderTest4.py +++ b/src/MEDLoader/Swig/MEDLoaderTest4.py @@ -2049,7 +2049,7 @@ class MEDLoaderTest4(unittest.TestCase): self.assertTrue(ncc) self.assertTrue(a0.isEqual(a0Exp,1e-12)) self.assertTrue(a1.isEqual(DataArrayByte([12,12,42,42,42]))) - self.assertTrue(a2.isEqual(DataArrayInt([0,9,26,34,42])))#[8,16,24,32,40] tony + self.assertTrue(a2.isEqual(DataArrayInt([0,9,18,27,36]))) self.assertTrue(a3.isEqual(DataArrayInt([8,1,0,6,7,13,12,18,19,8,2,1,7,8,14,13,19,20,8,2,3,8,9,14,15,20,21,8,3,4,9,10,15,16,21,22,8,4,5,10,11,16,17,22,23]))) self.assertTrue(a4.isEqual(DataArrayInt([-1,-1,0,31,62]))) self.assertTrue(a5.isEqual(DataArrayInt([6,4,3,2,8,9,4,15,21,20,14,4,3,15,14,2,4,2,14,20,8,4,8,20,21,9,4,9,21,15,3,6,4,4,3,9,10,4,16,22,21,15,4,4,16,15,3,4,3,15,21,9,4,9,21,22,10,4,10,22,16,4,6,4,5,4,10,11,4,17,23,22,16,4,5,17,16,4,4,4,16,22,10,4,10,22,23,11,4,11,23,17,5]))) @@ -2085,7 +2085,7 @@ class MEDLoaderTest4(unittest.TestCase): self.assertTrue(ncc) self.assertTrue(a0.isEqual(a0Exp,1e-12)) self.assertTrue(a1.isEqual(DataArrayByte([42,42]))) - self.assertTrue(a2.isEqual(DataArrayInt([8,16]))) + self.assertTrue(a2.isEqual(DataArrayInt([0,9]))) self.assertTrue(a3.isEqual(DataArrayInt([8,2,3,8,9,14,15,20,21,8,3,4,9,10,15,16,21,22]))) self.assertTrue(a4.isEqual(DataArrayInt([0,31]))) self.assertTrue(a5.isEqual(DataArrayInt([6,4,3,2,8,9,4,15,21,20,14,4,3,15,14,2,4,2,14,20,8,4,8,20,21,9,4,9,21,15,3,6,4,4,3,9,10,4,16,22,21,15,4,4,16,15,3,4,3,15,21,9,4,9,21,22,10,4,10,22,16,4]))) @@ -2112,7 +2112,7 @@ class MEDLoaderTest4(unittest.TestCase): self.assertTrue(ncc) self.assertTrue(a0.isEqual(a0Exp,1e-12)) self.assertTrue(a1.isEqual(DataArrayByte([42,42,42]))) - self.assertTrue(a2.isEqual(DataArrayInt([8,16,24]))) + self.assertTrue(a2.isEqual(DataArrayInt([0,9,18]))) self.assertTrue(a3.isEqual(DataArrayInt([8,2,3,8,9,14,15,20,21,8,3,4,9,10,15,16,21,22,8,4,5,10,11,16,17,22,23]))) self.assertTrue(a4.isEqual(DataArrayInt([0,31,62]))) self.assertTrue(a5.isEqual(DataArrayInt([6,4,3,2,8,9,4,15,21,20,14,4,3,15,14,2,4,2,14,20,8,4,8,20,21,9,4,9,21,15,3,6,4,4,3,9,10,4,16,22,21,15,4,4,16,15,3,4,3,15,21,9,4,9,21,22,10,4,10,22,16,4,6,4,5,4,10,11,4,17,23,22,16,4,5,17,16,4,4,4,16,22,10,4,10,22,23,11,4,11,23,17,5]))) @@ -2198,7 +2198,7 @@ class MEDLoaderTest4(unittest.TestCase): self.assertTrue(ncc) self.assertTrue(a0.isEqual(a0Exp,1e-12)) self.assertTrue(a1.isEqual(DataArrayByte([42,42,42]))) - self.assertTrue(a2.isEqual(DataArrayInt([8,16,24]))) + self.assertTrue(a2.isEqual(DataArrayInt([0,9,18]))) self.assertTrue(a3.isEqual(DataArrayInt([8,2,3,8,9,14,15,20,21,8,3,4,9,10,15,16,21,22,8,4,5,10,11,16,17,22,23]))) self.assertTrue(a4.isEqual(DataArrayInt([0,31,62]))) self.assertTrue(a5.isEqual(DataArrayInt([6,4,3,2,8,9,4,15,21,20,14,4,3,15,14,2,4,2,14,20,8,4,8,20,21,9,4,9,21,15,3,6,4,4,3,9,10,4,16,22,21,15,4,4,16,15,3,4,3,15,21,9,4,9,21,22,10,4,10,22,16,4,6,4,5,4,10,11,4,17,23,22,16,4,5,17,16,4,4,4,16,22,10,4,10,22,23,11,4,11,23,17,5]))) -- 2.39.2