]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
Small fix.
authorAnthony Geay <anthony.geay@edf.fr>
Mon, 4 Jan 2016 07:05:21 +0000 (08:05 +0100)
committerAnthony Geay <anthony.geay@edf.fr>
Mon, 4 Jan 2016 07:05:21 +0000 (08:05 +0100)
src/MEDLoader/MEDFileMesh.cxx
src/MEDLoader/Swig/MEDLoaderTest3.py

index 6c5bd3afe0b5735eb3618c341c38a004cd881f5e..c858bf9f0308e6594f31ed46cc8ed563bef04fa8 100644 (file)
@@ -3164,6 +3164,7 @@ MEDFileMesh *MEDFileUMesh::cartesianize() const
         if((const MEDFileUMeshSplitL1 *)(*it))
           *it=(*it)->shallowCpyUsingCoords(coordsCart);
       ret->_coords=coordsCart;
+      ret->setAxType(AX_CART);
       return ret.retn();
     }
 }
@@ -6210,6 +6211,7 @@ MEDFileMesh *MEDFileCMesh::cartesianize() const
       MEDCouplingAutoRefCountObjectPtr<MEDFileCurveLinearMesh> ret(MEDFileCurveLinearMesh::New());
       ret->MEDFileStructuredMesh::operator=(*this);
       ret->setMesh(clmesh);
+      ret->setAxType(AX_CART);
       return ret.retn();
     }
 }
@@ -6421,6 +6423,7 @@ MEDFileMesh *MEDFileCurveLinearMesh::cartesianize() const
       MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> coordsCart(coords->cartesianize(getAxType()));
       mesh2->setCoords(coordsCart);
       ret->setMesh(mesh2);
+      ret->setAxType(AX_CART);
       return ret.retn();
     }
 }
index b50dae7983b1b070fd05cd9bcce10ba33ece1c02..f717cbda190c9d874b8fe48dbdba32dc3946feba 100644 (file)
@@ -4763,6 +4763,7 @@ class MEDLoaderTest(unittest.TestCase):
       ref3=mm.getDirectUndergroundSingleGeoTypeMesh(NORM_QUAD4).getNodalConnectivity().getHiddenCppPointer()
       self.assertEqual(ref0,mm.getDirectUndergroundSingleGeoTypeMesh(NORM_QUAD4).getCoords().getHiddenCppPointer())
       mm2=mm.cartesianize() # the trigger
+      self.assertEqual(mm2.getAxType(),AX_CART)
       self.assertTrue(isinstance(mm2,MEDFileUMesh))
       self.assertTrue(mm.getHiddenCppPointer()!=mm2.getHiddenCppPointer())
       self.assertTrue(ref0==mm.getCoords().getHiddenCppPointer()) # <- here important
@@ -4787,6 +4788,7 @@ class MEDLoaderTest(unittest.TestCase):
       # UMesh cart
       mm.setAxType(AX_CART)
       mm2=mm.cartesianize() # the trigger
+      self.assertEqual(mm2.getAxType(),AX_CART)
       self.assertTrue(isinstance(mm2,MEDFileUMesh))
       self.assertTrue(mm.getHiddenCppPointer()==mm2.getHiddenCppPointer()) # optimization
       # CurveLinearMesh non cart
@@ -4796,6 +4798,7 @@ class MEDLoaderTest(unittest.TestCase):
       mm.setName("a") ; mm.setDescription("b") ; mm.setTime(3,4,5.) ; mm.addFamily("c",-4) ; mm.setFamiliesOnGroup("d",["c"]) ; mm.setTimeUnit("ms")
       ref0=mm.getMesh().getCoords().getHiddenCppPointer()
       mm2=mm.cartesianize() # the trigger
+      self.assertEqual(mm2.getAxType(),AX_CART)
       self.assertTrue(isinstance(mm2,MEDFileCurveLinearMesh))
       self.assertTrue(mm.getHiddenCppPointer()!=mm2.getHiddenCppPointer())
       self.assertTrue(ref0==mm.getMesh().getCoords().getHiddenCppPointer()) # <- here important
@@ -4816,6 +4819,7 @@ class MEDLoaderTest(unittest.TestCase):
       # CurveLinearMesh cart
       mm.setAxType(AX_CART)
       mm2=mm.cartesianize() # the trigger
+      self.assertEqual(mm2.getAxType(),AX_CART)
       self.assertTrue(isinstance(mm2,MEDFileCurveLinearMesh))
       self.assertTrue(mm.getHiddenCppPointer()==mm2.getHiddenCppPointer()) # optimization
       # CMesh non cart
@@ -4824,6 +4828,7 @@ class MEDLoaderTest(unittest.TestCase):
       mm.setFamilyFieldArr(0,d1) ; mm.setFamilyFieldArr(1,d0)
       mm.setName("a") ; mm.setDescription("b") ; mm.setTime(3,4,5.) ; mm.addFamily("c",-4) ; mm.setFamiliesOnGroup("d",["c"]) ; mm.setTimeUnit("ms")
       mm2=mm.cartesianize() # the trigger
+      self.assertEqual(mm2.getAxType(),AX_CART)
       self.assertTrue(isinstance(mm2,MEDFileCurveLinearMesh))
       self.assertEqual(mm2.getMesh().getNodeGridStructure(),mm.getMesh().getNodeGridStructure())
       self.assertEqual(mm2.getName(),mm.getName())
@@ -4841,6 +4846,7 @@ class MEDLoaderTest(unittest.TestCase):
       # CMesh cart
       mm.setAxType(AX_CART)
       mm2=mm.cartesianize() # the trigger
+      self.assertEqual(mm2.getAxType(),AX_CART)
       self.assertTrue(isinstance(mm2,MEDFileCMesh))
       self.assertTrue(mm.getHiddenCppPointer()==mm2.getHiddenCppPointer()) # optimization
       pass