Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
23544: SMESH's performance issues
[modules/smesh.git]
/
src
/
SMDS
/
SMDS_MeshGroup.cxx
diff --git
a/src/SMDS/SMDS_MeshGroup.cxx
b/src/SMDS/SMDS_MeshGroup.cxx
index 80e7c6080496b14e5f4204a5b896f620095f21d5..e2f5fbccfa3750effcc0dc1a29fc7f709339be65 100644
(file)
--- a/
src/SMDS/SMDS_MeshGroup.cxx
+++ b/
src/SMDS/SMDS_MeshGroup.cxx
@@
-45,7
+45,7
@@
SMDS_MeshGroup::SMDS_MeshGroup(const SMDS_Mesh * theMesh,
const SMDSAbs_ElementType theType)
SMDS_MeshGroup::SMDS_MeshGroup(const SMDS_Mesh * theMesh,
const SMDSAbs_ElementType theType)
- : SMDS_ElementHolder( theMesh ), myType(
theType), myTic(0
)
+ : SMDS_ElementHolder( theMesh ), myType(
theType ), myTic( 0
)
{
}
{
}
@@
-69,15
+69,15
@@
void SMDS_MeshGroup::Clear()
bool SMDS_MeshGroup::Add(const SMDS_MeshElement * theElem)
{
// the type of the group is determined by the first element added
bool SMDS_MeshGroup::Add(const SMDS_MeshElement * theElem)
{
// the type of the group is determined by the first element added
- if (
myElements.empty()
) {
+ if (
myElements.empty()
) {
myType = theElem->GetType();
}
myType = theElem->GetType();
}
- else if (
theElem->GetType() != myType
) {
+ else if (
theElem->GetType() != myType
) {
MESSAGE("SMDS_MeshGroup::Add : Type Mismatch "<<theElem->GetType()<<"!="<<myType);
return false;
}
MESSAGE("SMDS_MeshGroup::Add : Type Mismatch "<<theElem->GetType()<<"!="<<myType);
return false;
}
- myElements.insert(
theElem
);
+ myElements.insert(
theElem
);
++myTic;
return true;
++myTic;
return true;
@@
-88,12
+88,12
@@
bool SMDS_MeshGroup::Add(const SMDS_MeshElement * theElem)
//purpose :
//=======================================================================
//purpose :
//=======================================================================
-bool SMDS_MeshGroup::Remove(
const SMDS_MeshElement * theElem
)
+bool SMDS_MeshGroup::Remove(
const SMDS_MeshElement * theElem
)
{
TElementSet::iterator found = myElements.find(theElem);
if ( found != myElements.end() ) {
{
TElementSet::iterator found = myElements.find(theElem);
if ( found != myElements.end() ) {
- myElements.erase(
found
);
- if (
myElements.empty()
) myType = SMDSAbs_All;
+ myElements.erase(
found
);
+ if (
myElements.empty()
) myType = SMDSAbs_All;
++myTic;
return true;
}
++myTic;
return true;
}
@@
-102,12
+102,12
@@
bool SMDS_MeshGroup::Remove(const SMDS_MeshElement * theElem)
//=======================================================================
//function : Contains
//=======================================================================
//function : Contains
-//purpose :
+//purpose :
//=======================================================================
bool SMDS_MeshGroup::Contains(const SMDS_MeshElement * theElem) const
{
//=======================================================================
bool SMDS_MeshGroup::Contains(const SMDS_MeshElement * theElem) const
{
- return myElements.find(
theElem
) != myElements.end();
+ return myElements.find(
theElem
) != myElements.end();
}
//=======================================================================
}
//=======================================================================
@@
-152,6
+152,5
@@
void SMDS_MeshGroup::operator=( SMDS_MeshGroup && other )
void SMDS_MeshGroup::tmpClear()
{
void SMDS_MeshGroup::tmpClear()
{
- compact();
myElements.clear();
}
myElements.clear();
}