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