while ( smIt->more() )
{
SMESH_subMesh* sm = smIt->next();
- const int smCost = sm->GetComputeCost();
- totalCost += smCost;
- if ( sm != curSM &&
- ( !sm->IsEmpty() ||
- sm->GetComputeState() == SMESH_subMesh::FAILED_TO_COMPUTE ))
+ if ( sm->GetComputeState() != SMESH_subMesh::NOT_READY )
{
- computedCost += smCost;
+ const int smCost = sm->GetComputeCost();
+ totalCost += smCost;
+ if ( sm != curSM &&
+ ( !sm->IsEmpty() ||
+ sm->GetComputeState() == SMESH_subMesh::FAILED_TO_COMPUTE ))
+ {
+ computedCost += smCost;
+ }
}
}
}
//cout << " rate: " << rate << " cost " << algo->GetComputeCost() << endl;
computedCost += rate * algo->GetComputeCost();
}
- else
+ else if ( curSM->IsEmpty() )
{
computedCost += algo->GetProgressByTic() * algo->GetComputeCost();
}
+ else
+ {
+ computedCost += 0.99 * algo->GetComputeCost();
+ }
}
//cout << "Total: " << totalCost << " progress: " << computedCost / totalCost << endl;
return computedCost / totalCost;