From 122032657d9e4b2d22681007035591707e7f6c55 Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 24 Aug 2016 20:46:51 +0300 Subject: [PATCH] 53538: Salome application crashes after computing mesh --- src/GHS3DPRLPlugin/MG_TetraHPC_API.cxx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/GHS3DPRLPlugin/MG_TetraHPC_API.cxx b/src/GHS3DPRLPlugin/MG_TetraHPC_API.cxx index 6bd90d5..df33404 100644 --- a/src/GHS3DPRLPlugin/MG_TetraHPC_API.cxx +++ b/src/GHS3DPRLPlugin/MG_TetraHPC_API.cxx @@ -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; } -- 2.39.2