3 // Copyright : CEA/DEN/DMSS/LGLS
6 This file contains the main IDL difinitions of the %MED component in %SALOME application.
11 \defgroup MED SALOME MED component
14 #include "SALOME_Exception.idl"
15 #include "SALOME_Component.idl"
16 #include "SALOMEDS.idl"
22 typedef sequence<long> long_array;
26 typedef sequence<double> double_array;
30 typedef sequence<string> string_array;
34 typedef sequence<boolean> boolean_array;
37 This package contains a set of interfaces used for %SALOME %MED component.
48 This enumeration contains a set of elements difining the type of geometrical elements which constitue
51 typedef long medGeometryElement;
52 const medGeometryElement MED_NONE = 0;
53 const medGeometryElement MED_POINT1 = 1;
54 const medGeometryElement MED_SEG2 = 102;
55 const medGeometryElement MED_SEG3 = 103;
56 const medGeometryElement MED_TRIA3 = 203;
57 const medGeometryElement MED_QUAD4 = 204;
58 const medGeometryElement MED_TRIA6 = 206;
59 const medGeometryElement MED_QUAD8 = 208;
60 const medGeometryElement MED_TETRA4 = 304;
61 const medGeometryElement MED_PYRA5 = 305;
62 const medGeometryElement MED_PENTA6 = 306;
63 const medGeometryElement MED_HEXA8 = 308;
64 const medGeometryElement MED_TETRA10 = 310;
65 const medGeometryElement MED_PYRA13 = 313;
66 const medGeometryElement MED_PENTA15 = 315;
67 const medGeometryElement MED_HEXA20 = 320;
68 const medGeometryElement MED_ALL_ELEMENTS = 999;
72 This enumeration contains a set of elements difining the structural elements (entities) which constitue
75 typedef long medEntityMesh;
76 const medEntityMesh MED_CELL = 0;
77 const medEntityMesh MED_FACE = 1;
78 const medEntityMesh MED_EDGE = 2;
79 const medEntityMesh MED_NODE = 3;
80 const medEntityMesh MED_ALL_ENTITIES = 4;
82 typedef long medModeSwitch;
83 const medModeSwitch MED_FULL_INTERLACE = 0;
84 const medModeSwitch MED_NO_INTERLACE = 1;
86 typedef long medConnectivity;
87 const medConnectivity MED_NODAL = 0;
88 const medConnectivity MED_DESCENDING = 1;
92 enumeration contains a set of elements difining the type of driver.
94 typedef long medDriverTypes;
95 /*!<This driver is used for reading into memory of the mesh from %MED file.*/
96 const medDriverTypes MED_DRIVER = 0;
97 const medDriverTypes VTK_DRIVER = 1;
98 const medDriverTypes NO_DRIVER = 2;
101 An array of <VAR>medGeometryElement</VAR>
103 typedef sequence<medGeometryElement> medGeometryElement_array;
107 typedef sequence<FAMILY> Family_array;
111 typedef sequence<GROUP> Group_array;
113 // ----------------------
115 // ----------------------
118 // Index range begins from 1
120 // General Informations
121 //---------------------
124 Returns the name of the mesh .
126 string getName() raises (SALOME::SALOME_Exception);
129 Returns space dimension.
131 long getSpaceDimension() raises (SALOME::SALOME_Exception);
134 Returns mesh dimension.
137 - we have only MED_TETRA4 in MED_CELL : MeshDimension = 3D
138 - we have only MED_QUAD4 in MED_CELL : MeshDimension = 2D
139 - we have both MED_SEG2 and MED_TRIA3 in MED_CELL : MeshDimension = 2D
141 long getMeshDimension() raises (SALOME::SALOME_Exception);
146 boolean getIsAGrid() raises (SALOME::SALOME_Exception);
151 boolean existConnectivity (in medConnectivity mode,
152 in medEntityMesh entity)
153 raises (SALOME::SALOME_Exception);
159 Returns coordinate system :
164 string getCoordinatesSystem() raises (SALOME::SALOME_Exception);
167 Returns the number of nodes defined in the mesh.
169 long getNumberOfNodes() raises (SALOME::SALOME_Exception);
172 Returns an array of coordinates :
173 - X1,Y1,Z1,X2,Y2,...,Zn if MED_FULL_INTERLACE
174 - X1,X2,...Xn,Y1,Y2,...Zn if MED_NO_INTERLACE
176 SALOME_MED::double_array getCoordinates(in medModeSwitch typeSwitch)
177 raises (SALOME::SALOME_Exception);
180 Returns coordinate n° Number on axis n° Axis
182 double getCoordinate(in long Number, in long Axis)
183 raises (SALOME::SALOME_Exception);
187 Returns an array containing the names of coordinates.
196 SALOME_MED::string_array getCoordinatesNames()
197 raises (SALOME::SALOME_Exception);
200 Returns an array containing the units of coordinates (cm, m, mm, ...)
202 It could be empty. By defult IS is used (meter).
204 SALOME_MED::string_array getCoordinatesUnits()
205 raises (SALOME::SALOME_Exception);
207 SUPPORT getBoundaryElements(in medEntityMesh Entity)
208 raises (SALOME::SALOME_Exception);
209 SUPPORT getSkin(in SUPPORT mySupport3D ) raises (SALOME::SALOME_Exception);
211 SALOME_MED::long_array getGlobalNumberingIndex(in medEntityMesh entity) ;
212 struct coordinateInfos
215 SALOME_MED::string_array coordNames;
216 SALOME_MED::string_array coordUnits;
218 coordinateInfos getCoordGlobal() raises (SALOME::SALOME_Exception);
226 Returns the number of different <VAR>medGeometryElement</VAR> types existing
227 in the specified entity.
230 Not implemented for MED_ALL_ENTITIES.
232 long getNumberOfTypes(in medEntityMesh entity)
233 raises (SALOME::SALOME_Exception);
236 Returns an array of all <VAR>medGeometryElement</VAR> types existing
240 Not implemented for MED_ALL_ENTITIES.
242 medGeometryElement_array getTypes(in medEntityMesh entity)
243 raises (SALOME::SALOME_Exception);
246 Returns the number of elements of type <VAR>medGeometryElement</VAR>.
249 - Implemented for MED_ALL_ELEMENTS
250 - Not implemented for MED_ALL_ENTITIES
252 long getNumberOfElements(in medEntityMesh entity,
253 in medGeometryElement geomElement)
254 raises (SALOME::SALOME_Exception);
257 Give, in full or no interlace mode (for nodal connectivity),
258 descending or nodal connectivity.
260 You must give a <VAR>medEntityMesh</VAR> (ie:MED_EDGE) and a
261 <VAR>medGeometryElement</VAR> (ie:MED_SEG3).
263 SALOME_MED::long_array getConnectivity(in medModeSwitch typeSwitch,
264 in medConnectivity mode,
265 in medEntityMesh entity,
266 in medGeometryElement geomElement)
267 raises (SALOME::SALOME_Exception);
270 Give morse index array to use with
271 getConnectivity(MED_FULL_INTERLACE,mode,entity,MED_ALL_ELEMENTS).
273 Each value give start index for corresponding entity in
276 Example : i-th element, j-th node of it :
277 - In C mode : Connectivity[ConnectivityIndex[i]-1+j-1]
278 - In fortran mode : Connectivity[ConnectivityIndex[i]+j]
280 SALOME_MED::long_array getConnectivityIndex(in medConnectivity mode,
281 in medEntityMesh entity)
282 raises (SALOME::SALOME_Exception);
285 Gets a global number of the element which have the same connectivity as the
286 connectivity argument.
288 long getElementNumber(in medConnectivity mode,
289 in medEntityMesh entity,
290 in medGeometryElement type,
291 in SALOME_MED::long_array connectivity)
292 raises (SALOME::SALOME_Exception);
294 medGeometryElement getElementType (in medEntityMesh entity,
296 raises (SALOME::SALOME_Exception);
299 Returns a reverse connectivity to MED_CELL.
301 If mode=MED_NODAL, the array contains, for each node, all cells
304 If mode=MED_DESCENDING, the array contains, for each face (or edge),
305 the 2 cells of each side. First is cell which face normal is outgoing.
307 SALOME_MED::long_array getReverseConnectivity(in medConnectivity mode)
308 raises (SALOME::SALOME_Exception);
311 Give index array to use with getReverseConnectivity(MED_NODAL).
313 This method is not used with MED_DESCENDING mode,
314 because we have allways two cells.
316 See getConnectivityIndex for details.
318 SALOME_MED::long_array getReverseConnectivityIndex(in medConnectivity mode)
319 raises (SALOME::SALOME_Exception);
321 struct connectivityInfos
324 medGeometryElement_array meshTypes;
325 SALOME_MED::long_array numberOfElements;
327 connectivityInfos getConnectGlobal(in medEntityMesh entity)
328 raises (SALOME::SALOME_Exception);
330 // Families and Groups
331 // -------------------
334 Returns the number of all families.
336 long getNumberOfFamilies(in medEntityMesh entity)
337 raises (SALOME::SALOME_Exception);
340 Returns the number of all groups.
342 long getNumberOfGroups(in medEntityMesh entity)
343 raises (SALOME::SALOME_Exception);
346 Returns an array of all families.
348 Family_array getFamilies(in medEntityMesh entity)
349 raises (SALOME::SALOME_Exception);
352 Returns the reference to i-th family.
355 i is bounded by 1 and NumberOfFamilies.
357 FAMILY getFamily(in medEntityMesh entity,in long familyNumber)
358 raises (SALOME::SALOME_Exception);
361 Returns an array of all groups.
363 Group_array getGroups(in medEntityMesh entity)
364 raises (SALOME::SALOME_Exception);
367 Returns the reference to i-th group.
370 i is bounded by 1 and NumberOfGroups.
372 GROUP getGroup(in medEntityMesh entity,in long groupNumber)
373 raises (SALOME::SALOME_Exception);
379 Returns a field on mySupport containing volume.
382 mySupport must be on MED_CELL entity and MeshDimension must be 3D.
384 FIELD getVolume(in SUPPORT mySupport)
385 raises (SALOME::SALOME_Exception);
388 Returns a field on mySupport containing area.
391 mySupport must be on MED_FACE entity.
393 FIELD getArea(in SUPPORT mySupport)
394 raises (SALOME::SALOME_Exception);
397 Returns a field on mySupport containing length.
400 mySupport must be on MED_EDGE entity.
402 FIELD getLength(in SUPPORT mySupport)
403 raises (SALOME::SALOME_Exception);
406 Returns a field on mySupport containing normal.
409 mySupport must be on MED_FACE entity if MeshDimension and
410 SpaceDimension=3D and on MED_EDGE if MeshDimension and SpaceDimension=2D.
412 FIELD getNormal(in SUPPORT mySupport)
413 raises (SALOME::SALOME_Exception);
416 Returns a field on mySupport containing barycenter.
418 FIELD getBarycenter(in SUPPORT mySupport)
419 raises (SALOME::SALOME_Exception);
422 Returns a field on mySupport containing neighbourhood.
424 // FIELD getNeighbourhood(in SUPPORT mySupport)
425 // raises (SALOME::SALOME_Exception);
431 Adds the Mesh in the StudyManager.
433 void addInStudy(in SALOMEDS::Study myStudy, in MESH myIor )
434 raises (SALOME::SALOME_Exception, SALOMEDS::StudyBuilder::LockProtection);
436 // Add a MED/VTK/... driver
437 // Multiple drivers can be added whatever the type
438 long addDriver (in medDriverTypes driverType, in string fileName, in string meshName)
439 raises (SALOME::SALOME_Exception);
441 void rmDriver (in long i) raises (SALOME::SALOME_Exception);
444 void read (in long i) raises (SALOME::SALOME_Exception);
445 void write (in long i, in string driverMeshName)
446 raises (SALOME::SALOME_Exception);
449 Internal Corba method.
451 long getCorbaIndex() raises (SALOME::SALOME_Exception);
455 long spaceDimension ;
459 Family_array famNode;
460 Family_array famEdge;
461 Family_array famFace;
462 Family_array famCell;
463 Group_array groupNode;
464 Group_array groupEdge;
465 Group_array groupFace;
466 Group_array groupCell;
468 meshInfos getMeshGlobal() raises (SALOME::SALOME_Exception);
472 // ----------------------
474 // ----------------------
479 Returns the name of the support.
481 string getName() raises (SALOME::SALOME_Exception);
484 Returns the description of the support.
486 string getDescription() raises (SALOME::SALOME_Exception);
489 Returns a reference to the mesh.
491 MESH getMesh() raises (SALOME::SALOME_Exception);
494 Returns the type of <VAR>medEntityMesh</VAR> used by the support.
497 A support deals only with one entity's type
498 (for example : MED_FACE or MED_NODE)
500 medEntityMesh getEntity() raises (SALOME::SALOME_Exception);
503 Returns True if all elements of this entity are
504 engaged, False otherwise.
506 If True, you must use mesh reference (getMesh) to get more information.
508 boolean isOnAllElements() raises (SALOME::SALOME_Exception);
511 If the method <VAR>isOnAllElements</VAR> returns False, this method
512 returns the number of elements in the support.
514 Example : number of MED_TRIA3 or MED_ALL_ELEMETNS elements
515 in entity of support.
518 If %SUPPORT is defined on MED_NODE, use MED_NONE <VAR>medGeometryElement</VAR> type.
520 long getNumberOfElements(in medGeometryElement geomElement)
521 raises (SALOME::SALOME_Exception);
523 long getNumberOfTypes() raises (SALOME::SALOME_Exception);
525 If isOnAllElements is False, returns an array of <VAR>medGeometryElement</VAR>
526 types used by the support.
528 <VAR>medEntityMesh</VAR> is given by getEntity.
530 medGeometryElement_array getTypes() raises (SALOME::SALOME_Exception);
534 If the method <VAR>isOnAllElements</VAR> returns False, this method returns an array which
535 contains all numbers of given <VAR>medGeometryElement</VAR>.
537 Numbering is global, ie numbers are bounded by 1 and
538 MESH::getNumberOfElement(entity,MED_ALL_ELEMENTS) and not by 1 and
539 MESH::getNumberOfElement(entity,geomElement).
542 If %SUPPORT is defined on MED_NODE, use MED_NONE <VAR>medGeometryElement</VAR> type.
544 SALOME_MED::long_array getNumber(in medGeometryElement geomElement)
545 raises (SALOME::SALOME_Exception);
548 If the method <VAR>isOnAllElements</VAR> returns False, this method returns the index
551 Use it with getNumber(MED_ALL_ELEMENTS).
554 See the method <VAR>getConnectivityIndex</VAR> for more details.
556 SALOME_MED::long_array getNumberIndex()
557 raises (SALOME::SALOME_Exception);
559 Returns the number of Gauss points for this <VAR>medGeometryElement</VAR>.
562 - Not defined if %SUPPORT is on MED_NODE.
563 - Not defined for MED_ALL_ELEMENTS <VAR>medGeometryElement</VAR> type.
565 long getNumberOfGaussPoint(in medGeometryElement geomElement)
566 raises (SALOME::SALOME_Exception);
568 SALOME_MED::long_array getNumbersOfGaussPoint()
569 raises (SALOME::SALOME_Exception);
571 void getBoundaryElements()
572 raises (SALOME::SALOME_Exception);
574 Internal Corba method.
576 long getCorbaIndex() raises (SALOME::SALOME_Exception);
581 boolean isOnAllElements;
582 medEntityMesh entity;
583 long numberOfGeometricType;
584 medGeometryElement_array types;
585 SALOME_MED::long_array nbEltTypes;
587 supportInfos getSupportGlobal() raises (SALOME::SALOME_Exception);
596 interface FAMILY : SUPPORT
600 Returns Family identifier (Identifier
601 of the family in the mesh).
604 There is precisely only one indentifier for each family.
606 long getIdentifier() raises (SALOME::SALOME_Exception);
609 Returns number of attributes.
611 long getNumberOfAttributes() raises (SALOME::SALOME_Exception);
614 Returns an array of all attributes' identifiers.
615 There is one for each attribute.
617 SALOME_MED::long_array getAttributesIdentifiers()
618 raises (SALOME::SALOME_Exception);
621 Returns identifier of i-th attribute.
624 i is bounded by 1 and NumberOfAttributes.
626 long getAttributeIdentifier(in long i) raises (SALOME::SALOME_Exception);
629 Returns an array of all values of the attributes .
630 There is one value for each attribute.
632 SALOME_MED::long_array getAttributesValues()
633 raises (SALOME::SALOME_Exception);
636 Returns the value of i-th attribute.
639 i is bounded by 1 and NumberOfAttributes.
641 long getAttributeValue(in long i) raises (SALOME::SALOME_Exception);
644 Returns an array of all descriptions of the attributes .
645 There is one description for each attribute.
647 SALOME_MED::string_array getAttributesDescriptions()
648 raises (SALOME::SALOME_Exception);
651 Returns the description of i-th attribute.
654 i is bounded by 1 and NumberOfAttributes.
656 string getAttributeDescription(in long i)
657 raises (SALOME::SALOME_Exception);
660 Returns the number of groups the family belongs to.
662 long getNumberOfGroups()
663 raises (SALOME::SALOME_Exception);
666 Returns an array of names of groups the family belongs to .
667 There is one name for each group.
669 SALOME_MED::string_array getGroupsNames()
670 raises (SALOME::SALOME_Exception);
673 Returns the name of i-th group.
676 i is bounded by 1 and NumberOfAttributes.
678 string getGroupName(in long i)
679 raises (SALOME::SALOME_Exception);
688 interface GROUP : SUPPORT
692 Returns the number of families in this group.
694 long getNumberOfFamilies() raises (SALOME::SALOME_Exception);
697 Returns an array of all families.
699 Family_array getFamilies() raises (SALOME::SALOME_Exception);
702 Returns a reference to the i-th family.
705 i is bounded by 1 and NumberOfFamilies.
707 FAMILY getFamily(in long i) raises (SALOME::SALOME_Exception);
720 Returns the field name.
722 string getName() raises (SALOME::SALOME_Exception);
725 Returns the field description.
727 string getDescription() raises (SALOME::SALOME_Exception);
730 Returns a reference to the support
731 on which the field is defined.
733 SUPPORT getSupport() raises (SALOME::SALOME_Exception);
736 Returns the number of field's components.
738 long getNumberOfComponents() raises (SALOME::SALOME_Exception);
741 Returns an array containing components names.
743 SALOME_MED::string_array getComponentsNames()
744 raises (SALOME::SALOME_Exception);
747 Returns the name of i-th component.
750 - i is bounded by 1 and NumberOfComponents.
751 - Name is mandatory for each field's component.
753 string getComponentName(in long i) raises (SALOME::SALOME_Exception);
756 Returns an array containing components units.
758 SALOME_MED::string_array getComponentsUnits()
759 raises (SALOME::SALOME_Exception);
762 Returns the unit of i-th component.
765 i is bounded by 1 and NumberOfComponents.
767 string getComponentUnit(in long i) raises (SALOME::SALOME_Exception);
770 long getIterationNumber() raises (SALOME::SALOME_Exception);
773 Returns time for this iteration.
775 double getTime() raises (SALOME::SALOME_Exception);
778 Returns order number use for
779 internal step in this iteration.
781 long getOrderNumber() raises (SALOME::SALOME_Exception);
786 long addDriver (in medDriverTypes driverType, in string fileName, in string fieldName)
787 raises (SALOME::SALOME_Exception);
792 void rmDriver (in long i)
793 raises (SALOME::SALOME_Exception);
796 void read (in long i)
797 raises (SALOME::SALOME_Exception);
802 void write (in long i, in string driverFieldName)
803 raises (SALOME::SALOME_Exception);
806 Adds the Field in the StudyManager.
808 void addInStudy(in SALOMEDS::Study myStudy, in FIELD myIor )
809 raises (SALOME::SALOME_Exception, SALOMEDS::StudyBuilder::LockProtection);
812 Internal Corba method.
815 raises (SALOME::SALOME_Exception);
820 interface FIELDDOUBLE : FIELD {
823 Returns an array of values of the field
825 SALOME_MED::double_array getValue(in medModeSwitch mode)
826 raises (SALOME::SALOME_Exception);
829 interface FIELDINT : FIELD {
832 Returns an array of values of the field
834 SALOME_MED::long_array getValue(in medModeSwitch mode)
835 raises (SALOME::SALOME_Exception);
844 long getNumberOfMeshes () raises (SALOME::SALOME_Exception);
845 long getNumberOfFields () raises (SALOME::SALOME_Exception);
846 SALOME_MED::string_array getMeshNames () raises (SALOME::SALOME_Exception);
847 SALOME_MED::string_array getFieldNames () raises (SALOME::SALOME_Exception);
848 MESH getMeshByName ( in string meshName) raises (SALOME::SALOME_Exception);
849 MESH getMesh ( in FIELD fieldPtr) raises (SALOME::SALOME_Exception);
850 FIELD getField ( in string fieldName,
852 in long numOrdre ) raises (SALOME::SALOME_Exception);
855 // Add a MED/VTK/... driver to a MED'GEN' object to
856 // be able to read/write files preserving meshes<-->fields association
857 // Multiple drivers can be added whatever the type.
858 // The access point in the <long> returned
859 long addDriver (in medDriverTypes driverType, in string fileName)
860 raises (SALOME::SALOME_Exception);
864 void rmDriver (in long i) raises (SALOME::SALOME_Exception);
866 Reads the structure of the %MED file
868 void readFileStruct(in long i) raises (SALOME::SALOME_Exception);
869 void writeFrom (in long i) raises (SALOME::SALOME_Exception);
870 void write (in long i) raises (SALOME::SALOME_Exception);
872 void addMesh (in MESH ptrMesh ) raises (SALOME::SALOME_Exception);
873 void addField (in FIELD ptrField ) raises (SALOME::SALOME_Exception);
875 void addInStudy (in SALOMEDS::Study myStudy, in MED medPtr) raises (SALOME::SALOME_Exception, SALOMEDS::StudyBuilder::LockProtection);