m2D->setCoords(m3D->getCoords());
ret->setMeshAtLevel(0,m3D);
ret->setMeshAtLevel(-1,m2D);
- ret->setFamilyId(GetSpeStr4ExtMesh(),mem->get2DCellIdForExtrusion());
+ ret->setFamilyId(GetSpeStr4ExtMesh(),std::numeric_limits<int>::max()-mem->get2DCellIdForExtrusion());
return ret.retn();
}
MCAuto<MEDCouplingUMesh> m3D(getMeshAtLevel(0)),m2D(getMeshAtLevel(-1));
if(m3D.isNull() || m2D.isNull())
throw INTERP_KERNEL::Exception("MEDFileUMesh::convertToExtrudedMesh : this must be defined both at level 0 and level -1 !");
- int zeId(getFamilyId(GetSpeStr4ExtMesh()));
+ int zeId(std::numeric_limits<int>::max()-getFamilyId(GetSpeStr4ExtMesh()));
MCAuto<MEDCouplingMappedExtrudedMesh> ret(MEDCouplingMappedExtrudedMesh::New(m3D,m2D,zeId));
return ret.retn();
}
pass
def testExtrudedMesh1(self):
- fname1="Pyfile107.med"
+ fname="Pyfile107.med"
arrX=DataArrayDouble([0,1,2,3]) ; arrY=DataArrayDouble([0,1,2,3,4]) ; arrZ=DataArrayDouble([0,1,2,3,4,5])
- mesh3D=MEDCouplingCMesh() ; mesh3D.setCoords(arrX,arrY,arrZ)
+ mesh3D=MEDCouplingCMesh() ; mesh3D.setCoords(arrX,arrY,arrZ) ; mesh3D.setName("mesh")
ex=MEDCouplingMappedExtrudedMesh(mesh3D)
mm=MEDFileUMesh(ex)
+ mm.write(fname,2)
ex2=mm.convertToExtrudedMesh()
+ mm2=MEDFileMesh.New(fname)
+ ex3=mm2.convertToExtrudedMesh()
self.assertTrue(ex.isEqual(ex2,1e-12))
+ self.assertTrue(ex.isEqual(ex3,1e-12))
pass
pass