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