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 209-215
Link Here
|
209 |
{ |
209 |
{ |
210 |
|
210 |
|
211 |
med_2_3::MEDjointLire(fid, meshname, name, |
211 |
med_2_3::MEDjointLire(fid, meshname, name, |
212 |
node_corresp,ncouples, |
212 |
(med_2_3::med_int*)node_corresp,ncouples, |
213 |
cor_typent_local, cor_typgeo_local, |
213 |
cor_typent_local, cor_typgeo_local, |
214 |
cor_typent_dist, cor_typgeo_dist |
214 |
cor_typent_dist, cor_typgeo_dist |
215 |
); |
215 |
); |
Lines 247-253
Link Here
|
247 |
if (!m_collection->isDimensionOK(type,m_collection->getMeshDimension())) continue; |
247 |
if (!m_collection->isDimensionOK(type,m_collection->getMeshDimension())) continue; |
248 |
int ntype = (m_collection->getMesh())[idomain]->getNumberOfElementsWithPoly(MED_EN::MED_CELL,type); |
248 |
int ntype = (m_collection->getMesh())[idomain]->getNumberOfElementsWithPoly(MED_EN::MED_CELL,type); |
249 |
if (ntype==0) continue; |
249 |
if (ntype==0) continue; |
250 |
med_2_3::MEDglobalNumLire(fid,meshname, array+offset, ntype, |
250 |
med_2_3::MEDglobalNumLire(fid,meshname, (med_2_3::med_int*)(array+offset), ntype, |
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 |
} |
Lines 259-265
Link Here
|
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 |
int* array=new int[nnode]; |
262 |
med_2_3::MEDglobalNumLire(fid,meshname, array, nnode, |
262 |
med_2_3::MEDglobalNumLire(fid,meshname, (med_2_3::med_int*)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]=array; |
265 |
} |
265 |
} |
Lines 280-286
Link Here
|
280 |
|
280 |
|
281 |
int ntype = (m_collection->getMesh())[idomain]->getNumberOfElementsWithPoly(MED_EN::MED_FACE,type); |
281 |
int ntype = (m_collection->getMesh())[idomain]->getNumberOfElementsWithPoly(MED_EN::MED_FACE,type); |
282 |
if (ntype==0) continue; |
282 |
if (ntype==0) continue; |
283 |
med_2_3::MEDglobalNumLire(fid,meshname, array+offset, ntype, |
283 |
med_2_3::MEDglobalNumLire(fid,meshname, (med_2_3::med_int*)(array+offset), ntype, |
284 |
med_2_3::MED_MAILLE, (med_2_3::med_geometrie_element)type); |
284 |
med_2_3::MED_MAILLE, (med_2_3::med_geometrie_element)type); |
285 |
offset+=ntype; |
285 |
offset+=ntype; |
286 |
} |
286 |
} |
Lines 348-354
Link Here
|
348 |
jointSort(node_corresp, nbnodes, false); |
348 |
jointSort(node_corresp, nbnodes, false); |
349 |
|
349 |
|
350 |
error= |
350 |
error= |
351 |
med_2_3::MEDjointEcr(fid, mesh_name, joint_name, node_corresp, nbnodes, |
351 |
med_2_3::MEDjointEcr(fid, mesh_name, joint_name, (med_2_3::med_int*)node_corresp, nbnodes, |
352 |
med_2_3::MED_NOEUD, med_2_3::MED_POINT1,med_2_3::MED_NOEUD, med_2_3::MED_POINT1); |
352 |
med_2_3::MED_NOEUD, med_2_3::MED_POINT1,med_2_3::MED_NOEUD, med_2_3::MED_POINT1); |
353 |
if (error==-1) cout << "erreur creation de joint "<<endl; |
353 |
if (error==-1) cout << "erreur creation de joint "<<endl; |
354 |
|
354 |
|
Lines 388-394
Link Here
|
388 |
if (!m_collection->isDimensionOK(type,m_collection->getMeshDimension())) continue; |
388 |
if (!m_collection->isDimensionOK(type,m_collection->getMeshDimension())) continue; |
389 |
int ntype = (m_collection->getMesh())[idomain]->getNumberOfElementsWithPoly(MED_EN::MED_CELL,type); |
389 |
int ntype = (m_collection->getMesh())[idomain]->getNumberOfElementsWithPoly(MED_EN::MED_CELL,type); |
390 |
if (ntype==0) continue; |
390 |
if (ntype==0) continue; |
391 |
med_2_3::MEDglobalNumEcr(fid,meshchar, array+offset, ntype, |
391 |
med_2_3::MEDglobalNumEcr(fid,meshchar, (med_2_3::med_int*)(array+offset), ntype, |
392 |
med_2_3::MED_MAILLE, (med_2_3::med_geometrie_element)type); |
392 |
med_2_3::MED_MAILLE, (med_2_3::med_geometrie_element)type); |
393 |
offset+=ntype; |
393 |
offset+=ntype; |
394 |
|
394 |
|
Lines 426-432
Link Here
|
426 |
|
426 |
|
427 |
int ntype = (m_collection->getMesh())[idomain]->getNumberOfElementsWithPoly(constituent_entity,type); |
427 |
int ntype = (m_collection->getMesh())[idomain]->getNumberOfElementsWithPoly(constituent_entity,type); |
428 |
if (ntype==0) continue; |
428 |
if (ntype==0) continue; |
429 |
med_2_3::MEDglobalNumEcr(fid,meshchar, array+offset, ntype, |
429 |
med_2_3::MEDglobalNumEcr(fid,meshchar,(med_2_3::med_int*)(array+offset), ntype, |
430 |
med_2_3::MED_MAILLE, (med_2_3::med_geometrie_element)type); |
430 |
med_2_3::MED_MAILLE, (med_2_3::med_geometrie_element)type); |
431 |
|
431 |
|
432 |
offset+=ntype; |
432 |
offset+=ntype; |
Lines 443-449
Link Here
|
443 |
|
443 |
|
444 |
m_collection->getTopology()->getNodeList(idomain,array); |
444 |
m_collection->getTopology()->getNodeList(idomain,array); |
445 |
|
445 |
|
446 |
med_2_3::MEDglobalNumEcr(fid,meshchar, array, nnode, |
446 |
med_2_3::MEDglobalNumEcr(fid,meshchar, (med_2_3::med_int*)array, nnode, |
447 |
med_2_3::MED_NOEUD, med_2_3::MED_POINT1); |
447 |
med_2_3::MED_NOEUD, med_2_3::MED_POINT1); |
448 |
|
448 |
|
449 |
delete[] array; |
449 |
delete[] array; |
Lines 499-505
Link Here
|
499 |
{ |
499 |
{ |
500 |
MED_EN::medGeometryElement local_type = (m_collection->getMesh())[idomain]->getElementType(entity,1); |
500 |
MED_EN::medGeometryElement local_type = (m_collection->getMesh())[idomain]->getElementType(entity,1); |
501 |
MED_EN::medGeometryElement distant_type = (m_collection->getMesh())[idistant]->getElementType(entity,1); |
501 |
MED_EN::medGeometryElement distant_type = (m_collection->getMesh())[idistant]->getElementType(entity,1); |
502 |
vector<int> corresp; |
502 |
vector<med_2_3::med_int> corresp; |
503 |
for (int i=0; i<nbcells; i++) |
503 |
for (int i=0; i<nbcells; i++) |
504 |
for (int icol = index[i]-1; icol<index[i+1]-1; icol++) |
504 |
for (int icol = index[i]-1; icol<index[i+1]-1; icol++) |
505 |
{ |
505 |
{ |
Lines 541-547
Link Here
|
541 |
med_2_3::med_geometrie_element distant_geo_elem=(med_2_3::med_geometrie_element)iter->first.second; |
541 |
med_2_3::med_geometrie_element distant_geo_elem=(med_2_3::med_geometrie_element)iter->first.second; |
542 |
int size_joint=size/2; |
542 |
int size_joint=size/2; |
543 |
//med_2_3::med_err error = |
543 |
//med_2_3::med_err error = |
544 |
med_2_3::MEDjointEcr(fid, mesh_name, joint_name, corresp, size_joint, med_2_3::MED_MAILLE, |
544 |
med_2_3::MEDjointEcr(fid, mesh_name, joint_name, (med_2_3::med_int*)corresp, size_joint, med_2_3::MED_MAILLE, |
545 |
local_geo_elem,med_2_3::MED_MAILLE, distant_geo_elem); |
545 |
local_geo_elem,med_2_3::MED_MAILLE, distant_geo_elem); |
546 |
delete[] corresp; |
546 |
delete[] corresp; |
547 |
} |
547 |
} |