mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-27 09:50:34 +05:00
progress bar: fix for viscous layers
This commit is contained in:
parent
27a1dc566b
commit
9a4f5e4852
@ -1486,12 +1486,16 @@ double SMESH_Mesh::GetComputeProgress() const
|
|||||||
currentSubIds.Add( smToCompute[i]->GetId() );
|
currentSubIds.Add( smToCompute[i]->GetId() );
|
||||||
}
|
}
|
||||||
double rate = algo->GetProgress();
|
double rate = algo->GetProgress();
|
||||||
if ( !( 0. < rate && rate < 1.001 ))
|
if ( 0. < rate && rate < 1.001 )
|
||||||
|
{
|
||||||
|
computedCost += rate * ( algoDoneCost + algoNotDoneCost );
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
rate = algo->GetProgressByTic();
|
rate = algo->GetProgressByTic();
|
||||||
|
computedCost += algoDoneCost + rate * algoNotDoneCost;
|
||||||
}
|
}
|
||||||
// cout << "rate: "<<rate << " algoNotDoneCost: " << algoNotDoneCost << endl;
|
// cout << "rate: "<<rate << " algoNotDoneCost: " << algoNotDoneCost << endl;
|
||||||
computedCost += algoDoneCost + rate * algoNotDoneCost;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// get cost of already treated sub-meshes
|
// get cost of already treated sub-meshes
|
||||||
|
@ -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() )
|
for ( TopExp_Explorer vert(F,TopAbs_VERTEX); !uvOK && vert.More(); vert.Next() )
|
||||||
uvOK = ( V == vert.Current() );
|
uvOK = ( V == vert.Current() );
|
||||||
if ( !uvOK ) {
|
if ( !uvOK ) {
|
||||||
#ifdef _DEBUG_
|
|
||||||
MESSAGE ( "SMESH_MesherHelper::GetNodeUV(); Vertex " << vertexID
|
MESSAGE ( "SMESH_MesherHelper::GetNodeUV(); Vertex " << vertexID
|
||||||
<< " not in face " << GetMeshDS()->ShapeToIndex( F ) );
|
<< " not in face " << GetMeshDS()->ShapeToIndex( F ) );
|
||||||
#endif
|
|
||||||
// get UV of a vertex closest to the node
|
// get UV of a vertex closest to the node
|
||||||
double dist = 1e100;
|
double dist = 1e100;
|
||||||
gp_Pnt pn = XYZ( n );
|
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
|
double r = Max( 0.5, 1 - tol*n->GetID()); // to get a unique u on edge
|
||||||
u = f*r + l*(1-r);
|
u = f*r + l*(1-r);
|
||||||
MESSAGE("curve.IsNull: " << u);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -966,7 +963,6 @@ bool SMESH_MesherHelper::CheckNodeU(const TopoDS_Edge& E,
|
|||||||
}
|
}
|
||||||
else if ( fabs( u ) > numeric_limits<double>::min() )
|
else if ( fabs( u ) > numeric_limits<double>::min() )
|
||||||
{
|
{
|
||||||
MESSAGE("fabs( u ) > numeric_limits<double>::min() ; u " << u << " f " << f << " l " << l);
|
|
||||||
setPosOnShapeValidity( shapeID, true );
|
setPosOnShapeValidity( shapeID, true );
|
||||||
}
|
}
|
||||||
if (( u < f-tol || u > l+tol ) && force )
|
if (( u < f-tol || u > l+tol ) && force )
|
||||||
@ -4677,4 +4673,3 @@ void SMESH_MesherHelper::FixQuadraticElements(SMESH_ComputeErrorPtr& compError,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user