70 void setMedFileIn(std::string fileName);
71 std::string getMedFileIn();
73 void setMedFileOut(std::string fileOut);
74 std::string getMedFileOut();
76 void setMeshName(std::string name);
79 void setMeshNameOut(std::string name);
80 std::string getMeshNameOut();
82 void setMeshOutMed(
bool mybool);
85 void setPublish(
bool mybool);
88 void setFieldName(std::string myFieldName);
89 std::string getFieldName();
91 void setTimeStep(
int time);
92 int getTimeStep()
const;
94 void setRankTimeStep(
int time,
int myRank);
97 void setTimeStepRankLast();
99 void setChosenTimeStepRank();
100 void updateTimeStepRank();
102 void setLogFile(std::string);
103 std::string getLogFile();
105 void setVerbosityLevel(
int verbosity);
106 int getVerbosityLevel();
108 void setRemoveOnSuccess(
bool mybool);
109 bool getRemoveOnSuccess();
113 void setUseLocalMap(
bool mybool);
114 bool getUseLocalMap();
116 void setUseBackgroundMap(
bool mybool);
117 bool getUseBackgroundMap();
119 void setUseConstantValue(
bool mybool);
120 bool getUseConstantValue();
122 void setConstantValue(
double cnst);
123 double getConstantValue()
const;
125 void setSizeMapFile(std::string mapFile);
126 std::string getSizeMapFile();
128 void setFromMedFile(
bool mybool);
129 bool isFromMedFile();
131 void setKeepWorkingFiles(
bool mybool);
132 bool getKeepWorkingFiles();
134 void setPrintLogInFile(
bool mybool);
135 bool getPrintLogInFile();
137 void setWorkingDir(std::string dir);
138 std::string getWorkingDir()
const;
142 static std::string getCommandToRun(
MgAdapt* );
143 std::string getCommandToRun() ;
144 int compute(std::string& errStr);
145 std::string getFileName()
const;
146 static std::string getExeName();
149 void checkDirPath(std::string& dirPath);
151 bool hasOptionDefined(
const std::string& optionName )
const;
152 void setOptionValue(
const std::string& optionName,
153 const std::string& optionValue);
154 std::string getOptionValue(
const std::string& optionName,
155 bool* isDefault=0)
const;
156 std::vector <std::string> getCustomOptionValuesStrVec()
const;
157 std::vector <std::string> getOptionValuesStrVec()
const;
162 static double toDbl(
const std::string&,
bool* isOk = 0);
163 static bool toBool(
const std::string&,
bool* isOk = 0);
164 static int toInt(
const std::string&,
bool* isOk = 0 );
165 static std::string toLowerStr(
const std::string& str);
168 static std::string defaultWorkingDirectory();
169 static std::string defaultLogFile();
170 static bool defaultKeepFiles();
171 static bool defaultRemoveLogOnSuccess();
172 static int defaultVerboseLevel();
173 static bool defaultPrintLogInFile();
174 static bool defaultFromMedFile();
175 static bool defaultMeshOutMed();
176 static bool defaultPublish();
177 static bool defaultUseLocalMap();
178 static bool defaultUseBackgroundMap();
179 static bool defaultUseConstantValue();
180 static bool defaultUseNoTimeStep();
181 static bool defaultUseLastTimeStep();
182 static bool defaultUseChosenTimeStep();
183 static double defaultMaximumMemory();
201 group(std::string name, std::vector<int> famListId, std::vector<std::string> famNames)
202 :_name(name), _famListId( famListId ), _famNames( famNames ) {}
209 family(std::string famName,
int famId):_famName(famName), _famId(famId) {}
255 void convertMedFile(std::string& meshIn,std::string& solFileIn, std::string& sizeMapIn) ;
256 void storeGroups(MEDCoupling::MEDFileMesh* fileMesh);
257 void restoreGroups(MEDCoupling::MEDFileMesh* fileMesh)
const;
258 void storefams(MEDCoupling::MEDFileMesh* fileMesh);
259 void restorefams(MEDCoupling::MEDFileMesh* fileMesh)
const;
260 void storeGroupsAndFams(MEDCoupling::MEDFileMesh* fileMesh);
261 void restoreGroupsAndFams(MEDCoupling::MEDFileMesh* fileMesh)
const;
262 void convertMeshFile(std::string& meshFormatIn, std::vector< std::string>& solFieldFileNames)
const ;
263 void buildConstantSizeMapSolFile(
const std::string& solFormatFieldFileName,
const int dim,
const int version,
const size_t nbNodes)
const;
264 void buildBackGroundMeshAndSolFiles(
const std::vector<std::string>& fieldFileNames,
const std::string& meshFormatsizeMapFile)
const;
265 Status addMessage(
const std::string& msg,
const bool isFatal =
false);
266 void execCmd(
const char* cmd,
int& err);
268 void appendMsgToLogFile(std::string& msg);
269 std::vector<std::string> getListFieldsNames(std::string fileIn) ;
270 void checkDimensionOptionAdaptation() ;
271 void checkFieldName(std::string fileIn) ;
272 void checkTimeStepRank(std::string fileIn) ;
std::string getMeshName(std::string mesh_file)
Definition: SMESH_DriverMesh.cxx:57
#define SMESH_EXPORT
Definition: SMESH_SMESH.hxx:37
Definition: MG_ADAPT.hxx:59
bool removeOnSuccess
Definition: MG_ADAPT.hxx:233
bool meshOutMed
Definition: MG_ADAPT.hxx:219
std::vector< std::string > solFormatOutput
Definition: MG_ADAPT.hxx:249
std::string medFileOut
Definition: MG_ADAPT.hxx:216
std::string medFileIn
Definition: MG_ADAPT.hxx:215
int verbosityLevel
Definition: MG_ADAPT.hxx:232
bool fromMedFile
Definition: MG_ADAPT.hxx:214
std::string meshNameOut
Definition: MG_ADAPT.hxx:218
std::string logFile
Definition: MG_ADAPT.hxx:230
std::string meshName
Definition: MG_ADAPT.hxx:217
std::vector< family > famVec
Definition: MG_ADAPT.hxx:251
MgAdaptHypothesisData * data
Definition: MG_ADAPT.hxx:238
std::string fieldName
Definition: MG_ADAPT.hxx:223
double constantValue
Definition: MG_ADAPT.hxx:224
TOptionValues _customOption2value
Definition: MG_ADAPT.hxx:242
TOptionValues _defaultOptionValues
Definition: MG_ADAPT.hxx:243
Status _status
Definition: MG_ADAPT.hxx:247
std::string meshFormatOutputMesh
Definition: MG_ADAPT.hxx:248
bool myUseChosenTimeStep
Definition: MG_ADAPT.hxx:221
std::vector< group > groupVec
Definition: MG_ADAPT.hxx:250
bool printLogInFile
Definition: MG_ADAPT.hxx:235
std::vector< std::string > _errorMessages
Definition: MG_ADAPT.hxx:246
TOptionNames _boolOptions
Definition: MG_ADAPT.hxx:244
Status
Definition: MG_ADAPT.hxx:185
@ DRS_FAIL
Definition: MG_ADAPT.hxx:192
@ DRS_WARN_DESCENDING
Definition: MG_ADAPT.hxx:191
@ DRS_OK
Definition: MG_ADAPT.hxx:186
@ DRS_WARN_RENUMBER
Definition: MG_ADAPT.hxx:188
@ DRS_EMPTY
Definition: MG_ADAPT.hxx:187
@ DRS_WARN_SKIP_ELEM
Definition: MG_ADAPT.hxx:190
int rank
Definition: MG_ADAPT.hxx:225
bool toKeepWorkingFiles
Definition: MG_ADAPT.hxx:234
std::string sizeMapFile
Definition: MG_ADAPT.hxx:222
std::string workingDir
Definition: MG_ADAPT.hxx:231
bool useBackgroundMap
Definition: MG_ADAPT.hxx:220
std::vector< std::string > tmpFilesToBeDeleted
Definition: MG_ADAPT.hxx:252
Definition: MG_ADAPT.hxx:31
Definition: MG_ADAPT.hxx:36
std::set< std::string > TOptionNames
Definition: MG_ADAPT.hxx:38
std::string remove_extension(const std::string &filename)
Definition: MG_ADAPT.cxx:60
std::map< std::string, std::string > TOptionValues
Definition: MG_ADAPT.hxx:37
static bool toBool(const LDOMString &theStr)
Definition: SMESH_Filter_i.cxx:3500
Definition: MG_ADAPT.hxx:43
std::string myMeshFileOut
Definition: MG_ADAPT.hxx:45
bool myUseNoTimeStep
Definition: MG_ADAPT.hxx:51
bool myMeshOutMed
Definition: MG_ADAPT.hxx:47
std::string myMeshFileIn
Definition: MG_ADAPT.hxx:44
bool myRemoveLogOnSuccess
Definition: MG_ADAPT.hxx:53
double myConstantValue
Definition: MG_ADAPT.hxx:49
bool myPrintLogInFile
Definition: MG_ADAPT.hxx:53
int myVerboseLevel
Definition: MG_ADAPT.hxx:54
std::string myFileSizeMapDir
Definition: MG_ADAPT.hxx:45
bool myPublish
Definition: MG_ADAPT.hxx:47
bool myUseLocalMap
Definition: MG_ADAPT.hxx:48
bool myKeepFiles
Definition: MG_ADAPT.hxx:53
std::string myFileOutDir
Definition: MG_ADAPT.hxx:45
std::string myFileInDir
Definition: MG_ADAPT.hxx:44
std::string myLogFile
Definition: MG_ADAPT.hxx:52
std::string myOutMeshName
Definition: MG_ADAPT.hxx:44
bool fromMedFile
Definition: MG_ADAPT.hxx:46
std::string myInMeshName
Definition: MG_ADAPT.hxx:44
bool myUseBackgroundMap
Definition: MG_ADAPT.hxx:48
int myTimeStep
Definition: MG_ADAPT.hxx:50
bool myUseConstantValue
Definition: MG_ADAPT.hxx:48
bool myUseLastTimeStep
Definition: MG_ADAPT.hxx:51
std::string myFieldName
Definition: MG_ADAPT.hxx:45
std::string myMeshFileBackground
Definition: MG_ADAPT.hxx:44
std::string myWorkingDir
Definition: MG_ADAPT.hxx:52
int myRank
Definition: MG_ADAPT.hxx:50
bool myUseChosenTimeStep
Definition: MG_ADAPT.hxx:51
Definition: MG_ADAPT.hxx:206
std::string _famName
Definition: MG_ADAPT.hxx:207
family(std::string famName, int famId)
Definition: MG_ADAPT.hxx:209
int _famId
Definition: MG_ADAPT.hxx:208
Definition: MG_ADAPT.hxx:197
std::string _name
Definition: MG_ADAPT.hxx:198
std::vector< std::string > _famNames
Definition: MG_ADAPT.hxx:200
std::vector< int > _famListId
Definition: MG_ADAPT.hxx:199
group(std::string name, std::vector< int > famListId, std::vector< std::string > famNames)
Definition: MG_ADAPT.hxx:201