Adaptation to NETGEN_Remote

This commit is contained in:
Yoann Audouin 2022-09-21 15:26:21 +02:00
parent 2a4b66bc50
commit 7e9c7d9eac

View File

@ -1507,10 +1507,7 @@ bool SMESH_subMesh::ComputeStateEngine(compute_event event)
{ {
algo = GetAlgo(); algo = GetAlgo();
ASSERT(algo); ASSERT(algo);
if(!_father->IsParallel()) ret = algo->CheckHypothesis((*_father), _subShape, hyp_status);
ret = algo->CheckHypothesis((*_father), _subShape, hyp_status);
else
ret = true;
if (!ret) if (!ret)
{ {
MESSAGE("***** verify compute state *****"); MESSAGE("***** verify compute state *****");
@ -1519,8 +1516,9 @@ bool SMESH_subMesh::ComputeStateEngine(compute_event event)
break; break;
} }
TopoDS_Shape shape = _subShape; TopoDS_Shape shape = _subShape;
if(!_father->IsParallel()) _father->Lock();
algo->SubMeshesToCompute().assign( 1, this ); algo->SubMeshesToCompute().assign( 1, this );
_father->Unlock();
// check submeshes needed // check submeshes needed
// In parallel there would be no submesh to check // In parallel there would be no submesh to check
if (_father->HasShapeToMesh() && !_father->IsParallel()) { if (_father->HasShapeToMesh() && !_father->IsParallel()) {
@ -1741,8 +1739,7 @@ bool SMESH_subMesh::ComputeStateEngine(compute_event event)
updateDependantsState( SUBMESH_COMPUTED ); updateDependantsState( SUBMESH_COMPUTED );
} }
// let algo clear its data gathered while algo->Compute() // let algo clear its data gathered while algo->Compute()
if(!_father->IsParallel()) algo->CheckHypothesis((*_father), _subShape, hyp_status);
algo->CheckHypothesis((*_father), _subShape, hyp_status);
} }
break; break;
case COMPUTE_CANCELED: // nothing to do case COMPUTE_CANCELED: // nothing to do