3 // Copyright : CEA/DEN/DMSS/LGLS
9 #include "SALOME_Exception.idl"
10 #include "SALOME_Component.idl"
11 #include "SALOMEDS.idl"
17 typedef sequence<long> long_array;
21 typedef sequence<double> double_array;
25 typedef sequence<string> string_array;
29 typedef sequence<boolean> boolean_array;
42 enum medGeometryElement {
75 enum medConnectivity {
87 An array of medGeometryElement
89 typedef sequence<medGeometryElement> medGeometryElement_array;
93 typedef sequence<FAMILY> Family_array;
97 typedef sequence<GROUP> Group_array;
99 // ----------------------
101 // ----------------------
104 // Index range begins at 1
106 // General Informations
107 //---------------------
112 string getName() raises (SALOME::SALOME_Exception);
115 Returns space dimension.
117 long getSpaceDimension() raises (SALOME::SALOME_Exception);
120 Returns mesh dimension.
123 - we have only MED_TETRA4 in MED_CELL : MeshDimension = 3
124 - we have only MED_QUAD4 in MED_CELL : MeshDimension = 2
125 - we have both MED_SEG2 and MED_TRIA3 in MED_CELL : MeshDimension = 2
127 long getMeshDimension() raises (SALOME::SALOME_Exception);
133 Returns coordinate's system :
138 string getCoordinateSystem() raises (SALOME::SALOME_Exception);
141 Returns the number of nodes defined in mesh.
143 long getNumberOfNodes() raises (SALOME::SALOME_Exception);
146 Returns coordinates array :
147 - X1,Y1,Z1,X2,Y2,...,Zn if MED_FULL_INTERLACE
148 - X1,X2,...Xn,Y1,Y2,...Zn if MED_NO_INTERLACE
150 Engines::double_array getCoordinates(in medModeSwitch typeSwitch)
151 raises (SALOME::SALOME_Exception);
154 Returns an array with names of coordinates.
163 Engines::string_array getCoordinatesNames()
164 raises (SALOME::SALOME_Exception);
167 Returns an array with units of coordinates (cm, m, mm, ...)
169 It could be empty. We suppose we are IS (meter).
171 Engines::string_array getCoordinatesUnits()
172 raises (SALOME::SALOME_Exception);
178 Returns the number of different <medGeometryElement> types existing
179 in the specified entity.
181 Note : Not implemented for MED_ALL_ENTITIES.
183 long getNumberOfTypes(in medEntityMesh entity)
184 raises (SALOME::SALOME_Exception);
187 Returns an array of all <med geometry elements> types existing
190 Note : Not implemented for MED_ALL_ENTITIES.
192 medGeometryElement_array getTypes(in medEntityMesh entity)
193 raises (SALOME::SALOME_Exception);
196 Returns the number of elements of type <med geometrie element>.
199 - Implemented for MED_ALL_ELEMENTS
200 - Not implemented for MED_ALL_ENTITIES
202 long getNumberOfElements(in medEntityMesh entity,
203 in medGeometryElement geomElement)
204 raises (SALOME::SALOME_Exception);
207 Give, in full or no interlace mode (for nodal connectivity),
208 descending or nodal connectivity.
210 You must give a <medEntityMesh> (ie:MED_EDGE) and a
211 <medGeometryElement> (ie:MED_SEG3).
213 Engines::long_array getConnectivity(in medModeSwitch typeSwitch,
214 in medConnectivity mode,
215 in medEntityMesh entity,
216 in medGeometryElement geomElement)
217 raises (SALOME::SALOME_Exception);
220 Give morse index array to use with
221 getConnectivity(MED_FULL_INTERLACE,mode,entity,MED_ALL_ELEMENTS).
223 Each value give start index for corresponding entity in
226 Example : i-th element, j-th node of it :
227 - In C mode : Connectivity[ConnectivityIndex[i]-1+j-1]
228 - In fortran mode : Connectivity[ConnectivityIndex[i]+j]
230 Engines::long_array getConnectivityIndex(in medConnectivity mode,
231 in medEntityMesh entity)
232 raises (SALOME::SALOME_Exception);
235 Get global number of element which have same connectivity than
236 connectivity argument.
238 long getElementNumber(in medConnectivity mode,
239 in medEntityMesh entity,
240 in medGeometryElement type,
241 in Engines::long_array connectivity)
242 raises (SALOME::SALOME_Exception);
245 Return a reverse connectivity to MED_CELL.
247 If mode=MED_NODAL, the array contains, for each node, all cells
250 If mode=MED_DESCENDING, the array contains, for each face (or edge),
251 the 2 cells of each side. First is cell which face normal is outgoing.
253 Engines::long_array getReverseConnectivity(in medConnectivity mode)
254 raises (SALOME::SALOME_Exception);
257 Give index array to use with getReverseConnectivity(MED_NODAL).
259 It is unusefull with MED_DESCENDING mode,
260 because we have allways two cells.
262 See getConnectivityIndex for details.
264 Engines::long_array getReverseConnectivityIndex(in medConnectivity mode)
265 raises (SALOME::SALOME_Exception);
267 // Families and Groups
268 // -------------------
271 Returns the number of all families.
273 long getNumberOfFamilies(in medEntityMesh entity)
274 raises (SALOME::SALOME_Exception);
277 Returns the number of all groups.
279 long getNumberOfGroups(in medEntityMesh entity)
280 raises (SALOME::SALOME_Exception);
283 Returns an array of all families.
285 Family_array getFamilies(in medEntityMesh entity)
286 raises (SALOME::SALOME_Exception);
289 Returns a reference to i-th to family.
291 Note : i is bounded by 1 and NumberOfFamilies.
293 FAMILY getFamily(in medEntityMesh entity,in long familyNumber)
294 raises (SALOME::SALOME_Exception);
297 Returns an array of all groups.
299 Group_array getGroups(in medEntityMesh entity)
300 raises (SALOME::SALOME_Exception);
303 Returns a reference to i-th group.
305 Note : i is bounded by 1 and NumberOfGroups.
307 GROUP getGroup(in medEntityMesh entity,in long groupNumber)
308 raises (SALOME::SALOME_Exception);
314 Returns a field on mySupport containing volume.
316 Note : mySupport must be on MED_CELL entity and MeshDimension must be 3.
318 FIELD getVolume(in SUPPORT mySupport)
319 raises (SALOME::SALOME_Exception);
322 Returns a field on mySupport containing area.
324 Note : mySupport must be on MED_FACE entity.
326 FIELD getArea(in SUPPORT mySupport)
327 raises (SALOME::SALOME_Exception);
330 Returns a field on mySupport containing length.
332 Note : mySupport must be on MED_EDGE entity.
334 FIELD getLength(in SUPPORT mySupport)
335 raises (SALOME::SALOME_Exception);
338 Returns a field on mySupport containing normal.
340 Note : mySupport must be on MED_FACE entity if MeshDimension and
341 SpaceDimension=3 and on MED_EDGE if MeshDimension and SpaceDimension=2.
343 FIELD getNormal(in SUPPORT mySupport)
344 raises (SALOME::SALOME_Exception);
347 Returns a field on mySupport containing barycenter.
349 FIELD getBarycenter(in SUPPORT mySupport)
350 raises (SALOME::SALOME_Exception);
353 Returns a field on mySupport containing neighbourhood.
355 // FIELD getNeighbourhood(in SUPPORT mySupport)
356 // raises (SALOME::SALOME_Exception);
362 Add the Mesh in the StudyManager.
364 void addInStudy(in SALOMEDS::Study myStudy, in MESH myIor )
365 raises (SALOME::SALOME_Exception, SALOMEDS::StudyBuilder::LockProtection);
367 // Add a MED/VTK/... driver
368 // Multiple drivers can be added whatever the type
369 long addDriver (in medDriverTypes driverType, in string fileName, in string meshName)
370 raises (SALOME::SALOME_Exception);
372 void rmDriver (in long i) raises (SALOME::SALOME_Exception);
375 void read (in long i) raises (SALOME::SALOME_Exception);
376 void write (in long i, in string driverMeshName)
377 raises (SALOME::SALOME_Exception);
379 // Cuisine Interne/Internal Kitchen
380 long getCorbaIndex() raises (SALOME::SALOME_Exception);
384 // ----------------------
386 // ----------------------
391 Returns the name of the support.
393 string getName() raises (SALOME::SALOME_Exception);
396 Returns the description of the support.
398 string getDescription() raises (SALOME::SALOME_Exception);
401 Returns a reference to the mesh.
403 MESH getMesh() raises (SALOME::SALOME_Exception);
406 Returns the medEntityMesh's type used by the support.
408 Note : A support deals only with one entity's type
409 (for example : MED_FACE or MED_NODE)
411 medEntityMesh getEntity() raises (SALOME::SALOME_Exception);
414 Returns true if all elements of this entity are
415 concerned, false otherwise.
417 If true, you must use mesh reference (getMesh) to get more information.
419 boolean isOnAllElements() raises (SALOME::SALOME_Exception);
422 If isOnAllElements is false, returns number of elements in the
425 Example : number of MED_TRIA3 or MED_ALL_ELEMETNS elements
426 in entity of support.
428 Note : If SUPPORT is defined on MED_NODE, use MED_NONE
429 medGeometryElement type.
431 long getNumberOfElements(in medGeometryElement geomElement)
432 raises (SALOME::SALOME_Exception);
435 If isOnAllElements is false, returns an array of <medGeometryElement>
436 types used by the support.
438 <medEntityMesh> is given by getEntity.
440 medGeometryElement_array getTypes() raises (SALOME::SALOME_Exception);
443 If isOnAllElements is false, returns an array which contains
444 all number of given medGeometryElement.
446 Numbering is global, ie numbers are bounded by 1 and
447 MESH::getNumberOfElement(entity,MED_ALL_ELEMENTS) and not by 1 and
448 MESH::getNumberOfElement(entity,geomElement).
450 Note : If SUPPORT is defined on MED_NODE, use MED_NONE
451 medGeometryElement type.
453 Engines::long_array getNumber(in medGeometryElement geomElement)
454 raises (SALOME::SALOME_Exception);
457 If isOnAllElements is false, returns index of element number.
459 Use it with getNumber(MED_ALL_ELEMENTS).
461 Note : See getConnectivityIndex for details.
463 Engines::long_array getNumberIndex()
464 raises (SALOME::SALOME_Exception);
466 Returns number of Gauss points for this medGeometryElement.
469 - Not defined if SUPPORT is on MED_NODE.
470 - Not defined for MED_ALL_ELEMENTS medGeometryElement type.
472 long getNumberOfGaussPoints(in medGeometryElement geomElement)
473 raises (SALOME::SALOME_Exception);
476 long getCorbaIndex() raises (SALOME::SALOME_Exception);
484 interface FAMILY : SUPPORT
488 Returns Family identifier (Identifier
489 of the family in the mesh).
491 Note : There is precisely one for each family.
493 long getIdentifier() raises (SALOME::SALOME_Exception);
496 Returns number of attributes.
498 long getNumberOfAttributes() raises (SALOME::SALOME_Exception);
501 Returns an array of all attributes' identifiers.
502 There is one for each attribute.
504 Engines::long_array getAttributesIdentifiers()
505 raises (SALOME::SALOME_Exception);
508 Returns identifier of i-th attribute.
510 Note : i is bounded by 1 and NumberOfAttributes.
512 long getAttributeIdentifier(in long i) raises (SALOME::SALOME_Exception);
515 Returns an array of all attributes values.
516 There is one for each attribute.
518 Engines::long_array getAttributesValues()
519 raises (SALOME::SALOME_Exception);
522 Returns value of i-th attribute.
524 Note : i is bounded by 1 and NumberOfAttributes.
526 long getAttributeValue(in long i) raises (SALOME::SALOME_Exception);
529 Returns an array of all attributes descriptions.
530 There is one for each attribute.
532 Engines::string_array getAttributesDescriptions()
533 raises (SALOME::SALOME_Exception);
536 Returns description of i-th attribute.
538 Note : i is bounded by 1 and NumberOfAttributes.
540 string getAttributeDescription(in long i)
541 raises (SALOME::SALOME_Exception);
548 interface GROUP : SUPPORT
552 Returns number of families in this group.
554 long getNumberOfFamilies() raises (SALOME::SALOME_Exception);
557 Returns array of all families.
559 Family_array getFamilies() raises (SALOME::SALOME_Exception);
562 Returns a reference for the i-th family.
564 Note : i is bounded by 1 and NumberOfFamilies.
566 FAMILY getFamily(in long i) raises (SALOME::SALOME_Exception);
579 Returns the field name.
581 string getName() raises (SALOME::SALOME_Exception);
584 Returns the field description.
586 string getDescription() raises (SALOME::SALOME_Exception);
589 Returns a reference to the support
590 on which the field is defined.
592 SUPPORT getSupport() raises (SALOME::SALOME_Exception);
595 Returns the number of field's components.
597 long getNumberOfComponents() raises (SALOME::SALOME_Exception);
600 Returns an array containing components names.
602 Engines::string_array getComponentsNames()
603 raises (SALOME::SALOME_Exception);
606 Returns the name of i-th component.
609 - i is bounded by 1 and NumberOfComponents.
610 - Name is mandatory foreach field's component.
612 string getComponentName(in long i) raises (SALOME::SALOME_Exception);
615 Returns an array containing components units.
617 Engines::string_array getComponentsUnits()
618 raises (SALOME::SALOME_Exception);
621 Returns the unit of i-th component.
623 Note : i is bounded by 1 and NumberOfComponents.
625 string getComponentUnit(in long i) raises (SALOME::SALOME_Exception);
628 long getIterationNumber() raises (SALOME::SALOME_Exception);
631 Returns time for this iteration.
633 double getTime() raises (SALOME::SALOME_Exception);
636 Returns order number use for
637 internal step in this iteration.
639 long getOrderNumber() raises (SALOME::SALOME_Exception);
644 long addDriver (in medDriverTypes driverType, in string fileName, in string fieldName)
645 raises (SALOME::SALOME_Exception);
648 void rmDriver (in long i)
649 raises (SALOME::SALOME_Exception);
652 void read (in long i)
653 raises (SALOME::SALOME_Exception);
658 void write (in long i, in string driverFieldName)
659 raises (SALOME::SALOME_Exception);
662 Add the Field in the StudyManager.
664 void addInStudy(in SALOMEDS::Study myStudy, in FIELD myIor )
665 raises (SALOME::SALOME_Exception, SALOMEDS::StudyBuilder::LockProtection);
669 raises (SALOME::SALOME_Exception);
674 interface FIELDDOUBLE : FIELD {
677 Returns the field values array
679 Engines::double_array getValue(in medModeSwitch mode)
680 raises (SALOME::SALOME_Exception);
683 interface FIELDINT : FIELD {
686 Returns the field values array
688 Engines::long_array getValue(in medModeSwitch mode)
689 raises (SALOME::SALOME_Exception);
698 long getNumberOfMeshes () raises (SALOME::SALOME_Exception);
699 long getNumberOfFields () raises (SALOME::SALOME_Exception);
700 Engines::string_array getMeshNames () raises (SALOME::SALOME_Exception);
701 Engines::string_array getFieldNames () raises (SALOME::SALOME_Exception);
702 MESH getMeshByName ( in string meshName) raises (SALOME::SALOME_Exception);
703 MESH getMesh ( in FIELD fieldPtr) raises (SALOME::SALOME_Exception);
704 FIELD getField ( in string fieldName,
706 in long numOrdre ) raises (SALOME::SALOME_Exception);
709 // Add a MED/VTK/... driver to a MED'GEN' object to
710 // be able to read/write files preserving meshes<-->fields association
711 // Multiple drivers can be added whatever the type.
712 // The access point in the <long> returned
713 long addDriver (in medDriverTypes driverType, in string fileName)
714 raises (SALOME::SALOME_Exception);
716 void rmDriver (in long i) raises (SALOME::SALOME_Exception);
718 void readFileStruct(in long i) raises (SALOME::SALOME_Exception);
719 void writeFrom (in long i) raises (SALOME::SALOME_Exception);
720 void write (in long i) raises (SALOME::SALOME_Exception);
722 void addMesh (in MESH ptrMesh ) raises (SALOME::SALOME_Exception);
723 void addField (in FIELD ptrField ) raises (SALOME::SALOME_Exception);
725 void addInStudy (in SALOMEDS::Study myStudy, in MED medPtr) raises (SALOME::SALOME_Exception, SALOMEDS::StudyBuilder::LockProtection);