Salome HOME
Ze test of 1SGTUMesh.
[modules/med.git] / idl / MED.idl
index fd0cc5ac608c0b38b7aa1ed897d37552de30fde3..de9e4c06dcfbee62ee78c602d1ae7ac374efab45 100644 (file)
@@ -1,51 +1,66 @@
+// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
 // File: MED.idl
 // Project: SALOME
-// Copyright : CEA/DEN/DMSS/LGLS
-// $Header$
-/*! 
-This file contains the main IDL difinitions of the %MED component in %SALOME application.
+//
+/*!
+This file contains the main IDL definitions of the %MED component in %SALOME application.
 */
+
 #ifndef MED_IDL
 #define MED_IDL
+
 /*!
  \defgroup MED SALOME MED component
+
+ This component is dedicated to the mounting in memory of a .med file. some
+ services of that component store CORBA objects (MED, MESH, FIELD) in the
+ study and/or give a direct access to those objects.
 */
 
+#include "SALOME_GenericObj.idl"
 #include "SALOME_Exception.idl"
 #include "SALOME_Component.idl"
+#include "SALOME_Types.idl"
 #include "SALOMEDS.idl"
+#include "SALOME_Comm.idl"
 
-module SALOME_MED {
-  /*!
-    An array of long
-  */
-  typedef sequence<long> long_array;
-  /*!
-    An array of double
-  */
-  typedef sequence<double> double_array;
-  /*!
-    An array of string
-  */
-  typedef sequence<string> string_array;
-  /*!
-    An array of boolean
-  */
-  typedef sequence<boolean> boolean_array;
-
+module SALOME_MED
+{
 /*! \ingroup MED
 This package contains a set of interfaces used for %SALOME %MED component.
-*/ 
+*/
 
 
   interface FIELD;
   interface FAMILY;
   interface GROUP;
+  interface GMESH;
   interface MESH;
   interface SUPPORT;
 
-/*! 
-This enumeration contains a set of elements difining the type of geometrical elements which constitue 
+/*!
+This enumeration contains a set of elements defining the type of geometrical elements which constitue
 a %Mesh.
 */
   typedef long medGeometryElement;
@@ -65,11 +80,13 @@ a %Mesh.
   const medGeometryElement MED_PYRA13 = 313;
   const medGeometryElement MED_PENTA15 = 315;
   const medGeometryElement MED_HEXA20 = 320;
+  const medGeometryElement MED_POLYGON = 400;
+  const medGeometryElement MED_POLYHEDRA = 500;
   const medGeometryElement MED_ALL_ELEMENTS = 999;
 
 
-/*! 
-This enumeration contains a set of elements difining the structural elements (entities) which constitue 
+/*!
+This enumeration contains a set of elements defining the structural elements (entities) which constitue
 a %Mesh.
 */
   typedef long medEntityMesh;
@@ -79,17 +96,28 @@ a %Mesh.
   const medEntityMesh MED_NODE = 3;
   const medEntityMesh MED_ALL_ENTITIES = 4;
 
+/*!
+This enumeration contains a set of modes to store data in an array.
+For example an array of coordinates in 3D; tow storage may be considered:
+
+ - X1,Y1,Z1,X2,Y2,Z2,...,Xn,Yn,Zn if MED_FULL_INTERLACE
+ - X1,X2,...,Xn,Y1,Y2,...,Yn,Z1,Z2,...,Zn if MED_NO_INTERLACE
+*/
   typedef long medModeSwitch;
   const medModeSwitch MED_FULL_INTERLACE = 0;
   const medModeSwitch MED_NO_INTERLACE = 1;
+  const medModeSwitch MED_NO_INTERLACE_BY_TYPE = 2;
 
+/*!
+This enumeration contains a set of elements defining the type of connectivity.
+*/
   typedef long medConnectivity;
   const medConnectivity MED_NODAL = 0;
   const medConnectivity MED_DESCENDING = 1;
 
 
-/*! 
-   enumeration contains a set of elements difining the type of driver.
+/*!
+   enumeration contains a set of elements defining the type of driver.
 */
     typedef long medDriverTypes;
     /*!<This driver is used for reading into memory of the mesh from %MED file.*/
@@ -98,23 +126,26 @@ a %Mesh.
     const medDriverTypes NO_DRIVER = 2;
 
   /*!
-    An array of <VAR>medGeometryElement</VAR>
+    An array of %medGeometryElement
   */
   typedef sequence<medGeometryElement> medGeometryElement_array;
+
   /*!
     An array of %FAMILY
   */
   typedef sequence<FAMILY> Family_array;
+
   /*!
     An array of %GROUP
   */
   typedef sequence<GROUP> Group_array;
-  
+
   // ----------------------
-  // mesh interface
+  // base mesh interface
   // ----------------------
 
-  interface MESH {
+  interface GMESH : SALOME::MultiCommClass, SALOME::GenericObj 
+  {
     // Index range begins from 1
 
     // General Informations
@@ -124,7 +155,7 @@ a %Mesh.
       Returns the name of the mesh .
     */
     string getName() raises (SALOME::SALOME_Exception);
-    
+
     /*!
       Returns space dimension.
     */
@@ -132,7 +163,7 @@ a %Mesh.
 
     /*!
       Returns mesh dimension.
-      
+
       Example :
       - we have only MED_TETRA4 in MED_CELL : MeshDimension = 3D
       - we have only MED_QUAD4 in MED_CELL : MeshDimension = 2D
@@ -145,55 +176,30 @@ a %Mesh.
     */
     boolean getIsAGrid() raises (SALOME::SALOME_Exception);
 
-    /*!
-       Pour Alliances
-    */
-    boolean existConnectivity (in medConnectivity mode,
-                              in medEntityMesh entity)
-                              raises (SALOME::SALOME_Exception);
-
-    // Coordinates
-    //------------
-
     /*!
       Returns coordinate system :
       - "CARTESIAN"
       - "CYLINDRICAL"
       - "SPHERICAL"
     */
-    string getCoordinatesSystem() raises (SALOME::SALOME_Exception); 
+    string getCoordinatesSystem() raises (SALOME::SALOME_Exception);
 
     /*!
       Returns the number of nodes defined in the mesh.
     */
     long getNumberOfNodes() raises (SALOME::SALOME_Exception);
 
-    /*!
-      Returns an array of coordinates  :
-      - X1,Y1,Z1,X2,Y2,...,Zn if MED_FULL_INTERLACE
-      - X1,X2,...Xn,Y1,Y2,...Zn if MED_NO_INTERLACE
-    */
-    SALOME_MED::double_array getCoordinates(in medModeSwitch typeSwitch)
-      raises (SALOME::SALOME_Exception);
-
-    /*!
-     Returns coordinate  n° Number on axis n° Axis 
-    */
-    double getCoordinate(in long Number, in long Axis)
-      raises (SALOME::SALOME_Exception);
-      
-
     /*!
       Returns an array containing the names of coordinates.
-      
+
       Example :
       - x,y,z
       - r,teta,phi
       - ...
-      
+
       It could be empty.
     */
-    SALOME_MED::string_array getCoordinatesNames()
+    SALOME_TYPES::ListOfString getCoordinatesNames()
       raises (SALOME::SALOME_Exception);
 
     /*!
@@ -201,19 +207,34 @@ a %Mesh.
 
       It could be empty. By defult IS is used (meter).
     */
-    SALOME_MED::string_array getCoordinatesUnits()
+    SALOME_TYPES::ListOfString getCoordinatesUnits()
+      raises (SALOME::SALOME_Exception);
+
+    /*!
+      Returns the %SUPPORT containing the boundary elements
+      of the mesh.
+    */
+
+    SUPPORT getBoundaryElements(in medEntityMesh Entity)
+      raises (SALOME::SALOME_Exception);
+
+    /*!
+      Returns the %SUPPORT defined on all the element of an Entity.
+    */
+    SUPPORT getSupportOnAll(in medEntityMesh Entity)
       raises (SALOME::SALOME_Exception);
 
-    SUPPORT getBoundaryElements(in medEntityMesh Entity)            
-                                            raises (SALOME::SALOME_Exception);
+    /*!
+      Returns the %SUPPORT containing the boundary elements
+      of the support mySupport3D.
+    */
     SUPPORT getSkin(in SUPPORT mySupport3D ) raises (SALOME::SALOME_Exception);
 
-    SALOME_MED::long_array getGlobalNumberingIndex(in medEntityMesh entity) ;
     struct coordinateInfos
     {
-       string                  coordSystem;
-       SALOME_MED::string_array   coordNames;
-       SALOME_MED::string_array   coordUnits;
+       string                   coordSystem;
+       SALOME_TYPES::ListOfString coordNames;
+       SALOME_TYPES::ListOfString coordUnits;
     };
     coordinateInfos getCoordGlobal()   raises (SALOME::SALOME_Exception);
 
@@ -223,29 +244,29 @@ a %Mesh.
     // ------------
 
     /*!
-      Returns the number of different <VAR>medGeometryElement</VAR> types existing 
+      Returns the number of defferent %medGeometryElement types existing
       in the specified entity.
 
-      \note 
+      \note
       Not implemented for MED_ALL_ENTITIES.
     */
     long getNumberOfTypes(in medEntityMesh entity)
       raises (SALOME::SALOME_Exception);
 
     /*!
-      Returns an array of all <VAR>medGeometryElement</VAR> types existing 
+      Returns an array of all %medGeometryElement types existing
       in the mesh.
 
-      \note 
+      \note
        Not implemented for MED_ALL_ENTITIES.
     */
     medGeometryElement_array getTypes(in medEntityMesh entity)
       raises (SALOME::SALOME_Exception);
 
     /*!
-      Returns the number of elements of type <VAR>medGeometryElement</VAR>.
+      Returns the number of elements of type %medGeometryElement.
 
-      Note : 
+      Note :
       - Implemented for MED_ALL_ELEMENTS
       - Not implemented for MED_ALL_ENTITIES
     */
@@ -253,80 +274,10 @@ a %Mesh.
                             in medGeometryElement geomElement)
       raises (SALOME::SALOME_Exception);
 
-    /*!
-      Give, in full or no interlace mode (for nodal connectivity),
-      descending or nodal connectivity.
-
-      You must give a <VAR>medEntityMesh</VAR> (ie:MED_EDGE) and a 
-      <VAR>medGeometryElement</VAR> (ie:MED_SEG3).
-    */
-    SALOME_MED::long_array getConnectivity(in medModeSwitch typeSwitch,
-                                       in medConnectivity mode,
-                                       in medEntityMesh entity,
-                                       in medGeometryElement geomElement)
-      raises (SALOME::SALOME_Exception);
-
-    /*!
-      Give morse index array to use with 
-      getConnectivity(MED_FULL_INTERLACE,mode,entity,MED_ALL_ELEMENTS).
-
-      Each value give start index for corresponding entity in 
-      connectivity array.
-
-      Example : i-th element, j-th node of it :
-      - In C mode : Connectivity[ConnectivityIndex[i]-1+j-1]
-      - In fortran mode : Connectivity[ConnectivityIndex[i]+j]
-    */
-    SALOME_MED::long_array getConnectivityIndex(in medConnectivity mode,
-                                            in medEntityMesh entity)
-      raises (SALOME::SALOME_Exception);
-
-    /*!
-      Gets a global number of the element which have the same connectivity as the  
-      connectivity argument.
-    */
-    long getElementNumber(in medConnectivity mode, 
-                         in medEntityMesh entity, 
-                         in medGeometryElement type, 
-                         in SALOME_MED::long_array connectivity) 
-      raises (SALOME::SALOME_Exception);
-
-    medGeometryElement   getElementType (in  medEntityMesh entity, 
+    medGeometryElement   getElementType (in  medEntityMesh entity,
                                       in long number)
       raises (SALOME::SALOME_Exception);
 
-    /*!
-      Returns a reverse connectivity to MED_CELL.
-
-      If mode=MED_NODAL, the array contains, for each node, all cells 
-      arround it.
-
-      If mode=MED_DESCENDING, the array contains, for each face (or edge), 
-      the 2 cells of each side. First is cell which face normal is outgoing.
-    */
-    SALOME_MED::long_array getReverseConnectivity(in medConnectivity mode)
-      raises (SALOME::SALOME_Exception);
-
-    /*!
-      Give index array to use with getReverseConnectivity(MED_NODAL).
-
-      This method is not used with MED_DESCENDING mode, 
-      because we have allways two cells.
-
-      See getConnectivityIndex for details.
-    */
-    SALOME_MED::long_array getReverseConnectivityIndex(in medConnectivity mode)
-      raises (SALOME::SALOME_Exception);
-
-    struct connectivityInfos
-    {
-       long                     numberOfNodes;
-        medGeometryElement_array meshTypes;
-       SALOME_MED::long_array      numberOfElements;
-    };
-    connectivityInfos getConnectGlobal(in medEntityMesh entity) 
-    raises (SALOME::SALOME_Exception);
-
     // Families and Groups
     // -------------------
 
@@ -351,7 +302,7 @@ a %Mesh.
     /*!
       Returns the reference to i-th family.
 
-      \note 
+      \note
       i is bounded by 1 and NumberOfFamilies.
     */
     FAMILY getFamily(in medEntityMesh entity,in long familyNumber)
@@ -366,7 +317,7 @@ a %Mesh.
     /*!
       Returns the reference to i-th group.
 
-      \note 
+      \note
      i is bounded by 1 and NumberOfGroups.
     */
     GROUP getGroup(in medEntityMesh entity,in long groupNumber)
@@ -378,7 +329,7 @@ a %Mesh.
     /*!
       Returns a field on mySupport containing volume.
 
-      \note 
+      \note
       mySupport must be on MED_CELL entity and MeshDimension must be 3D.
     */
     FIELD getVolume(in SUPPORT mySupport)
@@ -387,7 +338,7 @@ a %Mesh.
     /*!
       Returns a field on mySupport containing area.
 
-      \note 
+      \note
       mySupport must be on MED_FACE entity.
     */
     FIELD getArea(in SUPPORT mySupport)
@@ -406,7 +357,7 @@ a %Mesh.
       Returns a field on mySupport containing normal.
 
       \note
-      mySupport must be on MED_FACE entity if MeshDimension and 
+      mySupport must be on MED_FACE entity if MeshDimension and
       SpaceDimension=3D and on MED_EDGE if MeshDimension and SpaceDimension=2D.
     */
     FIELD getNormal(in SUPPORT mySupport)
@@ -430,24 +381,24 @@ a %Mesh.
     /*!
       Adds the Mesh in the StudyManager.
     */
-    void addInStudy(in SALOMEDS::Study myStudy, in MESH myIor )
+    void addInStudy(in SALOMEDS::Study myStudy, in GMESH myIor )
       raises (SALOME::SALOME_Exception, SALOMEDS::StudyBuilder::LockProtection);
 
     //                                 Add a MED/VTK/... driver
     //                          Multiple drivers can be added whatever the type
-    long addDriver     (in medDriverTypes driverType, in string  fileName, in string meshName) 
+    long addDriver     (in medDriverTypes driverType, in string  fileName, in string meshName)
                                         raises (SALOME::SALOME_Exception);
     //                          Remove a driver
     void rmDriver      (in long i)  raises (SALOME::SALOME_Exception);
 
    //
     void read          (in long i)  raises (SALOME::SALOME_Exception);
-    void write         (in long i, in string driverMeshName)  
+    void write         (in long i, in string driverMeshName)
                                     raises (SALOME::SALOME_Exception);
-  
+
 /*!
-Internal Corba method. 
-*/ 
+Internal Corba method.
+*/
     long getCorbaIndex()       raises (SALOME::SALOME_Exception);
     struct meshInfos
     {
@@ -466,15 +417,154 @@ Internal Corba method.
           Group_array  groupCell;
     };
     meshInfos getMeshGlobal()          raises (SALOME::SALOME_Exception);
+    boolean areEquals(in GMESH other);
+
+    MESH convertInMESH();
   };
 
-  
+  // ----------------------
+  // mesh interface
+  // ----------------------
+
+  interface MESH : GMESH {
+
+    /*!
+       Pour Alliances
+    */
+    boolean existConnectivity (in medConnectivity mode,
+                              in medEntityMesh entity)
+                              raises (SALOME::SALOME_Exception);
+
+    // Coordinates
+    //------------
+
+    /*!
+      Returns an array of coordinates stored in any type
+    */
+    SALOME_TYPES::ListOfDouble getCoordinates(in medModeSwitch typeSwitch)
+      raises (SALOME::SALOME_Exception);
+
+    /*!
+      Returns an array (Sender) of coordinates stored in any type.\n
+      It could be used in a Client code using the MED Client classes.
+     */
+    SALOME::SenderDouble getSenderForCoordinates(in medModeSwitch typeSwitch)
+      raises (SALOME::SALOME_Exception);
+    /*!
+     Returns coordinate  n° Number on axis n° Axis
+    */
+    double getCoordinate(in long Number, in long Axis)
+      raises (SALOME::SALOME_Exception);
+
+    /*!
+      Returns the %SUPPORT containing the boundary elements
+      of the mesh.
+    */
+
+    SALOME_TYPES::ListOfLong getGlobalNumberingIndex(in medEntityMesh entity) ;
+
+
+    // Connectivity
+    // ------------
+
+    /*!
+      Give, in full or no interlace mode (for nodal connectivity),
+      descending or nodal connectivity.
+
+      You must give a %medEntityMesh (ie:MED_EDGE) and a
+      %medGeometryElement (ie:MED_SEG3).
+    */
+    SALOME_TYPES::ListOfLong getConnectivity(in medConnectivity mode,
+                                           in medEntityMesh entity,
+                                           in medGeometryElement geomElement)
+      raises (SALOME::SALOME_Exception);
+
+    /*!
+      Idem getConnectivity but return a Sender.\n
+      It could be used in a Client code using the MED Client classes.
+     */
+    SALOME::SenderInt getSenderForConnectivity(in medConnectivity mode,
+                                               in medEntityMesh entity,
+                                               in medGeometryElement geomElement)
+      raises (SALOME::SALOME_Exception);
+
+    /*!
+      Give morse index array to use with
+      getConnectivity(mode,entity,MED_ALL_ELEMENTS).
+
+      Each value give start index for corresponding entity in
+      connectivity array.
+
+      Example : i-th element, j-th node of it :
+      - In C mode : Connectivity[ConnectivityIndex[i]-1+j-1]
+      - In fortran mode : Connectivity[ConnectivityIndex[i]+j]
+    */
+    SALOME_TYPES::ListOfLong getConnectivityIndex(in medConnectivity mode,
+                                                in medEntityMesh entity)
+      raises (SALOME::SALOME_Exception);
+
+    /*!
+      Idem getConnectivityIndex but return a Sender.\n
+      It could be used in a Client code using the MED Client classes.
+     */
+    SALOME::SenderInt getSenderForConnectivityIndex(in medConnectivity mode,
+                                                    in medEntityMesh entity,
+                                                    in medGeometryElement geomElement)
+      raises (SALOME::SALOME_Exception);
+
+    /*!
+      Gets a global number of the element which have the same connectivity as the
+      connectivity argument.
+    */
+    long getElementNumber(in medConnectivity mode,
+                         in medEntityMesh entity,
+                         in medGeometryElement type,
+                         in SALOME_TYPES::ListOfLong connectivity)
+      raises (SALOME::SALOME_Exception);
+
+    /*!
+      Returns a reverse connectivity to MED_CELL.
+
+      If mode=MED_NODAL, the array contains, for each node, all cells
+      arround it.
+
+      If mode=MED_DESCENDING, the array contains, for each face (or edge),
+      the 2 cells of each side. First is cell which face normal is outgoing.
+    */
+    SALOME_TYPES::ListOfLong getReverseConnectivity(in medConnectivity mode)
+      raises (SALOME::SALOME_Exception);
+
+    /*!
+      Give index array to use with getReverseConnectivity(MED_NODAL).
+
+      This method is not used with MED_DESCENDING mode,
+      because we have allways two cells.
+
+      See getConnectivityIndex for details.
+    */
+    SALOME_TYPES::ListOfLong getReverseConnectivityIndex(in medConnectivity mode)
+      raises (SALOME::SALOME_Exception);
+
+    struct connectivityInfos
+    {
+       long                     numberOfNodes;
+        medGeometryElement_array meshTypes;
+       SALOME_TYPES::ListOfLong   numberOfElements;
+       SALOME_TYPES::ListOfLong   nodalConnectivityLength;
+        long                     entityDimension;
+    };
+    connectivityInfos getConnectGlobal(in medEntityMesh entity)
+    raises (SALOME::SALOME_Exception);
+
+  };
+
+
   // ----------------------
   // Support interface
   // ----------------------
-  
-  interface SUPPORT {
-    
+
+  interface SUPPORT : SALOME::MultiCommClass, SALOME::GenericObj {
+
     /*!
       Returns the name of the support.
     */
@@ -488,13 +578,13 @@ Internal Corba method.
     /*!
       Returns a reference to the mesh.
     */
-    MESH getMesh() raises (SALOME::SALOME_Exception);
+    GMESH getMesh() raises (SALOME::SALOME_Exception);
 
     /*!
-      Returns the type of <VAR>medEntityMesh</VAR> used by the support. 
+      Returns the type of %medEntityMesh used by the support.
 
-      \note 
-      A support deals only with one entity's type 
+      \note
+      A support deals only with one entity's type
       (for example : MED_FACE or MED_NODE)
     */
     medEntityMesh getEntity() raises (SALOME::SALOME_Exception);
@@ -508,71 +598,89 @@ Internal Corba method.
     boolean isOnAllElements() raises (SALOME::SALOME_Exception);
 
     /*!
-      If the method <VAR>isOnAllElements</VAR> returns False, this method 
+      If the method %isOnAllElements() returns False, this method
      returns the number of elements in the support.
 
-      Example : number of MED_TRIA3 or MED_ALL_ELEMETNS elements 
+      Example : number of MED_TRIA3 or MED_ALL_ELEMETNS elements
       in entity of support.
 
-      \note 
-      If %SUPPORT is defined on MED_NODE, use MED_NONE <VAR>medGeometryElement</VAR> type.
+      \note
+      If %SUPPORT is defined on MED_NODE, use MED_NONE %medGeometryElement
+      type.
     */
     long getNumberOfElements(in medGeometryElement geomElement)
       raises (SALOME::SALOME_Exception);
 
      long  getNumberOfTypes() raises (SALOME::SALOME_Exception);
     /*!
-      If isOnAllElements is False, returns an array of <VAR>medGeometryElement</VAR>
+      If isOnAllElements is False, returns an array of %medGeometryElement
       types used by the support.
 
-      <VAR>medEntityMesh</VAR> is given by getEntity.
+      %medEntityMesh is given by getEntity.
     */
     medGeometryElement_array getTypes() raises (SALOME::SALOME_Exception);
 
 
     /*!
-      If the method <VAR>isOnAllElements</VAR> returns False, this method returns an array which 
-     contains all numbers of given <VAR>medGeometryElement</VAR>.
+      If the method %isOnAllElements() returns False, this method returns an array which
+     contains all numbers of given %medGeometryElement.
 
-      Numbering is global, ie numbers are bounded by 1 and 
-      MESH::getNumberOfElement(entity,MED_ALL_ELEMENTS) and not by 1 and 
+      Numbering is global, ie numbers are bounded by 1 and
+      MESH::getNumberOfElement(entity,MED_ALL_ELEMENTS) and not by 1 and
       MESH::getNumberOfElement(entity,geomElement).
 
       \note
-      If %SUPPORT is defined on MED_NODE, use MED_NONE <VAR>medGeometryElement</VAR> type.
+      If %SUPPORT is defined on MED_NODE, use MED_NONE %medGeometryElement type.
     */
-    SALOME_MED::long_array getNumber(in medGeometryElement geomElement)
+    SALOME_TYPES::ListOfLong getNumber(in medGeometryElement geomElement)
       raises (SALOME::SALOME_Exception);
 
     /*!
-      If the method <VAR>isOnAllElements</VAR> returns False, this method returns the index 
-      of element number.
-      
-      Use it with getNumber(MED_ALL_ELEMENTS). 
-      
-      \note 
-       See the method <VAR>getConnectivityIndex</VAR> for more details.
+      If the method %isOnAllElements() returns False, this method returns an array which
+     contains all numbers of given %medGeometryElement.
+
+      Numbering is from file, ie numbers are bounded by 1 and
+      MESH::getNumberOfElement(entity,MED_ALL_ELEMENTS) and not by 1 and
+      MESH::getNumberOfElement(entity,geomElement).
+
+      \note
+      If %SUPPORT is defined on MED_NODE, use MED_NONE %medGeometryElement type.
     */
-    SALOME_MED::long_array getNumberIndex()
+    SALOME_TYPES::ListOfLong getNumberFromFile(in medGeometryElement geomElement)
       raises (SALOME::SALOME_Exception);
-    /*!
-      Returns the number of Gauss points for this <VAR>medGeometryElement</VAR>.
 
-      \note 
-      - Not defined if %SUPPORT is on MED_NODE.
-      - Not defined for MED_ALL_ELEMENTS <VAR>medGeometryElement</VAR> type.
+    /*!
+      Idem SALOME::Sender getNumber(in medGeometryElement geomElement) but returning Sender.\n
+      It could be used in a Client code using the MED Client classes.
      */
-    long getNumberOfGaussPoint(in medGeometryElement geomElement)
-                               raises (SALOME::SALOME_Exception);
 
-    SALOME_MED::long_array getNumbersOfGaussPoint()
-                               raises (SALOME::SALOME_Exception);
+    SALOME::SenderInt getSenderForNumber(in medGeometryElement geomElement)
+      raises (SALOME::SALOME_Exception);
+
+    /*!
+      If the method %isOnAllElements() returns False, this method returns the index
+      of element number.
+
+      Use it with getNumber(MED_ALL_ELEMENTS).
+
+      \note
+       See the method %getConnectivityIndex for more details.
+    */
+    SALOME_TYPES::ListOfLong getNumberIndex()
+      raises (SALOME::SALOME_Exception);
+
+    /*!
+      Idem SALOME_TYPES::ListOfLong getNumberIndex() but return a Sender.\n
+      It could be used in a Client code using the MED Client classes.
+     */
+    SALOME::SenderInt getSenderForNumberIndex()
+      raises (SALOME::SALOME_Exception);
 
     void getBoundaryElements()
                                        raises (SALOME::SALOME_Exception);
 /*!
-Internal Corba method. 
-*/    
+Internal Corba method.
+*/
     long getCorbaIndex()               raises (SALOME::SALOME_Exception);
     struct supportInfos
     {
@@ -580,9 +688,10 @@ Internal Corba method.
           string        description;
           boolean       isOnAllElements;
           medEntityMesh entity;
-           long          numberOfGeometricType; 
+           long          numberOfGeometricType;
            medGeometryElement_array types;
-           SALOME_MED::long_array nbEltTypes; 
+           SALOME_TYPES::ListOfLong   nbEltTypes;
+           SALOME_TYPES::ListOfLong   nodalConnectivityLength;
     };
     supportInfos getSupportGlobal()            raises (SALOME::SALOME_Exception);
 
@@ -593,12 +702,12 @@ Internal Corba method.
   // Family interface
   //-----------------
 
-  interface FAMILY : SUPPORT 
+  interface FAMILY : SUPPORT
     {
 
       /*!
        Returns Family identifier (Identifier
-       of the family in the mesh). 
+       of the family in the mesh).
 
        \note
       There is precisely only one indentifier for each family.
@@ -614,13 +723,13 @@ Internal Corba method.
        Returns an array of all attributes' identifiers.
        There is one for each attribute.
       */
-      SALOME_MED::long_array getAttributesIdentifiers() 
+      SALOME_TYPES::ListOfLong getAttributesIdentifiers()
        raises (SALOME::SALOME_Exception);
 
       /*!
        Returns identifier of i-th attribute.
 
-       \note 
+       \note
       i is bounded by 1 and NumberOfAttributes.
       */
       long getAttributeIdentifier(in long i) raises (SALOME::SALOME_Exception);
@@ -629,13 +738,13 @@ Internal Corba method.
        Returns an array of all values of the attributes .
        There is one value for each attribute.
       */
-      SALOME_MED::long_array getAttributesValues() 
+      SALOME_TYPES::ListOfLong getAttributesValues()
        raises (SALOME::SALOME_Exception);
 
       /*!
        Returns the value of i-th attribute.
 
-       \note 
+       \note
       i is bounded by 1 and NumberOfAttributes.
       */
       long getAttributeValue(in long i) raises (SALOME::SALOME_Exception);
@@ -644,16 +753,16 @@ Internal Corba method.
        Returns an array of all descriptions of the attributes .
        There is one description for each attribute.
       */
-      SALOME_MED::string_array getAttributesDescriptions() 
+      SALOME_TYPES::ListOfString getAttributesDescriptions()
        raises (SALOME::SALOME_Exception);
 
       /*!
        Returns the description of i-th attribute.
 
-       \note 
+       \note
       i is bounded by 1 and NumberOfAttributes.
       */
-      string getAttributeDescription(in long i) 
+      string getAttributeDescription(in long i)
        raises (SALOME::SALOME_Exception);
 
      /*!
@@ -666,16 +775,16 @@ Internal Corba method.
        Returns an array of names of groups the family belongs to .
        There is one name for each group.
       */
-      SALOME_MED::string_array getGroupsNames() 
+      SALOME_TYPES::ListOfString getGroupsNames()
        raises (SALOME::SALOME_Exception);
 
       /*!
        Returns the name of i-th group.
 
-       \note 
+       \note
       i is bounded by 1 and NumberOfAttributes.
       */
-      string getGroupName(in long i) 
+      string getGroupName(in long i)
        raises (SALOME::SALOME_Exception);
 
 
@@ -685,7 +794,7 @@ Internal Corba method.
   //----------------
   // Group interface
   //----------------
-  interface GROUP : SUPPORT 
+  interface GROUP : SUPPORT
     {
 
       /*!
@@ -701,7 +810,7 @@ Internal Corba method.
       /*!
        Returns a reference to the i-th family.
 
-       \note 
+       \note
       i is bounded by 1 and NumberOfFamilies.
       */
       FAMILY getFamily(in long i) raises (SALOME::SALOME_Exception);
@@ -713,14 +822,21 @@ Internal Corba method.
   // Field interface
   //----------------
 
-  interface FIELD 
+  interface FIELD : SALOME::GenericObj
     {
 
       /*!
-       Returns the field name.
-      */
+       *  Returns the field name.
+       */
       string getName() raises (SALOME::SALOME_Exception);
 
+      /*!
+       *  Changes the field name.
+       *
+       *  \param theName The new name for this field.
+       */
+      void setName (in string theName) raises (SALOME::SALOME_Exception);
+
       /*!
        Returns the field description.
       */
@@ -740,13 +856,13 @@ Internal Corba method.
       /*!
        Returns an array containing components names.
       */
-      SALOME_MED::string_array getComponentsNames() 
+      SALOME_TYPES::ListOfString getComponentsNames()
        raises (SALOME::SALOME_Exception);
 
       /*!
        Returns the name of i-th component.
 
-       \note  
+       \note
        - i is bounded by 1 and NumberOfComponents.
        - Name is mandatory for each field's component.
       */
@@ -755,18 +871,34 @@ Internal Corba method.
       /*!
        Returns an array containing components units.
       */
-      SALOME_MED::string_array getComponentsUnits()
+      SALOME_TYPES::ListOfString getComponentsUnits()
        raises (SALOME::SALOME_Exception);
 
       /*!
-       Returns the unit of i-th component.
+       *  Returns the unit of i-th component.
+       *
+       *  \note i is bounded by 1 and NumberOfComponents.
+       */
+      string getComponentUnit(in long i) raises (SALOME::SALOME_Exception);
 
-       \note 
-      i is bounded by 1 and NumberOfComponents.
+      /*!
+       Returns an array containing components descriptions.
       */
-      string getComponentUnit(in long i) raises (SALOME::SALOME_Exception);
+      SALOME_TYPES::ListOfString getComponentsDescriptions()
+       raises (SALOME::SALOME_Exception);
+
+      /*!
+       Returns the description of i-th component.
 
+       \note
+       - i is bounded by 1 and NumberOfComponents.
+       - Name is mandatory for each field's component.
+      */
+      string getComponentDescription(in long i) raises (SALOME::SALOME_Exception);
 
+      /*!
+       Returns the iteration number.
+      */
       long getIterationNumber() raises (SALOME::SALOME_Exception);
 
       /*!
@@ -775,23 +907,28 @@ Internal Corba method.
       double getTime() raises (SALOME::SALOME_Exception);
 
       /*!
-       Returns order number use for 
+       Returns order number use for
        internal step in this iteration.
       */
       long getOrderNumber() raises (SALOME::SALOME_Exception);
 
+      /*!
+       Returns if gauss points are present.
+      */
+      boolean getGaussPresence();
+
       // Read & Write
       // -----------
-      
-      long addDriver (in medDriverTypes driverType, in string  fileName, in string fieldName) 
+
+      long addDriver (in medDriverTypes driverType, in string  fileName, in string fieldName)
        raises (SALOME::SALOME_Exception);
-      
+
       /*!
      Removes a driver
      */
       void rmDriver (in long i)
        raises (SALOME::SALOME_Exception);
-      
+
       //
       void read (in long i)
        raises (SALOME::SALOME_Exception);
@@ -799,13 +936,15 @@ Internal Corba method.
       /*!
        Writes a field.
       */
-      void write (in long i, in string driverFieldName)  
+      void write (in long i, in string driverFieldName)
        raises (SALOME::SALOME_Exception);
-      
+
       /*!
        Adds the Field in the StudyManager.
       */
-      void addInStudy(in SALOMEDS::Study myStudy, in FIELD myIor )
+      void addInStudy(in SALOMEDS::Study myStudy, in FIELD myIor)
+       raises (SALOME::SALOME_Exception, SALOMEDS::StudyBuilder::LockProtection);
+      void addInStudyToComponent(in SALOMEDS::SComponent myComponent, in FIELD myIor)
        raises (SALOME::SALOME_Exception, SALOMEDS::StudyBuilder::LockProtection);
 
 /*!
@@ -817,63 +956,139 @@ Internal Corba method.
     };
 
 
-  interface FIELDDOUBLE : FIELD {
+  interface FIELDDOUBLE : FIELD , SALOME::MultiCommClass {
+
+    /*!
+      Returns an array of values of the field
+    */
+    SALOME_TYPES::ListOfDouble getValue(in medModeSwitch mode)
+      raises (SALOME::SALOME_Exception);
 
     /*!
-      Returns an array of values of the field  
+      Idem as getValue but it could be used in a Client code using the
+      MED Client classes.
     */
-    SALOME_MED::double_array getValue(in medModeSwitch mode)
+    SALOME::SenderDouble getSenderForValue(in medModeSwitch mode)
       raises (SALOME::SALOME_Exception);
   };
 
-  interface FIELDINT : FIELD {
+  interface FIELDDOUBLENO : FIELDDOUBLE {
+  };
+
+  interface FIELDDOUBLENOBYTYPE : FIELDDOUBLE {
+  };
+
+  interface FIELDDOUBLEFULL : FIELDDOUBLE {
+  };
+
+  interface FIELDINT : FIELD , SALOME::MultiCommClass {
+
+    /*!
+      Returns an array of values of the field
+    */
+    SALOME_TYPES::ListOfLong getValue(in medModeSwitch mode)
+      raises (SALOME::SALOME_Exception);
 
     /*!
-      Returns an array of values of the field  
+      Idem as getValue but it could be used in a Client code using the
+      MED Client classes.
     */
-    SALOME_MED::long_array getValue(in medModeSwitch mode)
+    SALOME::SenderInt getSenderForValue(in medModeSwitch mode)
       raises (SALOME::SALOME_Exception);
+  };
 
+  interface FIELDINTNO : FIELDINT {
   };
 
-  // MED interface
+  interface FIELDINTNOBYTYPE : FIELDINT {
+  };
 
-  interface MED {
+  interface FIELDINTFULL : FIELDINT {
+  };
 
+  // MED interface
 
-    long                   getNumberOfMeshes () raises (SALOME::SALOME_Exception);       
+  interface MED : SALOME::GenericObj {
+    /*!
+      returns the number of meshes in the %MED object.
+     */
+    long                   getNumberOfMeshes () raises (SALOME::SALOME_Exception);
+    /*!
+      returns the number of fields in the %MED object.
+     */
     long                   getNumberOfFields () raises (SALOME::SALOME_Exception);
-    SALOME_MED::string_array  getMeshNames      () raises (SALOME::SALOME_Exception);
-    SALOME_MED::string_array  getFieldNames     () raises (SALOME::SALOME_Exception);
-    MESH                   getMeshByName     ( in string  meshName)  raises (SALOME::SALOME_Exception);
-    MESH                   getMesh           ( in FIELD  fieldPtr)   raises (SALOME::SALOME_Exception);
-    FIELD                  getField          ( in string fieldName, 
+    /*!
+      returns an array which contains the name of each meshes in the %MED object.
+     */
+    SALOME_TYPES::ListOfString  getMeshNames      () raises (SALOME::SALOME_Exception);
+    /*!
+      returns an array which contains the name of each fields in the %MED object.
+     */
+    SALOME_TYPES::ListOfString  getFieldNames     () raises (SALOME::SALOME_Exception);
+    /*!
+      giving a mesh name, it returns the corresponding %MESH pointer.
+     */
+    GMESH                   getMeshByName     ( in string  meshName)  raises (SALOME::SALOME_Exception);
+    /*!
+      giving a %FIELD pointer, it returns the corresponding %MESH pointer of the mesh
+      on which the field lies.
+     */
+    GMESH                   getMesh           ( in FIELD  fieldPtr)   raises (SALOME::SALOME_Exception);
+    /*!
+      giving a field name, it returns the number of iteration in the corresponding %FIELD object.
+     */
+    long getFieldNumberOfIteration(in string fieldName) raises (SALOME::SALOME_Exception);
+    /*!
+      giving a field name and an integer %i, it returns a couple of integers: the time iteration and
+      the order number of the %i^th iteration of the corresponding %FIELD object.
+     */
+    SALOME_TYPES::ListOfLong  getFieldIteration(in string fieldName, in long i) raises (SALOME::SALOME_Exception);
+    /*!
+      giving a field name, it returns an array of integers: the list of the order number and
+      the time iteration couple of all iterations of the corresponding %FIELD object.
+
+      (IT1, DT1, IT2, DT2, ... , ITn, DTn) when n is the number of the %FIELD iterations.
+     */
+    SALOME_TYPES::ListOfLong  getFieldIterations(in string fieldName) raises (SALOME::SALOME_Exception);
+    /*!
+      giving a field name, a time iteration and an order number, it returns the corresponding %FIELD oject.
+     */
+    FIELD                  getField          ( in string fieldName,
                                               in long pasTemps,
                                               in long numOrdre )    raises (SALOME::SALOME_Exception);
 
 
-    // Add a MED/VTK/... driver to a MED'GEN' object to 
+    // Add a MED/VTK/... driver to a MED'GEN' object to
     // be able to read/write files preserving  meshes<-->fields association
     // Multiple drivers can be added whatever the type.
     // The access point in the <long> returned
-    long addDriver     (in medDriverTypes driverType, in string  fileName) 
+    long addDriver     (in medDriverTypes driverType, in string  fileName)
                                         raises (SALOME::SALOME_Exception);
-    /*! 
+    /*!
    Removes the driver
-    */ 
+    */
     void rmDriver      (in long i)  raises (SALOME::SALOME_Exception);
-    /*! 
+    /*!
     Reads the structure of the %MED file
     */
     void readFileStruct(in long i)  raises (SALOME::SALOME_Exception);
     void writeFrom     (in long i)  raises (SALOME::SALOME_Exception);
     void write         (in long i)  raises (SALOME::SALOME_Exception);
 
-    void addMesh  (in MESH   ptrMesh   ) raises (SALOME::SALOME_Exception);
+    void addMesh  (in GMESH  ptrMesh   ) raises (SALOME::SALOME_Exception);
     void addField (in FIELD  ptrField  ) raises (SALOME::SALOME_Exception);
-    
+
     void addInStudy (in SALOMEDS::Study myStudy, in MED medPtr) raises (SALOME::SALOME_Exception, SALOMEDS::StudyBuilder::LockProtection);
   };
+  
+  /*! \brief A structure containing information about MED file
+  */
+  struct MedFileInfo
+  {
+    string fileName; //!< name of file
+    long   fileSize; //!< size of file
+    long   major, minor, release; //!< MED file version
+  };
 };
 
 #endif /* MED_IDL */