1 //=============================================================================
2 // File : MEDMEM_Mesh_i.hxx
5 // Copyright : EDF 2002
6 // $Header: /export/home/PAL/MED_SRC/src/MEDMEM_I/MEDMEM_Mesh_i.hxx
7 //=============================================================================
9 #ifndef _MED_MESH_I_HXX_
10 #define _MED_MESH_I_HXX_
15 #include <SALOMEconfig.h>
16 #include "SALOMEMultiComm.hxx"
17 #include CORBA_SERVER_HEADER(MED)
18 #include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
19 #include CORBA_SERVER_HEADER(SALOME_Comm)
23 class MESH_i: public POA_SALOME_MED::MESH,
24 public PortableServer::RefCountServantBase,
25 public SALOMEMultiComm
28 static std::map < int,::MEDMEM::MESH *> meshMap;
35 // C++ object containing values
36 ::MEDMEM::MESH * const _mesh;
37 const int _corbaIndex;
43 // Constructors and associated internal methods
45 MESH_i(::MEDMEM::MESH * const m);
50 char * getName() throw (SALOME::SALOME_Exception);
52 CORBA::Long getSpaceDimension() throw (SALOME::SALOME_Exception);
54 CORBA::Long getMeshDimension() throw (SALOME::SALOME_Exception);
56 CORBA::Boolean getIsAGrid() throw (SALOME::SALOME_Exception);
58 CORBA::Boolean existConnectivity
59 ( SALOME_MED::medConnectivity connectivityType,
60 SALOME_MED::medEntityMesh entity)
61 throw (SALOME::SALOME_Exception);
63 char * getCoordinatesSystem()
64 throw (SALOME::SALOME_Exception);
66 SALOME_MED::double_array* getCoordinates(SALOME_MED::medModeSwitch typeSwitch)
67 throw (SALOME::SALOME_Exception);
69 SALOME::SenderDouble_ptr getSenderForCoordinates(SALOME_MED::medModeSwitch typeSwitch)
70 throw (SALOME::SALOME_Exception);
72 CORBA::Double getCoordinate(CORBA::Long Number, CORBA::Long Axis)
73 throw (SALOME::SALOME_Exception);
75 SALOME_MED::string_array* getCoordinatesNames()
76 throw (SALOME::SALOME_Exception);
78 SALOME_MED::string_array* getCoordinatesUnits()
79 throw (SALOME::SALOME_Exception);
81 CORBA::Long getNumberOfNodes()
82 throw (SALOME::SALOME_Exception);
84 CORBA::Long getNumberOfTypes (SALOME_MED::medEntityMesh entity)
85 throw (SALOME::SALOME_Exception);
87 SALOME_MED::medGeometryElement_array* getTypes(SALOME_MED::medEntityMesh entity)
88 throw (SALOME::SALOME_Exception);
90 SALOME_MED::medGeometryElement getElementType(SALOME_MED::medEntityMesh entity,
92 throw (SALOME::SALOME_Exception);
95 CORBA::Long getNumberOfElements (SALOME_MED::medEntityMesh entity,
96 SALOME_MED::medGeometryElement geomElement)
97 throw (SALOME::SALOME_Exception);
99 SALOME_MED::long_array* getConnectivity(SALOME_MED::medModeSwitch typeSwitch,
100 SALOME_MED::medConnectivity mode,
101 SALOME_MED::medEntityMesh entity,
102 SALOME_MED::medGeometryElement geomElement)
103 throw (SALOME::SALOME_Exception);
105 SALOME::SenderInt_ptr getSenderForConnectivity(SALOME_MED::medModeSwitch typeSwitch,
106 SALOME_MED::medConnectivity mode,
107 SALOME_MED::medEntityMesh entity,
108 SALOME_MED::medGeometryElement geomElement)
109 throw (SALOME::SALOME_Exception);
111 SALOME_MED::long_array* getConnectivityIndex(SALOME_MED::medConnectivity mode,
112 SALOME_MED::medEntityMesh entity)
113 throw (SALOME::SALOME_Exception);
115 SALOME_MED::long_array* getGlobalNumberingIndex(SALOME_MED::medEntityMesh entity)
116 throw (SALOME::SALOME_Exception);
118 CORBA::Long getElementNumber(SALOME_MED::medConnectivity mode,
119 SALOME_MED::medEntityMesh entity,
120 SALOME_MED::medGeometryElement type,
121 const SALOME_MED::long_array& connectivity)
122 throw (SALOME::SALOME_Exception);
124 SALOME_MED::long_array* getReverseConnectivity(SALOME_MED::medConnectivity mode)
125 throw (SALOME::SALOME_Exception);
127 SALOME_MED::long_array* getReverseConnectivityIndex(SALOME_MED::medConnectivity mode)
128 throw (SALOME::SALOME_Exception);
131 CORBA::Long getNumberOfFamilies(SALOME_MED::medEntityMesh entity)
132 throw (SALOME::SALOME_Exception);
133 CORBA::Long getNumberOfGroups(SALOME_MED::medEntityMesh entity)
134 throw (SALOME::SALOME_Exception);
135 SALOME_MED::Family_array* getFamilies(SALOME_MED::medEntityMesh entity)
136 throw (SALOME::SALOME_Exception);
137 SALOME_MED::FAMILY_ptr getFamily (SALOME_MED::medEntityMesh entity,
139 throw (SALOME::SALOME_Exception);
140 SALOME_MED::Group_array* getGroups(SALOME_MED::medEntityMesh entity)
141 throw (SALOME::SALOME_Exception);
142 SALOME_MED::GROUP_ptr getGroup (SALOME_MED::medEntityMesh entity,
144 throw (SALOME::SALOME_Exception);
146 SALOME_MED::SUPPORT_ptr getBoundaryElements(SALOME_MED::medEntityMesh entity)
147 throw (SALOME::SALOME_Exception);
148 SALOME_MED::SUPPORT_ptr getSkin (SALOME_MED::SUPPORT_ptr mySupport3D)
149 throw (SALOME::SALOME_Exception);
151 SALOME_MED::FIELD_ptr getVolume (SALOME_MED::SUPPORT_ptr mySupport)
152 throw (SALOME::SALOME_Exception);
153 SALOME_MED::FIELD_ptr getArea (SALOME_MED::SUPPORT_ptr mySupport)
154 throw (SALOME::SALOME_Exception);
155 SALOME_MED::FIELD_ptr getLength (SALOME_MED::SUPPORT_ptr mySupport)
156 throw (SALOME::SALOME_Exception);
157 SALOME_MED::FIELD_ptr getNormal (SALOME_MED::SUPPORT_ptr mySupport)
158 throw (SALOME::SALOME_Exception);
159 SALOME_MED::FIELD_ptr getBarycenter (SALOME_MED::SUPPORT_ptr mySupport)
160 throw (SALOME::SALOME_Exception);
161 SALOME_MED::FIELD_ptr getNeighbourhood (SALOME_MED::SUPPORT_ptr mySupport)
162 throw (SALOME::SALOME_Exception);
166 void addInStudy (SALOMEDS::Study_ptr myStudy,
167 SALOME_MED::MESH_ptr myIor)
168 throw (SALOME::SALOME_Exception, SALOMEDS::StudyBuilder::LockProtection);
169 void addInStudy (SALOMEDS::Study_ptr myStudy,
170 SALOME_MED::MESH_ptr myIor,
171 const std::string & fileName)
172 throw (SALOME::SALOME_Exception, SALOMEDS::StudyBuilder::LockProtection);
173 CORBA::Long addDriver (SALOME_MED::medDriverTypes driverType,
174 const char* fileName, const char* meshName)
175 throw (SALOME::SALOME_Exception);
176 void rmDriver (CORBA::Long i) throw (SALOME::SALOME_Exception);
177 void read (CORBA::Long i) throw (SALOME::SALOME_Exception);
178 void write (CORBA::Long i, const char* driverMeshName)
179 throw (SALOME::SALOME_Exception);
182 CORBA::Long getCorbaIndex() throw (SALOME::SALOME_Exception);
183 ::MEDMEM::MESH * constructConstMesh() const;
184 SALOME_MED::MESH::meshInfos * getMeshGlobal()
185 throw (SALOME::SALOME_Exception);
186 SALOME_MED::MESH::coordinateInfos * getCoordGlobal()
187 throw (SALOME::SALOME_Exception);
188 SALOME_MED::MESH::connectivityInfos * getConnectGlobal
189 (SALOME_MED::medEntityMesh entity)
190 throw (SALOME::SALOME_Exception);
191 CORBA::Boolean areEquals(SALOME_MED::MESH_ptr other);
197 #endif /* _MED_MESH_I_HXX_ */