-// Copyright (C) 2007-2015 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2016 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
(_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);
{
(_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(...)
{
(_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";
cellMesh->setName(finalMeshName);
mfm->setMeshAtLevel( 0, cellMesh );
- faceMesh->checkCoherency();
+ faceMesh->checkConsistencyLight();
if (faceMesh->getNumberOfCells()>0)
{
faceMesh->tryToShareSameCoordsPermute(*cellMesh, 1e-10);
// 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();
// }
// add joints
- using MEDCoupling::MEDCouplingAutoRefCountObjectPtr;
+ using MEDCoupling::MCAuto;
using MEDCoupling::MEDCouplingSkyLineArray;
using MEDCoupling::MEDFileJoint;
using MEDCoupling::MEDFileJointCorrespondence;
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 )
{
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 >
- corr = MEDFileJointCorrespondence::New( nodeCorr->getValueArray() );
+ MCAuto< MEDFileJointCorrespondence >
+ corr = MEDFileJointCorrespondence::New( nodeCorr->getValuesArray() );
j1st->pushCorrespondence( corr );
}
{
t1 = INTERP_KERNEL::NormalizedCellType( types[it].first );
t2 = INTERP_KERNEL::NormalizedCellType( types[it].second );
- MEDCouplingAutoRefCountObjectPtr< MEDFileJointCorrespondence>
- corr = MEDFileJointCorrespondence::New( cellCorr->getValueArray(), t1, t2 );
+ MCAuto< MEDFileJointCorrespondence>
+ corr = MEDFileJointCorrespondence::New( cellCorr->getValuesArray(), t1, t2 );
j1st->pushCorrespondence( corr );
}
}
}
field->setArray(da);
field->setTime(time,DT,IT);
- field->checkCoherency();
+ field->checkConsistencyLight();
}
return field;
}
nbfFieldFound++;
try
{
- MEDLoader::WriteField(distfilename,field,false);
+ WriteField(distfilename,field,false);
}
catch(INTERP_KERNEL::Exception& e)
{
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();
{
MEDCoupling::MEDFileData* newdata = MEDCoupling::MEDFileData::New();
- MEDCoupling::MEDCouplingAutoRefCountObjectPtr<MEDCoupling::MEDFileMeshes> meshes;
- MEDCoupling::MEDCouplingAutoRefCountObjectPtr<MEDCoupling::MEDFileFields> fields;
+ MEDCoupling::MCAuto<MEDCoupling::MEDFileMeshes> meshes;
+ MEDCoupling::MCAuto<MEDCoupling::MEDFileFields> fields;
meshes = MEDCoupling::MEDFileMeshes::New();
fields = MEDCoupling::MEDFileFields::New();