Salome HOME
bos #24596 [CEA] New MeshGems license
[plugins/hybridplugin.git] / src / HYBRIDPlugin / HYBRIDPlugin_Hypothesis.cxx
index 31bdd19bfcb347549108db2cd812af55316b7c47..e2f8e4df4f88baa46ef96a6fa484e6214f2f86cc 100644 (file)
@@ -945,26 +945,27 @@ bool HYBRIDPlugin_Hypothesis::SetEnforcedMesh(SMESH_Mesh& theMesh, SMESH::Elemen
 bool HYBRIDPlugin_Hypothesis::SetEnforcedGroup(const SMESHDS_Mesh* theMeshDS, SMESH::smIdType_array_var theIDs, SMESH::ElementType elementType, std::string name, std::string entry, std::string groupName)
 {
   TIDSortedElemSet theElemSet;
-    if ( theIDs->length() == 0 ){MESSAGE("The source group is empty");}
-    for ( SMESH::smIdType i = 0; i < theIDs->length(); i++) {
-      SMESH::smIdType ind = theIDs[i];
-      if (elementType == SMESH::NODE)
-      {
-        const SMDS_MeshNode * node = theMeshDS->FindNode(ind);
-        if (node)
-          theElemSet.insert( node );
-      }
-      else
-      {
-        const SMDS_MeshElement * elem = theMeshDS->FindElement(ind);
-        if (elem)
-          theElemSet.insert( elem );
-      }
+  if ( theIDs->length() == 0 ){MESSAGE("The source group is empty");}
+  for ( CORBA::ULong i = 0; i < theIDs->length(); i++)
+  {
+    SMESH::smIdType ind = theIDs[i];
+    if (elementType == SMESH::NODE)
+    {
+      const SMDS_MeshNode * node = theMeshDS->FindNode(ind);
+      if (node)
+        theElemSet.insert( node );
     }
+    else
+    {
+      const SMDS_MeshElement * elem = theMeshDS->FindElement(ind);
+      if (elem)
+        theElemSet.insert( elem );
+    }
+  }
 
-//   SMDS_ElemIteratorPtr it = theGroup->GetGroupDS()->GetElements();
-//   while ( it->more() ) 
-//     theElemSet.insert( it->next() );
+  //   SMDS_ElemIteratorPtr it = theGroup->GetGroupDS()->GetElements();
+  //   while ( it->more() )
+  //     theElemSet.insert( it->next() );
 
   bool added = SetEnforcedElements( theElemSet, elementType, groupName);
   if (added) {
@@ -973,7 +974,7 @@ bool HYBRIDPlugin_Hypothesis::SetEnforcedGroup(const SMESHDS_Mesh* theMeshDS, SM
     newEnfMesh->entry = entry;
     newEnfMesh->elementType = elementType;
     newEnfMesh->groupName = groupName;
-    
+
     THYBRIDEnforcedMeshList::iterator it = _enfMeshList.find(newEnfMesh);
     if (it == _enfMeshList.end()) {
       _entryEnfMeshMap[entry].insert(newEnfMesh);