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