1 // Project MULTIPR, IOLS WP1.2.1 - EDF/CS
2 // Partitioning/decimation module for the SALOME v3.2 platform
7 // Interface CORBA for the MULTIPR module
9 // Author: Olivier LE ROUX - CS, Virtual Reality Dpt
14 #ifndef __MULTIPR_INTERFACE_CORBA__
15 #define __MULTIPR_INTERFACE_CORBA__
17 #include "SALOME_Exception.idl"
18 #include "SALOME_Component.idl"
19 #include "SALOME_GenericObj.idl"
20 #include "SALOMEDS.idl" // to access study
25 * This package contains the interface MULTIPR_ORB used for %MULTIPR component.
31 typedef sequence<string> string_array;
34 //*************************************************************************
35 // Interface of the %MULTIPR component used to manage partition/decimation
36 //*************************************************************************
38 interface MULTIPR_Obj : SALOME::GenericObj
41 //---------------------------------------------------------------------
42 // Basic accessors/mutators
43 //--------------------------------------------------------------------
51 * Return true iff this obj represents a valid sequential MED file.
53 boolean isValidSequentialMEDFile();
56 * Return true iff this obj represents a valid distributed MED file.
58 boolean isValidDistributedMEDFile();
61 * Return the name of the associated MED file.
64 raises (SALOME::SALOME_Exception);
67 * Return the name of the associated sequential MED file (for a distributed MED file).
69 string getSeqFilename()
70 raises (SALOME::SALOME_Exception);
73 * Set the mesh to be partitionned/decimated.
74 * Assume sequential MED file.
76 void setMesh(in string meshName)
77 raises (SALOME::SALOME_Exception);
80 * Set the boxing parameter used for decimation (100 by default).
82 void setBoxing(in long boxing)
83 raises (SALOME::SALOME_Exception);
86 * Return the list of meshes contained in the associated MED file.
88 string_array getMeshes()
89 raises (SALOME::SALOME_Exception);
92 * Return the list of fields contained in the current mesh of the associated MED file.
94 string_array getFields(in string pPartList)
95 raises (SALOME::SALOME_Exception);
98 * Return the number of iterations for a given field.
100 long getTimeStamps(in string pPartList, in string fieldName)
101 raises (SALOME::SALOME_Exception);
104 * Get the minimum and maximum value of a part's field.
106 void getFieldMinMax(in string pPartName, in string pFieldName, inout float pMin, inout float pMax)
107 raises (SALOME::SALOME_Exception);
110 * Return the name of all partitions.
111 * Assume this object encapsulates a distributed MED file.
113 string_array getParts()
114 raises (SALOME::SALOME_Exception);
117 * Return all information about a part.
118 * Assume this object encapsulates a distributed MED file.
120 string getPartInfo(in string partName)
121 raises (SALOME::SALOME_Exception);
123 //---------------------------------------------------------------------
125 //--------------------------------------------------------------------
128 * Create a distributed MED file (v2.3) by extracting all the groups from the
129 * current mesh of the current MED sequential MED file.
131 * - the file is in MED format and can be read using MED file v2.3.
132 * - the file is sequential (not a distributed MED).
133 * - the file only contains TETRA10 elements (dimension of space and mesh is 3).
134 * - the file have no profil.
135 * \return the name of each part.
137 string_array partitionneDomaine()
138 raises (SALOME::SALOME_Exception);
141 * Create a distributed MED file (V2.3) by splitting a group of a MED file
142 * previously created by partitionneDomaine.
144 * - the file is a distributed MED file, previously created by partitionneDomaine()
145 * (=> each part only contain 1 mesh, TETRA10 elements only)
147 * - partitionner METIS=0 or SCOTCH=1
148 * \return the name of each part.
150 string_array partitionneGroupe(
153 in long partitionner)
154 raises (SALOME::SALOME_Exception);
157 * Create 3 resolutions of the given part of a distributed MED file (V2.3).
159 * - the file is a distributed MED file, previously created by
160 * partitionneDomaine() or partitionneGrain()
161 * (=> each part only contain 1 mesh, TETRA10 elements only)
163 string_array decimePartition(
167 in string filterName,
168 in string filterParams)
169 raises (SALOME::SALOME_Exception);
172 * Return useful information to configure decimation parameters.
173 * Depends on part, field and filter: generic operation.
175 string evalDecimationParams(
179 in string filterName,
180 in string filterParams)
181 raises (SALOME::SALOME_Exception);
184 * Remove all the parts starting with the given prefix from the distributed MED file.
185 * Example: if prefixPartName="PART_4" => remove "PART_4" and all sub-parts "PART_4_*",
187 * Assume this object encapsulates a distributed MED file.
189 void removeParts(in string prefixPartName)
190 raises (SALOME::SALOME_Exception);
193 * Get mesh statistics.
197 raises (SALOME::SALOME_Exception);
199 //---------------------------------------------------------------------
201 //--------------------------------------------------------------------
204 * Save the current distributed MED file to disk.
206 void save(in string path)
207 raises (SALOME::SALOME_Exception);
210 * Check save progress.
211 * \return current save progress in percents.
213 long getSaveProgress();
216 * Reset save progress to zero.
218 void resetSaveProgress();
220 }; // interface MULTIPR_Obj
223 //*************************************************************************
224 // Interface of the %MULTIPR component; used to create MULTIPR_Obj object
225 // and to define high level API.
226 //*************************************************************************
227 interface MULTIPR_Gen : Engines::Component, SALOMEDS::Driver
230 * Return the version of the MULTIPR library.
233 raises (SALOME::SALOME_Exception);
235 //------------------------------------------------------------------------
237 // Directly apply one of the 3 main operations of the MULTIPR module on a MED file
238 //------------------------------------------------------------------------
241 * Create a distributed MED file (v2.3) by extracting all the groups from the
242 * mesh of a sequential MED file.
243 * High level function.
245 void partitionneDomaine(
246 in string medFilename,
248 raises (SALOME::SALOME_Exception);
251 * Create a distributed MED file (V2.3) by splitting a group of a MED file
252 * previously created by partitionneDomaine().
253 * High level function.
255 void partitionneGroupe(
256 in string medFilename,
259 in long partitionner) // 0=METIS 1=SCOTCH
260 raises (SALOME::SALOME_Exception);
263 * Creates 3 resolutions of the given part of a distributed MED file (V2.3).
264 * High level function.
266 void decimePartition(
267 in string medFilename,
271 in string filterName,
272 in string filterParams)
273 raises (SALOME::SALOME_Exception);
275 //------------------------------------------------------------------------
277 // Create an object to encapsulate a MED file.
278 //------------------------------------------------------------------------
281 * Create a MULTIPR_Obj object which encapsulate a MED file.
283 MULTIPR_Obj getObject(in string medFilename)
284 raises (SALOME::SALOME_Exception);
286 //------------------------------------------------------------------------
288 // Methods to correctly serve Persistence and Dump Python.
289 //------------------------------------------------------------------------
292 * Set the current study
294 void SetCurrentStudy (in SALOMEDS::Study theStudy);
297 * Get the current study
299 SALOMEDS::Study GetCurrentStudy();
302 }; // interface MULTIPR_Gen
305 }; // module MULTIPR_ORB
307 #endif // __MULTIPR_INTERFACE_CORBA__