]> SALOME platform Git repositories - plugins/hybridplugin.git/commitdiff
Salome HOME
23418: [OCC] Mesh: Minimization of memory usage of SMESH V8_5_0b1
authoreap <eap@opencascade.com>
Fri, 22 Dec 2017 11:23:55 +0000 (14:23 +0300)
committereap <eap@opencascade.com>
Thu, 5 Apr 2018 14:42:49 +0000 (17:42 +0300)
src/HYBRIDPlugin/HYBRIDPlugin_HYBRID.cxx
src/HYBRIDPlugin/HYBRIDPlugin_Hypothesis.cxx
src/HYBRIDPlugin/HYBRIDPlugin_Hypothesis.hxx

index f7ea3f6a7cf2abc102be4f0711f43d5a10757ce6..2f1c1f42e9af25da929d613b68084b15fa012147 100644 (file)
@@ -611,7 +611,7 @@ static bool readGMFFile(MG_HYBRID_API*                          MGOutput,
           if (fullyCreatedElement) {
             aCreatedElem = theHelper->AddFace( node[0], node[1], node[2], noID, force3d );
             // add iElem < aFaceGroupByHybridId.size() to avoid crash if imprinting with hexa core with MeshGems <= 2.4-5
-            if ( !aFaceGroupByHybridId.empty() && iElem < aFaceGroupByHybridId.size() && !aFaceGroupByHybridId[iElem].empty() ) {
+            if ( iElem < (int)aFaceGroupByHybridId.size() && !aFaceGroupByHybridId[iElem].empty() ) {
               addElemInMeshGroup(theHelper->GetMesh(), aCreatedElem, aFaceGroupByHybridId[iElem], groupsToRemove);
             }
             // add element in shape for groups on geom to work
index e1a94837742836425ab1a5e071d281496c9508e7..c23cdd5abe49888aeca10cc375bc23cadf9568e4 100644 (file)
@@ -906,14 +906,6 @@ bool HYBRIDPlugin_Hypothesis::SetEnforcedElements(TIDSortedElemSet theElemSet, S
           elemRet = _enfEdges.insert(make_pair(elem,groupName));
           added = added && elemRet.second;
         }
-        else if (elem->GetType() > SMDSAbs_Edge) {
-          SMDS_ElemIteratorPtr it = elem->edgesIterator();
-          for (;it->more();) {
-            const SMDS_MeshElement* anEdge = it->next();
-            elemRet = _enfEdges.insert(make_pair(anEdge,groupName));
-            added = added && elemRet.second;
-          }
-        }
         break;
       case SMESH::FACE:
         if (elem->GetType() == SMDSAbs_Face)
@@ -923,16 +915,6 @@ bool HYBRIDPlugin_Hypothesis::SetEnforcedElements(TIDSortedElemSet theElemSet, S
             added = added && elemRet.second;
           }
         }
-        else if (elem->GetType() > SMDSAbs_Face) { // Group of faces
-          SMDS_ElemIteratorPtr it = elem->facesIterator();
-          for (;it->more();) {
-            const SMDS_MeshElement* aFace = it->next();
-            if (aFace->NbCornerNodes() == 3) {
-              elemRet = _enfTriangles.insert(make_pair(aFace,groupName));
-              added = added && elemRet.second;
-            }
-          }
-        }
         break;
       default:
         break;
index f732da82eb0e173b8499dd52ec42f8d8690161b8..2862586739585afcee9e6f6ff19ca155e6efa3b7 100644 (file)
@@ -111,7 +111,7 @@ public:
 
   struct TIDMeshIDCompare {
     bool operator () (const SMDS_MeshElement* e1, const SMDS_MeshElement* e2) const
-    { return e1->getMeshId() == e2->getMeshId() ? e1->GetID() < e2->GetID() : e1->getMeshId() < e2->getMeshId() ; }
+    { return e1->GetMesh() == e2->GetMesh() ? e1->GetID() < e2->GetID() : e1->GetMesh() < e2->GetMesh(); }
   };
   
   typedef std::map<const SMDS_MeshElement*, std::string, TIDMeshIDCompare > TIDSortedElemGroupMap;