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