1 //=============================================================================
2 // File : SMESH_MEDMesh_i.hxx
4 // Copyright : EDF 2001
5 //=============================================================================
7 #ifndef _MED_SMESH_MESH_I_HXX_
8 #define _MED_SMESH_MESH_I_HXX_
10 #include <SALOMEconfig.h>
11 #include CORBA_SERVER_HEADER(MED)
16 #include "SMESHDS_Mesh.hxx"
18 #include "SMDS_MeshElement.hxx"
19 #include "SMDS_MeshNode.hxx"
20 #include "SMDS_MeshFacesIterator.hxx"
21 #include "SMDS_MeshEdgesIterator.hxx"
22 #include "SMDS_MeshNodesIterator.hxx"
23 #include "SMDS_MeshVolumesIterator.hxx"
25 #define MED_NBR_GEOMETRIE_MAILLE 15
26 #define MED_NBR_TYPE 5
31 class SMESH_MEDMesh_i:
32 public POA_SALOME_MED::MESH,
33 public PortableServer::RefCountServantBase
40 // C++ object containing values
41 ::SMESH_Mesh_i* _mesh_i;
42 Handle (SMESHDS_Mesh) _meshDS;
51 map <SALOME_MED::medGeometryElement,int> _mapIndToSeqElts;
52 Engines::long_array_var _seq_elemId[MED_NBR_GEOMETRIE_MAILLE];
54 map <SALOME_MED::medEntityMesh,int> _mapNbTypes;
55 map <SALOME_MED::medEntityMesh,int> _mapIndToVectTypes;
56 vector<SALOME_MED::medGeometryElement> _TypesId[MED_NBR_GEOMETRIE_MAILLE];
58 vector<SALOME_MED::FAMILY_ptr> _families;
61 // Constructors and associated internal methods
63 SMESH_MEDMesh_i(SMESH_Mesh_i* m);
67 char * getName() throw (SALOME::SALOME_Exception);
68 CORBA::Long getSpaceDimension() throw (SALOME::SALOME_Exception);
69 CORBA::Long getMeshDimension() throw (SALOME::SALOME_Exception);
71 char * getCoordinateSystem()
72 throw (SALOME::SALOME_Exception);
73 Engines::double_array* getCoordinates(SALOME_MED::medModeSwitch typeSwitch)
74 throw (SALOME::SALOME_Exception);
75 Engines::string_array* getCoordinatesNames()
76 throw (SALOME::SALOME_Exception);
77 Engines::string_array* getCoordinatesUnits()
78 throw (SALOME::SALOME_Exception);
79 CORBA::Long getNumberOfNodes()
80 throw (SALOME::SALOME_Exception);
82 CORBA::Long getNumberOfTypes (SALOME_MED::medEntityMesh entity)
83 throw (SALOME::SALOME_Exception);
84 SALOME_MED::medGeometryElement_array* getTypes(SALOME_MED::medEntityMesh entity)
85 throw (SALOME::SALOME_Exception);
87 CORBA::Long getNumberOfElements (SALOME_MED::medEntityMesh entity,
88 SALOME_MED::medGeometryElement geomElement)
89 throw (SALOME::SALOME_Exception);
90 Engines::long_array* getConnectivity (SALOME_MED::medModeSwitch typeSwitch,
91 SALOME_MED::medConnectivity mode,
92 SALOME_MED::medEntityMesh entity,
93 SALOME_MED::medGeometryElement geomElement)
94 throw (SALOME::SALOME_Exception);
95 Engines::long_array* getConnectivityIndex(SALOME_MED::medConnectivity mode,
96 SALOME_MED::medEntityMesh entity)
97 throw (SALOME::SALOME_Exception);
99 CORBA::Long getElementNumber(SALOME_MED::medConnectivity mode,
100 SALOME_MED::medEntityMesh entity,
101 SALOME_MED::medGeometryElement type,
102 const Engines::long_array & connectivity)
103 throw (SALOME::SALOME_Exception);
105 Engines::long_array* getReverseConnectivity(SALOME_MED::medConnectivity mode)
107 throw (SALOME::SALOME_Exception);
108 Engines::long_array* getReverseConnectivityIndex(SALOME_MED::medConnectivity mode)
109 throw (SALOME::SALOME_Exception);
112 CORBA::Long getNumberOfFamilies (SALOME_MED::medEntityMesh entity)
113 throw (SALOME::SALOME_Exception);
114 CORBA::Long getNumberOfGroups (SALOME_MED::medEntityMesh entity)
115 throw (SALOME::SALOME_Exception);
116 SALOME_MED::Family_array* getFamilies (SALOME_MED::medEntityMesh entity)
117 throw (SALOME::SALOME_Exception);
118 SALOME_MED::FAMILY_ptr getFamily (SALOME_MED::medEntityMesh entity,
120 throw (SALOME::SALOME_Exception);
121 SALOME_MED::Group_array* getGroups (SALOME_MED::medEntityMesh entity)
122 throw (SALOME::SALOME_Exception);
123 SALOME_MED::GROUP_ptr getGroup (SALOME_MED::medEntityMesh entity,
125 throw (SALOME::SALOME_Exception);
127 SALOME_MED::FIELD_ptr getVolume (SALOME_MED::SUPPORT_ptr mySupport)
128 throw (SALOME::SALOME_Exception);
129 SALOME_MED::FIELD_ptr getArea (SALOME_MED::SUPPORT_ptr mySupport)
130 throw (SALOME::SALOME_Exception);
131 SALOME_MED::FIELD_ptr getLength (SALOME_MED::SUPPORT_ptr mySupport)
132 throw (SALOME::SALOME_Exception);
133 SALOME_MED::FIELD_ptr getNormal (SALOME_MED::SUPPORT_ptr mySupport)
134 throw (SALOME::SALOME_Exception);
135 SALOME_MED::FIELD_ptr getBarycenter (SALOME_MED::SUPPORT_ptr mySupport)
136 throw (SALOME::SALOME_Exception);
137 SALOME_MED::FIELD_ptr getNeighbourhood (SALOME_MED::SUPPORT_ptr mySupport)
138 throw (SALOME::SALOME_Exception);
142 void addInStudy (SALOMEDS::Study_ptr myStudy,
143 SALOME_MED::MESH_ptr myIor)
144 throw (SALOME::SALOME_Exception);
145 CORBA::Long addDriver (SALOME_MED::medDriverTypes driverType,
146 const char* fileName, const char* meshName)
147 throw (SALOME::SALOME_Exception);
148 void rmDriver (CORBA::Long i)
149 throw (SALOME::SALOME_Exception);
150 void read (CORBA::Long i)
151 throw (SALOME::SALOME_Exception);
152 void write (CORBA::Long i, const char* driverMeshName)
153 throw (SALOME::SALOME_Exception);
156 CORBA::Long getCorbaIndex() throw (SALOME::SALOME_Exception);
159 void calculeNbElts() throw (SALOME::SALOME_Exception);
160 void createFamilies() throw (SALOME::SALOME_Exception);
163 #endif /* _MED_MESH_I_HXX_ */