Salome HOME
Revert "Merge branch 'yan/V8_3_BR' into pre/V8_3_BR"
[modules/hydrosolver.git] / idl / HYDROSOLVER.idl
1 //  Copyright (C) 2012-2013 EDF
2 //
3 //  This file is part of SALOME HYDRO module.
4 //
5 //  SALOME HYDRO module is free software: you can redistribute it and/or modify
6 //  it under the terms of the GNU General Public License as published by
7 //  the Free Software Foundation, either version 3 of the License, or
8 //  (at your option) any later version.
9 //
10 //  SALOME HYDRO module is distributed in the hope that it will be useful,
11 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
12 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 //  GNU General Public License for more details.
14 //
15 //  You should have received a copy of the GNU General Public License
16 //  along with SALOME HYDRO module.  If not, see <http://www.gnu.org/licenses/>.
17
18 #ifndef _HYDROSOLVER_IDL_
19 #define _HYDROSOLVER_IDL_
20
21 #include "DSC_Engines.idl"
22 #include "SALOMEDS.idl"
23 #include "SALOME_Exception.idl"
24 #include "SALOME_Component.idl"
25 #include "SALOME_Comm.idl"
26 #include "SALOME_Parametric.idl"
27
28
29
30 module HYDROSOLVER_ORB
31 {
32   struct MascaretFile {
33     string fileName;
34     string fileType;
35   };
36
37   typedef sequence<MascaretFile> MascaretFileList;
38
39   typedef sequence<string> stringvec;
40   typedef sequence<double> dblevec;
41
42   interface MASCARET: Engines::Superv_Component
43   {
44     /**
45      * @brief Execute a computation of a complete Mascaret case.
46      *
47      * The Compute method realizes the computation with the files specified in input. The
48      * variables outputVars are extracted in output and returned in outputValues.
49      *
50      * @param fileList the list of Mascaret files describing the case to compute
51      * @param ligFile the file containing the initial water line
52      * @param outputVars the list of the output variables to extract
53      * @param outputValues the extracted values
54      */
55     void Compute(in MascaretFileList fileList, in string ligFile,
56                  in stringvec outputVars, out dblevec outputValues)
57       raises (SALOME::SALOME_Exception);
58
59     /**
60      * @brief Initialize the component with the Mascaret case.
61      *
62      * The Init method prepares the component for a series of computation with
63      * the method Exec or ExecStep. It extracts the deterministic data from Salome study and
64      * stores this data along with the lists of input and output variables to
65      * identify them in future calls to Exec.
66      *
67      * @param studyID        the identifier of the study containing the deterministic data
68      * @param detCaseEntry   the identifier of the deterministic case within the study
69      */
70     void Init(in long studyID, in SALOMEDS::ID detCaseEntry)
71       raises (SALOME::SALOME_Exception);
72
73     /**
74      * @brief Execute a computation with a given sample of variables.
75      *
76      * The Exec method realizes the computation with the probabilistic variables
77      * described in paramInput and the deterministic variables set previously with
78      * the Init method. The result is put in paramOutput in the order specified by
79      * paramInput.outputVarList.
80      *
81      * @param paramInput   a structure describing the probabilistic variables and the order
82      *                     of the output variables.
83      * @param paramOutput  a structure containing the result of the computation
84      */
85     void Exec(in SALOME_TYPES::ParametricInput paramInput,
86               out SALOME_TYPES::ParametricOutput paramOutput)
87       raises (SALOME::SALOME_Exception);
88
89     /**
90      * @brief Initialize the border(s) for coupling
91      *
92      * @param borders structure describing the borders
93      */
94     void InitBorders(in Engines::fileBlock borders)
95       raises (SALOME::SALOME_Exception);
96
97     /**
98      * @brief Compute a single time step
99      *
100      * @param timeData  the data describing the time step to execute
101      * @param inputData the state data coming from the coupled code
102      * @param outputData the data to send to the coupled code
103      */
104     void ExecStep(in Engines::fileBlock timeData,
105                   in Engines::fileBlock inputData,
106                   out Engines::fileBlock outputData)
107       raises (SALOME::SALOME_Exception);
108
109     /**
110      * @brief Cleanup everything that was previously set
111      *
112      * The Finalize method is in charge of cleaning everything that what set hitherto.
113      * It may be empty.
114      */
115     void Finalize()
116       raises (SALOME::SALOME_Exception);
117
118     /**
119      * @brief Old coupling method with datastream.
120      */
121     void ExecCoupling(in stringvec inputVarList, in stringvec outputVarList)
122       raises (SALOME::SALOME_Exception);
123
124     /**
125      * @brief Old method to log values from datastream coupling.
126      */
127     void Log(in long studyID, in stringvec inputVarList)
128       raises (SALOME::SALOME_Exception);
129
130   };
131
132   interface TELEMAC2D: Engines::Superv_Component
133   {
134     /**
135      * @brief Execute a computation of a complete Telemac2D case.
136      *
137      * The Compute method realizes the computation of the case specified in input.
138      *
139      * @param studyID   the identifier of the study containing Telemac2D case data
140      * @param caseEntry the identifier of the Telemac2D case within the study
141      */
142     void Compute(in long studyID, in SALOMEDS::ID caseEntry)
143       raises (SALOME::SALOME_Exception);
144
145     /**
146      * @brief Initialize the component with the Telemac2D case.
147      *
148      * The Init method prepares the component for a series of computation with
149      * the method Exec or ExecStep. It extracts the deterministic data from Salome study and
150      * stores this data along with the lists of input and output variables to
151      * identify them in future calls to Exec.
152      *
153      * @param studyID   the identifier of the study containing Telemac2D case data
154      * @param caseEntry the identifier of the Telemac2D case within the study
155      */
156     void Init(in long studyID, in SALOMEDS::ID detCaseEntry)
157       raises (SALOME::SALOME_Exception);
158
159     /**
160      * @brief Execute a computation with a given sample of variables.
161      *
162      * The Exec method realizes the computation with the probabilistic variables
163      * described in paramInput and the deterministic variables set previously with
164      * the Init method. The result is put in paramOutput in the order specified by
165      * paramInput.outputVarList.
166      *
167      * @param paramInput   a structure describing the probabilistic variables and the order
168      *                     of the output variables.
169      * @param paramOutput  a structure containing the result of the computation
170      */
171     void Exec(in SALOME_TYPES::ParametricInput paramInput,
172               out SALOME_TYPES::ParametricOutput paramOutput)
173       raises (SALOME::SALOME_Exception);
174
175     /**
176      * @brief Initialize the border(s) for coupling
177      *
178      * @param borders structure describing the borders
179      */
180     void InitBorders(in Engines::fileBlock borders)
181       raises (SALOME::SALOME_Exception);
182
183     /**
184      * @brief Compute a single time step
185      *
186      * @param timeData  the data describing the time step to execute
187      * @param inputData the state data coming from the coupled code
188      * @param outputData the data to send to the coupled code
189      */
190     void ExecStep(in Engines::fileBlock timeData,
191                   in Engines::fileBlock inputData,
192                   out Engines::fileBlock outputData)
193       raises (SALOME::SALOME_Exception);
194
195     /**
196      * @brief Cleanup everything that was previously set
197      *
198      * The Finalize method is in charge of cleaning everything that what set hitherto.
199      * It may be empty.
200      */
201     void Finalize()
202       raises (SALOME::SALOME_Exception);
203
204   };
205
206   interface HYDROSOLVER: Engines::EngineComponent, SALOMEDS::Driver
207   {
208
209   };
210
211 };
212
213 #endif