Salome HOME
*** empty log message ***
[modules/multipr.git] / idl / MULTIPR.idl
1 // Project MULTIPR, IOLS WP1.2.1 - EDF/CS
2 // Partitioning/decimation module for the SALOME v3.2 platform
3
4 // 
5 // MULTIPR.idl
6 // 
7 // Interface CORBA for the MULTIPR module
8 //
9 // Author: Olivier LE ROUX - CS, Virtual Reality Dpt
10 //
11 // Date: 01/2007
12 //
13
14 #ifndef __MULTIPR_INTERFACE_CORBA__
15 #define __MULTIPR_INTERFACE_CORBA__
16
17 #include "SALOME_Exception.idl"
18 #include "SALOME_Component.idl"
19 #include "SALOME_GenericObj.idl"
20 #include "SALOMEDS.idl" // to access study
21
22
23 /*!  \ingroup MULTIPR
24  *
25  * This package contains the interface MULTIPR_ORB used for %MULTIPR component.
26  */
27 module MULTIPR_ORB
28 {
29
30
31 typedef sequence<string> string_array;
32
33
34 //*************************************************************************
35 // Interface of the %MULTIPR component used to manage partition/decimation
36 //*************************************************************************
37
38 interface MULTIPR_Obj
39 {
40
41         //---------------------------------------------------------------------
42         // Basic accessors/mutators
43         //--------------------------------------------------------------------
44         
45         /*!
46          * Return true iff this obj represents a valid sequential MED file.
47          */
48         boolean isValidSequentialMEDFile();
49         
50         /*!
51          * Return true iff this obj represents a valid distributed MED file.
52          */
53         boolean isValidDistributedMEDFile();
54         
55         /*!
56          * Set the mesh to be partitionned/decimated. 
57          * Assume sequential MED file.
58          */
59         void setMesh(in string meshName)
60                 raises (SALOME::SALOME_Exception);
61
62         /*!
63          * Set the boxing parameter used for decimation (100 by default).
64          */
65         void setBoxing(in long boxing)
66                 raises (SALOME::SALOME_Exception);
67         
68         /*!
69          * Return the list of meshes contained in the associated MED file.
70          */
71         string_array getMeshes()
72                 raises (SALOME::SALOME_Exception);
73                 
74         /*!
75          * Return the list of fields contained in the current mesh of the associated MED file.
76          */
77         string_array getFields()
78                 raises (SALOME::SALOME_Exception);
79         
80         /*!
81          * Return the number of iterations for a given field.
82          */
83         long getTimeStamps(in string fieldName)
84                 raises (SALOME::SALOME_Exception);
85
86         /*!
87          * Return the name of all partitions.
88          * Assume this object encapsulates a distributed MED file.
89          */
90         string_array getParts()
91                 raises (SALOME::SALOME_Exception);
92
93         /*!
94          * Return all information about a part.
95          * Assume this object encapsulates a distributed MED file.
96          */
97         string getPartInfo(in string partName)
98                 raises (SALOME::SALOME_Exception);
99
100         /*!
101          * Remove the given part from the distributed MED file.
102          * Assume this object encapsulates a distributed MED file.
103          */
104         void removePart(in string partName)
105                 raises (SALOME::SALOME_Exception);
106         
107         //---------------------------------------------------------------------
108         // Algorithms
109         //--------------------------------------------------------------------
110         
111         /*!
112          * Create a distributed MED file (v2.3) by extracting all the groups from the current mesh of the current MED sequential MED file.
113          * Assume:
114          * - the file is in MED format and can be read using MED file v2.3.
115          * - the file is sequential (not a distributed MED).
116          * - the file only contains TETRA10 elements (dimension of space and mesh is 3).
117          * - the file have no profil.
118          * \return the name of each part.
119          */
120         string_array partitionneDomaine()
121                 raises (SALOME::SALOME_Exception);
122         
123         /*! 
124          * Create a distributed MED file (V2.3) by splitting a group of a MED file previously created by partitionneDomaine.
125          * Assume:
126          * - the file is a distributed MED file, previously created by partitionneDomaine()
127          *   (=> each part only contain 1 mesh, TETRA10 elements only)
128          * - nbPart > 1
129          * - partitionner METIS=0 or SCOTCH=1
130          * \return the name of each part.
131          */
132         string_array partitionneGrain(
133                 in string partName, 
134                 in long   nbParts, 
135                 in long   partitionner)
136                 raises (SALOME::SALOME_Exception);
137         
138         /*!
139          * Create 3 resolutions of the given part of a distributed MED file (V2.3).
140          * Assume:
141          * - the file is a distributed MED file, previously created by partitionneDomaine() or partitionneGrain()
142          *   (=> each part only contain 1 mesh, TETRA10 elements only)
143          */
144         string_array decimePartition(
145                 in string partName,
146                 in string fieldName,
147                 in long   fieldIt,
148                 in string filterName,
149                 in double tmed,
150                 in double tlow,
151                 in double radius)
152                 raises (SALOME::SALOME_Exception);
153         
154         //---------------------------------------------------------------------
155         // i/o
156         //--------------------------------------------------------------------
157         
158         /*!
159          * Save the current distributed MED file to disk.
160          */
161         void save()
162                 raises (SALOME::SALOME_Exception);
163
164 }; // interface MULTIPR_Obj
165
166
167 //*************************************************************************
168 // Interface of the %MULTIPR component; used to create MULTIPR_Obj object 
169 // and to define high level API.
170 //*************************************************************************
171 interface MULTIPR_Gen : Engines::Component
172 {
173         /*!
174          * Return the version of the MULTIPR library.
175          */
176         string getVersion()
177                 raises (SALOME::SALOME_Exception);
178         
179         //------------------------------------------------------------------------
180         // High level API
181         // Directly apply one of the 3 main operations of the MULTIPR module on a MED file
182         //------------------------------------------------------------------------      
183
184         /*!         
185          * Create a distributed MED file (v2.3) by extracting all the groups from the mesh of a sequential MED file.
186          * High level function.
187          */
188         void partitionneDomaine(
189                 in string medFilename, 
190                 in string meshName)
191                 raises (SALOME::SALOME_Exception);
192
193         /*!         
194          * Create a distributed MED file (V2.3) by splitting a group of a MED file previously created by partitionneDomaine().
195          * High level function.
196          */
197         void partitionneGrain(
198                 in string medFilename, 
199                 in string partName, 
200                 in long   nbParts, 
201                 in long   partitionner) // 0=METIS 1=SCOTCH
202                 raises (SALOME::SALOME_Exception);
203
204         /*!         
205          * Creates 3 resolutions of the given part of a distributed MED file (V2.3).
206          * High level function.
207          */
208         void decimePartition(
209                 in string medFilename, 
210                 in string partName, 
211                 in string fieldName,
212                 in long   fieldIt,
213                 in string filterName,
214                 in double tmed,
215                 in double tlow,
216                 in double radius,
217                 in long   boxing)
218                 raises (SALOME::SALOME_Exception);
219
220         //------------------------------------------------------------------------
221         // Low level API
222         // Create an object to encapsulate a MED file.
223         //------------------------------------------------------------------------
224         
225         /*!
226          * Create a MULTIPR_Obj object which encapsulate a MED file.
227          */
228         MULTIPR_Obj getObject(in string medFilename)
229                 raises (SALOME::SALOME_Exception);
230
231 }; // interface MULTIPR_Gen
232  
233   
234 }; // module MULTIPR_ORB
235
236 #endif // __MULTIPR_INTERFACE_CORBA__
237