1 // Copyright (C) 2020-2023 CEA, EDF
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 #include "SALOME_Component.idl"
24 #include "SALOME_Exception.idl"
25 #include "SALOME_GenericObj.idl"
26 #include "SALOMEDS.idl"
27 #include "SMESH_Mesh.idl"
31 struct MgAdaptHypothesisData
33 string myFileInDir, myMeshFileIn, myInMeshName, myMeshFileBackground, myOutMeshName,
34 myMeshFileOut, myFileOutDir, myFileSizeMapDir, myFieldName;
36 boolean myPublish, myMeshOutMed;
37 boolean myUseLocalMap, myUseBackgroundMap, myUseConstantValue;
38 double myConstantValue;
39 long myRank, myTimeStep;
40 boolean myUseNoTimeStep, myUseLastTimeStep, myUseChosenTimeStep;
41 string myWorkingDir, myLogFile;
42 boolean myPrintLogInFile, myKeepFiles, myRemoveLogOnSuccess;
46 interface MG_ADAPT : SALOME::GenericObj
48 void setData(inout MgAdaptHypothesisData data);
50 void setMedFileIn(in string MedFileIn);
51 string getMedFileIn();
53 void setMedFileOut(in string MedFileOut);
54 string getMedFileOut();
56 void setMeshName(in string s);
59 void setMeshNameOut(in string s);
60 string getMeshNameOut();
62 void setMeshOutMed(in boolean b);
63 boolean getMeshOutMed();
65 void setPublish(in boolean b);
68 void setSizeMapFieldName(in string s);
69 string getSizeMapFieldName();
71 void setTimeStep(in long s);
74 void setTimeStepRank(in long s, in long f);
77 void setTimeStepRankLast();
80 void setLogFile(in string f);
83 void setVerbosityLevel(in long f);
84 long getVerbosityLevel();
86 void setRemoveOnSuccess(in boolean f);
87 boolean getRemoveOnSuccess();
89 MgAdaptHypothesisData getData();
91 void setUseLocalMap(in boolean f);
92 boolean getUseLocalMap();
94 void setUseBackgroundMap(in boolean f);
95 boolean getUseBackgroundMap();
97 void setUseConstantValue(in boolean f);
98 boolean getUseConstantValue();
100 void setConstantSize(in double f);
101 double getConstantSize();
103 void setSizeMapFile(in string f);
104 string getSizeMapFile();
106 void setFromMedFile(in boolean f);
107 boolean isFromMedFile();
109 void setKeepWorkingFiles(in boolean f);
110 boolean getKeepWorkingFiles();
112 void setPrintLogInFile(in boolean f);
113 boolean getPrintLogInFile();
115 void setWorkingDir(in string f);
116 string getWorkingDir();
118 void setSizeMapType(in string f);
120 string getCommandToRun();
121 void compute() raises(SALOME::SALOME_Exception);
123 string getFileName();
125 void copyMgAdaptHypothesisData(in MgAdaptHypothesisData f);
127 //void checkDirPath(inout string f);
129 boolean hasOptionDefined(in string optionName);
130 void setOptionValue(in string optionName, in string optionValue) raises (SALOME::SALOME_Exception);
131 string getOptionValue(in string optionName, inout boolean isDefault) raises (SALOME::SALOME_Exception);
132 SMESH::string_array getCustomOptionValuesStrVec();
133 SMESH::string_array getOptionValuesStrVec();
136 typedef MG_ADAPT MG_ADAPT_HYPOTHESIS;
137 interface MG_ADAPT_OBJECT : SALOME::GenericObj
139 void setMeshIn(in SMESH_Mesh theMesh) raises (SALOME::SALOME_Exception);
140 void setMEDFileIn(in string f) raises (SALOME::SALOME_Exception);
141 void setMEDFileOut(in string f) raises (SALOME::SALOME_Exception);
142 void setMEDFileBackground(in string f) raises (SALOME::SALOME_Exception);
143 void AddHypothesis(in MG_ADAPT mg) raises (SALOME::SALOME_Exception);
144 long Compute(in boolean Publish) raises (SALOME::SALOME_Exception);
148 #endif // MG_ADAPT_IDL