Salome HOME
Cleanup of parallel meshing + documentation
[modules/smesh.git] / src / SMESH / SMESH_subMesh.cxx
index ace4c6f1ffb0c69951362b10df5a96106fd4fcbc..bc3aa8792e0dfa6789bd966c8cfa0298d2ca9c5e 100644 (file)
@@ -63,10 +63,9 @@ using namespace std;
 
 #ifdef _DEBUG_
 // enable printing algo + shape id + hypo used while meshing
-//#define PRINT_WHO_COMPUTE_WHAT
+#define PRINT_WHO_COMPUTE_WHAT
 #endif
 
-//#define PRINT_WHO_COMPUTE_WHAT
 //=============================================================================
 /*!
  * \brief Allocate some memory at construction and release it at destruction.
@@ -1516,7 +1515,8 @@ bool SMESH_subMesh::ComputeStateEngine(compute_event event)
         TopoDS_Shape shape = _subShape;
         algo->setSubMeshesToCompute(this);
         // check submeshes needed
-        // In parallel there would be no submesh to check
+        // When computing in parallel mode we do not have a additional layer of submesh
+        // The check should not be done in parallel as that check is not thread-safe
         if (_father->HasShapeToMesh() && !_father->IsParallel()) {
           bool subComputed = false, subFailed = false;
           if (!algo->OnlyUnaryInput()) {
@@ -1646,11 +1646,9 @@ bool SMESH_subMesh::ComputeStateEngine(compute_event event)
 #ifdef PRINT_WHO_COMPUTE_WHAT
         for (subS.ReInit(); subS.More(); subS.Next())
         {
-          const std::list <const SMESHDS_Hypothesis *> & hyps
-          {
-            SMESH_MeshLocker myLocker(_father);
-            hyps = _algo->GetUsedHypothesis( *_father, _subShape );
-          }
+          SMESH_MeshLocker myLocker(_father);
+          const std::list <const SMESHDS_Hypothesis *> & hyps =
+              _algo->GetUsedHypothesis( *_father, _subShape );
           SMESH_Comment hypStr;
           if ( !hyps.empty() )
           {