X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESH%2FMG_ADAPT.cxx;h=48da103e37c698bd846e6ae661892639f8688863;hb=2f549d1c9a2a2791550d3f617354ade97d588a78;hp=739394b78da3bbc568a59b59d5f180f5c9f8b25d;hpb=499f29d24922cec66e41b41a0039a954993bc6df;p=modules%2Fsmesh.git diff --git a/src/SMESH/MG_ADAPT.cxx b/src/SMESH/MG_ADAPT.cxx index 739394b78..48da103e3 100644 --- a/src/SMESH/MG_ADAPT.cxx +++ b/src/SMESH/MG_ADAPT.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2020-2022 CEA/DEN, EDF R&D +// Copyright (C) 2020-2023 CEA, EDF // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -43,6 +43,7 @@ #include #include #include // unique_ptr +#include typedef SMESH_Comment ToComment; @@ -956,6 +957,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) @@ -1036,14 +1038,19 @@ std::string MgAdapt::getCommandToRun() if ( key.empty() ) return ToComment( "Problem with library SalomeMeshGemsKeyGenerator: " + errorTxt ); - cmd += " --key " + key; + if ( key!="0" ) + cmd += " --key " + key; } #ifdef WIN32 cmd += " < NUL"; #endif - // std::cout << "--- cmd :"<< std::endl; - // std::cout << cmd << std::endl; + + if (SALOME::VerbosityActivated()) + { + std::cout << "--- cmd :"<< std::endl; + std::cout << cmd << std::endl; + } return cmd; } @@ -1130,7 +1137,7 @@ std::string MgAdapt::getFileName() const aGenericName << _getpid(); #endif aGenericName << "_"; - aGenericName << std::abs((int)(long) aGenericName.data()); + aGenericName << std::chrono::system_clock::now().time_since_epoch().count(); return aGenericName; } @@ -1575,9 +1582,9 @@ MgAdapt::Status MgAdapt::addMessage(const std::string& msg, _errorMessages.push_back( msg ); //~MESSAGE(msg); -#ifdef _DEBUG_ - std::cout << msg << std::endl; -#endif + if (SALOME::VerbosityActivated()) + std::cout << msg << std::endl; + return ( _status = isFatal ? MgAdapt::DRS_FAIL : MgAdapt::DRS_WARN_SKIP_ELEM ); }