Salome HOME
some precisions
authorazakir <abdoulbari.zakir@csgroup.eu>
Tue, 19 Jan 2021 10:31:46 +0000 (11:31 +0100)
committerazakir <abdoulbari.zakir@csgroup.eu>
Tue, 19 Jan 2021 10:31:46 +0000 (11:31 +0100)
src/SMESH/MG_ADAPT.cxx

index 09a06ef867fb3146e6c08388306cd2a5d84061f2..2445d8cdba0ef42666fd66ca74baf6a9c7867b72 100644 (file)
@@ -758,12 +758,19 @@ void MgAdapt::execCmd( const char* cmd, int& err)
     }
     err = 0;
 }
-
+/*
+ * to delete tmp files .mesh, .sol and if needed  
+ * the log file
+ * 
+ */
 void MgAdapt::cleanUp()
 {
        int notOk;
        std::string errStr;
-       if(removeOnSuccess) tmpFilesToBeDeleted.push_back(logFile);
+       if(toKeepWorkingFiles)
+           return;
+       if(removeOnSuccess && printLogInFile) 
+           tmpFilesToBeDeleted.push_back(logFile);
        
        std::vector< std::string>::iterator it = tmpFilesToBeDeleted.begin();
        for (; it!=tmpFilesToBeDeleted.end(); ++it)
@@ -819,6 +826,7 @@ std::string MgAdapt::getCommandToRun()
 
     cmd+= " --in "+ meshIn;
     meshFormatOutputMesh = getFileName()+".mesh";
+    tmpFilesToBeDeleted.push_back(meshFormatOutputMesh);
     cmd+= " --out "+ meshFormatOutputMesh;
     if (useLocalMap || useConstantValue) cmd+= " --sizemap "+ solFileIn;
     else //  (useBackgroundMap)
@@ -840,6 +848,7 @@ std::string MgAdapt::getCommandToRun()
                std::string solFileOut = getFileName()+".sol";
         cmd+= " --write_sizemap "+ solFileOut;
                solFormatOutput.push_back(solFileOut);
+               tmpFilesToBeDeleted.push_back(solFileOut);
        } 
     if (verbosityLevel != defaultVerboseLevel())
     {