Salome HOME
update after merging trhe branches CEA_V3_0_x, OCC_V3_1_0_a1_x, and the main
[modules/med.git] / idl / MED.idl
1 // File: MED.idl
2 // Project: SALOME
3 // Copyright : CEA/DEN/DMSS/LGLS
4 // $Header$
5
6 /*!
7 This file contains the main IDL definitions of the %MED component in %SALOME application.
8 */
9
10 #ifndef MED_IDL
11 #define MED_IDL
12
13 /*!
14  \defgroup MED SALOME MED component
15
16  This component is dedicated to the mounting in memory of a .med file. some
17  services of that component store CORBA objects (MED, MESH, FIELD) in the
18  study and/or give a direct access to those objects.
19 */
20
21 #include "SALOME_GenericObj.idl"
22 #include "SALOME_Exception.idl"
23 #include "SALOME_Component.idl"
24 #include "SALOMEDS.idl"
25 #include "SALOME_Comm.idl"
26
27 module SALOME_MED {
28   /*!
29     An array of long
30   */
31   typedef sequence<long> long_array;
32   /*!
33     An array of double
34   */
35   typedef sequence<double> double_array;
36   /*!
37     An array of string
38   */
39   typedef sequence<string> string_array;
40   /*!
41     An array of boolean
42   */
43   typedef sequence<boolean> boolean_array;
44
45 /*! \ingroup MED
46 This package contains a set of interfaces used for %SALOME %MED component.
47 */
48
49
50   interface FIELD;
51   interface FAMILY;
52   interface GROUP;
53   interface MESH;
54   interface SUPPORT;
55
56 /*!
57 This enumeration contains a set of elements defining the type of geometrical elements which constitue
58 a %Mesh.
59 */
60   typedef long medGeometryElement;
61   const medGeometryElement MED_NONE = 0;
62   const medGeometryElement MED_POINT1 = 1;
63   const medGeometryElement MED_SEG2 = 102;
64   const medGeometryElement MED_SEG3 = 103;
65   const medGeometryElement MED_TRIA3 = 203;
66   const medGeometryElement MED_QUAD4 = 204;
67   const medGeometryElement MED_TRIA6 = 206;
68   const medGeometryElement MED_QUAD8 = 208;
69   const medGeometryElement MED_TETRA4 = 304;
70   const medGeometryElement MED_PYRA5 = 305;
71   const medGeometryElement MED_PENTA6 = 306;
72   const medGeometryElement MED_HEXA8 = 308;
73   const medGeometryElement MED_TETRA10 = 310;
74   const medGeometryElement MED_PYRA13 = 313;
75   const medGeometryElement MED_PENTA15 = 315;
76   const medGeometryElement MED_HEXA20 = 320;
77   const medGeometryElement MED_POLYGON = 400;
78   const medGeometryElement MED_POLYHEDRA = 500;
79   const medGeometryElement MED_ALL_ELEMENTS = 999;
80
81
82 /*!
83 This enumeration contains a set of elements defining the structural elements (entities) which constitue
84 a %Mesh.
85 */
86   typedef long medEntityMesh;
87   const medEntityMesh MED_CELL = 0;
88   const medEntityMesh MED_FACE = 1;
89   const medEntityMesh MED_EDGE = 2;
90   const medEntityMesh MED_NODE = 3;
91   const medEntityMesh MED_ALL_ENTITIES = 4;
92
93 /*!
94 This enumeration contains a set of modes to store data in an array.
95 For example an array of coordinates in 3D; tow storage may be considered:
96
97  - X1,Y1,Z1,X2,Y2,Z2,...,Xn,Yn,Zn if MED_FULL_INTERLACE
98  - X1,X2,...,Xn,Y1,Y2,...,Yn,Z1,Z2,...,Zn if MED_NO_INTERLACE
99 */
100   typedef long medModeSwitch;
101   const medModeSwitch MED_FULL_INTERLACE = 0;
102   const medModeSwitch MED_NO_INTERLACE = 1;
103
104 /*!
105 This enumeration contains a set of elements defining the type of connectivity.
106 */
107   typedef long medConnectivity;
108   const medConnectivity MED_NODAL = 0;
109   const medConnectivity MED_DESCENDING = 1;
110
111
112 /*!
113    enumeration contains a set of elements defining the type of driver.
114 */
115     typedef long medDriverTypes;
116     /*!<This driver is used for reading into memory of the mesh from %MED file.*/
117     const medDriverTypes MED_DRIVER  = 0;
118     const medDriverTypes VTK_DRIVER = 1;
119     const medDriverTypes NO_DRIVER = 2;
120
121   /*!
122     An array of %medGeometryElement
123   */
124   typedef sequence<medGeometryElement> medGeometryElement_array;
125
126   /*!
127     An array of %FAMILY
128   */
129   typedef sequence<FAMILY> Family_array;
130
131   /*!
132     An array of %GROUP
133   */
134   typedef sequence<GROUP> Group_array;
135
136   // ----------------------
137   // mesh interface
138   // ----------------------
139
140   interface MESH : SALOME::MultiCommClass, SALOME::GenericObj {
141     // Index range begins from 1
142
143     // General Informations
144     //---------------------
145
146     /*!
147       Returns the name of the mesh .
148     */
149     string getName() raises (SALOME::SALOME_Exception);
150
151     /*!
152       Returns space dimension.
153     */
154     long getSpaceDimension() raises (SALOME::SALOME_Exception);
155
156     /*!
157       Returns mesh dimension.
158
159       Example :
160       - we have only MED_TETRA4 in MED_CELL : MeshDimension = 3D
161       - we have only MED_QUAD4 in MED_CELL : MeshDimension = 2D
162       - we have both MED_SEG2 and MED_TRIA3 in MED_CELL : MeshDimension = 2D
163     */
164     long getMeshDimension() raises (SALOME::SALOME_Exception);
165
166     /*!
167         Pour Alliances
168     */
169     boolean getIsAGrid() raises (SALOME::SALOME_Exception);
170
171     /*!
172         Pour Alliances
173     */
174     boolean existConnectivity (in medConnectivity mode,
175                                in medEntityMesh entity)
176                                raises (SALOME::SALOME_Exception);
177
178     // Coordinates
179     //------------
180
181     /*!
182       Returns coordinate system :
183       - "CARTESIAN"
184       - "CYLINDRICAL"
185       - "SPHERICAL"
186     */
187     string getCoordinatesSystem() raises (SALOME::SALOME_Exception);
188
189     /*!
190       Returns the number of nodes defined in the mesh.
191     */
192     long getNumberOfNodes() raises (SALOME::SALOME_Exception);
193
194     /*!
195       Returns an array of coordinates stored in any type
196     */
197     SALOME_MED::double_array getCoordinates(in medModeSwitch typeSwitch)
198       raises (SALOME::SALOME_Exception);
199
200     /*!
201       Returns an array (Sender) of coordinates stored in any type.\n
202       It could be used in a Client code using the MED Client classes.
203      */
204     SALOME::SenderDouble getSenderForCoordinates(in medModeSwitch typeSwitch)
205       raises (SALOME::SALOME_Exception);
206     /*!
207      Returns coordinate  n° Number on axis n° Axis
208     */
209     double getCoordinate(in long Number, in long Axis)
210       raises (SALOME::SALOME_Exception);
211
212
213     /*!
214       Returns an array containing the names of coordinates.
215
216       Example :
217       - x,y,z
218       - r,teta,phi
219       - ...
220
221       It could be empty.
222     */
223     SALOME_MED::string_array getCoordinatesNames()
224       raises (SALOME::SALOME_Exception);
225
226     /*!
227       Returns an array containing the units of coordinates (cm, m, mm, ...)
228
229       It could be empty. By defult IS is used (meter).
230     */
231     SALOME_MED::string_array getCoordinatesUnits()
232       raises (SALOME::SALOME_Exception);
233
234     /*!
235       Returns the %SUPPORT containing the boundary elements
236       of the mesh.
237     */
238
239     SUPPORT getBoundaryElements(in medEntityMesh Entity)
240       raises (SALOME::SALOME_Exception);
241
242     /*!
243       Returns the %SUPPORT containing the boundary elements
244       of the support mySupport3D.
245     */
246     SUPPORT getSkin(in SUPPORT mySupport3D ) raises (SALOME::SALOME_Exception);
247
248     SALOME_MED::long_array getGlobalNumberingIndex(in medEntityMesh entity) ;
249
250     struct coordinateInfos
251     {
252         string                  coordSystem;
253         SALOME_MED::string_array   coordNames;
254         SALOME_MED::string_array   coordUnits;
255     };
256     coordinateInfos getCoordGlobal()    raises (SALOME::SALOME_Exception);
257
258
259
260     // Connectivity
261     // ------------
262
263     /*!
264       Returns the number of defferent %medGeometryElement types existing
265       in the specified entity.
266
267       \note
268       Not implemented for MED_ALL_ENTITIES.
269     */
270     long getNumberOfTypes(in medEntityMesh entity)
271       raises (SALOME::SALOME_Exception);
272
273     /*!
274       Returns an array of all %medGeometryElement types existing
275       in the mesh.
276
277       \note
278        Not implemented for MED_ALL_ENTITIES.
279     */
280     medGeometryElement_array getTypes(in medEntityMesh entity)
281       raises (SALOME::SALOME_Exception);
282
283     /*!
284       Returns the number of elements of type %medGeometryElement.
285
286       Note :
287       - Implemented for MED_ALL_ELEMENTS
288       - Not implemented for MED_ALL_ENTITIES
289     */
290     long getNumberOfElements(in medEntityMesh entity,
291                              in medGeometryElement geomElement)
292       raises (SALOME::SALOME_Exception);
293
294     /*!
295       Give, in full or no interlace mode (for nodal connectivity),
296       descending or nodal connectivity.
297
298       You must give a %medEntityMesh (ie:MED_EDGE) and a
299       %medGeometryElement (ie:MED_SEG3).
300     */
301     SALOME_MED::long_array getConnectivity(in medModeSwitch typeSwitch,
302                                         in medConnectivity mode,
303                                         in medEntityMesh entity,
304                                         in medGeometryElement geomElement)
305       raises (SALOME::SALOME_Exception);
306
307     /*!
308       Idem getConnectivity but return a Sender.\n
309       It could be used in a Client code using the MED Client classes.
310      */
311     SALOME::SenderInt getSenderForConnectivity(in medModeSwitch typeSwitch,
312                                         in medConnectivity mode,
313                                         in medEntityMesh entity,
314                                         in medGeometryElement geomElement)
315       raises (SALOME::SALOME_Exception);
316
317     /*!
318       Idem getConnectivity but return a Sender.\n
319       It could be used in a Client code using the MED Client classes.
320      */
321     SALOME::SenderInt getSenderForPolygonsConnectivity(in medConnectivity mode,
322                                                        in medEntityMesh entity)
323       raises (SALOME::SALOME_Exception);
324
325     /*!
326       Idem getConnectivityIndex but return a Sender.\n
327       It could be used in a Client code using the MED Client classes.
328      */
329     SALOME::SenderInt getSenderForPolygonsConnectivityIndex(in medConnectivity mode,
330                                                             in medEntityMesh entity)
331       raises (SALOME::SALOME_Exception);
332
333     /*!
334       Idem getConnectivity but return a Sender.\n
335       It could be used in a Client code using the MED Client classes.
336      */
337     SALOME::SenderInt getSenderForPolyhedronConnectivity(in medConnectivity mode)
338       raises (SALOME::SALOME_Exception);
339
340     /*!
341       Idem getConnectivityIndex but return a Sender.\n
342       It could be used in a Client code using the MED Client classes.
343      */
344     SALOME::SenderInt getSenderForPolyhedronIndex(in medConnectivity mode)
345       raises (SALOME::SALOME_Exception);
346
347     /*!
348       Idem getConnectivityIndex but return a Sender.\n
349       It could be used in a Client code using the MED Client classes.
350      */
351     SALOME::SenderInt getSenderForPolyhedronFacesIndex()
352       raises (SALOME::SALOME_Exception);
353
354     /*!
355       Give morse index array to use with
356       getConnectivity(MED_FULL_INTERLACE,mode,entity,MED_ALL_ELEMENTS).
357
358       Each value give start index for corresponding entity in
359       connectivity array.
360
361       Example : i-th element, j-th node of it :
362       - In C mode : Connectivity[ConnectivityIndex[i]-1+j-1]
363       - In fortran mode : Connectivity[ConnectivityIndex[i]+j]
364     */
365     SALOME_MED::long_array getConnectivityIndex(in medConnectivity mode,
366                                              in medEntityMesh entity)
367       raises (SALOME::SALOME_Exception);
368
369     /*!
370       Gets a global number of the element which have the same connectivity as the
371       connectivity argument.
372     */
373     long getElementNumber(in medConnectivity mode,
374                           in medEntityMesh entity,
375                           in medGeometryElement type,
376                           in SALOME_MED::long_array connectivity)
377       raises (SALOME::SALOME_Exception);
378
379     medGeometryElement   getElementType (in  medEntityMesh entity,
380                                        in long number)
381       raises (SALOME::SALOME_Exception);
382
383     /*!
384       Returns a reverse connectivity to MED_CELL.
385
386       If mode=MED_NODAL, the array contains, for each node, all cells
387       arround it.
388
389       If mode=MED_DESCENDING, the array contains, for each face (or edge),
390       the 2 cells of each side. First is cell which face normal is outgoing.
391     */
392     SALOME_MED::long_array getReverseConnectivity(in medConnectivity mode)
393       raises (SALOME::SALOME_Exception);
394
395     /*!
396       Give index array to use with getReverseConnectivity(MED_NODAL).
397
398       This method is not used with MED_DESCENDING mode,
399       because we have allways two cells.
400
401       See getConnectivityIndex for details.
402     */
403     SALOME_MED::long_array getReverseConnectivityIndex(in medConnectivity mode)
404       raises (SALOME::SALOME_Exception);
405
406     struct connectivityInfos
407     {
408         long                     numberOfNodes;
409         medGeometryElement_array meshTypes;
410         SALOME_MED::long_array      numberOfElements;
411         long                       entityDimension;
412     };
413     connectivityInfos getConnectGlobal(in medEntityMesh entity)
414     raises (SALOME::SALOME_Exception);
415
416     // Families and Groups
417     // -------------------
418
419     /*!
420       Returns the number of all families.
421     */
422     long getNumberOfFamilies(in medEntityMesh entity)
423       raises (SALOME::SALOME_Exception);
424
425     /*!
426       Returns the number of all groups.
427     */
428     long getNumberOfGroups(in medEntityMesh entity)
429       raises (SALOME::SALOME_Exception);
430
431     /*!
432       Returns an array of all families.
433     */
434     Family_array getFamilies(in medEntityMesh entity)
435       raises (SALOME::SALOME_Exception);
436
437     /*!
438       Returns the reference to i-th family.
439
440       \note
441       i is bounded by 1 and NumberOfFamilies.
442     */
443     FAMILY getFamily(in medEntityMesh entity,in long familyNumber)
444       raises (SALOME::SALOME_Exception);
445
446     /*!
447       Returns an array of all groups.
448     */
449     Group_array getGroups(in medEntityMesh entity)
450       raises (SALOME::SALOME_Exception);
451
452     /*!
453       Returns the reference to i-th group.
454
455       \note
456      i is bounded by 1 and NumberOfGroups.
457     */
458     GROUP getGroup(in medEntityMesh entity,in long groupNumber)
459       raises (SALOME::SALOME_Exception);
460
461     // Others
462     // ------
463
464     /*!
465       Returns a field on mySupport containing volume.
466
467       \note
468       mySupport must be on MED_CELL entity and MeshDimension must be 3D.
469     */
470     FIELD getVolume(in SUPPORT mySupport)
471       raises (SALOME::SALOME_Exception);
472
473     /*!
474       Returns a field on mySupport containing area.
475
476       \note
477       mySupport must be on MED_FACE entity.
478     */
479     FIELD getArea(in SUPPORT mySupport)
480       raises (SALOME::SALOME_Exception);
481
482     /*!
483       Returns a field on mySupport containing length.
484
485     \note
486      mySupport must be on MED_EDGE entity.
487     */
488     FIELD getLength(in SUPPORT mySupport)
489       raises (SALOME::SALOME_Exception);
490
491     /*!
492       Returns a field on mySupport containing normal.
493
494       \note
495       mySupport must be on MED_FACE entity if MeshDimension and
496       SpaceDimension=3D and on MED_EDGE if MeshDimension and SpaceDimension=2D.
497     */
498     FIELD getNormal(in SUPPORT mySupport)
499       raises (SALOME::SALOME_Exception);
500
501     /*!
502       Returns a field on mySupport containing barycenter.
503     */
504     FIELD getBarycenter(in SUPPORT mySupport)
505       raises (SALOME::SALOME_Exception);
506
507     /*
508       Returns a field on mySupport containing neighbourhood.
509     */
510     // FIELD getNeighbourhood(in SUPPORT mySupport)
511     // raises (SALOME::SALOME_Exception);
512
513     // Read & Write
514     // -----------
515
516     /*!
517       Adds the Mesh in the StudyManager.
518     */
519     void addInStudy(in SALOMEDS::Study myStudy, in MESH myIor )
520       raises (SALOME::SALOME_Exception, SALOMEDS::StudyBuilder::LockProtection);
521
522     //                          Add a MED/VTK/... driver
523     //                          Multiple drivers can be added whatever the type
524     long addDriver     (in medDriverTypes driverType, in string  fileName, in string meshName)
525                                         raises (SALOME::SALOME_Exception);
526     //                          Remove a driver
527     void rmDriver      (in long i)  raises (SALOME::SALOME_Exception);
528
529    //
530     void read          (in long i)  raises (SALOME::SALOME_Exception);
531     void write         (in long i, in string driverMeshName)
532                                     raises (SALOME::SALOME_Exception);
533
534 /*!
535 Internal Corba method.
536 */
537     long getCorbaIndex()        raises (SALOME::SALOME_Exception);
538     struct meshInfos
539     {
540            string name ;
541            long spaceDimension ;
542            long meshDimension;
543            long numberOfNodes ;
544            boolean isAGrid;
545            Family_array famNode;
546            Family_array famEdge;
547            Family_array famFace;
548            Family_array famCell;
549            Group_array  groupNode;
550            Group_array  groupEdge;
551            Group_array  groupFace;
552            Group_array  groupCell;
553     };
554     meshInfos getMeshGlobal()           raises (SALOME::SALOME_Exception);
555     boolean areEquals(in MESH other);
556   };
557
558
559   // ----------------------
560   // Support interface
561   // ----------------------
562
563   interface SUPPORT : SALOME::MultiCommClass, SALOME::GenericObj {
564
565     /*!
566       Returns the name of the support.
567     */
568     string getName() raises (SALOME::SALOME_Exception);
569
570     /*!
571       Returns the description of the support.
572     */
573     string getDescription() raises (SALOME::SALOME_Exception);
574
575     /*!
576       Returns a reference to the mesh.
577     */
578     MESH getMesh() raises (SALOME::SALOME_Exception);
579
580     /*!
581       Returns the type of %medEntityMesh used by the support.
582
583       \note
584       A support deals only with one entity's type
585       (for example : MED_FACE or MED_NODE)
586     */
587     medEntityMesh getEntity() raises (SALOME::SALOME_Exception);
588
589     /*!
590       Returns True if all elements of this entity are
591       engaged, False otherwise.
592
593       If True, you must use mesh reference (getMesh) to get more information.
594     */
595     boolean isOnAllElements() raises (SALOME::SALOME_Exception);
596
597     /*!
598       If the method %isOnAllElements() returns False, this method
599      returns the number of elements in the support.
600
601       Example : number of MED_TRIA3 or MED_ALL_ELEMETNS elements
602       in entity of support.
603
604       \note
605       If %SUPPORT is defined on MED_NODE, use MED_NONE %medGeometryElement
606       type.
607     */
608     long getNumberOfElements(in medGeometryElement geomElement)
609       raises (SALOME::SALOME_Exception);
610
611      long  getNumberOfTypes() raises (SALOME::SALOME_Exception);
612     /*!
613       If isOnAllElements is False, returns an array of %medGeometryElement
614       types used by the support.
615
616       %medEntityMesh is given by getEntity.
617     */
618     medGeometryElement_array getTypes() raises (SALOME::SALOME_Exception);
619
620
621     /*!
622       If the method %isOnAllElements() returns False, this method returns an array which
623      contains all numbers of given %medGeometryElement.
624
625       Numbering is global, ie numbers are bounded by 1 and
626       MESH::getNumberOfElement(entity,MED_ALL_ELEMENTS) and not by 1 and
627       MESH::getNumberOfElement(entity,geomElement).
628
629       \note
630       If %SUPPORT is defined on MED_NODE, use MED_NONE %medGeometryElement type.
631     */
632     SALOME_MED::long_array getNumber(in medGeometryElement geomElement)
633       raises (SALOME::SALOME_Exception);
634
635     /*!
636       Idem SALOME::Sender getNumber(in medGeometryElement geomElement) but returning Sender.\n
637       It could be used in a Client code using the MED Client classes.
638      */
639
640     SALOME::SenderInt getSenderForNumber(in medGeometryElement geomElement)
641       raises (SALOME::SALOME_Exception);
642
643     /*!
644       If the method %isOnAllElements() returns False, this method returns the index
645       of element number.
646
647       Use it with getNumber(MED_ALL_ELEMENTS).
648
649       \note
650        See the method %getConnectivityIndex for more details.
651     */
652     SALOME_MED::long_array getNumberIndex()
653       raises (SALOME::SALOME_Exception);
654
655     /*!
656       Idem SALOME_MED::long_array getNumberIndex() but return a Sender.\n
657       It could be used in a Client code using the MED Client classes.
658      */
659     SALOME::SenderInt getSenderForNumberIndex()
660       raises (SALOME::SALOME_Exception);
661
662     /*!
663       Returns the number of Gauss points for this %medGeometryElement.
664
665       \note
666       - Not defined if %SUPPORT is on MED_NODE.
667       - Not defined for MED_ALL_ELEMENTS %medGeometryElement type.
668      */
669     long getNumberOfGaussPoint(in medGeometryElement geomElement)
670                                 raises (SALOME::SALOME_Exception);
671
672     SALOME_MED::long_array getNumbersOfGaussPoint()
673                                 raises (SALOME::SALOME_Exception);
674
675     void getBoundaryElements()
676                                         raises (SALOME::SALOME_Exception);
677 /*!
678 Internal Corba method.
679 */
680     long getCorbaIndex()                raises (SALOME::SALOME_Exception);
681     struct supportInfos
682     {
683            string        name;
684            string        description;
685            boolean       isOnAllElements;
686            medEntityMesh entity;
687            long          numberOfGeometricType;
688            medGeometryElement_array types;
689            SALOME_MED::long_array nbEltTypes;
690     };
691     supportInfos getSupportGlobal()             raises (SALOME::SALOME_Exception);
692
693   };
694
695
696   //-----------------
697   // Family interface
698   //-----------------
699
700   interface FAMILY : SUPPORT
701     {
702
703       /*!
704         Returns Family identifier (Identifier
705         of the family in the mesh).
706
707         \note
708       There is precisely only one indentifier for each family.
709       */
710       long getIdentifier() raises (SALOME::SALOME_Exception);
711
712       /*!
713         Returns number of attributes.
714       */
715       long getNumberOfAttributes() raises (SALOME::SALOME_Exception);
716
717       /*!
718         Returns an array of all attributes' identifiers.
719         There is one for each attribute.
720       */
721       SALOME_MED::long_array getAttributesIdentifiers()
722         raises (SALOME::SALOME_Exception);
723
724       /*!
725         Returns identifier of i-th attribute.
726
727         \note
728       i is bounded by 1 and NumberOfAttributes.
729       */
730       long getAttributeIdentifier(in long i) raises (SALOME::SALOME_Exception);
731
732       /*!
733         Returns an array of all values of the attributes .
734         There is one value for each attribute.
735       */
736       SALOME_MED::long_array getAttributesValues()
737         raises (SALOME::SALOME_Exception);
738
739       /*!
740         Returns the value of i-th attribute.
741
742         \note
743       i is bounded by 1 and NumberOfAttributes.
744       */
745       long getAttributeValue(in long i) raises (SALOME::SALOME_Exception);
746
747       /*!
748         Returns an array of all descriptions of the attributes .
749         There is one description for each attribute.
750       */
751       SALOME_MED::string_array getAttributesDescriptions()
752         raises (SALOME::SALOME_Exception);
753
754       /*!
755         Returns the description of i-th attribute.
756
757         \note
758       i is bounded by 1 and NumberOfAttributes.
759       */
760       string getAttributeDescription(in long i)
761         raises (SALOME::SALOME_Exception);
762
763      /*!
764         Returns the number of groups the family belongs to.
765       */
766       long getNumberOfGroups()
767         raises (SALOME::SALOME_Exception);
768
769       /*!
770         Returns an array of names of groups the family belongs to .
771         There is one name for each group.
772       */
773       SALOME_MED::string_array getGroupsNames()
774         raises (SALOME::SALOME_Exception);
775
776       /*!
777         Returns the name of i-th group.
778
779         \note
780       i is bounded by 1 and NumberOfAttributes.
781       */
782       string getGroupName(in long i)
783         raises (SALOME::SALOME_Exception);
784
785
786     };
787
788
789   //----------------
790   // Group interface
791   //----------------
792   interface GROUP : SUPPORT
793     {
794
795       /*!
796         Returns the number of families in this group.
797       */
798       long getNumberOfFamilies() raises (SALOME::SALOME_Exception);
799
800       /*!
801         Returns an array of all families.
802       */
803       Family_array getFamilies() raises (SALOME::SALOME_Exception);
804
805       /*!
806         Returns a reference to the i-th family.
807
808         \note
809       i is bounded by 1 and NumberOfFamilies.
810       */
811       FAMILY getFamily(in long i) raises (SALOME::SALOME_Exception);
812
813     };
814
815
816   //----------------
817   // Field interface
818   //----------------
819
820   interface FIELD : SALOME::GenericObj
821     {
822
823       /*!
824         Returns the field name.
825       */
826       string getName() raises (SALOME::SALOME_Exception);
827
828       /*!
829         Returns the field description.
830       */
831       string getDescription() raises (SALOME::SALOME_Exception);
832
833       /*!
834         Returns a reference to the support
835         on which the field is defined.
836       */
837       SUPPORT getSupport() raises (SALOME::SALOME_Exception);
838
839       /*!
840         Returns the number of field's components.
841       */
842       long getNumberOfComponents() raises (SALOME::SALOME_Exception);
843
844       /*!
845         Returns an array containing components names.
846       */
847       SALOME_MED::string_array getComponentsNames()
848         raises (SALOME::SALOME_Exception);
849
850       /*!
851         Returns the name of i-th component.
852
853         \note
854         - i is bounded by 1 and NumberOfComponents.
855         - Name is mandatory for each field's component.
856       */
857       string getComponentName(in long i) raises (SALOME::SALOME_Exception);
858
859       /*!
860         Returns an array containing components units.
861       */
862       SALOME_MED::string_array getComponentsUnits()
863         raises (SALOME::SALOME_Exception);
864
865       /*!
866         Returns the unit of i-th component.
867
868         \note
869       i is bounded by 1 and NumberOfComponents.
870       */
871       string getComponentUnit(in long i) raises (SALOME::SALOME_Exception);
872
873       /*!
874         Returns an array containing components descriptions.
875       */
876       SALOME_MED::string_array getComponentsDescriptions()
877         raises (SALOME::SALOME_Exception);
878
879       /*!
880         Returns the description of i-th component.
881
882         \note
883         - i is bounded by 1 and NumberOfComponents.
884         - Name is mandatory for each field's component.
885       */
886       string getComponentDescription(in long i) raises (SALOME::SALOME_Exception);
887
888       /*!
889         Returns the iteration number.
890       */
891       long getIterationNumber() raises (SALOME::SALOME_Exception);
892
893       /*!
894         Returns time for this iteration.
895       */
896       double getTime() raises (SALOME::SALOME_Exception);
897
898       /*!
899         Returns order number use for
900         internal step in this iteration.
901       */
902       long getOrderNumber() raises (SALOME::SALOME_Exception);
903
904       // Read & Write
905       // -----------
906
907       long addDriver (in medDriverTypes driverType, in string  fileName, in string fieldName)
908         raises (SALOME::SALOME_Exception);
909
910       /*!
911      Removes a driver
912      */
913       void rmDriver (in long i)
914         raises (SALOME::SALOME_Exception);
915
916       //
917       void read (in long i)
918         raises (SALOME::SALOME_Exception);
919
920       /*!
921         Writes a field.
922       */
923       void write (in long i, in string driverFieldName)
924         raises (SALOME::SALOME_Exception);
925
926       /*!
927         Adds the Field in the StudyManager.
928       */
929       void addInStudy(in SALOMEDS::Study myStudy, in FIELD myIor )
930         raises (SALOME::SALOME_Exception, SALOMEDS::StudyBuilder::LockProtection);
931
932 /*!
933 Internal Corba method.
934 */
935       long getCorbaIndex()
936         raises (SALOME::SALOME_Exception);
937
938     };
939
940
941   interface FIELDDOUBLE : FIELD , SALOME::MultiCommClass {
942
943     /*!
944       Returns an array of values of the field
945     */
946     SALOME_MED::double_array getValue(in medModeSwitch mode)
947       raises (SALOME::SALOME_Exception);
948
949     /*!
950       Idem as getValue but it could be used in a Client code using the
951       MED Client classes.
952     */
953     SALOME::SenderDouble getSenderForValue(in medModeSwitch mode)
954       raises (SALOME::SALOME_Exception);
955   };
956
957   interface FIELDINT : FIELD , SALOME::MultiCommClass {
958
959     /*!
960       Returns an array of values of the field
961     */
962     SALOME_MED::long_array getValue(in medModeSwitch mode)
963       raises (SALOME::SALOME_Exception);
964
965     /*!
966       Idem as getValue but it could be used in a Client code using the
967       MED Client classes.
968     */
969     SALOME::SenderInt getSenderForValue(in medModeSwitch mode)
970       raises (SALOME::SALOME_Exception);
971   };
972
973   // MED interface
974
975   interface MED : SALOME::GenericObj {
976     /*!
977       returns the number of meshes in the %MED object.
978      */
979     long                   getNumberOfMeshes () raises (SALOME::SALOME_Exception);
980     /*!
981       returns the number of fields in the %MED object.
982      */
983     long                   getNumberOfFields () raises (SALOME::SALOME_Exception);
984     /*!
985       returns an array which contains the name of each meshes in the %MED object.
986      */
987     SALOME_MED::string_array  getMeshNames      () raises (SALOME::SALOME_Exception);
988     /*!
989       returns an array which contains the name of each fields in the %MED object.
990      */
991     SALOME_MED::string_array  getFieldNames     () raises (SALOME::SALOME_Exception);
992     /*!
993       giving a mesh name, it returns the corresponding %MESH pointer.
994      */
995     MESH                   getMeshByName     ( in string  meshName)  raises (SALOME::SALOME_Exception);
996     /*!
997       giving a %FIELD pointer, it returns the corresponding %MESH pointer of the mesh
998       on which the field lies.
999      */
1000     MESH                   getMesh           ( in FIELD  fieldPtr)   raises (SALOME::SALOME_Exception);
1001     /*!
1002       giving a field name, it returns the number of iteration in the corresponding %FIELD object.
1003      */
1004     long getFieldNumberOfIteration(in string fieldName) raises (SALOME::SALOME_Exception);
1005     /*!
1006       giving a field name and an integer %i, it returns a couple of integers: the time iteration and
1007       the order number of the %i^th iteration of the corresponding %FIELD object.
1008      */
1009     SALOME_MED::long_array  getFieldIteration(in string fieldName, in long i) raises (SALOME::SALOME_Exception);
1010     /*!
1011       giving a field name, it returns an array of integers: the list of the time iteration and
1012       the order number couple of all iterations of the corresponding %FIELD object.
1013
1014       (DT1, IT1, DT2, IT2, ... , DTn, ITn) when n is the number of the %FIELD iterations.
1015      */
1016     SALOME_MED::long_array  getFieldIterations(in string fieldName) raises (SALOME::SALOME_Exception);
1017     /*!
1018       giving a field name, a time iteration and an order number, it returns the corresponding %FIELD oject.
1019      */
1020     FIELD                  getField          ( in string fieldName,
1021                                                in long pasTemps,
1022                                                in long numOrdre )    raises (SALOME::SALOME_Exception);
1023
1024
1025     // Add a MED/VTK/... driver to a MED'GEN' object to
1026     // be able to read/write files preserving  meshes<-->fields association
1027     // Multiple drivers can be added whatever the type.
1028     // The access point in the <long> returned
1029     long addDriver     (in medDriverTypes driverType, in string  fileName)
1030                                         raises (SALOME::SALOME_Exception);
1031     /*!
1032    Removes the driver
1033     */
1034     void rmDriver      (in long i)  raises (SALOME::SALOME_Exception);
1035     /*!
1036     Reads the structure of the %MED file
1037     */
1038     void readFileStruct(in long i)  raises (SALOME::SALOME_Exception);
1039     void writeFrom     (in long i)  raises (SALOME::SALOME_Exception);
1040     void write         (in long i)  raises (SALOME::SALOME_Exception);
1041
1042     void addMesh  (in MESH   ptrMesh   ) raises (SALOME::SALOME_Exception);
1043     void addField (in FIELD  ptrField  ) raises (SALOME::SALOME_Exception);
1044
1045     void addInStudy (in SALOMEDS::Study myStudy, in MED medPtr) raises (SALOME::SALOME_Exception, SALOMEDS::StudyBuilder::LockProtection);
1046   };
1047 };
1048
1049 #endif /* MED_IDL */