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