1 // Copyright (C) 2011-2020 CEA/DEN, EDF R&D
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/
19 // File : MG_ADAPT.hxx
25 #include "SALOME_Component.idl"
26 #include "SALOME_Exception.idl"
27 #include "SALOME_GenericObj.idl"
28 #include "SALOMEDS.idl"
29 #include "SMESH_Mesh.idl"
33 typedef sequence<string> str_array ;
34 struct MgAdaptHypothesisData
36 string myFileInDir, myMeshFileIn, myInMeshName, myMeshFileBackground, myOutMeshName,
37 myMeshFileOut, myFileOutDir, myFileSizeMapDir, myFieldName;
39 boolean myPublish, myMeshOutMed;
40 boolean myUseLocalMap, myUseBackgroundMap, myUseConstantValue;
41 double myConstantValue;
42 long myRank, myTimeStep;
43 boolean myUseNoTimeStep, myUseLastTimeStep, myUseChosenTimeStep;
44 string myWorkingDir, myLogFile;
45 boolean myPrintLogInFile, myKeepFiles, myRemoveLogOnSuccess;
51 interface MG_ADAPT : SALOME::GenericObj
53 //MG_ADAPT CreateMG_ADAPT(in PortableServer::POA_var poa);
54 void setData( inout MgAdaptHypothesisData data);
56 void setMedFileIn(in string MedFileIn );
57 string getMedFileIn();
59 void setMedFileOut(in string MedFileOut);
60 string getMedFileOut();
62 void setMeshName(in string s);
65 void setMeshNameOut(in string s);
66 string getMeshNameOut();
68 void setMeshOutMed(in boolean b);
69 boolean getMeshOutMed();
71 void setPublish(in boolean b);
74 void setSizeMapFieldName(in string s);
75 string getSizeMapFieldName();
77 void setTimeStep(in long s);
80 void setTimeStepRank(in long s, in long f);
83 void setTimeStepRankLast();
86 void setLogFile(in string f);
89 void setVerbosityLevel(in long f);
90 long getVerbosityLevel();
92 void setRemoveOnSuccess(in boolean f);
93 boolean getRemoveOnSuccess();
95 MgAdaptHypothesisData getData();
97 void setUseLocalMap(in boolean f);
98 boolean getUseLocalMap();
100 void setUseBackgroundMap(in boolean f);
101 boolean getUseBackgroundMap();
103 void setUseConstantValue(in boolean f);
104 boolean getUseConstantValue();
106 void setConstantSize(in double f);
107 double getConstantSize() ;
109 void setSizeMapFile(in string f);
110 string getSizeMapFile();
112 void setFromMedFile(in boolean f);
113 boolean isFromMedFile();
115 void setKeepWorkingFiles(in boolean f);
116 boolean getKeepWorkingFiles();
118 void setPrintLogInFile(in boolean f);
119 boolean getPrintLogInFile();
121 void setWorkingDir(in string f);
122 string getWorkingDir() ;
124 void setSizeMapType(in string f);
126 string getCommandToRun() ;
127 //long compute(out string errStr);
130 string getFileName() ;
132 void copyMgAdaptHypothesisData(in MgAdaptHypothesisData f ) ;
134 //void checkDirPath(inout string f);
138 boolean hasOptionDefined( in string optionName ) ;
139 void setOptionValue(in string optionName,
140 in string optionValue) raises (SALOME::SALOME_Exception);
141 string getOptionValue(in string optionName,
142 inout boolean isDefault) raises (SALOME::SALOME_Exception);
143 str_array getCustomOptionValuesStrVec() ;
144 str_array getOptionValuesStrVec() ;
146 typedef MG_ADAPT MG_ADAPT_HYPOTHESIS;
147 interface MG_ADAPT_OBJECT : SALOME::GenericObj
149 void setMeshIn(in SMESH_Mesh theMesh );
150 void setMEDFileIn(in string f);
151 void setMEDFileOut(in string f);
152 void setMEDFileBackground(in string f);
153 void AddHypothesis(in MG_ADAPT mg);
154 long Compute(in boolean Publish);
158 #endif // MG_ADAPT_IDL