Salome HOME
022398: EDF 2783 SMESH: No end with viscous layer computation
[modules/smesh.git] / src / SMESH / SMESH_subMesh.cxx
index 1246c5fa39f8bd8c624fc745f96cd428513968af..c6e3d54647c8fa38c2310308fc7037f31d6533ea 100644 (file)
@@ -1561,6 +1561,9 @@ bool SMESH_subMesh::ComputeStateEngine(int event)
         }
         // Compute
 
+        // to restore cout that may be redirected by algo
+        std::streambuf* coutBuffer = std::cout.rdbuf();
+
         //cleanDependants(); for "UseExisting_*D" algos
         //removeSubMeshElementsAndNodes();
         loadDependentMeshes();
@@ -1568,9 +1571,8 @@ bool SMESH_subMesh::ComputeStateEngine(int event)
         _computeState = FAILED_TO_COMPUTE;
         _computeError = SMESH_ComputeError::New(COMPERR_OK,"",algo);
         try {
-#if OCC_VERSION_LARGE > 0x06010000
           OCC_CATCH_SIGNALS;
-#endif
+
           algo->InitComputeError();
 
           MemoryReserve aMemoryReserve;
@@ -1641,6 +1643,8 @@ bool SMESH_subMesh::ComputeStateEngine(int event)
           else
             ret = false;
         }
+        std::cout.rdbuf( coutBuffer ); // restore cout that could be redirected by algo
+
         // check if an error reported on any sub-shape
         bool isComputeErrorSet = !checkComputeError( algo, ret, shape );
         if ( isComputeErrorSet )