Salome HOME
progress bar: fix for viscous layers
authoreap <eap@opencascade.com>
Mon, 5 Aug 2013 12:30:05 +0000 (12:30 +0000)
committereap <eap@opencascade.com>
Mon, 5 Aug 2013 12:30:05 +0000 (12:30 +0000)
src/SMESH/SMESH_Mesh.cxx
src/SMESH/SMESH_MesherHelper.cxx

index bcddd46d52d707b398cf7b48fa5eaee7da38a1de..4ae04c64775e0d12dd4e132d5caf3a1169682bb5 100644 (file)
@@ -1486,12 +1486,16 @@ double SMESH_Mesh::GetComputeProgress() const
         currentSubIds.Add( smToCompute[i]->GetId() );
       }
       double rate = algo->GetProgress();
-      if ( !( 0. < rate && rate < 1.001 ))
+      if ( 0. < rate && rate < 1.001 )
+      {
+        computedCost += rate * ( algoDoneCost + algoNotDoneCost );
+      }
+      else
       {
         rate = algo->GetProgressByTic();
+        computedCost += algoDoneCost + rate * algoNotDoneCost;
       }
       // cout << "rate: "<<rate << " algoNotDoneCost: " << algoNotDoneCost << endl;
-      computedCost += algoDoneCost + rate * algoNotDoneCost;
     }
 
   // get cost of already treated sub-meshes
index 48bd275bea85c1ea85f127ffd677aa6a93b78c07..ea08fda34fe3c0a2efab714cd04d9ead8e1e5972 100644 (file)
@@ -600,10 +600,8 @@ gp_XY SMESH_MesherHelper::GetNodeUV(const TopoDS_Face&   F,
         for ( TopExp_Explorer vert(F,TopAbs_VERTEX); !uvOK && vert.More(); vert.Next() )
           uvOK = ( V == vert.Current() );
         if ( !uvOK ) {
-#ifdef _DEBUG_
           MESSAGE ( "SMESH_MesherHelper::GetNodeUV(); Vertex " << vertexID
-               << " not in face " << GetMeshDS()->ShapeToIndex( F ) );
-#endif
+                    << " not in face " << GetMeshDS()->ShapeToIndex( F ) );
           // get UV of a vertex closest to the node
           double dist = 1e100;
           gp_Pnt pn = XYZ( n );
@@ -909,7 +907,6 @@ bool SMESH_MesherHelper::CheckNodeU(const TopoDS_Edge&   E,
       {
         double r = Max( 0.5, 1 - tol*n->GetID()); // to get a unique u on edge
         u =  f*r + l*(1-r);
-        MESSAGE("curve.IsNull: " << u);
       }
     }
     else
@@ -966,7 +963,6 @@ bool SMESH_MesherHelper::CheckNodeU(const TopoDS_Edge&   E,
       }
       else if ( fabs( u ) > numeric_limits<double>::min() )
       {
-        MESSAGE("fabs( u ) > numeric_limits<double>::min() ; u " << u << " f " << f << " l " << l);
         setPosOnShapeValidity( shapeID, true );
       }
       if (( u < f-tol || u > l+tol ) && force )
@@ -4677,4 +4673,3 @@ void SMESH_MesherHelper::FixQuadraticElements(SMESH_ComputeErrorPtr& compError,
     }
   }
 }
-