- void setVerbosityLevel(int verbosity);
- int getVerbosityLevel();
-
- void setRemoveOnSuccess(bool mybool);
- bool getRemoveOnSuccess();
-
- MgAdaptHypothesisData* getData() const;
-
- void setUseLocalMap(bool mybool);
- bool getUseLocalMap();
-
- void setUseBackgroundMap(bool mybool);
- bool getUseBackgroundMap();
-
- void setUseConstantValue(bool mybool);
- bool getUseConstantValue();
-
- void setConstantValue(double cnst);
- double getConstantValue() const;
-
- void setSizeMapFile(std::string mapFile);
- std::string getSizeMapFile();
-
- void setFromMedFile(bool mybool);
- bool isFromMedFile();
-
- void setKeepWorkingFiles(bool mybool);
- bool getKeepWorkingFiles();
-
- void setPrintLogInFile(bool mybool);
- bool getPrintLogInFile();
-
- void setWorkingDir(std::string dir);
- std::string getWorkingDir() const;
-
-
- bool setAll();
- static std::string getCommandToRun(MgAdapt* );
- std::string getCommandToRun() ;
- int compute(std::string& errStr);
- std::string getFileName() const;
- static std::string getExeName();
- void copyMgAdaptHypothesisData( const MgAdaptHypothesisData* from) ;
-
- void checkDirPath(std::string& dirPath);
-
- bool hasOptionDefined( const std::string& optionName ) const;
- void setOptionValue(const std::string& optionName,
- const std::string& optionValue) throw (std::invalid_argument);
- std::string getOptionValue(const std::string& optionName,
- bool* isDefault=0) const throw (std::invalid_argument);
- std::vector <std::string> getCustomOptionValuesStrVec() const;
- std::vector <std::string> getOptionValuesStrVec() const;
-
-
- TOptionValues getOptionValues() const;
- const TOptionValues& getCustomOptionValues() const ;
- static double toDbl(const std::string&, bool* isOk = 0) throw (std::invalid_argument);
- static bool toBool(const std::string&, bool* isOk = 0) throw (std::invalid_argument);
- static int toInt(const std::string&, bool* isOk = 0 ) throw (std::invalid_argument);
- static std::string toLowerStr(const std::string& str);
-
-
- /* default values */
- static std::string defaultWorkingDirectory();
- static std::string defaultLogFile();
- static bool defaultKeepFiles();
- static bool defaultRemoveLogOnSuccess();
- static int defaultVerboseLevel();
- static bool defaultPrintLogInFile();
- static bool defaultFromMedFile();
- static bool defaultMeshOutMed();
- static bool defaultPublish();
- static bool defaultUseLocalMap();
- static bool defaultUseBackgroundMap();
- static bool defaultUseConstantValue();
- static bool defaultUseNoTimeStep();
- static bool defaultUseLastTimeStep();
- static bool defaultUseChosenTimeStep();
- static double defaultMaximumMemory();
- static bool isFileExist(const std::string& fName);
-
-
-
-
- enum Status {
- DRS_OK,
- DRS_EMPTY, // a file contains no mesh with the given name
- DRS_WARN_RENUMBER, // a file has overlapped ranges of element numbers,
- // so the numbers from the file are ignored
- DRS_WARN_SKIP_ELEM, // some elements were skipped due to incorrect file data
- DRS_WARN_DESCENDING, // some elements were skipped due to descending connectivity
- DRS_FAIL, // general failure (exception etc.)
- DRS_NO_TIME_STEP // general failure (exception etc.)
- };
-
- struct group {
-
- std::string _name;
- std::vector<MEDCoupling::mcIdType> _famListId;
- std::vector<std::string> _famNames;
- group(std::string name, std::vector<MEDCoupling::mcIdType> famListId, std::vector<std::string> famNames):_name(name)
- {
- std::vector<MEDCoupling::mcIdType>::iterator it = famListId.begin();
- for (; it!=famListId.end(); ++it)
- _famListId.push_back(*it);
-
- std::vector<std::string>::iterator itt = famNames.begin();
- for (; itt!=famNames.end(); ++itt)
- _famNames.push_back(*itt);
- }
- };
-
- struct family {
- std::string _famName;
- mcIdType _famId;
- family(std::string famName, MEDCoupling::mcIdType famId):_famName(famName), _famId(famId) {}
- };
+ void setTimeStepRankLast();
+ void setNoTimeStep();
+ void setChosenTimeStepRank();
+ void updateTimeStepRank();
+
+ void setLogFile(std::string);
+ std::string getLogFile();
+
+ void setVerbosityLevel(int verbosity);
+ int getVerbosityLevel();
+
+ void setRemoveOnSuccess(bool mybool);
+ bool getRemoveOnSuccess();
+
+ MgAdaptHypothesisData* getData() const;
+
+ void setUseLocalMap(bool mybool);
+ bool getUseLocalMap();
+
+ void setUseBackgroundMap(bool mybool);
+ bool getUseBackgroundMap();
+
+ void setUseConstantValue(bool mybool);
+ bool getUseConstantValue();
+
+ void setConstantValue(double cnst);
+ double getConstantValue() const;
+
+ void setSizeMapFile(std::string mapFile);
+ std::string getSizeMapFile();
+
+ void setFromMedFile(bool mybool);
+ bool isFromMedFile();
+
+ void setKeepWorkingFiles(bool mybool);
+ bool getKeepWorkingFiles();
+
+ void setPrintLogInFile(bool mybool);
+ bool getPrintLogInFile();
+
+ void setWorkingDir(std::string dir);
+ std::string getWorkingDir() const;
+
+
+ bool setAll();
+ static std::string getCommandToRun(MgAdapt* );
+ std::string getCommandToRun() ;
+ int compute(std::string& errStr);
+ std::string getFileName() const;
+ static std::string getExeName();
+ void copyMgAdaptHypothesisData( const MgAdaptHypothesisData* from) ;
+
+ void checkDirPath(std::string& dirPath);
+
+ bool hasOptionDefined( const std::string& optionName ) const;
+ void setOptionValue(const std::string& optionName,
+ const std::string& optionValue);
+ std::string getOptionValue(const std::string& optionName,
+ bool* isDefault=0) const;
+ std::vector <std::string> getCustomOptionValuesStrVec() const;
+ std::vector <std::string> getOptionValuesStrVec() const;
+
+
+ TOptionValues getOptionValues() const;
+ const TOptionValues& getCustomOptionValues() const ;
+ static double toDbl(const std::string&, bool* isOk = 0);
+ static bool toBool(const std::string&, bool* isOk = 0);
+ static int toInt(const std::string&, bool* isOk = 0 );
+ static std::string toLowerStr(const std::string& str);
+
+ /* default values */
+ static std::string defaultWorkingDirectory();
+ static std::string defaultLogFile();
+ static bool defaultKeepFiles();
+ static bool defaultRemoveLogOnSuccess();
+ static int defaultVerboseLevel();
+ static bool defaultPrintLogInFile();
+ static bool defaultFromMedFile();
+ static bool defaultMeshOutMed();
+ static bool defaultPublish();
+ static bool defaultUseLocalMap();
+ static bool defaultUseBackgroundMap();
+ static bool defaultUseConstantValue();
+ static bool defaultUseNoTimeStep();
+ static bool defaultUseLastTimeStep();
+ static bool defaultUseChosenTimeStep();
+ static double defaultMaximumMemory();
+
+ enum Status {
+ DRS_OK,
+ DRS_EMPTY, // a file contains no mesh with the given name
+ DRS_WARN_RENUMBER, // a file has overlapped ranges of element numbers,
+ // so the numbers from the file are ignored
+ DRS_WARN_SKIP_ELEM, // some elements were skipped due to incorrect file data
+ DRS_WARN_DESCENDING, // some elements were skipped due to descending connectivity
+ DRS_FAIL, // general failure (exception etc.)
+ DRS_NO_TIME_STEP // general failure (exception etc.)
+ };
+
+ struct group
+ {
+ std::string _name;
+ std::vector<int> _famListId;
+ std::vector<std::string> _famNames;
+ group(std::string name, std::vector<int> famListId, std::vector<std::string> famNames)
+ :_name(name), _famListId( famListId ), _famNames( famNames ) {}
+ };
+
+ struct family
+ {
+ std::string _famName;
+ int _famId;
+ family(std::string famName, int famId):_famName(famName), _famId(famId) {}
+ };