Salome HOME
53538: Salome application crashes after computing mesh
authoreap <eap@opencascade.com>
Wed, 24 Aug 2016 17:46:51 +0000 (20:46 +0300)
committereap <eap@opencascade.com>
Wed, 24 Aug 2016 17:46:51 +0000 (20:46 +0300)
src/GHS3DPRLPlugin/MG_TetraHPC_API.cxx

index 6bd90d529b820be310cda4a7a5f7f3d1eafb8a62..df334044bb62c6326b7def05eb30b7e62371fcf7 100644 (file)
@@ -398,12 +398,12 @@ struct MG_TetraHPC_API::LibData
 
   int IsVertexRequired( int iNode )
   {
-    return ! ( iNode < int( _xyz.size() - _nodeSize.size() ));
+    return ! ( iNode < int( NbNodes() - _nodeSize.size() ));
   }
 
   double GetSizeAtVertex( int iNode )
   {
-    return IsVertexRequired( iNode ) ? _nodeSize[ iNode - _xyz.size() + _nodeSize.size() ] : 0.;
+    return IsVertexRequired( iNode ) ? _nodeSize[ iNode - NbNodes() + _nodeSize.size() ] : 0.;
   }
 };
 
@@ -733,7 +733,12 @@ bool MG_TetraHPC_API::Compute( const std::string& cmdLine )
     }
 
     // compute
-    return _libData->Compute( outFile );
+    bool ok =  _libData->Compute( outFile );
+
+    GetLog(); // write a log file
+    _logFile = ""; // not to write it again
+
+    return ok;
 #endif
   }
 
@@ -745,9 +750,6 @@ bool MG_TetraHPC_API::Compute( const std::string& cmdLine )
   //   errStr = SMESH_Comment("system(mg-tetra.exe ...) command failed with error: ")
   //     << strerror( errno );
 
-  // GetLog(); // write a log file
-  // _logFile = ""; // not to write it again
-
   return false;
 }