aFamilyArr.resize(aFamilySet.size());
for(vtkIdType anID = 0; anIter != aFamilySet.end(); anIter++, anID++){
- VISU::PFamilyImpl aFamily = *anIter;
+ VISU::PFamilyImpl aFamily = (*anIter).second;
const std::string& aFamilyName = aFamily->myName;
const VISU::TEntity& anEntity = aFamily->myEntity;
if(aName == aFamilyName){
aFamily = aFamilyMapIter->second;
aVEntity = aFamily->myEntity;
- goto exit_lable;
+ if(aFamily && aVEntity >= 0){
+ aFamilySet.insert(VISU::TEnity2Family(aVEntity, aFamily));
+ INITMSG(MY_GROUP_DEBUG,
+ "- aFamilyName = '"<<aFamilyName<<"'"<<
+ "; aVEntity = "<<aVEntity<<
+ "\n");
+ }
}
}
}
- exit_lable:
- if(aFamily && aVEntity >= 0){
- aFamilySet.insert(aFamily);
- INITMSG(MY_GROUP_DEBUG,
- "- aFamilyName = '"<<aFamilyName<<"'"<<
- "; aVEntity = "<<aVEntity<<
- "\n");
- }
}
if(!aFamilySet.empty())
aGroupMap.insert(VISU::TGroupMap::value_type(aGroupName,aGroup));
int isPointsUpdated = 0, isCellsOnEntityUpdated = 0;
VISU::TFamilySet::const_iterator aFamilyIter = theFamilySet.begin();
for(; aFamilyIter != theFamilySet.end(); aFamilyIter++){
- VISU::PMEDFamily aFamily = *aFamilyIter;
+ VISU::PMEDFamily aFamily = (*aFamilyIter).second;
const VISU::TEntity& anEntity = aFamily->myEntity;
const VISU::PMEDMeshOnEntity aMeshOnEntity = theMesh->myMeshOnEntityMap[anEntity];
isPointsUpdated += LoadPoints(myMed, theMesh);
bool VISU_CONVERTOR_EXPORT
operator<(const PFamily& theLeft, const PFamily& theRight);
- typedef std::set<PFamily> TFamilySet;
+ typedef std::pair<TEntity, PFamily> TEnity2Family;
+ typedef std::set<TEnity2Family> TFamilySet;
//! Define a basic class for MED GROUP entity
struct VISU_CONVERTOR_EXPORT TGroup: virtual TUnstructuredGridIDMapper
vtkIdType aNbCells = 0, aCellsSize = 0;
TFamilySet::const_iterator anIter = myFamilySet.begin();
for(; anIter != myFamilySet.end(); anIter++){
- PFamilyImpl aFamily = *anIter;
+ PFamilyImpl aFamily = (*anIter).second;
aNbCells += aFamily->myNbCells;
aCellsSize += aFamily->myCellsSize;
}
VISU::PCFamily aFamily = boost::get<2>(aFindFamilyOnEntity);
if(MYDEBUG) MESSAGE("VISU_MEDConvertor::Build - aGroup - aFamilyName = '"<<aFamilyName.in()<<"' = "<<bool(aFamily));
if(aFamily){
- aFamilySet.insert(aFamily);
+ aFamilySet.insert(VISU::TEnity2Family(aVEntity, aFamily));
}
}
int anIsUpdated = LoadPoints(theMesh);
VISU::TFamilySet::const_iterator aFamilyIter = theFamilySet.begin();
for(; aFamilyIter != theFamilySet.end(); aFamilyIter++){
- VISU::PCFamily aFamily = *aFamilyIter;
+ VISU::PCFamily aFamily = (*aFamilyIter).second;
const VISU::TEntity& aVEntity = aFamily->myEntity;
VISU::PCMeshOnEntity aMeshOnEntity = theMesh->myMeshOnEntityMap[aVEntity];
if(aVEntity == VISU::NODE_ENTITY){
const TFamilySet& aFamilySet = aGroup->myFamilySet;
TFamilySet::const_iterator aFamilyIter = aFamilySet.begin();
for(; aFamilyIter != aFamilySet.end(); aFamilyIter++){
- const PFamily& aFamily = *aFamilyIter;
+ const PFamily& aFamily = (*aFamilyIter).second;
CreateReference(theStudy,
aGroup->myEntry,
aFamily->myEntry);