From: apo Date: Fri, 12 Aug 2005 10:21:46 +0000 (+0000) Subject: To improve memory usage X-Git-Tag: BR-D5-38-2003_D2005-12-09~123 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=751669188f31f58a4e57a4c7b0f1af01bb589607;p=modules%2Fvisu.git To improve memory usage --- diff --git a/src/CONVERTOR/VISU_Convertor_impl.cxx b/src/CONVERTOR/VISU_Convertor_impl.cxx index 8c267acc..1abe7336 100644 --- a/src/CONVERTOR/VISU_Convertor_impl.cxx +++ b/src/CONVERTOR/VISU_Convertor_impl.cxx @@ -83,18 +83,34 @@ namespace VISU //--------------------------------------------------------------- - TSource::TSource(): - mySource(vtkUnstructuredGrid::New()) + TSource::TSource() + {} + + const TVTKSource& + TSource + ::GetSource() const { - mySource->Delete(); + if(!mySource.GetPointer()){ + mySource = vtkUnstructuredGrid::New(); + mySource->Delete(); + } + return mySource; } //--------------------------------------------------------------- - TAppendFilter::TAppendFilter(): - myFilter(vtkAppendFilter::New()) + TAppendFilter::TAppendFilter() + {} + + const TVTKAppendFilter& + TAppendFilter + ::GetFilter() const { - myFilter->Delete(); + if(!myFilter.GetPointer()){ + myFilter = vtkAppendFilter::New(); + myFilter->Delete(); + } + return myFilter; } @@ -466,8 +482,8 @@ namespace //--------------------------------------------------------------- void - GetPoints(VISU::TVTKSource& theSource, - VISU::PMeshImpl theMesh) + GetPoints(const TVTKSource& theSource, + const PMeshImpl& theMesh) { TVTKPoints& aPoints = theMesh->myPoints; const TNamedPointCoords& aCoords = theMesh->myNamedPointCoords; @@ -551,9 +567,9 @@ namespace //--------------------------------------------------------------- void - GetCellsOnEntity(VISU::TVTKSource& theSource, - const VISU::PMeshOnEntityImpl theMeshOnEntity, - const string& theFamilyName) + GetCellsOnEntity(const TVTKSource& theSource, + const PMeshOnEntityImpl& theMeshOnEntity, + const std::string& theFamilyName) { //Check on existing family PFamilyImpl aFamily = GetFamily(theMeshOnEntity,theFamilyName); @@ -618,9 +634,9 @@ namespace //--------------------------------------------------------------- void - GetCellsOnGroup(VISU::TVTKSource& theSource, - VISU::PMeshImpl theMesh, - const VISU::TFamilyAndEntitySet& theFamilyAndEntitySet) + GetCellsOnGroup(const TVTKSource& theSource, + const PMeshImpl& theMesh, + const TFamilyAndEntitySet& theFamilyAndEntitySet) { //Calculate dimentions of the group INITMSG(MYDEBUG,"GetCellsOnGroup\n"); @@ -686,8 +702,8 @@ namespace //--------------------------------------------------------------- std::string - GenerateFieldName(const VISU::PFieldImpl theField, - const VISU::PValForTimeImpl theValForTime) + GenerateFieldName(const PFieldImpl& theField, + const PValForTimeImpl& theValForTime) { const VISU::TTime& aTime = theValForTime->myTime; string aFieldName = theField->myMeshName + ", " + theField->myName + ": " + @@ -698,9 +714,9 @@ namespace //--------------------------------------------------------------- void - GetTimeStampOnProfile(VISU::TVTKSource& theSource, - const VISU::PFieldImpl theField, - const VISU::PValForTimeImpl theValForTime) + GetTimeStampOnProfile(const TVTKSource& theSource, + const PFieldImpl& theField, + const PValForTimeImpl& theValForTime) { int aNbTuples = theField->myDataSize/theField->myNbComp; string aFieldName = GenerateFieldName(theField,theValForTime); @@ -800,9 +816,9 @@ namespace //--------------------------------------------------------------- void - GetCells(VISU::TVTKSource& theSource, - PSubProfileImpl theSubProfile, - PMeshOnEntityImpl theMeshOnEntity) + GetCells(const TVTKSource& theSource, + const PSubProfileImpl& theSubProfile, + const PMeshOnEntityImpl& theMeshOnEntity) { vtkIdType aNbCells = theSubProfile->myNbCells; vtkIdType aCellsSize = theSubProfile->myCellsSize; @@ -862,14 +878,14 @@ namespace //--------------------------------------------------------------- void - GetMeshOnSubProfile(PMeshImpl theMesh, - PMeshOnEntityImpl theMeshOnEntity, - PProfileImpl theProfile, - PSubProfileImpl theSubProfile) + GetMeshOnSubProfile(const PMeshImpl& theMesh, + const PMeshOnEntityImpl& theMeshOnEntity, + const PProfileImpl& theProfile, + const PSubProfileImpl& theSubProfile) { INITMSG(MYDEBUG,"GetMeshOnSubProfile - aGeom = "<myGeom<mySource; + const TVTKSource& aSource = theSubProfile->GetSource(); if(theSubProfile->myIsVTKDone) return; @@ -884,16 +900,16 @@ namespace //--------------------------------------------------------------- void - GetMeshOnProfile(PMeshImpl theMesh, - PMeshOnEntityImpl theMeshOnEntity, - PProfileImpl theProfile) + GetMeshOnProfile(const PMeshImpl& theMesh, + const PMeshOnEntityImpl& theMeshOnEntity, + const PProfileImpl& theProfile) { if(theProfile->myIsVTKDone) return; - TVTKAppendFilter& anAppendFilter = theProfile->myFilter; + const TVTKAppendFilter& anAppendFilter = theProfile->GetFilter(); if(theProfile->myIsAll){ - TVTKSource& aSource = theMeshOnEntity->mySource; + const TVTKSource& aSource = theMeshOnEntity->GetSource(); anAppendFilter->AddInput(aSource.GetPointer()); }else{ const TGeom2SubProfile& aGeom2SubProfile = theProfile->myGeom2SubProfile; @@ -908,7 +924,7 @@ namespace theProfile, aSubProfile); - TVTKSource& aSource = aSubProfile->mySource; + const TVTKSource& aSource = aSubProfile->GetSource(); anAppendFilter->AddInput(aSource.GetPointer()); } } @@ -920,9 +936,9 @@ namespace //--------------------------------------------------------------- void - GetTimeStampOnGaussMesh(VISU::TVTKSource& theSource, - const VISU::PFieldImpl theField, - const VISU::PValForTimeImpl theValForTime) + GetTimeStampOnGaussMesh(const TVTKSource& theSource, + const PFieldImpl& theField, + const PValForTimeImpl& theValForTime) { int aNbTuples = theSource->GetNumberOfPoints(); std::string aFieldName = GenerateFieldName(theField,theValForTime); @@ -1031,9 +1047,9 @@ namespace //--------------------------------------------------------------- void - GetSource(VISU::TVTKSource& theSource, - PGaussSubMeshImpl theGaussSubMesh, - PMeshOnEntityImpl theMeshOnEntity) + GetSource(const TVTKSource& theSource, + const PGaussSubMeshImpl& theGaussSubMesh, + const PMeshOnEntityImpl& theMeshOnEntity) { const TPointCoords& aCoords = theGaussSubMesh->myPointCoords; vtkIdType aNbPoints = aCoords.GetNbPoints(); @@ -1075,7 +1091,7 @@ namespace for(int i = 0; aConnectivity->GetNextCell(npts,pts); i++) aCellLocationsArray->SetValue(i,aConnectivity->GetTraversalLocation(npts)); - TVTKSource& aSource = theGaussSubMesh->mySource; + const TVTKSource& aSource = theGaussSubMesh->GetSource(); aSource->SetCells(aCellTypesArray,aCellLocationsArray,aConnectivity); aSource->SetPoints(aPoints.GetPointer()); @@ -1087,10 +1103,10 @@ namespace //--------------------------------------------------------------- void - GetGaussSubMesh(PMeshImpl theMesh, - PMeshOnEntityImpl theMeshOnEntity, - PGaussMeshImpl theGaussMesh, - PGaussSubMeshImpl theGaussSubMesh) + GetGaussSubMesh(const PMeshImpl& theMesh, + const PMeshOnEntityImpl& theMeshOnEntity, + const PGaussMeshImpl& theGaussMesh, + const PGaussSubMeshImpl& theGaussSubMesh) { PGaussImpl aGauss = theGaussSubMesh->myGauss; INITMSG(MYDEBUG,"GetGaussSubMesh - aGeom = "<myGeom<myIsVTKDone) return; - TVTKSource& aSource = theGaussSubMesh->mySource; + const TVTKSource& aSource = theGaussSubMesh->GetSource(); GetSource(aSource,theGaussSubMesh,theMeshOnEntity); INITMSGA(MYDEBUG,0,"GetNumberOfPoints - "<GetNumberOfPoints()<GetNumberOfCells()<myIsVTKDone) return; INITMSG(MYDEBUG,"GetGaussMesh"<myFilter; + const TVTKAppendFilter& anAppendFilter = theGaussMesh->GetFilter(); const TGeom2GaussSubMesh& aGeom2GaussSubMesh = theGaussMesh->myGeom2GaussSubMesh; TGeom2GaussSubMesh::const_iterator anIter = aGeom2GaussSubMesh.begin(); for(; anIter != aGeom2GaussSubMesh.end(); anIter++){ @@ -1133,7 +1149,7 @@ namespace theGaussMesh, aGaussSubMesh); - TVTKSource& aSource = aGaussSubMesh->mySource; + const TVTKSource& aSource = aGaussSubMesh->GetSource(); anAppendFilter->AddInput(aSource.GetPointer()); } anAppendFilter->Update(); // Fix on VTK @@ -1187,10 +1203,10 @@ VISU_Convertor_impl TVTKSource aSource; bool *anIsInitialized; if(aFamily){ - aSource = aFamily->mySource; + aSource = aFamily->GetSource(); anIsInitialized = &(aFamily->myIsVTKDone); }else{ - aSource = aMeshOnEntity->mySource; + aSource = aMeshOnEntity->GetSource(); anIsInitialized = &(aMeshOnEntity->myIsVTKDone); } @@ -1254,7 +1270,7 @@ VISU_Convertor_impl const VISU::TFamilyAndEntitySet& aFamilyAndEntitySet = aGroup->myFamilyAndEntitySet; //Main part of code - TVTKSource& aSource = aGroup->mySource; + const TVTKSource& aSource = aGroup->GetSource(); try{ if(!aGroup->myIsVTKDone){ LoadMeshOnGroup(aMesh,aFamilyAndEntitySet); @@ -1308,7 +1324,7 @@ VISU_Convertor_impl PFieldImpl aField = boost::get<3>(aFindTimeStamp); //Main part of code - TVTKSource& aSource = aValForTime->mySource; + const TVTKSource& aSource = aValForTime->GetSource(); #ifndef _DEXCEPT_ try{ #endif @@ -1333,14 +1349,14 @@ VISU_Convertor_impl if(!aGaussMesh){ GetMeshOnProfile(aMesh,aVTKMeshOnEntity,aProfile); - TVTKAppendFilter& anAppendFilter = aProfile->myFilter; + const TVTKAppendFilter& anAppendFilter = aProfile->GetFilter(); aSource->ShallowCopy(anAppendFilter->GetOutput()); GetTimeStampOnProfile(aSource,aField,aValForTime); }else{ const TGeom2GaussSubMesh& aGeom2GaussSubMesh = aGaussMesh->myGeom2GaussSubMesh; GetGaussMesh(aMesh,aVTKMeshOnEntity,aGaussMesh); - TVTKAppendFilter& anAppendFilter = aGaussMesh->myFilter; + const TVTKAppendFilter& anAppendFilter = aGaussMesh->GetFilter(); aSource->ShallowCopy(anAppendFilter->GetOutput()); GetTimeStampOnGaussMesh(aSource,aField,aValForTime); } diff --git a/src/CONVERTOR/VISU_Convertor_impl.hxx b/src/CONVERTOR/VISU_Convertor_impl.hxx index 989329f8..623f3680 100644 --- a/src/CONVERTOR/VISU_Convertor_impl.hxx +++ b/src/CONVERTOR/VISU_Convertor_impl.hxx @@ -53,18 +53,26 @@ namespace VISU //--------------------------------------------------------------- - struct TSource: virtual TSizeCounter + class TSource: public virtual TSizeCounter { + mutable TVTKSource mySource; + public: TSource(); - TVTKSource mySource; + + const TVTKSource& + GetSource() const; }; //--------------------------------------------------------------- - struct TAppendFilter: virtual TIsVTKDone + struct TAppendFilter: public virtual TIsVTKDone { + mutable TVTKAppendFilter myFilter; + public: TAppendFilter(); - TVTKAppendFilter myFilter; + + const TVTKAppendFilter& + GetFilter() const; }; diff --git a/src/CONVERTOR/VISU_MedConvertor.cxx b/src/CONVERTOR/VISU_MedConvertor.cxx index 5f579fec..aac143c6 100644 --- a/src/CONVERTOR/VISU_MedConvertor.cxx +++ b/src/CONVERTOR/VISU_MedConvertor.cxx @@ -47,10 +47,10 @@ using MED::TFloat; using MED::EBooleen; #ifdef _DEBUG_ -static int MYDEBUG = 1; +static int MYDEBUG = 0; static int MYVALUEDEBUG = 0; -static int MY_FAMILY_DEBUG = 1; -static int MY_GROUP_DEBUG = 1; +static int MY_FAMILY_DEBUG = 0; +static int MY_GROUP_DEBUG = 0; #else static int MYDEBUG = 0; static int MYVALUEDEBUG = 0; @@ -384,8 +384,7 @@ namespace void BuildMeshOnEntityMap(PMEDMesh theMesh, - TFamilyCounterMap& theFamilyNbCellsCounterMap, - TFamilyCounterMap& theFamilyCellsSizeCounterMap, + TFamilyCounterMap& theFamilyID2CellsSize, const MED::TEntityInfo& theEntityInfo, MED::PNodeInfo theNodeInfo, MED::PWrapper theMEDWrapper) @@ -416,10 +415,8 @@ namespace for(TInt iElem = 0; iElem < theMesh->myNbPoints; iElem++){ TInt aFamId = theNodeInfo->GetFamNum(iElem); - if(aFamId != 0){ - theFamilyNbCellsCounterMap[aFamId] += 1; - theFamilyCellsSizeCounterMap[aFamId] += 2; - } + if(aFamId != 0) + theFamilyID2CellsSize[aFamId] += 2; } INITMSG(MYDEBUG, @@ -449,10 +446,8 @@ namespace TInt aNbConn = aPolygoneInfo->GetNbConn(anElemId); aMeshOnEntity->myCellsSize += aNbConn; TInt aFamId = aPolygoneInfo->GetFamNum(anElemId); - if(aFamId != 0){ - theFamilyNbCellsCounterMap[aFamId] += 1; - theFamilyCellsSizeCounterMap[aFamId] += aNbConn + 1; - } + if(aFamId != 0) + theFamilyID2CellsSize[aFamId] += aNbConn + 1; } break; } @@ -477,10 +472,8 @@ namespace } aMeshOnEntity->myCellsSize += aCellSize; TInt aFamId = aPolyedreInfo->GetFamNum(anElemId); - if(aFamId != 0){ - theFamilyNbCellsCounterMap[aFamId] += 1; - theFamilyCellsSizeCounterMap[aFamId] += aCellSize + 1; - } + if(aFamId != 0) + theFamilyID2CellsSize[aFamId] += aCellSize + 1; } break; } @@ -501,10 +494,8 @@ namespace for(TInt iElem = 0; iElem < aNbElem; iElem++){ TInt aFamId = aCellInfo->GetFamNum(iElem); - if(aFamId != 0){ - theFamilyNbCellsCounterMap[aFamId] += 1; - theFamilyCellsSizeCounterMap[aFamId] += aVNbNodes + 1; - } + if(aFamId != 0) + theFamilyID2CellsSize[aFamId] += aVNbNodes + 1; } }} // end switch(...) } @@ -595,26 +586,25 @@ namespace //--------------------------------------------------------------- void BuildFamilyMap(PMEDMesh theMesh, - const TFamilyCounterMap& theFamilyNbCellsCounterMap, - const TFamilyCounterMap& theFamilyCellsSizeCounterMap, + const TFamilyCounterMap& theFamilyID2CellsSize, const MED::TEntityInfo& theEntityInfo, - const MED::TElemGroup& theElemGroup, - const MED::TFamilyGroup& theFamilyGroup, + const MED::TEntity2TGeom2ElemInfo& theEntity2TGeom2ElemInfo, + const MED::TFamilyInfoSet& theFamilyInfoSet, MED::PWrapper theMEDWrapper) { + INITMSG(MYDEBUG,"BuildFamilyMap\n"); MED::PMeshInfo aMeshInfo = theMesh->myMeshInfo; - MED::TFamilyByEntity aFamilyByEntity = MED::GetFamiliesByEntity(theMEDWrapper,theElemGroup,theFamilyGroup); - MED::TFamilyByEntity::const_iterator aFamilyByEntityIter = aFamilyByEntity.begin(); - INITMSG(MY_FAMILY_DEBUG,"BuildFamilyMap:\n"); - for(; aFamilyByEntityIter != aFamilyByEntity.end(); aFamilyByEntityIter++){ - const MED::EEntiteMaillage& aMEntity = aFamilyByEntityIter->first; - const MED::TFamilyGroup& aFamilyGroup = aFamilyByEntityIter->second; + MED::TEntity2FamilySet aEntity2FamilySet = MED::GetEntity2FamilySet(theMEDWrapper,theEntity2TGeom2ElemInfo,theFamilyInfoSet); + MED::TEntity2FamilySet::const_iterator aEntity2FamilySetIter = aEntity2FamilySet.begin(); + for(; aEntity2FamilySetIter != aEntity2FamilySet.end(); aEntity2FamilySetIter++){ + const MED::EEntiteMaillage& aMEntity = aEntity2FamilySetIter->first; + const MED::TFamilyTSizeSet& aFamilyTSizeSet = aEntity2FamilySetIter->second; TEntity aVEntity = MEDEntityToVTK(aMEntity); PMEDMeshOnEntity aMeshOnEntity = theMesh->myMeshOnEntityMap[aVEntity]; TFamilyMap& aFamilyMap = aMeshOnEntity->myFamilyMap; - if(aFamilyGroup.empty()) + if(aFamilyTSizeSet.empty()) continue; INITMSG(MY_FAMILY_DEBUG, @@ -622,52 +612,111 @@ namespace "; aVEntity = "<GetId() == 0) + MED::TFamilyTSizeSet::const_iterator aFamilyTSizeSetIter = aFamilyTSizeSet.begin(); + for(; aFamilyTSizeSetIter != aFamilyTSizeSet.end(); aFamilyTSizeSetIter++){ + const MED::TFamilyTSize& aFamilyTSize = *aFamilyTSizeSetIter; + const MED::PFamilyInfo& aFamilyInfo = boost::get<0>(aFamilyTSize); + TInt aSize = boost::get<1>(aFamilyTSize); + if(aFamilyInfo->GetId() == 0) continue; TInt anId = aFamilyInfo->GetId(); std::string aFamilyName = aFamilyInfo->GetName(); - PMEDFamily aFamily = aFamilyMap[aFamilyName](new TMEDFamily()); + PMEDFamily aFamily = aFamilyMap[aFamilyName](new TMEDFamily()); aFamily->myId = anId; - aFamily->myName = aFamilyInfo->GetName(); aFamily->myEntity = aVEntity; - { - aFamily->myNbCells = 0; - TFamilyCounterMap::const_iterator anIter = theFamilyNbCellsCounterMap.find(anId); - if(anIter != theFamilyNbCellsCounterMap.end()) - aFamily->myNbCells = anIter->second; - } - { - aFamily->myCellsSize = 0; - TFamilyCounterMap::const_iterator anIter = theFamilyCellsSizeCounterMap.find(anId); - if(anIter != theFamilyCellsSizeCounterMap.end()) - aFamily->myCellsSize = anIter->second; - } + aFamily->myNbCells = aSize; + + aFamily->myCellsSize = 0; + TFamilyCounterMap::const_iterator anIter = theFamilyID2CellsSize.find(anId); + if(anIter != theFamilyID2CellsSize.end()) + aFamily->myCellsSize = anIter->second; INITMSG(MY_FAMILY_DEBUG, - "- aFamilyName = '"<myName<<"'"<< + "- aFamilyName = '"<myGroupMap; + MED::TGroupInfo aGroupInfo = MED::GetGroupInfo(theFamilyInfoSet); + MED::TGroupInfo::const_iterator aGroupInfoIter = aGroupInfo.begin(); + for(; aGroupInfoIter != aGroupInfo.end(); aGroupInfoIter++){ + const std::string& aGroupName = aGroupInfoIter->first; + INITMSG(MY_GROUP_DEBUG,"aGroupName = '"<second; + MED::TFamilyInfoSet::const_iterator aFamilyIter = aFamilyInfoSet.begin(); + for(; aFamilyIter != aFamilyInfoSet.end(); aFamilyIter++){ + const MED::PFamilyInfo& aFamilyInfo = *aFamilyIter; + const std::string& aFamilyName = aFamilyInfo->GetName(); + + TEntity aVEntity = TEntity(-1); + PMEDFamily aFamily; + + // Find aVisuEntity + const TMeshOnEntityMap& aMeshOnEntityMap = theMesh->myMeshOnEntityMap; + TMeshOnEntityMap::const_iterator aMeshOnEntityIter = aMeshOnEntityMap.begin(); + for(; aMeshOnEntityIter != aMeshOnEntityMap.end(); aMeshOnEntityIter++){ + const PMeshOnEntity& aMeshOnEntity = aMeshOnEntityIter->second; + const TFamilyMap& aFamilyMap = aMeshOnEntity->myFamilyMap; + TFamilyMap::const_iterator aFamilyMapIter = aFamilyMap.begin(); + for(; aFamilyMapIter != aFamilyMap.end(); aFamilyMapIter++){ + const std::string& aName = aFamilyMapIter->first; + aFamily = aFamilyMapIter->second; + if(aName == aFamilyName){ + aVEntity = aFamily->myEntity; + goto exit_lable; + } + } + } + exit_lable: + if(aFamily && aVEntity >= 0){ + aGroup->myFamilyAndEntitySet.insert(TFamilyAndEntity(aFamilyName,aVEntity)); + INITMSG(MY_GROUP_DEBUG, + "- aFamilyName = '"<myNbCells += aFamily->myNbCells; + aGroup->myCellsSize += aFamily->myCellsSize; + } + } + if(!aGroup->myFamilyAndEntitySet.empty() && aGroup->myNbCells > 0){ + BEGMSG(MY_GROUP_DEBUG, + "- myNbCells = "<myNbCells<< + "; myCellsSize = "<myCellsSize<< + "\n"); + aGroupMap.insert(VISU::TGroupMap::value_type(aGroupName,aGroup)); } } } + } @@ -713,7 +762,8 @@ VISU_MedConvertor MED::TEntityInfo aEntityInfo = aMed->GetEntityInfo(aMeshInfo); - MED::TElemGroup anElemGroup = MED::GetElemsByEntity(aMed,aMeshInfo,aEntityInfo); + MED::TEntity2TGeom2ElemInfo anEntity2TGeom2ElemInfo = + MED::GetEntity2TGeom2ElemInfo(aMed,aMeshInfo,aEntityInfo); // creating TMesh structure and TMeshOnEntityMap TInt aDim = aMeshInfo->GetDim(); @@ -731,11 +781,10 @@ VISU_MedConvertor "; aDim = "<myGroupMap; - MED::TGroupInfo aGroupInfo = GetFamiliesByGroup(aFamilyGroup); - MED::TGroupInfo::const_iterator aGroupInfoIter = aGroupInfo.begin(); - for(; aGroupInfoIter != aGroupInfo.end(); aGroupInfoIter++){ - const std::string& aGroupName = aGroupInfoIter->first; - const MED::TFamilyGroup& aFamilyGroup = aGroupInfoIter->second; - PMEDGroup aGroup(new TMEDGroup()); - aGroup->myName = aGroupName; - aGroup->myMeshName = aMesh->myName; - - INITMSG(MY_GROUP_DEBUG,"aGroup->myName = '"<myName<<"'\n"); - - MED::TFamilyGroup::const_iterator aFamilyIter = aFamilyGroup.begin(); - for(; aFamilyIter != aFamilyGroup.end(); aFamilyIter++){ - const MED::PFamilyInfo& aFamilyInfo = *aFamilyIter; - const std::string& aFamilyName = aFamilyInfo->GetName(); - - TEntity aVEntity = TEntity(-1); - PMEDFamily aFamily; - - // Find aVisuEntity - const TMeshOnEntityMap& aMeshOnEntityMap = aMesh->myMeshOnEntityMap; - TMeshOnEntityMap::const_iterator aMeshOnEntityIter = aMeshOnEntityMap.begin(); - for(; aMeshOnEntityIter != aMeshOnEntityMap.end(); aMeshOnEntityIter++){ - const PMeshOnEntity& aMeshOnEntity = aMeshOnEntityIter->second; - const TFamilyMap& aFamilyMap = aMeshOnEntity->myFamilyMap; - TFamilyMap::const_iterator aFamilyMapIter = aFamilyMap.begin(); - for(; aFamilyMapIter != aFamilyMap.end(); aFamilyMapIter++){ - const std::string& aName = aFamilyMapIter->first; - aFamily = aFamilyMapIter->second; - if(aName == aFamilyName){ - aVEntity = aFamily->myEntity; - goto exit_lable; - } - } - } - exit_lable: - if(aFamily && aVEntity >= 0){ - aGroup->myFamilyAndEntitySet.insert(TFamilyAndEntity(aFamilyName,aVEntity)); - INITMSG(MY_GROUP_DEBUG, - "aFamilyName = '"<myName<<"'"<< - "; aVEntity = "<myNbCells += aFamily->myNbCells; - aGroup->myCellsSize += aFamily->myCellsSize; - } - } - if(!aGroup->myFamilyAndEntitySet.empty() && aGroup->myNbCells > 0){ - BEGMSG(MY_GROUP_DEBUG, - "myNbCells = "<myNbCells<< - "; myCellsSize = "<myCellsSize<< - "\n"); - aGroupMap.insert(VISU::TGroupMap::value_type(aGroupName,aGroup)); - } - } #ifndef _DEXCEPT_ }catch(std::exception& exc){ MSG(MYDEBUG,"Follow exception was occured in:\n"<