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