if((const MEDFileUMeshSplitL1 *)(*it))
*it=(*it)->shallowCpyUsingCoords(coordsCart);
ret->_coords=coordsCart;
+ ret->setAxType(AX_CART);
return ret.retn();
}
}
MEDCouplingAutoRefCountObjectPtr<MEDFileCurveLinearMesh> ret(MEDFileCurveLinearMesh::New());
ret->MEDFileStructuredMesh::operator=(*this);
ret->setMesh(clmesh);
+ ret->setAxType(AX_CART);
return ret.retn();
}
}
MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> coordsCart(coords->cartesianize(getAxType()));
mesh2->setCoords(coordsCart);
ret->setMesh(mesh2);
+ ret->setAxType(AX_CART);
return ret.retn();
}
}
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
# 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
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
# 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
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())
# 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