Salome HOME
Forward medcoupling exception thrown in case of problem of conversion
[modules/smesh.git] / idl / MG_ADAPT.idl
1 // Copyright (C) 2011-2020  CEA/DEN, EDF R&D
2 //
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.
7 //
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.
12 //
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
16 //
17 // See http://www.salome-platform.org/
18 //
19 // File   : MG_ADAPT.hxx
20 //
21 #ifndef MG_ADAPT_IDL
22 #define MG_ADAPT_IDL
23
24 #include "SALOME_Component.idl"
25 #include "SALOME_Exception.idl"
26 #include "SALOME_GenericObj.idl"
27 #include "SALOMEDS.idl"
28 #include "SMESH_Mesh.idl"
29
30 module SMESH{
31
32   typedef sequence<string> str_array ;
33   struct MgAdaptHypothesisData
34   {
35     string  myFileInDir, myMeshFileIn, myInMeshName, myMeshFileBackground, myOutMeshName,
36             myMeshFileOut,  myFileOutDir, myFileSizeMapDir, myFieldName;
37     boolean fromMedFile;
38     boolean myPublish, myMeshOutMed;
39     boolean myUseLocalMap, myUseBackgroundMap, myUseConstantValue;
40     double  myConstantValue;
41     long    myRank, myTimeStep;
42     boolean myUseNoTimeStep, myUseLastTimeStep, myUseChosenTimeStep;
43     string  myWorkingDir, myLogFile;
44     boolean myPrintLogInFile, myKeepFiles, myRemoveLogOnSuccess;
45     long    myVerboseLevel;
46   };
47
48
49   interface MG_ADAPT : SALOME::GenericObj
50   {
51     //MG_ADAPT CreateMG_ADAPT(in PortableServer::POA_var poa);
52     void setData( inout MgAdaptHypothesisData data);
53
54     void setMedFileIn(in string MedFileIn );
55     string getMedFileIn();
56
57     void setMedFileOut(in string MedFileOut);
58     string getMedFileOut();
59
60     void setMeshName(in string s);
61     string getMeshName();
62
63     void setMeshNameOut(in string s);
64     string getMeshNameOut();
65
66     void setMeshOutMed(in boolean b);
67     boolean getMeshOutMed();
68
69     void setPublish(in boolean b);
70     boolean getPublish();
71
72     void setSizeMapFieldName(in string s);
73     string getSizeMapFieldName();
74
75     void setTimeStep(in long s);
76     long getTimeStep() ;
77
78     void setTimeStepRank(in long s, in long f);
79     long getRank();
80
81     void setTimeStepRankLast();
82     void setNoTimeStep();
83
84     void setLogFile(in string f);
85     string getLogFile();
86
87     void setVerbosityLevel(in long f);
88     long getVerbosityLevel();
89
90     void setRemoveOnSuccess(in boolean f);
91     boolean getRemoveOnSuccess();
92
93     MgAdaptHypothesisData getData();
94
95     void setUseLocalMap(in boolean f);
96     boolean getUseLocalMap();
97
98     void setUseBackgroundMap(in boolean f);
99     boolean getUseBackgroundMap();
100
101     void setUseConstantValue(in boolean f);
102     boolean getUseConstantValue();
103
104     void setConstantSize(in double f);
105     double getConstantSize() ;
106
107     void setSizeMapFile(in string f);
108     string getSizeMapFile();
109
110     void setFromMedFile(in boolean f);
111     boolean isFromMedFile();
112
113     void setKeepWorkingFiles(in boolean f);
114     boolean getKeepWorkingFiles();
115
116     void setPrintLogInFile(in boolean f);
117     boolean getPrintLogInFile();
118
119     void setWorkingDir(in string f);
120     string getWorkingDir() ;
121
122     void setSizeMapType(in string f);
123     boolean setAll();
124     string getCommandToRun() ;
125     void compute() raises(SALOME::SALOME_Exception);
126     string getErrMsg();
127     string getFileName() ;
128     string getExeName();
129     void copyMgAdaptHypothesisData(in MgAdaptHypothesisData f ) ;
130
131     //void checkDirPath(inout string  f);
132
133     boolean hasOptionDefined( in string optionName ) ;
134     void setOptionValue(in string optionName, in string optionValue) raises (SALOME::SALOME_Exception);
135     string getOptionValue(in string optionName, inout boolean isDefault) raises (SALOME::SALOME_Exception);
136     str_array getCustomOptionValuesStrVec() ;
137     str_array getOptionValuesStrVec() ;
138   };
139
140   typedef MG_ADAPT MG_ADAPT_HYPOTHESIS;
141   interface MG_ADAPT_OBJECT : SALOME::GenericObj
142   {
143     void setMeshIn(in SMESH_Mesh theMesh )   raises (SALOME::SALOME_Exception);
144     void setMEDFileIn(in string f)           raises (SALOME::SALOME_Exception);
145     void setMEDFileOut(in string f)          raises (SALOME::SALOME_Exception);
146     void setMEDFileBackground(in string f)   raises (SALOME::SALOME_Exception);
147     void AddHypothesis(in MG_ADAPT mg)       raises (SALOME::SALOME_Exception);
148     long Compute(in boolean Publish)         raises (SALOME::SALOME_Exception);
149   };
150
151 };
152 #endif // MG_ADAPT_IDL