X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDWrapper%2FMED_Algorithm.cxx;h=5598ef8c010dd5101368986c0ae1abaf06387a19;hb=HEAD;hp=a62f979ea280172d55c2ada438beeed3bc245815;hpb=0fc0831670e27a5611b941c52dc152fd63964515;p=modules%2Fsmesh.git diff --git a/src/MEDWrapper/MED_Algorithm.cxx b/src/MEDWrapper/MED_Algorithm.cxx index a62f979ea..5598ef8c0 100644 --- a/src/MEDWrapper/MED_Algorithm.cxx +++ b/src/MEDWrapper/MED_Algorithm.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2024 CEA, EDF, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -24,14 +24,6 @@ #include "MED_Wrapper.hxx" #include "MED_Utilities.hxx" -#ifdef _DEBUG_ -static int MYDEBUG = 0; -static int MYVALUEDEBUG = 0; -#else -static int MYDEBUG = 0; -static int MYVALUEDEBUG = 0; -#endif - namespace MED { //--------------------------------------------------------------- @@ -40,7 +32,7 @@ namespace MED const PMeshInfo& theMeshInfo, const MED::TEntityInfo& theEntityInfo) { - MSG(MYDEBUG,"GetElemsByEntity(...)"); + MSG("GetElemsByEntity(...)"); TEntity2TGeom2ElemInfo anEntity2TGeom2ElemInfo; MED::TEntityInfo::const_iterator anIter = theEntityInfo.begin(); PElemInfo anElemInfo; @@ -61,7 +53,7 @@ namespace MED aGeom2ElemInfo[aGeom] = theWrapper->GetPElemInfo(theMeshInfo,anEntity,aGeom,MED::eNOD,&anErr); } } - ADDMSG(MYDEBUG,"\n"); + ADDMSG("\n"); return anEntity2TGeom2ElemInfo; } @@ -70,17 +62,17 @@ namespace MED GetFamilyInfoSet(const PWrapper& theWrapper, const PMeshInfo& theMeshInfo) { - MSG(MYDEBUG,"GetFamilies(...)"); + MSG("GetFamilies(...)"); TErr anErr; TFamilyInfoSet aFamilyInfoSet; TInt aNbFam = theWrapper->GetNbFamilies(*theMeshInfo); - INITMSG(MYDEBUG,"GetNbFamilies() = "<GetPFamilyInfo(theMeshInfo,iFam,&anErr); if(anErr >= 0) aFamilyInfoSet.insert(aFamilyInfo); } - ADDMSG(MYDEBUG,"\n"); + ADDMSG("\n"); return aFamilyInfoSet; } @@ -88,7 +80,7 @@ namespace MED TGroupInfo GetGroupInfo(const TFamilyInfoSet& theFamilyInfoSet) { - MSG(MYDEBUG,"GetFamiliesByGroup(...)"); + MSG("GetFamiliesByGroup(...)"); TGroupInfo aGroup; TFamilyInfoSet::const_iterator anIter = theFamilyInfoSet.begin(); for(; anIter != theFamilyInfoSet.end(); anIter++){ @@ -99,22 +91,20 @@ namespace MED } } -#ifdef _DEBUG_ - if(MYDEBUG){ + if(SALOME::VerbosityActivated()){ TGroupInfo::const_iterator anIter = aGroup.begin(); for(; anIter != aGroup.end(); anIter++){ const std::string& aName = anIter->first; - INITMSG(MYDEBUG,"aGroupName = '"<second; TFamilyInfoSet::const_iterator anFamIter = aFamilyInfoSet.begin(); for(; anFamIter != aFamilyInfoSet.end(); anFamIter++){ const PFamilyInfo& aFamilyInfo = *anFamIter; - INITMSG(MYDEBUG,"aFamilyName = '"<GetName()<<"'\n"); + INITMSG("aFamilyName = '"<GetName()<<"'\n"); } } - ADDMSG(MYDEBUG,"\n"); + ADDMSG("\n"); } -#endif return aGroup; } @@ -125,28 +115,26 @@ namespace MED const PMeshInfo& theMeshInfo, const MED::TEntityInfo& theEntityInfo) { - MSG(MYDEBUG,"GetFieldsByEntity(...)"); + MSG("GetFieldsByEntity(...)"); TFieldInfo2TimeStampInfoSet aFieldInfo2TimeStampInfoSet; TInt aNbFields = theWrapper->GetNbFields(); - INITMSG(MYDEBUG,"GetNbFields() = "<GetPFieldInfo(theMeshInfo,iField); - INITMSG(MYDEBUG,"aFieldName = '"<GetName()<< + INITMSG("aFieldName = '"<GetName()<< "'; aNbComp = "<GetNbComp()<<"; "); TGeom2Size aGeom2Size; EEntiteMaillage anEntity = EEntiteMaillage(-1); TInt aNbTimeStamps = theWrapper->GetNbTimeStamps(aFieldInfo,theEntityInfo,anEntity,aGeom2Size); - ADDMSG(MYDEBUG,"anEntity = "<GetPTimeStampInfo(aFieldInfo,anEntity,aGeom2Size,iTimeStamp); aFieldInfo2TimeStampInfoSet[aFieldInfo].insert(aTimeStamp); - INITMSG(MYDEBUG, - "aDt = "<GetDt()<< - ", Unit = \'"<GetUnitDt()<<"\n"); + INITMSG("aDt = "<GetDt()<<", Unit = \'"<GetUnitDt()<<"\n"); } } - ADDMSG(MYDEBUG,"\n"); + ADDMSG("\n"); return aFieldInfo2TimeStampInfoSet; } @@ -178,11 +166,11 @@ namespace MED //--------------------------------------------------------------- TEntity2FamilySet - GetEntity2FamilySet(const PWrapper& theWrapper, + GetEntity2FamilySet(const PWrapper& /*theWrapper*/, const TEntity2TGeom2ElemInfo& theEntity2TGeom2ElemInfo, const TFamilyInfoSet& theFamilyInfoSet) { - MSG(MYDEBUG,"GetFamiliesByEntity(...)"); + MSG("GetFamiliesByEntity(...)"); TEntity2FamilySet anEntity2FamilySet; typedef std::map TId2Family; @@ -220,7 +208,7 @@ namespace MED TEntity2FamilyID::const_iterator anIter = anEntity2FamilyID.begin(); for(; anIter != anEntity2FamilyID.end(); anIter++){ const EEntiteMaillage& anEntity = anIter->first; - INITMSG(MYDEBUG,"anEntity = "<second; TFamilyID2Size::const_iterator anIter2 = aFamilyID2Size.begin(); for(; anIter2 != aFamilyID2Size.end(); anIter2++){ @@ -230,15 +218,14 @@ namespace MED if(anIter3 != anId2Family.end()){ const PFamilyInfo& aFamilyInfo = anIter3->second; anEntity2FamilySet[anEntity].insert(TFamilyTSize(aFamilyInfo,aSize)); - INITMSG(MYDEBUG, - "aFamilyName = '"<GetName()<< + INITMSG("aFamilyName = '"<GetName()<< "' anId = "<GetId()<<"\n"); } } } } } - ADDMSG(MYDEBUG,"\n"); + ADDMSG("\n"); return anEntity2FamilySet; } @@ -248,7 +235,7 @@ namespace MED TErr* theErr, EModeSwitch theMode) { - INITMSG(MYDEBUG,"GetKey2Gauss - theMode = "<(aKey); + const std::string& aName = boost::get<1>(aKey); + INITMSG("- aGeom = "<GetSize(); - for(TInt iElem = 0; iElem < aNbElem; iElem++){ - ADDMSG(MYVALUEDEBUG,anInfo->GetElemNum(iElem)<<", "); - } - ADDMSG(MYVALUEDEBUG, std::endl); -#endif + if(SALOME::VerbosityActivated()){ + INITMSG("- aName = '"<GetSize(); + for(TInt iElem = 0; iElem < aNbElem; iElem++){ + ADDMSG(anInfo->GetElemNum(iElem)<<", "); + } + + ADDMSG(std::endl); + } } return TMKey2Profile(theMode,aKey2Profile); }