]> SALOME platform Git repositories - samples/genericsolver.git/blob - idl/GENERICSOLVER_Gen.idl
Salome HOME
84a1df919a1b5c0644713a1de78e9a7d1373606e
[samples/genericsolver.git] / idl / GENERICSOLVER_Gen.idl
1 //  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 //  This library is free software; you can redistribute it and/or
7 //  modify it under the terms of the GNU Lesser General Public
8 //  License as published by the Free Software Foundation; either
9 //  version 2.1 of the License.
10 //
11 //  This library is distributed in the hope that it will be useful,
12 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 //  Lesser General Public License for more details.
15 //
16 //  You should have received a copy of the GNU Lesser General Public
17 //  License along with this library; if not, write to the Free Software
18 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 //  $Id$
23 //
24
25 #ifndef __GENERICSOLVER_GEN__
26 #define __GENERICSOLVER_GEN__
27
28 #include "SALOME_Component.idl"
29 #include "SALOMEDS.idl"
30 #include "SALOME_Exception.idl"
31
32 module GENERICSOLVER_ORB
33 {
34
35   typedef sequence<double> Point;
36   typedef SALOMEDS::ID ID;
37   typedef sequence<string> VarList;
38   typedef Engines::fileBlock pyobj;
39
40   interface GENERICSOLVER_Gen : Engines::Component, SALOMEDS::Driver
41   {
42
43     /**
44      * @brief Prepare module for later computation.
45      *
46      * The Init method prepares the module for a series of computation
47      * based on a study case. The study case is a set of parameters that
48      * globally defines _ALL_ information needed to make a computation.
49      * When Init exits, the module is ready to run if a call to an hypothetical
50      * method Exec() (without any more argument) occurs.
51      *
52      * @return                   0 if success, non zero if failure
53      * @param studyID            the identifier of the study containing the study case
54      * @param entry              the identifier of the study case within the study
55      * @param wrapperDescription a string containing the XML wrapper description
56      */
57     long Init(in long studyID, in ID entry, in string wrapperDescription)
58       raises (SALOME::SALOME_Exception);
59
60     /**
61      * @brief Run the module with modified parameters
62      *
63      * The Run method realizes the computation with some parameters (within inPoint)
64      * altered compared to what Init set before. The result is put in outPoint.
65      *
66      * @return          0 if success, non zero if failure
67      * @param inPoint   a vector of floating point values to be modified
68      * @param outPoint  the result of the computation as a vector of floating point values
69      */
70     long Exec(in Point inPoint, out Point outPoint)
71       raises (SALOME::SALOME_Exception);
72
73     /**
74      * @brief Cleanup everything that was previously set
75      *
76      * The Finalize method is in charge of cleaning everything that what set hitherto.
77      * It may be empty.
78      *
79      * @return          0 if success, non zero if failure
80      */
81     long Finalize()
82       raises (SALOME::SALOME_Exception);
83
84
85     /**
86      * @brief Initialize the component with the deterministic variables and the lists of
87      *        probabilistic variables.
88      *
89      * The InitWithVarList method prepares the component for a series of computation
90      * with the method ExecWithVarList. It stores the deterministic variables and the
91      * lists of input and output variables to identify them in future calls to
92      * ExecWithVarList.
93      *
94      * @param inputVarList      a list of strings containing the names of the input
95      *                          variables in the same order as in subsequent calls to
96      *                          ExecWithVarList.
97      * @param outputVarList     a list of strings containing the names of the output
98      *                          variables in the same order as they should be returned
99      *                          in subsequent calls to ExecWithVarList.
100      * @param deterministicVars a python dictionary containing the deterministic
101      *                          variables (mapping variable names to variable values)
102      */
103     void InitWithVarList(in VarList inputVarList, in VarList outputVarList, in pyobj deterministicVars)
104       raises (SALOME::SALOME_Exception);
105
106     /**
107      * @brief Execute a computation with a given sample of variables.
108      *
109      * The ExecWithVarList method realizes the computation with some parameters (within
110      * inPoint) corresponding to the variables set previously with the method
111      * InitWithVarList. The result is put in outPoint in the order specified by
112      * outputVarList of InitWithVarList method.
113      *
114      * @param inPoint   a vector of floating point values to be evaluated
115      * @param outPoint  the result of the computation as a vector of floating point values
116      */
117     void ExecWithVarList(in Point inPoint, out Point outPoint)
118       raises (SALOME::SALOME_Exception);
119
120   };
121 };
122
123 #endif