X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FMEDWrapper%2FMED_Algorithm.cxx;h=82d4c43e1011a9beae987cdad761b584be6b9a36;hp=6f361e302079c662e8365a229fdc4b0058a541cc;hb=fa95110a3b64cb8323176103200e3dd17f0ed67e;hpb=9ec3f92f476a3bcae72b418f5d9c0c9ece69a9bc diff --git a/src/MEDWrapper/MED_Algorithm.cxx b/src/MEDWrapper/MED_Algorithm.cxx index 6f361e302..82d4c43e1 100644 --- a/src/MEDWrapper/MED_Algorithm.cxx +++ b/src/MEDWrapper/MED_Algorithm.cxx @@ -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; } @@ -182,7 +170,7 @@ namespace MED 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); }