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