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
23418: [OCC] Mesh: Minimization of memory usage of SMESH
[modules/smesh.git]
/
src
/
DriverMED
/
DriverMED_R_SMESHDS_Mesh.cxx
diff --git
a/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx
b/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx
index 000316955a73241fe05852f971e80d25461f14b6..14a648c8a1843b5dc6fe80d6d232ba3840e6842d 100644
(file)
--- a/
src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx
+++ b/
src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx
@@
-273,7
+273,7
@@
Driver_Mesh::Status DriverMED_R_SMESHDS_Mesh::Perform()
if ( anIsElemNum && !aBallInfo->myElemNum->empty() )
maxID = *std::max_element( aBallInfo->myElemNum->begin(),
aBallInfo->myElemNum->end() );
if ( anIsElemNum && !aBallInfo->myElemNum->empty() )
maxID = *std::max_element( aBallInfo->myElemNum->begin(),
aBallInfo->myElemNum->end() );
- myMesh->
g
etGrid()->AllocateDiameters( maxID ); // performance optimization
+ myMesh->
G
etGrid()->AllocateDiameters( maxID ); // performance optimization
// create balls
SMDS_MeshElement* anElement;
// create balls
SMDS_MeshElement* anElement;
@@
-1038,8
+1038,6
@@
Driver_Mesh::Status DriverMED_R_SMESHDS_Mesh::Perform()
aResult = addMessage( "Unknown exception", /*isFatal=*/true );
}
#endif
aResult = addMessage( "Unknown exception", /*isFatal=*/true );
}
#endif
- if (myMesh)
- myMesh->compactMesh();
// Mantis issue 0020483
if (aResult == DRS_OK && isDescConn) {
// Mantis issue 0020483
if (aResult == DRS_OK && isDescConn) {
@@
-1137,6
+1135,14
@@
void DriverMED_R_SMESHDS_Mesh::GetGroup(SMESHDS_Group* theGroup)
if (( famVecPtr = myGroups2FamiliesMap.ChangeSeek( aGroupName )))
{
if (( famVecPtr = myGroups2FamiliesMap.ChangeSeek( aGroupName )))
{
+ size_t groupSize = 0;
+ for ( size_t i = 0; i < famVecPtr->size(); ++i )
+ {
+ DriverMED_FamilyPtr aFamily = (*famVecPtr)[i];
+ groupSize += aFamily->NbElements( theGroup->GetType() );
+ }
+ theGroup->SMDSGroup().Reserve( groupSize );
+
for ( size_t i = 0; i < famVecPtr->size(); ++i )
{
DriverMED_FamilyPtr aFamily = (*famVecPtr)[i];
for ( size_t i = 0; i < famVecPtr->size(); ++i )
{
DriverMED_FamilyPtr aFamily = (*famVecPtr)[i];