Salome HOME
Adding SetNbThreads in Python to set if compute will be done in parallel
[modules/smesh.git] / src / SMESH / SMESH_subMesh.cxx
index 651b74af3317364d7fcf595184d49d12f17f4d2b..751cf8b791104e823d29969e7c0e2424d579bc7c 100644 (file)
@@ -271,8 +271,7 @@ bool SMESH_subMesh::IsMeshComputed() const
       TopExp_Explorer exp( _subShape, (TopAbs_ShapeEnum) type );
       for ( ; exp.More(); exp.Next() )
       {
-        SMESHDS_SubMesh * smDS = meshDS->MeshElements( exp.Current() );
-        if ( smDS )
+        if ( SMESHDS_SubMesh * smDS = meshDS->MeshElements( exp.Current() ) )
         {
           bool computed = (dim > 0) ? smDS->NbElements() : smDS->NbNodes();
           if ( computed )
@@ -1595,7 +1594,6 @@ bool SMESH_subMesh::ComputeStateEngine(compute_event event)
           }
           else
           {
-            // TODO: Replace by call to ParallelCompute
             ret = algo->Compute((*_father), shape);
           }
           // algo can set _computeError of submesh
@@ -1656,7 +1654,6 @@ bool SMESH_subMesh::ComputeStateEngine(compute_event event)
         bool isComputeErrorSet = !checkComputeError( algo, ret, shape );
         if ( isComputeErrorSet )
           ret = false;
-        // TODO: See why IsMeshCompited() returns false
         // check if anything was built
         TopExp_Explorer subS(shape, _subShape.ShapeType());
         if ( ret )
@@ -2053,9 +2050,7 @@ bool SMESH_subMesh::checkComputeError(SMESH_Algo*         theAlgo,
     if ( !_computeError || _computeError->IsOK() )
     {
       // no error description is set to this sub-mesh, check if any mesh is computed
-      //TODO: See why this does not work
-      //_computeState = IsMeshComputed() ? COMPUTE_OK : FAILED_TO_COMPUTE;
-      _computeState = COMPUTE_OK;
+      _computeState = IsMeshComputed() ? COMPUTE_OK : FAILED_TO_COMPUTE;
       if ( _computeState != COMPUTE_OK )
       {
         if ( _subShape.ShapeType() == TopAbs_EDGE &&