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 "SALOME_GenericObj_i.hh"
18 #include CORBA_SERVER_HEADER(MED)
19 #include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
20 #include CORBA_SERVER_HEADER(SALOME_Comm)
24 class MESH_i: public POA_SALOME_MED::MESH,
25 public SALOMEMultiComm,
26 public SALOME::GenericObj_i
29 static std::map < int,::MEDMEM::MESH *> meshMap;
36 // C++ object containing values
37 ::MEDMEM::MESH * const _mesh;
38 const int _corbaIndex;
44 // Constructors and associated internal methods
46 MESH_i(::MEDMEM::MESH * const m);
51 char * getName() throw (SALOME::SALOME_Exception);
53 CORBA::Long getSpaceDimension() throw (SALOME::SALOME_Exception);
55 CORBA::Long getMeshDimension() throw (SALOME::SALOME_Exception);
57 CORBA::Boolean getIsAGrid() throw (SALOME::SALOME_Exception);
59 CORBA::Boolean existConnectivity
60 ( SALOME_MED::medConnectivity connectivityType,
61 SALOME_MED::medEntityMesh entity)
62 throw (SALOME::SALOME_Exception);
64 char * getCoordinatesSystem()
65 throw (SALOME::SALOME_Exception);
67 SALOME_MED::double_array* getCoordinates(SALOME_MED::medModeSwitch typeSwitch)
68 throw (SALOME::SALOME_Exception);
70 SALOME::SenderDouble_ptr getSenderForCoordinates(SALOME_MED::medModeSwitch typeSwitch)
71 throw (SALOME::SALOME_Exception);
73 CORBA::Double getCoordinate(CORBA::Long Number, CORBA::Long Axis)
74 throw (SALOME::SALOME_Exception);
76 SALOME_MED::string_array* getCoordinatesNames()
77 throw (SALOME::SALOME_Exception);
79 SALOME_MED::string_array* getCoordinatesUnits()
80 throw (SALOME::SALOME_Exception);
82 CORBA::Long getNumberOfNodes()
83 throw (SALOME::SALOME_Exception);
85 CORBA::Long getNumberOfTypes (SALOME_MED::medEntityMesh entity)
86 throw (SALOME::SALOME_Exception);
88 SALOME_MED::medGeometryElement_array* getTypes(SALOME_MED::medEntityMesh entity)
89 throw (SALOME::SALOME_Exception);
91 SALOME_MED::medGeometryElement getElementType(SALOME_MED::medEntityMesh entity,
93 throw (SALOME::SALOME_Exception);
96 CORBA::Long getNumberOfElements (SALOME_MED::medEntityMesh entity,
97 SALOME_MED::medGeometryElement geomElement)
98 throw (SALOME::SALOME_Exception);
100 SALOME_MED::long_array* getConnectivity(SALOME_MED::medModeSwitch typeSwitch,
101 SALOME_MED::medConnectivity mode,
102 SALOME_MED::medEntityMesh entity,
103 SALOME_MED::medGeometryElement geomElement)
104 throw (SALOME::SALOME_Exception);
106 SALOME::SenderInt_ptr getSenderForConnectivity(SALOME_MED::medModeSwitch typeSwitch,
107 SALOME_MED::medConnectivity mode,
108 SALOME_MED::medEntityMesh entity,
109 SALOME_MED::medGeometryElement geomElement)
110 throw (SALOME::SALOME_Exception);
112 SALOME_MED::long_array* getConnectivityIndex(SALOME_MED::medConnectivity mode,
113 SALOME_MED::medEntityMesh entity)
114 throw (SALOME::SALOME_Exception);
116 SALOME_MED::long_array* getGlobalNumberingIndex(SALOME_MED::medEntityMesh entity)
117 throw (SALOME::SALOME_Exception);
119 CORBA::Long getElementNumber(SALOME_MED::medConnectivity mode,
120 SALOME_MED::medEntityMesh entity,
121 SALOME_MED::medGeometryElement type,
122 const SALOME_MED::long_array& connectivity)
123 throw (SALOME::SALOME_Exception);
125 SALOME_MED::long_array* getReverseConnectivity(SALOME_MED::medConnectivity mode)
126 throw (SALOME::SALOME_Exception);
128 SALOME_MED::long_array* getReverseConnectivityIndex(SALOME_MED::medConnectivity mode)
129 throw (SALOME::SALOME_Exception);
132 CORBA::Long getNumberOfFamilies(SALOME_MED::medEntityMesh entity)
133 throw (SALOME::SALOME_Exception);
134 CORBA::Long getNumberOfGroups(SALOME_MED::medEntityMesh entity)
135 throw (SALOME::SALOME_Exception);
136 SALOME_MED::Family_array* getFamilies(SALOME_MED::medEntityMesh entity)
137 throw (SALOME::SALOME_Exception);
138 SALOME_MED::FAMILY_ptr getFamily (SALOME_MED::medEntityMesh entity,
140 throw (SALOME::SALOME_Exception);
141 SALOME_MED::Group_array* getGroups(SALOME_MED::medEntityMesh entity)
142 throw (SALOME::SALOME_Exception);
143 SALOME_MED::GROUP_ptr getGroup (SALOME_MED::medEntityMesh entity,
145 throw (SALOME::SALOME_Exception);
147 SALOME_MED::SUPPORT_ptr getBoundaryElements(SALOME_MED::medEntityMesh entity)
148 throw (SALOME::SALOME_Exception);
149 SALOME_MED::SUPPORT_ptr getSkin (SALOME_MED::SUPPORT_ptr mySupport3D)
150 throw (SALOME::SALOME_Exception);
152 SALOME_MED::FIELD_ptr getVolume (SALOME_MED::SUPPORT_ptr mySupport)
153 throw (SALOME::SALOME_Exception);
154 SALOME_MED::FIELD_ptr getArea (SALOME_MED::SUPPORT_ptr mySupport)
155 throw (SALOME::SALOME_Exception);
156 SALOME_MED::FIELD_ptr getLength (SALOME_MED::SUPPORT_ptr mySupport)
157 throw (SALOME::SALOME_Exception);
158 SALOME_MED::FIELD_ptr getNormal (SALOME_MED::SUPPORT_ptr mySupport)
159 throw (SALOME::SALOME_Exception);
160 SALOME_MED::FIELD_ptr getBarycenter (SALOME_MED::SUPPORT_ptr mySupport)
161 throw (SALOME::SALOME_Exception);
162 SALOME_MED::FIELD_ptr getNeighbourhood (SALOME_MED::SUPPORT_ptr mySupport)
163 throw (SALOME::SALOME_Exception);
167 void addInStudy (SALOMEDS::Study_ptr myStudy,
168 SALOME_MED::MESH_ptr myIor)
169 throw (SALOME::SALOME_Exception, SALOMEDS::StudyBuilder::LockProtection);
170 void addInStudy (SALOMEDS::Study_ptr myStudy,
171 SALOME_MED::MESH_ptr myIor,
172 const std::string & fileName)
173 throw (SALOME::SALOME_Exception, SALOMEDS::StudyBuilder::LockProtection);
174 CORBA::Long addDriver (SALOME_MED::medDriverTypes driverType,
175 const char* fileName, const char* meshName)
176 throw (SALOME::SALOME_Exception);
177 void rmDriver (CORBA::Long i) throw (SALOME::SALOME_Exception);
178 void read (CORBA::Long i) throw (SALOME::SALOME_Exception);
179 void write (CORBA::Long i, const char* driverMeshName)
180 throw (SALOME::SALOME_Exception);
183 CORBA::Long getCorbaIndex() throw (SALOME::SALOME_Exception);
184 ::MEDMEM::MESH * constructConstMesh() const;
185 SALOME_MED::MESH::meshInfos * getMeshGlobal()
186 throw (SALOME::SALOME_Exception);
187 SALOME_MED::MESH::coordinateInfos * getCoordGlobal()
188 throw (SALOME::SALOME_Exception);
189 SALOME_MED::MESH::connectivityInfos * getConnectGlobal
190 (SALOME_MED::medEntityMesh entity)
191 throw (SALOME::SALOME_Exception);
192 CORBA::Boolean areEquals(SALOME_MED::MESH_ptr other);
197 #endif /* _MED_MESH_I_HXX_ */