Lines 182-188
Link Here
|
182 |
med_2_3::med_int njoint = med_2_3::MEDnJoint(fid, meshname); |
182 |
med_2_3::med_int njoint = med_2_3::MEDnJoint(fid, meshname); |
183 |
for (int ijoint=0; ijoint<njoint; ijoint++) |
183 |
for (int ijoint=0; ijoint<njoint; ijoint++) |
184 |
{ |
184 |
{ |
185 |
int distant; |
185 |
med_2_3::med_int distant; |
186 |
char joint_description[MED_TAILLE_DESC]; |
186 |
char joint_description[MED_TAILLE_DESC]; |
187 |
char name[MED_TAILLE_NOM]; |
187 |
char name[MED_TAILLE_NOM]; |
188 |
char name_distant[MED_TAILLE_NOM]; |
188 |
char name_distant[MED_TAILLE_NOM]; |
Lines 204-210
Link Here
|
204 |
&cor_typent_local, &cor_typgeo_local, |
204 |
&cor_typent_local, &cor_typgeo_local, |
205 |
&cor_typent_dist, &cor_typgeo_dist |
205 |
&cor_typent_dist, &cor_typgeo_dist |
206 |
); |
206 |
); |
207 |
int* node_corresp=new int[ncouples]; |
207 |
med_2_3::med_int* node_corresp=new med_2_3::med_int[ncouples]; |
208 |
if (cor_typent_local == med_2_3::MED_NOEUD && cor_typent_dist == med_2_3::MED_NOEUD) |
208 |
if (cor_typent_local == med_2_3::MED_NOEUD && cor_typent_dist == med_2_3::MED_NOEUD) |
209 |
{ |
209 |
{ |
210 |
|
210 |
|
Lines 222-228
Link Here
|
222 |
cz->setDistantDomainNumber(distant); |
222 |
cz->setDistantDomainNumber(distant); |
223 |
cz->setLocalMesh((m_collection->getMesh())[idomain]); |
223 |
cz->setLocalMesh((m_collection->getMesh())[idomain]); |
224 |
cz->setDistantMesh((m_collection->getMesh())[distant]); |
224 |
cz->setDistantMesh((m_collection->getMesh())[distant]); |
225 |
cz->setNodeCorresp(node_corresp,ncouples); |
225 |
cz->setNodeCorresp((int *)node_corresp,ncouples); |
226 |
(m_collection->getCZ()).push_back(cz); |
226 |
(m_collection->getCZ()).push_back(cz); |
227 |
|
227 |
|
228 |
}//loop on correspom_topology->nbDomain())ndances |
228 |
}//loop on correspom_topology->nbDomain())ndances |
Lines 233-239
Link Here
|
233 |
int ncell=(m_collection->getMesh())[idomain]->getNumberOfElementsWithPoly(MED_EN::MED_CELL,MED_EN::MED_ALL_ELEMENTS); |
233 |
int ncell=(m_collection->getMesh())[idomain]->getNumberOfElementsWithPoly(MED_EN::MED_CELL,MED_EN::MED_ALL_ELEMENTS); |
234 |
if (ncell>0) |
234 |
if (ncell>0) |
235 |
{ |
235 |
{ |
236 |
int * array=new int[ncell]; |
236 |
med_2_3::med_int * array=new med_2_3::med_int[ncell]; |
237 |
int offset=0; |
237 |
int offset=0; |
238 |
MESSAGE("Reading cell global numbering for mesh "<< idomain); |
238 |
MESSAGE("Reading cell global numbering for mesh "<< idomain); |
239 |
list<MED_EN::medGeometryElement>::const_iterator iter; |
239 |
list<MED_EN::medGeometryElement>::const_iterator iter; |
Lines 251-274
Link Here
|
251 |
med_2_3::MED_MAILLE, (med_2_3::med_geometrie_element)type); |
251 |
med_2_3::MED_MAILLE, (med_2_3::med_geometrie_element)type); |
252 |
offset+=ntype; |
252 |
offset+=ntype; |
253 |
} |
253 |
} |
254 |
cellglobal[idomain]=array; |
254 |
cellglobal[idomain]=(int *)array; |
255 |
delete[] types; |
255 |
delete[] types; |
256 |
} |
256 |
} |
257 |
|
257 |
|
258 |
MESSAGE("Reading node global numbering"); |
258 |
MESSAGE("Reading node global numbering"); |
259 |
int nnode= (m_collection->getMesh())[idomain]->getNumberOfNodes(); |
259 |
int nnode= (m_collection->getMesh())[idomain]->getNumberOfNodes(); |
260 |
{ |
260 |
{ |
261 |
int* array=new int[nnode]; |
261 |
med_2_3::med_int* array=new med_2_3::med_int[nnode]; |
262 |
med_2_3::MEDglobalNumLire(fid,meshname, array, nnode, |
262 |
med_2_3::MEDglobalNumLire(fid,meshname, array, nnode, |
263 |
med_2_3::MED_NOEUD, med_2_3::MED_POINT1); |
263 |
med_2_3::MED_NOEUD, med_2_3::MED_POINT1); |
264 |
nodeglobal[idomain]=array; |
264 |
nodeglobal[idomain]=(int *)array; |
265 |
} |
265 |
} |
266 |
|
266 |
|
267 |
MESSAGE("Reading face global numbering for mesh "<<idomain); |
267 |
MESSAGE("Reading face global numbering for mesh "<<idomain); |
268 |
int nbface=(m_collection->getMesh())[idomain]->getNumberOfElementsWithPoly(MED_EN::MED_FACE,MED_EN::MED_ALL_ELEMENTS); |
268 |
int nbface=(m_collection->getMesh())[idomain]->getNumberOfElementsWithPoly(MED_EN::MED_FACE,MED_EN::MED_ALL_ELEMENTS); |
269 |
if (nbface!=0) |
269 |
if (nbface!=0) |
270 |
{ |
270 |
{ |
271 |
int* array=new int[nbface]; |
271 |
med_2_3::med_int* array=new med_2_3::med_int[nbface]; |
272 |
int offset=0; |
272 |
int offset=0; |
273 |
int nbtypes = (m_collection->getMesh())[idomain]->getNumberOfTypesWithPoly(MED_EN::MED_FACE); |
273 |
int nbtypes = (m_collection->getMesh())[idomain]->getNumberOfTypesWithPoly(MED_EN::MED_FACE); |
274 |
MED_EN::medGeometryElement* types =(m_collection->getMesh())[idomain]->getTypesWithPoly(MED_EN::MED_FACE); |
274 |
MED_EN::medGeometryElement* types =(m_collection->getMesh())[idomain]->getTypesWithPoly(MED_EN::MED_FACE); |
Lines 284-290
Link Here
|
284 |
med_2_3::MED_FACE, (med_2_3::med_geometrie_element)type); |
284 |
med_2_3::MED_FACE, (med_2_3::med_geometrie_element)type); |
285 |
offset+=ntype; |
285 |
offset+=ntype; |
286 |
} |
286 |
} |
287 |
faceglobal[idomain]=array; |
287 |
faceglobal[idomain]=(int *)array; |
288 |
delete[] types; |
288 |
delete[] types; |
289 |
} |
289 |
} |
290 |
med_2_3::MEDfermer(fid); |
290 |
med_2_3::MEDfermer(fid); |
Lines 346-352
Link Here
|
346 |
jointSort(node_corresp, nbnodes, false); |
346 |
jointSort(node_corresp, nbnodes, false); |
347 |
|
347 |
|
348 |
error= |
348 |
error= |
349 |
med_2_3::MEDjointEcr(fid, mesh_name, joint_name, node_corresp, nbnodes, |
349 |
med_2_3::MEDjointEcr(fid, mesh_name, joint_name,(med_2_3::med_int *) node_corresp, nbnodes, |
350 |
med_2_3::MED_NOEUD, med_2_3::MED_POINT1,med_2_3::MED_NOEUD, med_2_3::MED_POINT1); |
350 |
med_2_3::MED_NOEUD, med_2_3::MED_POINT1,med_2_3::MED_NOEUD, med_2_3::MED_POINT1); |
351 |
if (error==-1) cout << "erreur creation de joint "<<endl; |
351 |
if (error==-1) cout << "erreur creation de joint "<<endl; |
352 |
|
352 |
|
Lines 366-373
Link Here
|
366 |
// Writing cell global numbering |
366 |
// Writing cell global numbering |
367 |
// |
367 |
// |
368 |
int ncell=m_collection->getTopology()->getCellNumber(idomain); |
368 |
int ncell=m_collection->getTopology()->getCellNumber(idomain); |
369 |
int * array=new int[ncell]; |
369 |
med_2_3::med_int * array=new med_2_3::med_int[ncell]; |
370 |
m_collection->getTopology()->getCellList(idomain,array); |
370 |
m_collection->getTopology()->getCellList(idomain,(int *)array); |
371 |
int offset=0; |
371 |
int offset=0; |
372 |
|
372 |
|
373 |
MED_EN::MESH_ENTITIES::const_iterator currentEntity; |
373 |
MED_EN::MESH_ENTITIES::const_iterator currentEntity; |
Lines 404-411
Link Here
|
404 |
offset=0; |
404 |
offset=0; |
405 |
int nface= m_collection->getTopology()->getFaceNumber(idomain); |
405 |
int nface= m_collection->getTopology()->getFaceNumber(idomain); |
406 |
if (nface >0) |
406 |
if (nface >0) |
407 |
array=new int[nface]; |
407 |
array=new med_2_3::med_int[nface]; |
408 |
m_collection->getTopology()->getFaceList(idomain,array); |
408 |
m_collection->getTopology()->getFaceList(idomain,(int *)array); |
409 |
strcpy(meshchar,(m_collection->getMesh())[idomain]->getName().c_str()); |
409 |
strcpy(meshchar,(m_collection->getMesh())[idomain]->getName().c_str()); |
410 |
int nbfacetypes = (m_collection->getMesh())[idomain]->getNumberOfTypesWithPoly(constituent_entity); |
410 |
int nbfacetypes = (m_collection->getMesh())[idomain]->getNumberOfTypesWithPoly(constituent_entity); |
411 |
MED_EN::medGeometryElement* facetypes; |
411 |
MED_EN::medGeometryElement* facetypes; |
Lines 429-436
Link Here
|
429 |
//writing node global numbering |
429 |
//writing node global numbering |
430 |
|
430 |
|
431 |
int nnode= m_collection->getTopology()->getNodeNumber(idomain); |
431 |
int nnode= m_collection->getTopology()->getNodeNumber(idomain); |
432 |
array=new int[nnode]; |
432 |
array=new med_2_3::med_int[nnode]; |
433 |
m_collection->getTopology()->getNodeList(idomain,array); |
433 |
m_collection->getTopology()->getNodeList(idomain,(int *)array); |
434 |
med_2_3::MEDglobalNumEcr(fid,meshchar, array, nnode, |
434 |
med_2_3::MEDglobalNumEcr(fid,meshchar, array, nnode, |
435 |
med_2_3::MED_NOEUD, med_2_3::MED_POINT1); |
435 |
med_2_3::MED_NOEUD, med_2_3::MED_POINT1); |
436 |
|
436 |
|
Lines 500-506
Link Here
|
500 |
for (iter= cellmap.begin(); iter != cellmap.end(); iter++) |
500 |
for (iter= cellmap.begin(); iter != cellmap.end(); iter++) |
501 |
{ |
501 |
{ |
502 |
int size= iter->second.size(); |
502 |
int size= iter->second.size(); |
503 |
int *corresp = new int[size]; |
503 |
med_2_3::med_int *corresp = new med_2_3::med_int[size]; |
504 |
for (int ind=0; ind < size; ind++) |
504 |
for (int ind=0; ind < size; ind++) |
505 |
corresp[ind]=(iter->second)[ind]; |
505 |
corresp[ind]=(iter->second)[ind]; |
506 |
med_2_3::med_geometrie_element local_geo_elem=(med_2_3::med_geometrie_element)iter->first.first; |
506 |
med_2_3::med_geometrie_element local_geo_elem=(med_2_3::med_geometrie_element)iter->first.first; |