Salome HOME
23373: [CEA 1170] Optimization of a 3D mesh using MG-Tetra (note 0022387)
authoreap <eap@opencascade.com>
Wed, 31 Oct 2018 12:01:25 +0000 (15:01 +0300)
committereap <eap@opencascade.com>
Wed, 31 Oct 2018 12:01:25 +0000 (15:01 +0300)
always provide memory options for MG-Tetra Optimization

src/GHS3DPlugin/GHS3DPlugin_OptimizerHypothesis.cxx

index d183a140d8343a00e0427a6d4121ef4d71fae6f6..88f8f003dc670ad4b8298fead711f45d356d4129 100644 (file)
@@ -155,6 +155,12 @@ std::string GHS3DPlugin_OptimizerHypothesis::CommandToRun(const GHS3DPlugin_Opti
 {
   SMESH_Comment cmd( GetExeName() );
 
+  cmd << " --max_memory "
+      << (( hyp && hyp->myMaximumMemory > 0 ) ? hyp->myMaximumMemory : DefaultMaximumMemory());
+
+  cmd << " --automatic_memory "
+      << (( hyp && hyp->myInitialMemory > 0 ) ? hyp->myInitialMemory : 100.0 );
+
   if ( hyp )
   {
     const char* mode[3] = { "no", "yes", "only" };
@@ -187,12 +193,6 @@ std::string GHS3DPlugin_OptimizerHypothesis::CommandToRun(const GHS3DPlugin_Opti
     if ( !hyp->myToCreateNewNodes )
       cmd << " --no_internal_points";
 
-    if ( hyp->myMaximumMemory > 0 )
-      cmd << " --max_memory " << hyp->myMaximumMemory;
-
-    if ( hyp->myInitialMemory > 0 )
-      cmd << " --automatic_memory " << hyp->myInitialMemory;
-
     cmd << " --verbose " << hyp->myVerboseLevel;
     
     cmd << " " << hyp->myTextOption;