idl/MED.idl

Go to the documentation of this file.
00001 // Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00002 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00003 // 
00004 // This library is free software; you can redistribute it and/or
00005 // modify it under the terms of the GNU Lesser General Public
00006 // License as published by the Free Software Foundation; either 
00007 // version 2.1 of the License.
00008 // 
00009 // This library is distributed in the hope that it will be useful 
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
00012 // Lesser General Public License for more details.
00013 //
00014 // You should have received a copy of the GNU Lesser General Public  
00015 // License along with this library; if not, write to the Free Software 
00016 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00017 //
00018 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00019 //
00020 // File: MED.idl
00021 // Project: SALOME
00022 // $Header: /home/server/cvs/MED/MED_SRC/idl/MED.idl,v 1.18 2006/06/01 11:21:13 jfa Exp $
00023 
00028 #ifndef MED_IDL
00029 #define MED_IDL
00030 
00039 #include "SALOME_GenericObj.idl"
00040 #include "SALOME_Exception.idl"
00041 #include "SALOME_Component.idl"
00042 #include "SALOMEDS.idl"
00043 #include "SALOME_Comm.idl"
00044 
00045 module SALOME_MED {
00049   typedef sequence<long> long_array;
00053   typedef sequence<double> double_array;
00057   typedef sequence<string> string_array;
00061   typedef sequence<boolean> boolean_array;
00062 
00068   interface FIELD;
00069   interface FAMILY;
00070   interface GROUP;
00071   interface MESH;
00072   interface SUPPORT;
00073 
00078   typedef long medGeometryElement;
00079   const medGeometryElement MED_NONE = 0;
00080   const medGeometryElement MED_POINT1 = 1;
00081   const medGeometryElement MED_SEG2 = 102;
00082   const medGeometryElement MED_SEG3 = 103;
00083   const medGeometryElement MED_TRIA3 = 203;
00084   const medGeometryElement MED_QUAD4 = 204;
00085   const medGeometryElement MED_TRIA6 = 206;
00086   const medGeometryElement MED_QUAD8 = 208;
00087   const medGeometryElement MED_TETRA4 = 304;
00088   const medGeometryElement MED_PYRA5 = 305;
00089   const medGeometryElement MED_PENTA6 = 306;
00090   const medGeometryElement MED_HEXA8 = 308;
00091   const medGeometryElement MED_TETRA10 = 310;
00092   const medGeometryElement MED_PYRA13 = 313;
00093   const medGeometryElement MED_PENTA15 = 315;
00094   const medGeometryElement MED_HEXA20 = 320;
00095   const medGeometryElement MED_POLYGON = 400;
00096   const medGeometryElement MED_POLYHEDRA = 500;
00097   const medGeometryElement MED_ALL_ELEMENTS = 999;
00098 
00099 
00104   typedef long medEntityMesh;
00105   const medEntityMesh MED_CELL = 0;
00106   const medEntityMesh MED_FACE = 1;
00107   const medEntityMesh MED_EDGE = 2;
00108   const medEntityMesh MED_NODE = 3;
00109   const medEntityMesh MED_ALL_ENTITIES = 4;
00110 
00118   typedef long medModeSwitch;
00119   const medModeSwitch MED_FULL_INTERLACE = 0;
00120   const medModeSwitch MED_NO_INTERLACE = 1;
00121 
00125   typedef long medConnectivity;
00126   const medConnectivity MED_NODAL = 0;
00127   const medConnectivity MED_DESCENDING = 1;
00128 
00129 
00133     typedef long medDriverTypes;
00135     const medDriverTypes MED_DRIVER  = 0;
00136     const medDriverTypes VTK_DRIVER = 1;
00137     const medDriverTypes NO_DRIVER = 2;
00138 
00142   typedef sequence<medGeometryElement> medGeometryElement_array;
00143 
00147   typedef sequence<FAMILY> Family_array;
00148 
00152   typedef sequence<GROUP> Group_array;
00153 
00154   // ----------------------
00155   // mesh interface
00156   // ----------------------
00157 
00158   interface MESH : SALOME::MultiCommClass, SALOME::GenericObj {
00159     // Index range begins from 1
00160 
00161     // General Informations
00162     //---------------------
00163 
00167     string getName() raises (SALOME::SALOME_Exception);
00168 
00172     long getSpaceDimension() raises (SALOME::SALOME_Exception);
00173 
00182     long getMeshDimension() raises (SALOME::SALOME_Exception);
00183 
00187     boolean getIsAGrid() raises (SALOME::SALOME_Exception);
00188 
00192     boolean existConnectivity (in medConnectivity mode,
00193                       in medEntityMesh entity)
00194                       raises (SALOME::SALOME_Exception);
00195 
00196     // Coordinates
00197     //------------
00198 
00205     string getCoordinatesSystem() raises (SALOME::SALOME_Exception);
00206 
00210     long getNumberOfNodes() raises (SALOME::SALOME_Exception);
00211 
00215     SALOME_MED::double_array getCoordinates(in medModeSwitch typeSwitch)
00216       raises (SALOME::SALOME_Exception);
00217 
00222     SALOME::SenderDouble getSenderForCoordinates(in medModeSwitch typeSwitch)
00223       raises (SALOME::SALOME_Exception);
00227     double getCoordinate(in long Number, in long Axis)
00228       raises (SALOME::SALOME_Exception);
00229 
00230 
00241     SALOME_MED::string_array getCoordinatesNames()
00242       raises (SALOME::SALOME_Exception);
00243 
00249     SALOME_MED::string_array getCoordinatesUnits()
00250       raises (SALOME::SALOME_Exception);
00251 
00257     SUPPORT getBoundaryElements(in medEntityMesh Entity)
00258       raises (SALOME::SALOME_Exception);
00259 
00264     SUPPORT getSkin(in SUPPORT mySupport3D ) raises (SALOME::SALOME_Exception);
00265 
00266     SALOME_MED::long_array getGlobalNumberingIndex(in medEntityMesh entity) ;
00267 
00268     struct coordinateInfos
00269     {
00270      string              coordSystem;
00271      SALOME_MED::string_array   coordNames;
00272      SALOME_MED::string_array   coordUnits;
00273     };
00274     coordinateInfos getCoordGlobal()    raises (SALOME::SALOME_Exception);
00275 
00276 
00277 
00278     // Connectivity
00279     // ------------
00280 
00288     long getNumberOfTypes(in medEntityMesh entity)
00289       raises (SALOME::SALOME_Exception);
00290 
00298     medGeometryElement_array getTypes(in medEntityMesh entity)
00299       raises (SALOME::SALOME_Exception);
00300 
00308     long getNumberOfElements(in medEntityMesh entity,
00309                     in medGeometryElement geomElement)
00310       raises (SALOME::SALOME_Exception);
00311 
00319     SALOME_MED::long_array getConnectivity(in medModeSwitch typeSwitch,
00320                          in medConnectivity mode,
00321                          in medEntityMesh entity,
00322                          in medGeometryElement geomElement)
00323       raises (SALOME::SALOME_Exception);
00324 
00329     SALOME::SenderInt getSenderForConnectivity(in medModeSwitch typeSwitch,
00330                          in medConnectivity mode,
00331                          in medEntityMesh entity,
00332                          in medGeometryElement geomElement)
00333       raises (SALOME::SALOME_Exception);
00334 
00339     SALOME::SenderInt getSenderForPolygonsConnectivity(in medConnectivity mode,
00340                                                        in medEntityMesh entity)
00341       raises (SALOME::SALOME_Exception);
00342 
00347     SALOME::SenderInt getSenderForPolygonsConnectivityIndex(in medConnectivity mode,
00348                                                             in medEntityMesh entity)
00349       raises (SALOME::SALOME_Exception);
00350 
00355     SALOME::SenderInt getSenderForPolyhedronConnectivity(in medConnectivity mode)
00356       raises (SALOME::SALOME_Exception);
00357 
00362     SALOME::SenderInt getSenderForPolyhedronIndex(in medConnectivity mode)
00363       raises (SALOME::SALOME_Exception);
00364 
00369     SALOME::SenderInt getSenderForPolyhedronFacesIndex()
00370       raises (SALOME::SALOME_Exception);
00371 
00383     SALOME_MED::long_array getConnectivityIndex(in medConnectivity mode,
00384                               in medEntityMesh entity)
00385       raises (SALOME::SALOME_Exception);
00386 
00391     long getElementNumber(in medConnectivity mode,
00392                  in medEntityMesh entity,
00393                  in medGeometryElement type,
00394                  in SALOME_MED::long_array connectivity)
00395       raises (SALOME::SALOME_Exception);
00396 
00397     medGeometryElement   getElementType (in  medEntityMesh entity,
00398                            in long number)
00399       raises (SALOME::SALOME_Exception);
00400 
00410     SALOME_MED::long_array getReverseConnectivity(in medConnectivity mode)
00411       raises (SALOME::SALOME_Exception);
00412 
00421     SALOME_MED::long_array getReverseConnectivityIndex(in medConnectivity mode)
00422       raises (SALOME::SALOME_Exception);
00423 
00424     struct connectivityInfos
00425     {
00426      long                     numberOfNodes;
00427         medGeometryElement_array meshTypes;
00428      SALOME_MED::long_array      numberOfElements;
00429         long                       entityDimension;
00430     };
00431     connectivityInfos getConnectGlobal(in medEntityMesh entity)
00432     raises (SALOME::SALOME_Exception);
00433 
00434     // Families and Groups
00435     // -------------------
00436 
00440     long getNumberOfFamilies(in medEntityMesh entity)
00441       raises (SALOME::SALOME_Exception);
00442 
00446     long getNumberOfGroups(in medEntityMesh entity)
00447       raises (SALOME::SALOME_Exception);
00448 
00452     Family_array getFamilies(in medEntityMesh entity)
00453       raises (SALOME::SALOME_Exception);
00454 
00461     FAMILY getFamily(in medEntityMesh entity,in long familyNumber)
00462       raises (SALOME::SALOME_Exception);
00463 
00467     Group_array getGroups(in medEntityMesh entity)
00468       raises (SALOME::SALOME_Exception);
00469 
00476     GROUP getGroup(in medEntityMesh entity,in long groupNumber)
00477       raises (SALOME::SALOME_Exception);
00478 
00479     // Others
00480     // ------
00481 
00488     FIELD getVolume(in SUPPORT mySupport)
00489       raises (SALOME::SALOME_Exception);
00490 
00497     FIELD getArea(in SUPPORT mySupport)
00498       raises (SALOME::SALOME_Exception);
00499 
00506     FIELD getLength(in SUPPORT mySupport)
00507       raises (SALOME::SALOME_Exception);
00508 
00516     FIELD getNormal(in SUPPORT mySupport)
00517       raises (SALOME::SALOME_Exception);
00518 
00522     FIELD getBarycenter(in SUPPORT mySupport)
00523       raises (SALOME::SALOME_Exception);
00524 
00525     /*
00526       Returns a field on mySupport containing neighbourhood.
00527     */
00528     // FIELD getNeighbourhood(in SUPPORT mySupport)
00529     // raises (SALOME::SALOME_Exception);
00530 
00531     // Read & Write
00532     // -----------
00533 
00537     void addInStudy(in SALOMEDS::Study myStudy, in MESH myIor )
00538       raises (SALOME::SALOME_Exception, SALOMEDS::StudyBuilder::LockProtection);
00539 
00540     //                         Add a MED/VTK/... driver
00541     //                          Multiple drivers can be added whatever the type
00542     long addDriver     (in medDriverTypes driverType, in string  fileName, in string meshName)
00543                                         raises (SALOME::SALOME_Exception);
00544     //                          Remove a driver
00545     void rmDriver      (in long i)  raises (SALOME::SALOME_Exception);
00546 
00547    //
00548     void read          (in long i)  raises (SALOME::SALOME_Exception);
00549     void write         (in long i, in string driverMeshName)
00550                                     raises (SALOME::SALOME_Exception);
00551 
00555     long getCorbaIndex()      raises (SALOME::SALOME_Exception);
00556     struct meshInfos
00557     {
00558            string name ;
00559            long spaceDimension ;
00560         long meshDimension;
00561         long numberOfNodes ;
00562            boolean isAGrid;
00563            Family_array famNode;
00564            Family_array famEdge;
00565            Family_array famFace;
00566            Family_array famCell;
00567         Group_array  groupNode;
00568         Group_array  groupEdge;
00569         Group_array  groupFace;
00570         Group_array  groupCell;
00571     };
00572     meshInfos getMeshGlobal()      raises (SALOME::SALOME_Exception);
00573     boolean areEquals(in MESH other);
00574   };
00575 
00576 
00577   // ----------------------
00578   // Support interface
00579   // ----------------------
00580 
00581   interface SUPPORT : SALOME::MultiCommClass, SALOME::GenericObj {
00582 
00586     string getName() raises (SALOME::SALOME_Exception);
00587 
00591     string getDescription() raises (SALOME::SALOME_Exception);
00592 
00596     MESH getMesh() raises (SALOME::SALOME_Exception);
00597 
00605     medEntityMesh getEntity() raises (SALOME::SALOME_Exception);
00606 
00613     boolean isOnAllElements() raises (SALOME::SALOME_Exception);
00614 
00626     long getNumberOfElements(in medGeometryElement geomElement)
00627       raises (SALOME::SALOME_Exception);
00628 
00629      long  getNumberOfTypes() raises (SALOME::SALOME_Exception);
00636     medGeometryElement_array getTypes() raises (SALOME::SALOME_Exception);
00637 
00638 
00650     SALOME_MED::long_array getNumber(in medGeometryElement geomElement)
00651       raises (SALOME::SALOME_Exception);
00652 
00658     SALOME::SenderInt getSenderForNumber(in medGeometryElement geomElement)
00659       raises (SALOME::SALOME_Exception);
00660 
00670     SALOME_MED::long_array getNumberIndex()
00671       raises (SALOME::SALOME_Exception);
00672 
00677     SALOME::SenderInt getSenderForNumberIndex()
00678       raises (SALOME::SALOME_Exception);
00679 
00680     void getBoundaryElements()
00681                               raises (SALOME::SALOME_Exception);
00685     long getCorbaIndex()              raises (SALOME::SALOME_Exception);
00686     struct supportInfos
00687     {
00688            string    name;
00689         string       description;
00690         boolean       isOnAllElements;
00691         medEntityMesh entity;
00692            long          numberOfGeometricType;
00693            medGeometryElement_array types;
00694            SALOME_MED::long_array nbEltTypes;
00695     };
00696     supportInfos getSupportGlobal()          raises (SALOME::SALOME_Exception);
00697 
00698   };
00699 
00700 
00701   //-----------------
00702   // Family interface
00703   //-----------------
00704 
00705   interface FAMILY : SUPPORT
00706     {
00707 
00715       long getIdentifier() raises (SALOME::SALOME_Exception);
00716 
00720       long getNumberOfAttributes() raises (SALOME::SALOME_Exception);
00721 
00726       SALOME_MED::long_array getAttributesIdentifiers()
00727      raises (SALOME::SALOME_Exception);
00728 
00735       long getAttributeIdentifier(in long i) raises (SALOME::SALOME_Exception);
00736 
00741       SALOME_MED::long_array getAttributesValues()
00742      raises (SALOME::SALOME_Exception);
00743 
00750       long getAttributeValue(in long i) raises (SALOME::SALOME_Exception);
00751 
00756       SALOME_MED::string_array getAttributesDescriptions()
00757      raises (SALOME::SALOME_Exception);
00758 
00765       string getAttributeDescription(in long i)
00766      raises (SALOME::SALOME_Exception);
00767 
00771       long getNumberOfGroups()
00772      raises (SALOME::SALOME_Exception);
00773 
00778       SALOME_MED::string_array getGroupsNames()
00779      raises (SALOME::SALOME_Exception);
00780 
00787       string getGroupName(in long i)
00788      raises (SALOME::SALOME_Exception);
00789 
00790 
00791     };
00792 
00793 
00794   //----------------
00795   // Group interface
00796   //----------------
00797   interface GROUP : SUPPORT
00798     {
00799 
00803       long getNumberOfFamilies() raises (SALOME::SALOME_Exception);
00804 
00808       Family_array getFamilies() raises (SALOME::SALOME_Exception);
00809 
00816       FAMILY getFamily(in long i) raises (SALOME::SALOME_Exception);
00817 
00818     };
00819 
00820 
00821   //----------------
00822   // Field interface
00823   //----------------
00824 
00825   interface FIELD : SALOME::GenericObj
00826     {
00827 
00831       string getName() raises (SALOME::SALOME_Exception);
00832 
00836       string getDescription() raises (SALOME::SALOME_Exception);
00837 
00842       SUPPORT getSupport() raises (SALOME::SALOME_Exception);
00843 
00847       long getNumberOfComponents() raises (SALOME::SALOME_Exception);
00848 
00852       SALOME_MED::string_array getComponentsNames()
00853      raises (SALOME::SALOME_Exception);
00854 
00862       string getComponentName(in long i) raises (SALOME::SALOME_Exception);
00863 
00867       SALOME_MED::string_array getComponentsUnits()
00868      raises (SALOME::SALOME_Exception);
00869 
00876       string getComponentUnit(in long i) raises (SALOME::SALOME_Exception);
00877 
00881       SALOME_MED::string_array getComponentsDescriptions()
00882      raises (SALOME::SALOME_Exception);
00883 
00891       string getComponentDescription(in long i) raises (SALOME::SALOME_Exception);
00892 
00896       long getIterationNumber() raises (SALOME::SALOME_Exception);
00897 
00901       double getTime() raises (SALOME::SALOME_Exception);
00902 
00907       long getOrderNumber() raises (SALOME::SALOME_Exception);
00908 
00912       boolean getGaussPresence();
00913 
00914       // Read & Write
00915       // -----------
00916 
00917       long addDriver (in medDriverTypes driverType, in string  fileName, in string fieldName)
00918      raises (SALOME::SALOME_Exception);
00919 
00923       void rmDriver (in long i)
00924      raises (SALOME::SALOME_Exception);
00925 
00926       //
00927       void read (in long i)
00928      raises (SALOME::SALOME_Exception);
00929 
00933       void write (in long i, in string driverFieldName)
00934      raises (SALOME::SALOME_Exception);
00935 
00939       void addInStudy(in SALOMEDS::Study myStudy, in FIELD myIor )
00940      raises (SALOME::SALOME_Exception, SALOMEDS::StudyBuilder::LockProtection);
00941 
00945       long getCorbaIndex()
00946      raises (SALOME::SALOME_Exception);
00947 
00948     };
00949 
00950 
00951   interface FIELDDOUBLE : FIELD , SALOME::MultiCommClass {
00952 
00956     SALOME_MED::double_array getValue(in medModeSwitch mode)
00957       raises (SALOME::SALOME_Exception);
00958 
00963     SALOME::SenderDouble getSenderForValue(in medModeSwitch mode)
00964       raises (SALOME::SALOME_Exception);
00965   };
00966 
00967   interface FIELDDOUBLENO : FIELDDOUBLE {
00968   };
00969 
00970   interface FIELDDOUBLEFULL : FIELDDOUBLE {
00971   };
00972 
00973   interface FIELDINT : FIELD , SALOME::MultiCommClass {
00974 
00978     SALOME_MED::long_array getValue(in medModeSwitch mode)
00979       raises (SALOME::SALOME_Exception);
00980 
00985     SALOME::SenderInt getSenderForValue(in medModeSwitch mode)
00986       raises (SALOME::SALOME_Exception);
00987   };
00988 
00989   interface FIELDINTNO : FIELDINT {
00990   };
00991 
00992   interface FIELDINTFULL : FIELDINT {
00993   };
00994 
00995   // MED interface
00996 
00997   interface MED : SALOME::GenericObj {
01001     long                   getNumberOfMeshes () raises (SALOME::SALOME_Exception);
01005     long                   getNumberOfFields () raises (SALOME::SALOME_Exception);
01009     SALOME_MED::string_array  getMeshNames      () raises (SALOME::SALOME_Exception);
01013     SALOME_MED::string_array  getFieldNames     () raises (SALOME::SALOME_Exception);
01017     MESH                   getMeshByName     ( in string  meshName)  raises (SALOME::SALOME_Exception);
01022     MESH                   getMesh           ( in FIELD  fieldPtr)   raises (SALOME::SALOME_Exception);
01026     long getFieldNumberOfIteration(in string fieldName) raises (SALOME::SALOME_Exception);
01031     SALOME_MED::long_array  getFieldIteration(in string fieldName, in long i) raises (SALOME::SALOME_Exception);
01038     SALOME_MED::long_array  getFieldIterations(in string fieldName) raises (SALOME::SALOME_Exception);
01042     FIELD                  getField          ( in string fieldName,
01043                                 in long pasTemps,
01044                                 in long numOrdre )    raises (SALOME::SALOME_Exception);
01045 
01046 
01047     // Add a MED/VTK/... driver to a MED'GEN' object to
01048     // be able to read/write files preserving  meshes<-->fields association
01049     // Multiple drivers can be added whatever the type.
01050     // The access point in the <long> returned
01051     long addDriver     (in medDriverTypes driverType, in string  fileName)
01052                                         raises (SALOME::SALOME_Exception);
01056     void rmDriver      (in long i)  raises (SALOME::SALOME_Exception);
01060     void readFileStruct(in long i)  raises (SALOME::SALOME_Exception);
01061     void writeFrom     (in long i)  raises (SALOME::SALOME_Exception);
01062     void write         (in long i)  raises (SALOME::SALOME_Exception);
01063 
01064     void addMesh  (in MESH   ptrMesh   ) raises (SALOME::SALOME_Exception);
01065     void addField (in FIELD  ptrField  ) raises (SALOME::SALOME_Exception);
01066 
01067     void addInStudy (in SALOMEDS::Study myStudy, in MED medPtr) raises (SALOME::SALOME_Exception, SALOMEDS::StudyBuilder::LockProtection);
01068   };
01069 };
01070 
01071 #endif /* MED_IDL */