Back to index

salome-med  6.5.0
MED.idl
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 // File: MED.idl
00024 // Project: SALOME
00025 //
00030 #ifndef MED_IDL
00031 #define MED_IDL
00032 
00041 #include "SALOME_GenericObj.idl"
00042 #include "SALOME_Exception.idl"
00043 #include "SALOME_Component.idl"
00044 #include "SALOME_Types.idl"
00045 #include "SALOMEDS.idl"
00046 #include "SALOME_Comm.idl"
00047 
00048 module SALOME_MED
00049 {
00055   interface FIELD;
00056   interface FAMILY;
00057   interface GROUP;
00058   interface GMESH;
00059   interface MESH;
00060   interface SUPPORT;
00061 
00066   typedef long medGeometryElement;
00067   const medGeometryElement MED_NONE = 0;
00068   const medGeometryElement MED_POINT1 = 1;
00069   const medGeometryElement MED_SEG2 = 102;
00070   const medGeometryElement MED_SEG3 = 103;
00071   const medGeometryElement MED_TRIA3 = 203;
00072   const medGeometryElement MED_QUAD4 = 204;
00073   const medGeometryElement MED_TRIA6 = 206;
00074   const medGeometryElement MED_QUAD8 = 208;
00075   const medGeometryElement MED_TETRA4 = 304;
00076   const medGeometryElement MED_PYRA5 = 305;
00077   const medGeometryElement MED_PENTA6 = 306;
00078   const medGeometryElement MED_HEXA8 = 308;
00079   const medGeometryElement MED_TETRA10 = 310;
00080   const medGeometryElement MED_PYRA13 = 313;
00081   const medGeometryElement MED_PENTA15 = 315;
00082   const medGeometryElement MED_HEXA20 = 320;
00083   const medGeometryElement MED_POLYGON = 400;
00084   const medGeometryElement MED_POLYHEDRA = 500;
00085   const medGeometryElement MED_ALL_ELEMENTS = 999;
00086 
00087 
00092   typedef long medEntityMesh;
00093   const medEntityMesh MED_CELL = 0;
00094   const medEntityMesh MED_FACE = 1;
00095   const medEntityMesh MED_EDGE = 2;
00096   const medEntityMesh MED_NODE = 3;
00097   const medEntityMesh MED_ALL_ENTITIES = 4;
00098 
00106   typedef long medModeSwitch;
00107   const medModeSwitch MED_FULL_INTERLACE = 0;
00108   const medModeSwitch MED_NO_INTERLACE = 1;
00109   const medModeSwitch MED_NO_INTERLACE_BY_TYPE = 2;
00110 
00114   typedef long medConnectivity;
00115   const medConnectivity MED_NODAL = 0;
00116   const medConnectivity MED_DESCENDING = 1;
00117 
00118 
00122     typedef long medDriverTypes;
00124     const medDriverTypes MED_DRIVER  = 0;
00125     const medDriverTypes VTK_DRIVER = 1;
00126     const medDriverTypes NO_DRIVER = 2;
00127 
00131   typedef sequence<medGeometryElement> medGeometryElement_array;
00132 
00136   typedef sequence<FAMILY> Family_array;
00137 
00141   typedef sequence<GROUP> Group_array;
00142 
00143   // ----------------------
00144   // base mesh interface
00145   // ----------------------
00146 
00147   interface GMESH : SALOME::MultiCommClass, SALOME::GenericObj 
00148   {
00149     // Index range begins from 1
00150 
00151     // General Informations
00152     //---------------------
00153 
00157     string getName() raises (SALOME::SALOME_Exception);
00158 
00162     long getSpaceDimension() raises (SALOME::SALOME_Exception);
00163 
00172     long getMeshDimension() raises (SALOME::SALOME_Exception);
00173 
00177     boolean getIsAGrid() raises (SALOME::SALOME_Exception);
00178 
00185     string getCoordinatesSystem() raises (SALOME::SALOME_Exception);
00186 
00190     long getNumberOfNodes() raises (SALOME::SALOME_Exception);
00191 
00202     SALOME_TYPES::ListOfString getCoordinatesNames()
00203       raises (SALOME::SALOME_Exception);
00204 
00210     SALOME_TYPES::ListOfString getCoordinatesUnits()
00211       raises (SALOME::SALOME_Exception);
00212 
00218     SUPPORT getBoundaryElements(in medEntityMesh Entity)
00219       raises (SALOME::SALOME_Exception);
00220 
00224     SUPPORT getSupportOnAll(in medEntityMesh Entity)
00225       raises (SALOME::SALOME_Exception);
00226 
00231     SUPPORT getSkin(in SUPPORT mySupport3D ) raises (SALOME::SALOME_Exception);
00232 
00233     struct coordinateInfos
00234     {
00235        string                       coordSystem;
00236        SALOME_TYPES::ListOfString coordNames;
00237        SALOME_TYPES::ListOfString coordUnits;
00238     };
00239     coordinateInfos getCoordGlobal()      raises (SALOME::SALOME_Exception);
00240 
00241 
00242 
00243     // Connectivity
00244     // ------------
00245 
00253     long getNumberOfTypes(in medEntityMesh entity)
00254       raises (SALOME::SALOME_Exception);
00255 
00263     medGeometryElement_array getTypes(in medEntityMesh entity)
00264       raises (SALOME::SALOME_Exception);
00265 
00273     long getNumberOfElements(in medEntityMesh entity,
00274                           in medGeometryElement geomElement)
00275       raises (SALOME::SALOME_Exception);
00276 
00277     medGeometryElement   getElementType (in  medEntityMesh entity,
00278                                    in long number)
00279       raises (SALOME::SALOME_Exception);
00280 
00281     // Families and Groups
00282     // -------------------
00283 
00287     long getNumberOfFamilies(in medEntityMesh entity)
00288       raises (SALOME::SALOME_Exception);
00289 
00293     long getNumberOfGroups(in medEntityMesh entity)
00294       raises (SALOME::SALOME_Exception);
00295 
00299     Family_array getFamilies(in medEntityMesh entity)
00300       raises (SALOME::SALOME_Exception);
00301 
00308     FAMILY getFamily(in medEntityMesh entity,in long familyNumber)
00309       raises (SALOME::SALOME_Exception);
00310 
00314     Group_array getGroups(in medEntityMesh entity)
00315       raises (SALOME::SALOME_Exception);
00316 
00323     GROUP getGroup(in medEntityMesh entity,in long groupNumber)
00324       raises (SALOME::SALOME_Exception);
00325 
00326     // Others
00327     // ------
00328 
00335     FIELD getVolume(in SUPPORT mySupport)
00336       raises (SALOME::SALOME_Exception);
00337 
00344     FIELD getArea(in SUPPORT mySupport)
00345       raises (SALOME::SALOME_Exception);
00346 
00353     FIELD getLength(in SUPPORT mySupport)
00354       raises (SALOME::SALOME_Exception);
00355 
00363     FIELD getNormal(in SUPPORT mySupport)
00364       raises (SALOME::SALOME_Exception);
00365 
00369     FIELD getBarycenter(in SUPPORT mySupport)
00370       raises (SALOME::SALOME_Exception);
00371 
00372     /*
00373       Returns a field on mySupport containing neighbourhood.
00374     */
00375     // FIELD getNeighbourhood(in SUPPORT mySupport)
00376     // raises (SALOME::SALOME_Exception);
00377 
00378     // Read & Write
00379     // -----------
00380 
00384     void addInStudy(in SALOMEDS::Study myStudy, in GMESH myIor )
00385       raises (SALOME::SALOME_Exception, SALOMEDS::StudyBuilder::LockProtection);
00386 
00387     //                               Add a MED/VTK/... driver
00388     //                          Multiple drivers can be added whatever the type
00389     long addDriver     (in medDriverTypes driverType, in string  fileName, in string meshName)
00390                                         raises (SALOME::SALOME_Exception);
00391     //                          Remove a driver
00392     void rmDriver      (in long i)  raises (SALOME::SALOME_Exception);
00393 
00394    //
00395     void read          (in long i)  raises (SALOME::SALOME_Exception);
00396     void write         (in long i, in string driverMeshName)
00397                                     raises (SALOME::SALOME_Exception);
00398 
00402     long getCorbaIndex()    raises (SALOME::SALOME_Exception);
00403     struct meshInfos
00404     {
00405            string name ;
00406            long spaceDimension ;
00407           long meshDimension;
00408           long numberOfNodes ;
00409            boolean isAGrid;
00410            Family_array famNode;
00411            Family_array famEdge;
00412            Family_array famFace;
00413            Family_array famCell;
00414           Group_array  groupNode;
00415           Group_array  groupEdge;
00416           Group_array  groupFace;
00417           Group_array  groupCell;
00418     };
00419     meshInfos getMeshGlobal()             raises (SALOME::SALOME_Exception);
00420     boolean areEquals(in GMESH other);
00421 
00422     MESH convertInMESH();
00423   };
00424 
00425   // ----------------------
00426   // mesh interface
00427   // ----------------------
00428 
00429   interface MESH : GMESH {
00430 
00434     boolean existConnectivity (in medConnectivity mode,
00435                             in medEntityMesh entity)
00436                             raises (SALOME::SALOME_Exception);
00437 
00438     // Coordinates
00439     //------------
00440 
00444     SALOME_TYPES::ListOfDouble getCoordinates(in medModeSwitch typeSwitch)
00445       raises (SALOME::SALOME_Exception);
00446 
00451     SALOME::SenderDouble getSenderForCoordinates(in medModeSwitch typeSwitch)
00452       raises (SALOME::SALOME_Exception);
00456     double getCoordinate(in long Number, in long Axis)
00457       raises (SALOME::SALOME_Exception);
00458 
00464     SALOME_TYPES::ListOfLong getGlobalNumberingIndex(in medEntityMesh entity) ;
00465 
00466 
00467     // Connectivity
00468     // ------------
00469 
00477     SALOME_TYPES::ListOfLong getConnectivity(in medConnectivity mode,
00478                                            in medEntityMesh entity,
00479                                            in medGeometryElement geomElement)
00480       raises (SALOME::SALOME_Exception);
00481 
00486     SALOME::SenderInt getSenderForConnectivity(in medConnectivity mode,
00487                                                in medEntityMesh entity,
00488                                                in medGeometryElement geomElement)
00489       raises (SALOME::SALOME_Exception);
00490 
00502     SALOME_TYPES::ListOfLong getConnectivityIndex(in medConnectivity mode,
00503                                                 in medEntityMesh entity)
00504       raises (SALOME::SALOME_Exception);
00505 
00510     SALOME::SenderInt getSenderForConnectivityIndex(in medConnectivity mode,
00511                                                     in medEntityMesh entity,
00512                                                     in medGeometryElement geomElement)
00513       raises (SALOME::SALOME_Exception);
00514 
00519     long getElementNumber(in medConnectivity mode,
00520                        in medEntityMesh entity,
00521                        in medGeometryElement type,
00522                        in SALOME_TYPES::ListOfLong connectivity)
00523       raises (SALOME::SALOME_Exception);
00524 
00534     SALOME_TYPES::ListOfLong getReverseConnectivity(in medConnectivity mode)
00535       raises (SALOME::SALOME_Exception);
00536 
00545     SALOME_TYPES::ListOfLong getReverseConnectivityIndex(in medConnectivity mode)
00546       raises (SALOME::SALOME_Exception);
00547 
00548     struct connectivityInfos
00549     {
00550        long                     numberOfNodes;
00551         medGeometryElement_array meshTypes;
00552        SALOME_TYPES::ListOfLong   numberOfElements;
00553        SALOME_TYPES::ListOfLong   nodalConnectivityLength;
00554         long                     entityDimension;
00555     };
00556     connectivityInfos getConnectGlobal(in medEntityMesh entity)
00557     raises (SALOME::SALOME_Exception);
00558 
00559   };
00560 
00561 
00562   // ----------------------
00563   // Support interface
00564   // ----------------------
00565 
00566   interface SUPPORT : SALOME::MultiCommClass, SALOME::GenericObj {
00567 
00571     string getName() raises (SALOME::SALOME_Exception);
00572 
00576     string getDescription() raises (SALOME::SALOME_Exception);
00577 
00581     GMESH getMesh() raises (SALOME::SALOME_Exception);
00582 
00590     medEntityMesh getEntity() raises (SALOME::SALOME_Exception);
00591 
00598     boolean isOnAllElements() raises (SALOME::SALOME_Exception);
00599 
00611     long getNumberOfElements(in medGeometryElement geomElement)
00612       raises (SALOME::SALOME_Exception);
00613 
00614      long  getNumberOfTypes() raises (SALOME::SALOME_Exception);
00621     medGeometryElement_array getTypes() raises (SALOME::SALOME_Exception);
00622 
00623 
00635     SALOME_TYPES::ListOfLong getNumber(in medGeometryElement geomElement)
00636       raises (SALOME::SALOME_Exception);
00637 
00649     SALOME_TYPES::ListOfLong getNumberFromFile(in medGeometryElement geomElement)
00650       raises (SALOME::SALOME_Exception);
00651 
00657     SALOME::SenderInt getSenderForNumber(in medGeometryElement geomElement)
00658       raises (SALOME::SALOME_Exception);
00659 
00669     SALOME_TYPES::ListOfLong getNumberIndex()
00670       raises (SALOME::SALOME_Exception);
00671 
00676     SALOME::SenderInt getSenderForNumberIndex()
00677       raises (SALOME::SALOME_Exception);
00678 
00679     void getBoundaryElements()
00680                                    raises (SALOME::SALOME_Exception);
00684     long getCorbaIndex()            raises (SALOME::SALOME_Exception);
00685     struct supportInfos
00686     {
00687            string     name;
00688           string      description;
00689           boolean       isOnAllElements;
00690           medEntityMesh entity;
00691            long          numberOfGeometricType;
00692            medGeometryElement_array types;
00693            SALOME_TYPES::ListOfLong   nbEltTypes;
00694            SALOME_TYPES::ListOfLong   nodalConnectivityLength;
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_TYPES::ListOfLong getAttributesIdentifiers()
00727        raises (SALOME::SALOME_Exception);
00728 
00735       long getAttributeIdentifier(in long i) raises (SALOME::SALOME_Exception);
00736 
00741       SALOME_TYPES::ListOfLong getAttributesValues()
00742        raises (SALOME::SALOME_Exception);
00743 
00750       long getAttributeValue(in long i) raises (SALOME::SALOME_Exception);
00751 
00756       SALOME_TYPES::ListOfString 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_TYPES::ListOfString 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 
00838       void setName (in string theName) raises (SALOME::SALOME_Exception);
00839 
00843       string getDescription() raises (SALOME::SALOME_Exception);
00844 
00849       SUPPORT getSupport() raises (SALOME::SALOME_Exception);
00850 
00854       long getNumberOfComponents() raises (SALOME::SALOME_Exception);
00855 
00859       SALOME_TYPES::ListOfString getComponentsNames()
00860        raises (SALOME::SALOME_Exception);
00861 
00869       string getComponentName(in long i) raises (SALOME::SALOME_Exception);
00870 
00874       SALOME_TYPES::ListOfString getComponentsUnits()
00875        raises (SALOME::SALOME_Exception);
00876 
00882       string getComponentUnit(in long i) raises (SALOME::SALOME_Exception);
00883 
00887       SALOME_TYPES::ListOfString getComponentsDescriptions()
00888        raises (SALOME::SALOME_Exception);
00889 
00897       string getComponentDescription(in long i) raises (SALOME::SALOME_Exception);
00898 
00902       long getIterationNumber() raises (SALOME::SALOME_Exception);
00903 
00907       double getTime() raises (SALOME::SALOME_Exception);
00908 
00913       long getOrderNumber() raises (SALOME::SALOME_Exception);
00914 
00918       boolean getGaussPresence();
00919 
00920       // Read & Write
00921       // -----------
00922 
00923       long addDriver (in medDriverTypes driverType, in string  fileName, in string fieldName)
00924        raises (SALOME::SALOME_Exception);
00925 
00929       void rmDriver (in long i)
00930        raises (SALOME::SALOME_Exception);
00931 
00932       //
00933       void read (in long i)
00934        raises (SALOME::SALOME_Exception);
00935 
00939       void write (in long i, in string driverFieldName)
00940        raises (SALOME::SALOME_Exception);
00941 
00945       void addInStudy(in SALOMEDS::Study myStudy, in FIELD myIor)
00946        raises (SALOME::SALOME_Exception, SALOMEDS::StudyBuilder::LockProtection);
00947       void addInStudyToComponent(in SALOMEDS::SComponent myComponent, in FIELD myIor)
00948        raises (SALOME::SALOME_Exception, SALOMEDS::StudyBuilder::LockProtection);
00949 
00953       long getCorbaIndex()
00954        raises (SALOME::SALOME_Exception);
00955 
00956     };
00957 
00958 
00959   interface FIELDDOUBLE : FIELD , SALOME::MultiCommClass {
00960 
00964     SALOME_TYPES::ListOfDouble getValue(in medModeSwitch mode)
00965       raises (SALOME::SALOME_Exception);
00966 
00971     SALOME::SenderDouble getSenderForValue(in medModeSwitch mode)
00972       raises (SALOME::SALOME_Exception);
00973   };
00974 
00975   interface FIELDDOUBLENO : FIELDDOUBLE {
00976   };
00977 
00978   interface FIELDDOUBLENOBYTYPE : FIELDDOUBLE {
00979   };
00980 
00981   interface FIELDDOUBLEFULL : FIELDDOUBLE {
00982   };
00983 
00984   interface FIELDINT : FIELD , SALOME::MultiCommClass {
00985 
00989     SALOME_TYPES::ListOfLong getValue(in medModeSwitch mode)
00990       raises (SALOME::SALOME_Exception);
00991 
00996     SALOME::SenderInt getSenderForValue(in medModeSwitch mode)
00997       raises (SALOME::SALOME_Exception);
00998   };
00999 
01000   interface FIELDINTNO : FIELDINT {
01001   };
01002 
01003   interface FIELDINTNOBYTYPE : FIELDINT {
01004   };
01005 
01006   interface FIELDINTFULL : FIELDINT {
01007   };
01008 
01009   // MED interface
01010 
01011   interface MED : SALOME::GenericObj {
01015     long                   getNumberOfMeshes () raises (SALOME::SALOME_Exception);
01019     long                   getNumberOfFields () raises (SALOME::SALOME_Exception);
01023     SALOME_TYPES::ListOfString  getMeshNames      () raises (SALOME::SALOME_Exception);
01027     SALOME_TYPES::ListOfString  getFieldNames     () raises (SALOME::SALOME_Exception);
01031     GMESH                   getMeshByName     ( in string  meshName)  raises (SALOME::SALOME_Exception);
01036     GMESH                   getMesh           ( in FIELD  fieldPtr)   raises (SALOME::SALOME_Exception);
01040     long getFieldNumberOfIteration(in string fieldName) raises (SALOME::SALOME_Exception);
01045     SALOME_TYPES::ListOfLong  getFieldIteration(in string fieldName, in long i) raises (SALOME::SALOME_Exception);
01052     SALOME_TYPES::ListOfLong  getFieldIterations(in string fieldName) raises (SALOME::SALOME_Exception);
01056     FIELD                  getField          ( in string fieldName,
01057                                           in long pasTemps,
01058                                           in long numOrdre )    raises (SALOME::SALOME_Exception);
01059 
01060 
01061     // Add a MED/VTK/... driver to a MED'GEN' object to
01062     // be able to read/write files preserving  meshes<-->fields association
01063     // Multiple drivers can be added whatever the type.
01064     // The access point in the <long> returned
01065     long addDriver     (in medDriverTypes driverType, in string  fileName)
01066                                         raises (SALOME::SALOME_Exception);
01070     void rmDriver      (in long i)  raises (SALOME::SALOME_Exception);
01074     void readFileStruct(in long i)  raises (SALOME::SALOME_Exception);
01075     void writeFrom     (in long i)  raises (SALOME::SALOME_Exception);
01076     void write         (in long i)  raises (SALOME::SALOME_Exception);
01077 
01078     void addMesh  (in GMESH  ptrMesh   ) raises (SALOME::SALOME_Exception);
01079     void addField (in FIELD  ptrField  ) raises (SALOME::SALOME_Exception);
01080 
01081     void addInStudy (in SALOMEDS::Study myStudy, in MED medPtr) raises (SALOME::SALOME_Exception, SALOMEDS::StudyBuilder::LockProtection);
01082   };
01083   
01086   struct MedFileInfo
01087   {
01088     string fileName; 
01089     long   fileSize; 
01090     long   major, minor, release; 
01091   };
01092 };
01093 
01094 #endif /* MED_IDL */