bos #29143 [CEA] Compute takes too much time in polyhedron per solid use case

more optimization: don't fill in uniDimAlgoShapes if no multi-dimensional
  algo assigned
This commit is contained in:
eap 2022-02-25 14:44:14 +03:00
parent 4a9dc0d210
commit f85bc0ab6f

View File

@ -332,9 +332,21 @@ bool SMESH_Gen::Compute(SMESH_Mesh & aMesh,
else
smWithAlgoSupportingSubmeshes[0].push_front( shDim2smIt->second );
// ======================================================
// Apply all-dimensional algorithms supporing sub-meshes
// ======================================================
std::vector< SMESH_subMesh* > smVec;
for ( aShapeDim = 0; aShapeDim < 4; ++aShapeDim )
smVec.insert( smVec.end(),
smWithAlgoSupportingSubmeshes[aShapeDim].begin(),
smWithAlgoSupportingSubmeshes[aShapeDim].end() );
// gather sub-shapes with local uni-dimensional algos (bos #29143)
// ----------------------------------------------------------------
TopTools_MapOfShape uniDimAlgoShapes;
if ( !smVec.empty() )
{
ShapeToHypothesis::Iterator s2hyps( aMesh.GetMeshDS()->GetHypotheses() );
for ( ; s2hyps.More(); s2hyps.Next() )
{
@ -357,16 +369,8 @@ bool SMESH_Gen::Compute(SMESH_Mesh & aMesh,
}
}
}
}
// ======================================================
// Apply all-dimensional algorithms supporing sub-meshes
// ======================================================
std::vector< SMESH_subMesh* > smVec;
for ( aShapeDim = 0; aShapeDim < 4; ++aShapeDim )
smVec.insert( smVec.end(),
smWithAlgoSupportingSubmeshes[aShapeDim].begin(),
smWithAlgoSupportingSubmeshes[aShapeDim].end() );
{
// ------------------------------------------------
// sort list of sub-meshes according to mesh order