]> SALOME platform Git repositories - modules/multipr.git/blob - idl/MULTIPR.idl
Salome HOME
063f0372ffe57bc604e2a2aceff44c76ba8d71e7
[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          * Return the name of the associated MED file.
57          */
58         string getFilename()
59                 raises (SALOME::SALOME_Exception);
60                 
61         /*!
62          * Set the mesh to be partitionned/decimated. 
63          * Assume sequential MED file.
64          */
65         void setMesh(in string meshName)
66                 raises (SALOME::SALOME_Exception);
67
68         /*!
69          * Set the boxing parameter used for decimation (100 by default).
70          */
71         void setBoxing(in long boxing)
72                 raises (SALOME::SALOME_Exception);
73         
74         /*!
75          * Return the list of meshes contained in the associated MED file.
76          */
77         string_array getMeshes()
78                 raises (SALOME::SALOME_Exception);
79                 
80         /*!
81          * Return the list of fields contained in the current mesh of the associated MED file.
82          */
83         string_array getFields()
84                 raises (SALOME::SALOME_Exception);
85         
86         /*!
87          * Return the number of iterations for a given field.
88          */
89         long getTimeStamps(in string fieldName)
90                 raises (SALOME::SALOME_Exception);
91
92         /*!
93          * Return the name of all partitions.
94          * Assume this object encapsulates a distributed MED file.
95          */
96         string_array getParts()
97                 raises (SALOME::SALOME_Exception);
98
99         /*!
100          * Return all information about a part.
101          * Assume this object encapsulates a distributed MED file.
102          */
103         string getPartInfo(in string partName)
104                 raises (SALOME::SALOME_Exception);
105          
106         //---------------------------------------------------------------------
107         // Algorithms
108         //--------------------------------------------------------------------
109         
110         /*!
111          * Create a distributed MED file (v2.3) by extracting all the groups from the current mesh of the current MED sequential MED file.
112          * Assume:
113          * - the file is in MED format and can be read using MED file v2.3.
114          * - the file is sequential (not a distributed MED).
115          * - the file only contains TETRA10 elements (dimension of space and mesh is 3).
116          * - the file have no profil.
117          * \return the name of each part.
118          */
119         string_array partitionneDomaine()
120                 raises (SALOME::SALOME_Exception);
121         
122         /*! 
123          * Create a distributed MED file (V2.3) by splitting a group of a MED file previously created by partitionneDomaine.
124          * Assume:
125          * - the file is a distributed MED file, previously created by partitionneDomaine()
126          *   (=> each part only contain 1 mesh, TETRA10 elements only)
127          * - nbPart > 1
128          * - partitionner METIS=0 or SCOTCH=1
129          * \return the name of each part.
130          */
131         string_array partitionneGrain(
132                 in string partName, 
133                 in long   nbParts, 
134                 in long   partitionner)
135                 raises (SALOME::SALOME_Exception);
136         
137         /*!
138          * Create 3 resolutions of the given part of a distributed MED file (V2.3).
139          * Assume:
140          * - the file is a distributed MED file, previously created by partitionneDomaine() or partitionneGrain()
141          *   (=> each part only contain 1 mesh, TETRA10 elements only)
142          */
143         string_array decimePartition(
144                 in string partName,
145                 in string fieldName,
146                 in long   fieldIt,
147                 in string filterName,
148                 in double tmed,
149                 in double tlow,
150                 in double radius)
151                 raises (SALOME::SALOME_Exception);
152
153         /*!
154          * Return useful information to configure decimation parameters.
155          * Depends on part, field and filter: generic operation.
156          */
157         string evalDecimationParams(
158                 in string partName, 
159                 in string fieldName, 
160                 in long   fieldIt, 
161                 in string filterName,
162                 in string filterParams)
163                 raises (SALOME::SALOME_Exception);
164         
165         /*!
166          * Remove all the parts starting with the given prefix from the distributed MED file.
167          * Example: if prefixPartName="PART_4" => remove "PART_4" and all sub-parts "PART_4_*", but not "PART41".
168          * Assume this object encapsulates a distributed MED file.
169          */
170         void removeParts(in string prefixPartName)
171                 raises (SALOME::SALOME_Exception);
172         
173         //---------------------------------------------------------------------
174         // i/o
175         //--------------------------------------------------------------------
176         
177         /*!
178          * Save the current distributed MED file to disk.
179          */
180         void save(in string path)
181                 raises (SALOME::SALOME_Exception);
182
183 }; // interface MULTIPR_Obj
184
185
186 //*************************************************************************
187 // Interface of the %MULTIPR component; used to create MULTIPR_Obj object 
188 // and to define high level API.
189 //*************************************************************************
190 interface MULTIPR_Gen : Engines::Component
191 {
192         /*!
193          * Return the version of the MULTIPR library.
194          */
195         string getVersion()
196                 raises (SALOME::SALOME_Exception);
197         
198         //------------------------------------------------------------------------
199         // High level API
200         // Directly apply one of the 3 main operations of the MULTIPR module on a MED file
201         //------------------------------------------------------------------------      
202
203         /*!         
204          * Create a distributed MED file (v2.3) by extracting all the groups from the mesh of a sequential MED file.
205          * High level function.
206          */
207         void partitionneDomaine(
208                 in string medFilename, 
209                 in string meshName)
210                 raises (SALOME::SALOME_Exception);
211
212         /*!         
213          * Create a distributed MED file (V2.3) by splitting a group of a MED file previously created by partitionneDomaine().
214          * High level function.
215          */
216         void partitionneGrain(
217                 in string medFilename, 
218                 in string partName, 
219                 in long   nbParts, 
220                 in long   partitionner) // 0=METIS 1=SCOTCH
221                 raises (SALOME::SALOME_Exception);
222
223         /*!         
224          * Creates 3 resolutions of the given part of a distributed MED file (V2.3).
225          * High level function.
226          */
227         void decimePartition(
228                 in string medFilename, 
229                 in string partName, 
230                 in string fieldName,
231                 in long   fieldIt,
232                 in string filterName,
233                 in double tmed,
234                 in double tlow,
235                 in double radius,
236                 in long   boxing)
237                 raises (SALOME::SALOME_Exception);
238
239         //------------------------------------------------------------------------
240         // Low level API
241         // Create an object to encapsulate a MED file.
242         //------------------------------------------------------------------------
243         
244         /*!
245          * Create a MULTIPR_Obj object which encapsulate a MED file.
246          */
247         MULTIPR_Obj getObject(in string medFilename)
248                 raises (SALOME::SALOME_Exception);
249
250 }; // interface MULTIPR_Gen
251  
252   
253 }; // module MULTIPR_ORB
254
255 #endif // __MULTIPR_INTERFACE_CORBA__
256