X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDPartitioner%2FMEDPARTITIONER_MeshCollectionDriver.cxx;h=f284facac933b938336ecefcfcb8452ffcfc8d23;hb=bd238ae917aa20ba3fe2f7569883d619b7e4f7a9;hp=7f1b1fffe3a15eae73e48f64984c0fb9a77cacec;hpb=efadd75b7a6e2bedd20e6fe6b9245b61887e5562;p=tools%2Fmedcoupling.git diff --git a/src/MEDPartitioner/MEDPARTITIONER_MeshCollectionDriver.cxx b/src/MEDPartitioner/MEDPARTITIONER_MeshCollectionDriver.cxx index 7f1b1fffe..f284facac 100644 --- a/src/MEDPartitioner/MEDPARTITIONER_MeshCollectionDriver.cxx +++ b/src/MEDPartitioner/MEDPARTITIONER_MeshCollectionDriver.cxx @@ -72,8 +72,8 @@ int MeshCollectionDriver::readSeq(const char* filename, const char* meshname) (_collection->getFaceMesh()).push_back(mfm->getLevelM1Mesh(false)); //reading family ids - MEDCoupling::DataArrayInt* cellIds(mfm->getFamilyFieldAtLevel(0)->deepCpy()); - MEDCoupling::DataArrayInt* faceIds(mfm->getFamilyFieldAtLevel(-1)->deepCpy()); + MEDCoupling::DataArrayInt* cellIds(mfm->getFamilyFieldAtLevel(0)->deepCopy()); + MEDCoupling::DataArrayInt* faceIds(mfm->getFamilyFieldAtLevel(-1)->deepCopy()); (_collection->getCellFamilyIds()).push_back(cellIds); (_collection->getFaceFamilyIds()).push_back(faceIds); @@ -136,7 +136,7 @@ void MeshCollectionDriver::readData(MEDCoupling::MEDFileUMesh* mfm, int idomain) { (_collection->getMesh())[idomain]=mfm->getLevel0Mesh(false); //reading families groups - MEDCoupling::DataArrayInt* cellIds(mfm->getFamilyFieldAtLevel(0)->deepCpy()); + MEDCoupling::DataArrayInt* cellIds(mfm->getFamilyFieldAtLevel(0)->deepCopy()); (_collection->getCellFamilyIds())[idomain]=cellIds; } catch(...) @@ -153,7 +153,7 @@ void MeshCollectionDriver::readData(MEDCoupling::MEDFileUMesh* mfm, int idomain) { (_collection->getFaceMesh())[idomain]=mfm->getLevelM1Mesh(false); //reading families groups - MEDCoupling::DataArrayInt* faceIds(mfm->getFamilyFieldAtLevel(-1)->deepCpy()); + MEDCoupling::DataArrayInt* faceIds(mfm->getFamilyFieldAtLevel(-1)->deepCopy()); (_collection->getFaceFamilyIds())[idomain]=faceIds; if (MyGlobals::_Verbose>10) std::cout << "proc " << MyGlobals::_Rank << " : WITH Faces\n"; @@ -225,7 +225,7 @@ MEDCoupling::MEDFileMesh* MeshCollectionDriver::getMesh(int idomain) const cellMesh->setName(finalMeshName); mfm->setMeshAtLevel( 0, cellMesh ); - faceMesh->checkCoherency(); + faceMesh->checkConsistencyLight(); if (faceMesh->getNumberOfCells()>0) { faceMesh->tryToShareSameCoordsPermute(*cellMesh, 1e-10); @@ -243,7 +243,7 @@ MEDCoupling::MEDFileMesh* MeshCollectionDriver::getMesh(int idomain) const // if (boundaryMesh!=0) // { // //doing that testMesh becomes second mesh sorted by alphabetical order of name - // MEDLoader::WriteUMesh(distfilename, boundaryMesh, false); + // WriteUMesh(distfilename, boundaryMesh, false); // boundaryMesh->decrRef(); // } @@ -258,7 +258,7 @@ MEDCoupling::MEDFileMesh* MeshCollectionDriver::getMesh(int idomain) const // add joints - using MEDCoupling::MEDCouplingAutoRefCountObjectPtr; + using MEDCoupling::MCAuto; using MEDCoupling::MEDCouplingSkyLineArray; using MEDCoupling::MEDFileJoint; using MEDCoupling::MEDFileJointCorrespondence; @@ -268,7 +268,7 @@ MEDCoupling::MEDFileMesh* MeshCollectionDriver::getMesh(int idomain) const if ( _collection->getCZ().size() > 0 ) { - MEDCouplingAutoRefCountObjectPtr< MEDFileJoints > joints = MEDFileJoints::New(); + MCAuto< MEDFileJoints > joints = MEDFileJoints::New(); for ( size_t i = 0; i < _collection->getCZ().size(); ++i ) { @@ -287,19 +287,19 @@ MEDCoupling::MEDFileMesh* MeshCollectionDriver::getMesh(int idomain) const cz->setDescription( oss.str() ); } - MEDCouplingAutoRefCountObjectPtr< MEDFileJoint> + MCAuto< MEDFileJoint> joint = MEDFileJoint::New( cz->getName(), finalMeshName, finalMeshName, cz->getDistantDomainNumber() ); joint->setDescription( cz->getDescription() ); joints->pushJoint( joint ); - MEDCouplingAutoRefCountObjectPtr< MEDFileJointOneStep> j1st = MEDFileJointOneStep::New(); + MCAuto< MEDFileJointOneStep> j1st = MEDFileJointOneStep::New(); joint->pushStep( j1st ); const MEDCouplingSkyLineArray * nodeCorr = cz->getNodeCorresp(); if ( nodeCorr ) { - MEDCouplingAutoRefCountObjectPtr< MEDFileJointCorrespondence > + MCAuto< MEDFileJointCorrespondence > corr = MEDFileJointCorrespondence::New( nodeCorr->getValueArray() ); j1st->pushCorrespondence( corr ); } @@ -314,7 +314,7 @@ MEDCoupling::MEDFileMesh* MeshCollectionDriver::getMesh(int idomain) const { t1 = INTERP_KERNEL::NormalizedCellType( types[it].first ); t2 = INTERP_KERNEL::NormalizedCellType( types[it].second ); - MEDCouplingAutoRefCountObjectPtr< MEDFileJointCorrespondence> + MCAuto< MEDFileJointCorrespondence> corr = MEDFileJointCorrespondence::New( cellCorr->getValueArray(), t1, t2 ); j1st->pushCorrespondence( corr ); } @@ -380,7 +380,7 @@ MEDCoupling::MEDCouplingFieldDouble* MeshCollectionDriver::getField(std::string } field->setArray(da); field->setTime(time,DT,IT); - field->checkCoherency(); + field->checkConsistencyLight(); } return field; } @@ -403,7 +403,7 @@ void MeshCollectionDriver::writeMedFile(int idomain, const std::string& distfile nbfFieldFound++; try { - MEDLoader::WriteField(distfilename,field,false); + WriteField(distfilename,field,false); } catch(INTERP_KERNEL::Exception& e) { @@ -413,8 +413,8 @@ void MeshCollectionDriver::writeMedFile(int idomain, const std::string& distfile fieldName=field->getName(); tmp+="_"+fieldName+"_"+IntToStr(nbfFieldFound)+".med"; newName.replace(newName.find(".med"),4,tmp); - std::cout << "WARNING : writeMedFile : create a new file name with only one field because MEDLoader::WriteField throw:" << newName << std::endl; - MEDLoader::WriteField(newName,field,true); + std::cout << "WARNING : writeMedFile : create a new file name with only one field because WriteField throw:" << newName << std::endl; + WriteField(newName,field,true); } } mfm->decrRef(); @@ -424,8 +424,8 @@ MEDCoupling::MEDFileData* MeshCollectionDriver::getMEDFileData() { MEDCoupling::MEDFileData* newdata = MEDCoupling::MEDFileData::New(); - MEDCoupling::MEDCouplingAutoRefCountObjectPtr meshes; - MEDCoupling::MEDCouplingAutoRefCountObjectPtr fields; + MEDCoupling::MCAuto meshes; + MEDCoupling::MCAuto fields; meshes = MEDCoupling::MEDFileMeshes::New(); fields = MEDCoupling::MEDFileFields::New();