Salome HOME
projects
/
modules
/
smesh.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
4cd676f
)
#16559 EDF - Changes to the Concatenate function: non regression test fails
author
eap
<eap@opencascade.com>
Wed, 13 Feb 2019 13:26:17 +0000
(16:26 +0300)
committer
eap
<eap@opencascade.com>
Wed, 13 Feb 2019 13:26:17 +0000
(16:26 +0300)
fix group management
src/SMESH/SMESH_Mesh.cxx
patch
|
blob
|
history
diff --git
a/src/SMESH/SMESH_Mesh.cxx
b/src/SMESH/SMESH_Mesh.cxx
index c4b6c65d1a0059743c6e46266e2befb11c34247e..660c3e69f94115e98824b30ace7a2e3f83f7da20 100644
(file)
--- a/
src/SMESH/SMESH_Mesh.cxx
+++ b/
src/SMESH/SMESH_Mesh.cxx
@@
-2038,8
+2038,7
@@
SMESH_Group* SMESH_Mesh::AddGroup (const SMDSAbs_ElementType theType,
SMESH_Group* aGroup = new SMESH_Group ( id, this, theType, theName, theShape, thePredicate );
GetMeshDS()->AddGroup( aGroup->GetGroupDS() );
_mapGroup[ id ] = aGroup;
SMESH_Group* aGroup = new SMESH_Group ( id, this, theType, theName, theShape, thePredicate );
GetMeshDS()->AddGroup( aGroup->GetGroupDS() );
_mapGroup[ id ] = aGroup;
- while ( _mapGroup.count( _groupId ))
- ++_groupId;
+ _groupId = 1 + _mapGroup.rbegin()->first;
return aGroup;
}
return aGroup;
}
@@
-2051,7
+2050,7
@@
SMESH_Group* SMESH_Mesh::AddGroup (const SMDSAbs_ElementType theType,
SMESH_Group* SMESH_Mesh::AddGroup (SMESHDS_GroupBase* groupDS) throw(SALOME_Exception)
{
SMESH_Group* SMESH_Mesh::AddGroup (SMESHDS_GroupBase* groupDS) throw(SALOME_Exception)
{
- if ( !groupDS )
+ if ( !groupDS )
throw SALOME_Exception(LOCALIZED ("SMESH_Mesh::AddGroup(): NULL SMESHDS_GroupBase"));
std::map <int, SMESH_Group*>::iterator i_g = _mapGroup.find( groupDS->GetID() );
throw SALOME_Exception(LOCALIZED ("SMESH_Mesh::AddGroup(): NULL SMESHDS_GroupBase"));
std::map <int, SMESH_Group*>::iterator i_g = _mapGroup.find( groupDS->GetID() );
@@
-2066,8
+2065,7
@@
SMESH_Group* SMESH_Mesh::AddGroup (SMESHDS_GroupBase* groupDS) throw(SALOME_Exce
_mapGroup[ groupDS->GetID() ] = aGroup;
GetMeshDS()->AddGroup( aGroup->GetGroupDS() );
_mapGroup[ groupDS->GetID() ] = aGroup;
GetMeshDS()->AddGroup( aGroup->GetGroupDS() );
- while ( _mapGroup.count( _groupId ))
- ++_groupId;
+ _groupId = 1 + _mapGroup.rbegin()->first;
return aGroup;
}
return aGroup;
}
@@
-2077,7
+2075,7
@@
SMESH_Group* SMESH_Mesh::AddGroup (SMESHDS_GroupBase* groupDS) throw(SALOME_Exce
/*!
* \brief Creates SMESH_Groups for not wrapped SMESHDS_Groups
* \retval bool - true if new SMESH_Groups have been created
/*!
* \brief Creates SMESH_Groups for not wrapped SMESHDS_Groups
* \retval bool - true if new SMESH_Groups have been created
- *
+ *
*/
//================================================================================
*/
//================================================================================
@@
-2093,8
+2091,8
@@
bool SMESH_Mesh::SynchronizeGroups()
if ( !_mapGroup.count( _groupId ))
_mapGroup[_groupId] = new SMESH_Group( groupDS );
}
if ( !_mapGroup.count( _groupId ))
_mapGroup[_groupId] = new SMESH_Group( groupDS );
}
-
while ( _mapGroup.count( _groupId )
)
-
++_groupId
;
+
if ( !_mapGroup.empty()
)
+
_groupId = 1 + _mapGroup.rbegin()->first
;
return nbGroups < _mapGroup.size();
}
return nbGroups < _mapGroup.size();
}