]> SALOME platform Git repositories - modules/multipr.git/blob - idl/MULTIPR.idl
Salome HOME
Merge from V5_1_main 14/05/2010
[modules/multipr.git] / idl / MULTIPR.idl
1 //  Copyright (C) 2007-2010  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.
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/ or email : webmaster.salome@opencascade.com
18 //
19
20 // Partitioning/decimation module for the SALOME v3.2 platform
21 // MULTIPR.idl
22 // Interface CORBA for the MULTIPR module
23 // Author: Olivier LE ROUX - CS, Virtual Reality Dpt
24 // Date: 01/2007
25 //
26 #ifndef __MULTIPR_INTERFACE_CORBA__
27 #define __MULTIPR_INTERFACE_CORBA__
28
29 #include "SALOME_Exception.idl"
30 #include "SALOME_Component.idl"
31 #include "SALOME_GenericObj.idl"
32 #include "SALOMEDS.idl" // to access study
33
34
35 /*!  \ingroup MULTIPR
36  *
37  * This package contains the interface MULTIPR_ORB used for %MULTIPR component.
38  */
39 module MULTIPR_ORB
40 {
41
42
43 typedef sequence<string> string_array;
44
45
46 //*************************************************************************
47 // Interface of the %MULTIPR component used to manage partition/decimation
48 //*************************************************************************
49
50 interface MULTIPR_Obj : SALOME::GenericObj
51 {
52
53         //---------------------------------------------------------------------
54         // Basic accessors/mutators
55         //--------------------------------------------------------------------
56         
57     /*!
58      * Reset the object.
59      */
60     void    reset();
61     
62         /*!
63          * Return true iff this obj represents a valid sequential MED file.
64          */
65         boolean isValidSequentialMEDFile();
66         
67         /*!
68          * Return true iff this obj represents a valid distributed MED file.
69          */
70         boolean isValidDistributedMEDFile();
71         
72         /*!
73          * Return the name of the associated MED file.
74          */
75         string getFilename()
76                 raises (SALOME::SALOME_Exception);
77         
78     /*!
79      * Return the name of the associated sequential MED file (for a distributed MED file).
80      */
81     string getSeqFilename()
82         raises (SALOME::SALOME_Exception);
83         
84         /*!
85          * Set the mesh to be partitionned/decimated. 
86          * Assume sequential MED file.
87          */
88         void setMesh(in string meshName)
89                 raises (SALOME::SALOME_Exception);
90
91         /*!
92          * Set the boxing parameter used for decimation (100 by default).
93          */
94         void setBoxing(in long boxing)
95                 raises (SALOME::SALOME_Exception);
96         
97         /*!
98          * Return the list of meshes contained in the associated MED file.
99          */
100         string_array getMeshes()
101                 raises (SALOME::SALOME_Exception);
102                 
103         /*!
104          * Return the list of fields contained in the current mesh of the associated MED file.
105          */
106         string_array getFields(in string pPartList)
107                 raises (SALOME::SALOME_Exception);
108         
109         /*!
110          * Return the number of iterations for a given field.
111          */
112         long getTimeStamps(in string pPartList, in string fieldName)
113                 raises (SALOME::SALOME_Exception);
114
115     /*!
116      * Get the minimum and maximum value of a part's field.
117      */
118     void getFieldMinMax(in string pPartName, in string pFieldName, inout float pMin, inout float pMax)
119         raises (SALOME::SALOME_Exception);
120         
121         /*!
122          * Return the name of all partitions.
123          * Assume this object encapsulates a distributed MED file.
124          */
125         string_array getParts()
126                 raises (SALOME::SALOME_Exception);
127
128         /*!
129          * Return all information about a part.
130          * Assume this object encapsulates a distributed MED file.
131          */
132         string getPartInfo(in string partName)
133                 raises (SALOME::SALOME_Exception);
134          
135         //---------------------------------------------------------------------
136         // Algorithms
137         //--------------------------------------------------------------------
138         
139         /*!
140          * Create a distributed MED file (v2.3) by extracting all the groups from the 
141      * current mesh of the current MED sequential MED file.
142          * Assume:
143          * - the file is in MED format and can be read using MED file v2.3.
144          * - the file is sequential (not a distributed MED).
145          * - the file only contains TETRA10 elements (dimension of space and mesh is 3).
146          * - the file have no profil.
147          * \return the name of each part.
148          */
149         string_array partitionneDomaine()
150                 raises (SALOME::SALOME_Exception);
151         
152         /*! 
153          * Create a distributed MED file (V2.3) by splitting a group of a MED file 
154      * previously created by partitionneDomaine.
155          * Assume:
156          * - the file is a distributed MED file, previously created by partitionneDomaine()
157          *   (=> each part only contain 1 mesh, TETRA10 elements only)
158          * - nbPart > 1
159          * - partitionner METIS=0 or SCOTCH=1
160          * \return the name of each part.
161          */
162         string_array partitionneGroupe(
163                 in string partName, 
164                 in long   nbParts, 
165                 in long   partitionner)
166                 raises (SALOME::SALOME_Exception);
167         
168         /*!
169          * Create 3 resolutions of the given part of a distributed MED file (V2.3).
170          * Assume:
171          * - the file is a distributed MED file, previously created by 
172      *   partitionneDomaine() or partitionneGrain()
173          *   (=> each part only contain 1 mesh, TETRA10 elements only)
174          */
175         string_array decimePartition(
176                 in string partName,
177                 in string fieldName,
178                 in long   fieldIt,
179                 in string filterName,
180                 in string filterParams)
181                 raises (SALOME::SALOME_Exception);
182
183         /*!
184          * Return useful information to configure decimation parameters.
185          * Depends on part, field and filter: generic operation.
186          */
187         string evalDecimationParams(
188                 in string partName, 
189                 in string fieldName, 
190                 in long   fieldIt, 
191                 in string filterName,
192                 in string filterParams)
193                 raises (SALOME::SALOME_Exception);
194         
195         /*!
196          * Remove all the parts starting with the given prefix from the distributed MED file.
197          * Example: if prefixPartName="PART_4" => remove "PART_4" and all sub-parts "PART_4_*", 
198      * but not "PART41".
199          * Assume this object encapsulates a distributed MED file.
200          */
201         void removeParts(in string prefixPartName)
202                 raises (SALOME::SALOME_Exception);
203         
204         /*!
205          * Get mesh statistics.
206          */
207         string getMEDInfo(
208                 in string partName)
209                 raises (SALOME::SALOME_Exception);
210                 
211         //---------------------------------------------------------------------
212         // i/o
213         //--------------------------------------------------------------------
214         
215         /*!
216          * Save the current distributed MED file to disk.
217          */
218         void save(in string path)
219                 raises (SALOME::SALOME_Exception);
220
221     /*!
222     * Check save progress.
223     * \return current save progress in percents.
224     */
225     long getSaveProgress();
226
227     /*!
228     * Reset save progress to zero.
229     */
230     void resetSaveProgress();
231
232 }; // interface MULTIPR_Obj
233
234
235 //*************************************************************************
236 // Interface of the %MULTIPR component; used to create MULTIPR_Obj object 
237 // and to define high level API.
238 //*************************************************************************
239 interface MULTIPR_Gen : Engines::Component, SALOMEDS::Driver
240 {
241         /*!
242          * Return the version of the MULTIPR library.
243          */
244         string getVersion()
245                 raises (SALOME::SALOME_Exception);
246         
247         //------------------------------------------------------------------------
248         // High level API
249         // Directly apply one of the 3 main operations of the MULTIPR module on a MED file
250         //------------------------------------------------------------------------      
251
252         /*!         
253          * Create a distributed MED file (v2.3) by extracting all the groups from the 
254      * mesh of a sequential MED file.
255          * High level function.
256          */
257         void partitionneDomaine(
258                 in string medFilename, 
259                 in string meshName)
260                 raises (SALOME::SALOME_Exception);
261
262         /*!         
263          * Create a distributed MED file (V2.3) by splitting a group of a MED file 
264      * previously created by partitionneDomaine().
265          * High level function.
266          */
267         void partitionneGroupe(
268                 in string medFilename, 
269                 in string partName, 
270                 in long   nbParts, 
271                 in long   partitionner) // 0=METIS 1=SCOTCH
272                 raises (SALOME::SALOME_Exception);
273
274         /*!         
275          * Creates 3 resolutions of the given part of a distributed MED file (V2.3).
276          * High level function.
277          */
278         void decimePartition(
279                 in string medFilename, 
280                 in string partName, 
281                 in string fieldName,
282                 in long   fieldIt,
283                 in string filterName,
284                 in string filterParams)
285                 raises (SALOME::SALOME_Exception);
286
287         //------------------------------------------------------------------------
288         // Low level API
289         // Create an object to encapsulate a MED file.
290         //------------------------------------------------------------------------
291         
292         /*!
293          * Create a MULTIPR_Obj object which encapsulate a MED file.
294          */
295         MULTIPR_Obj getObject(in string medFilename)
296                 raises (SALOME::SALOME_Exception);
297
298     //------------------------------------------------------------------------
299     // Engine API
300     // Methods to correctly serve Persistence and Dump Python.
301     //------------------------------------------------------------------------
302
303     /*!
304      * Set the current study
305      */
306     void SetCurrentStudy (in SALOMEDS::Study theStudy);
307
308     /*!
309      * Get the current study
310      */
311     SALOMEDS::Study GetCurrentStudy();
312
313         
314 }; // interface MULTIPR_Gen
315  
316   
317 }; // module MULTIPR_ORB
318
319 #endif // __MULTIPR_INTERFACE_CORBA__
320