updated on Tue Jan 10 04:01:21 UTC 2012
[aur-mirror.git] / salome-med / salome-med-5.1.4_med_int.diff
blobaa79a5c0333c9576b5fd9f02e56a79ff733d5921
1 diff -Naur MED_SRC_5.1.4.orig//src/MEDLoader/MEDLoader.cxx MED_SRC_5.1.4//src/MEDLoader/MEDLoader.cxx
2 --- MED_SRC_5.1.4.orig//src/MEDLoader/MEDLoader.cxx 2010-07-07 20:06:41.319275884 +0200
3 +++ MED_SRC_5.1.4//src/MEDLoader/MEDLoader.cxx 2010-07-09 16:36:07.678049186 +0200
4 @@ -253,12 +253,13 @@
5 for(int i=0;i<nfam;i++)
7 int ngro=MEDnGroupe(fid,(char *)meshName,i+1);
8 + med_int ngroMI=ngro;
9 med_int natt=MEDnAttribut(fid,(char *)meshName,i+1);
10 - med_int *attide=new int[natt];
11 - med_int *attval=new int[natt];
12 + med_int *attide=new med_int[natt];
13 + med_int *attval=new med_int[natt];
14 char *attdes=new char[MED_TAILLE_DESC*natt+1];
15 char *gro=new char[MED_TAILLE_LNOM*ngro+1];
16 - MEDfamInfo(fid,(char *)meshName,i+1,nomfam,&numfam,attide,attval,attdes,&natt,gro,&ngro);
17 + MEDfamInfo(fid,(char *)meshName,i+1,nomfam,&numfam,attide,attval,attdes,&natt,gro,&ngroMI);
18 std::string cur=MEDLoaderNS::buildStringFromFortran(nomfam,sizeof(nomfam));
19 ret[i]=cur;
20 delete [] attdes;
21 @@ -280,12 +281,13 @@
22 for(int i=0;i<nfam;i++)
24 int ngro=MEDnGroupe(fid,(char *)meshName,i+1);
25 + med_int ngroMI = ngro;
26 med_int natt=MEDnAttribut(fid,(char *)meshName,i+1);
27 - med_int *attide=new int[natt];
28 - med_int *attval=new int[natt];
29 + med_int *attide=new med_int[natt];
30 + med_int *attval=new med_int[natt];
31 char *attdes=new char[MED_TAILLE_DESC*natt+1];
32 char *gro=new char[MED_TAILLE_LNOM*ngro+1];
33 - MEDfamInfo(fid,(char *)meshName,i+1,nomfam,&numfam,attide,attval,attdes,&natt,gro,&ngro);
34 + MEDfamInfo(fid,(char *)meshName,i+1,nomfam,&numfam,attide,attval,attdes,&natt,gro,&ngroMI);
35 for(int j=0;j<ngro;j++)
37 std::string cur=MEDLoaderNS::buildStringFromFortran(gro+j*MED_TAILLE_LNOM,MED_TAILLE_LNOM);
38 @@ -547,12 +549,13 @@
39 for(int i=0;i<nfam;i++)
41 int ngro=MEDnGroupe(fid,(char *)meshName,i+1);
42 + med_int ngroMI=ngro;
43 med_int natt=MEDnAttribut(fid,(char *)meshName,i+1);
44 - med_int *attide=new int[natt];
45 - med_int *attval=new int[natt];
46 + med_int *attide=new med_int[natt];
47 + med_int *attval=new med_int[natt];
48 char *attdes=new char[MED_TAILLE_DESC*natt+1];
49 char *gro=new char[MED_TAILLE_LNOM*ngro+1];
50 - MEDfamInfo(fid,(char *)meshName,i+1,nomfam,&numfam,attide,attval,attdes,&natt,gro,&ngro);
51 + MEDfamInfo(fid,(char *)meshName,i+1,nomfam,&numfam,attide,attval,attdes,&natt,gro,&ngroMI);
52 std::string cur=buildStringFromFortran(nomfam,sizeof(nomfam));
53 if(std::find(fams.begin(),fams.end(),cur)!=fams.end())
54 ret.push_back(numfam);
55 @@ -575,12 +578,13 @@
56 for(int i=0;i<nfam;i++)
58 int ngro=MEDnGroupe(fid,(char *)meshName,i+1);
59 + med_int ngroMI = ngro;
60 med_int natt=MEDnAttribut(fid,(char *)meshName,i+1);
61 - med_int *attide=new int[natt];
62 - med_int *attval=new int[natt];
63 + med_int *attide=new med_int[natt];
64 + med_int *attval=new med_int[natt];
65 char *attdes=new char[MED_TAILLE_DESC*natt+1];
66 char *gro=new char[MED_TAILLE_LNOM*ngro+1];
67 - MEDfamInfo(fid,(char *)meshName,i+1,nomfam,&numfam,attide,attval,attdes,&natt,gro,&ngro);
68 + MEDfamInfo(fid,(char *)meshName,i+1,nomfam,&numfam,attide,attval,attdes,&natt,gro,&ngroMI);
69 std::string cur=buildStringFromFortran(nomfam,sizeof(nomfam));
70 for(int j=0;j<ngro;j++)
72 @@ -669,19 +673,34 @@
73 if(curNbOfElem>0)
75 int *connTab=new int[(curMedType%100)*curNbOfElem];
76 + med_int *connTabMI = new med_int[(curMedType%100)*curNbOfElem];
77 int *fam=new int[curNbOfElem];
78 + med_int *famMI = new med_int[curNbOfElem];
79 MEDLoader::MEDConnOfOneElemType elem(typmai2[i],connTab,0,fam,curNbOfElem,-1);
80 - int *tmp=new int[curNbOfElem];
81 + for(int i=0; i<((curMedType%100)*curNbOfElem);i++){
82 + connTabMI[i]=connTab[i];
83 + }
84 + for(int i=0; i<curNbOfElem;i++){
85 + famMI[i]=fam[i];
86 + }
87 + med_int *tmp=new med_int[curNbOfElem];
88 char *noms=new char[MED_TAILLE_PNOM*curNbOfElem+1];
89 - MEDelementsLire(fid,nommaa,Mdim,connTab,MED_FULL_INTERLACE,noms,&inoele,tmp,&inuele,fam,curNbOfElem,whichEntity,curMedType,MED_NOD);
90 + MEDelementsLire(fid,nommaa,Mdim,connTabMI,MED_FULL_INTERLACE,noms,&inoele,tmp,&inuele,famMI,curNbOfElem,whichEntity,curMedType,MED_NOD);
91 delete [] tmp;
92 delete [] noms;
93 //trying to read global numbering
94 int *globArr=new int[curNbOfElem];
95 - if(MEDglobalNumLire(fid,nommaa,globArr,curNbOfElem,whichEntity,curMedType)==0)
96 + med_int *globArrMI=new med_int[curNbOfElem];
97 + if(MEDglobalNumLire(fid,nommaa,globArrMI,curNbOfElem,whichEntity,curMedType)==0){
98 + for(int i=0; i< curNbOfElem;i++){
99 + globArr[i]=globArrMI[i];
101 + delete [] globArrMI;
102 elem.setGlobal(globArr);
103 - else
104 + } else{
105 delete [] globArr;
106 + delete [] globArrMI;
108 conn.push_back(elem);
111 @@ -695,11 +714,23 @@
112 med_int arraySize;
113 MEDpolygoneInfo(fid,nommaa,whichPolyEntity,MED_NOD,&arraySize);
114 int *index=new int[curNbOfPolyElem+1];
115 + med_int *indexMI=new med_int[curNbOfPolyElem+1];
116 int *locConn=new int[arraySize];
117 + med_int *locConnMI=new med_int[arraySize];
118 int *fam=new int[curNbOfPolyElem];
119 - MEDLoader::MEDConnOfOneElemType elem(INTERP_KERNEL::NORM_POLYGON,locConn,index,fam,curNbOfPolyElem,arraySize);
120 - MEDpolygoneConnLire(fid,nommaa,index,curNbOfPolyElem+1,locConn,whichPolyEntity,MED_NOD);
121 - MEDfamLire(fid,nommaa,fam,curNbOfPolyElem,MED_MAILLE,MED_POLYGONE);
122 + med_int *famMI=new med_int[curNbOfPolyElem];
123 + MEDLoader::MEDConnOfOneElemType elem(INTERP_KERNEL::NORM_POLYGON,locConn,index,fam,curNbOfPolyElem,(int)arraySize);
124 + for(int i=0; i<(curNbOfPolyElem+1); i++){
125 + indexMI[i]=index[i];
127 + for(int i=0; i<arraySize;i++){
128 + locConnMI[i]=locConn[i];
130 + for(int i=0; i<curNbOfPolyElem;i++){
131 + famMI[i]=fam[i];
133 + MEDpolygoneConnLire(fid,nommaa,indexMI,curNbOfPolyElem+1,locConnMI,whichPolyEntity,MED_NOD);
134 + MEDfamLire(fid,nommaa,famMI,curNbOfPolyElem,MED_MAILLE,MED_POLYGONE);
135 conn.push_back(elem);
137 curNbOfPolyElem=MEDnEntMaa(fid,nommaa,MED_CONN,MED_MAILLE,MED_POLYEDRE,MED_NOD);
138 @@ -708,11 +739,27 @@
139 med_int indexFaceLgth,connFaceLgth;
140 MEDpolyedreInfo(fid,nommaa,MED_NOD,&indexFaceLgth,&connFaceLgth);
141 int *index=new int[curNbOfPolyElem+1];
142 + med_int *indexMI=new med_int[curNbOfPolyElem+1];
143 int *indexFace=new int[indexFaceLgth];
144 + med_int *indexFaceMI=new med_int[indexFaceLgth];
145 int *locConn=new int[connFaceLgth];
146 + med_int *locConnMI=new med_int[connFaceLgth];
147 int *fam=new int[curNbOfPolyElem];
148 - MEDpolyedreConnLire(fid,nommaa,index,curNbOfPolyElem+1,indexFace,indexFaceLgth,locConn,MED_NOD);
149 - MEDfamLire(fid,nommaa,fam,curNbOfPolyElem,MED_MAILLE,MED_POLYEDRE);
150 + med_int *famMI=new med_int[curNbOfPolyElem];
151 + MEDpolyedreConnLire(fid,nommaa,indexMI,curNbOfPolyElem+1,indexFaceMI,indexFaceLgth,locConnMI,MED_NOD);
152 + for(int i=0; i<(curNbOfPolyElem+1); i++){
153 + index[i]=indexMI[i];
155 + for(int i=0; i<indexFaceLgth; i++ ){
156 + indexFace[i]=indexFaceMI[i];
158 + for(int i=0;i<connFaceLgth;i++){
159 + locConn[i]=locConnMI[i];
161 + MEDfamLire(fid,nommaa,famMI,curNbOfPolyElem,MED_MAILLE,MED_POLYEDRE);
162 + for(int i=0; i<curNbOfPolyElem; i++){
163 + fam[i] = famMI[i];
165 int arraySize=connFaceLgth;
166 for(int i=0;i<curNbOfPolyElem;i++)
167 arraySize+=index[i+1]-index[i]-1;
168 @@ -731,8 +778,10 @@
171 delete [] index;
172 + delete [] indexMI;
173 delete [] locConn;
174 delete [] indexFace;
175 + delete [] indexFaceMI;
176 MEDLoader::MEDConnOfOneElemType elem(INTERP_KERNEL::NORM_POLYHED,finalConn,finalIndex,fam,curNbOfPolyElem,arraySize);
177 conn.push_back(elem);
179 @@ -1145,15 +1194,25 @@
180 if(allTypes.find(curType)!=allTypes.end())
182 std::vector<int> medConn;
183 + std::vector<med_int> medConnMI;
184 std::vector<int> medConnIndex;
185 + std::vector<med_int> medConnIndexMI;
186 std::vector<int> medConnIndex2;
187 int nbOfElt=MEDLoaderNS::buildMEDSubConnectivityOfOneType(conn,connIndex,curType,medConn,medConnIndex,medConnIndex2);
188 - if(curMedType!=MED_POLYGONE && curMedType!=MED_POLYEDRE)
189 - MEDconnEcr(fid,maa,mesh->getMeshDimension(),&medConn[0],MED_FULL_INTERLACE,nbOfElt,MED_MAILLE,curMedType,MED_NOD);
190 + for( int i=0; i<medConn.size(); i++ ){
191 + med_int val = medConn[i];
192 + medConnMI.push_back( val );
194 + for( int i=0; i<medConnIndex.size(); i++ ){
195 + med_int val = medConnIndex[i];
196 + medConnIndexMI.push_back( val );
198 + if(curMedType!=MED_POLYGONE && curMedType!=MED_POLYEDRE)
199 + MEDconnEcr(fid,maa,mesh->getMeshDimension(),&medConnMI[0],MED_FULL_INTERLACE,nbOfElt,MED_MAILLE,curMedType,MED_NOD);
200 else
202 if(curMedType==MED_POLYGONE)
203 - MEDpolygoneConnEcr(fid,maa,&medConnIndex[0],medConnIndex.size(),&medConn[0],MED_MAILLE,MED_NOD);
204 + MEDpolygoneConnEcr(fid,maa,&medConnIndexMI[0],medConnIndexMI.size(),&medConnMI[0],MED_MAILLE,MED_NOD);
208 diff -Naur MED_SRC_5.1.4.orig//src/MEDSPLITTER/MEDSPLITTER_MESHCollectionDriver.cxx MED_SRC_5.1.4//src/MEDSPLITTER/MEDSPLITTER_MESHCollectionDriver.cxx
209 --- MED_SRC_5.1.4.orig//src/MEDSPLITTER/MEDSPLITTER_MESHCollectionDriver.cxx 2010-07-07 20:06:41.172646373 +0200
210 +++ MED_SRC_5.1.4//src/MEDSPLITTER/MEDSPLITTER_MESHCollectionDriver.cxx 2010-07-09 17:45:10.497628460 +0200
211 @@ -195,10 +195,14 @@
212 char joint_description[MED_TAILLE_DESC];
213 char name[MED_TAILLE_NOM];
214 char name_distant[MED_TAILLE_NOM];
216 + med_int distantMI;
218 int ncorr = med_2_3::MEDjointInfo(fid,meshname, ijoint+1, name,
219 joint_description,
220 - &distant, name_distant);
221 + &distantMI, name_distant);
223 + distant = distantMI;
225 for (int ic=0; ic<ncorr; ic++)
227 @@ -216,12 +220,16 @@
228 int* node_corresp=new int[ncouples];
229 if (cor_typent_local == med_2_3::MED_NOEUD && cor_typent_dist == med_2_3::MED_NOEUD)
232 + med_int* node_correspMI=new med_int[ncouples];
233 med_2_3::MEDjointLire(fid, meshname, name,
234 - node_corresp,ncouples,
235 + node_correspMI,ncouples,
236 cor_typent_local, cor_typgeo_local,
237 cor_typent_dist, cor_typgeo_dist
239 + for( int i = 0; i < ncouples; i++){
240 + node_corresp[i] = node_correspMI[i];
242 + delete [] node_correspMI;
244 //constructing the connect zone and adding it to the connect zone list
245 MEDMEM::CONNECTZONE* cz = new MEDMEM::CONNECTZONE();
246 @@ -243,7 +251,8 @@
247 if (ncell>0)
249 int * array=new int[ncell];
250 - int offset=0;
251 + med_int * arrayMI = new med_int[ncell];
252 + med_int offset=0;
253 MESSAGE_MED("Reading cell global numbering for mesh "<< idomain);
254 list<MED_EN::medGeometryElement>::const_iterator iter;
255 char meshchar[MED_TAILLE_NOM];
256 @@ -256,10 +265,14 @@
257 if (!m_collection->isDimensionOK(type,m_collection->getMeshDimension())) continue;
258 int ntype = (m_collection->getMesh())[idomain]->getNumberOfElementsWithPoly(MED_EN::MED_CELL,type);
259 if (ntype==0) continue;
260 - med_2_3::MEDglobalNumLire(fid,meshname, array+offset, ntype,
261 + med_2_3::MEDglobalNumLire(fid,meshname, arrayMI+offset, ntype,
262 med_2_3::MED_MAILLE, (med_2_3::med_geometrie_element)type);
263 offset+=ntype;
265 + for( int i = 0; i < ncell; i++) {
266 + array[i] = arrayMI[i];
268 + delete [] arrayMI;
269 cellglobal[idomain]=array;
270 delete[] types;
272 @@ -268,8 +281,13 @@
273 int nnode= (m_collection->getMesh())[idomain]->getNumberOfNodes();
275 int* array=new int[nnode];
276 - med_2_3::MEDglobalNumLire(fid,meshname, array, nnode,
277 + med_int * arrayMI = new med_int[nnode];
278 + med_2_3::MEDglobalNumLire(fid,meshname, arrayMI, nnode,
279 med_2_3::MED_NOEUD, med_2_3::MED_POINT1);
280 + for( int i = 0; i < nnode; i++) {
281 + array[i] = arrayMI[i];
283 + delete [] arrayMI;
284 nodeglobal[idomain]=array;
287 @@ -278,7 +296,8 @@
288 if (nbface!=0)
290 int* array=new int[nbface];
291 - int offset=0;
292 + med_int * arrayMI = new med_int[nbface];
293 + med_int offset=0;
294 int nbtypes = (m_collection->getMesh())[idomain]->getNumberOfTypesWithPoly(MED_EN::MED_FACE);
295 MED_EN::medGeometryElement* types =(m_collection->getMesh())[idomain]->getTypesWithPoly(MED_EN::MED_FACE);
297 @@ -289,10 +308,14 @@
299 int ntype = (m_collection->getMesh())[idomain]->getNumberOfElementsWithPoly(MED_EN::MED_FACE,type);
300 if (ntype==0) continue;
301 - med_2_3::MEDglobalNumLire(fid,meshname, array+offset, ntype,
302 + med_2_3::MEDglobalNumLire(fid,meshname, arrayMI+offset, ntype,
303 med_2_3::MED_MAILLE, (med_2_3::med_geometrie_element)type);
304 offset+=ntype;
306 + for( int i = 0; i < nbface; i++) {
307 + array[i] = arrayMI[i];
309 + delete [] arrayMI;
310 faceglobal[idomain]=array;
311 delete[] types;
313 @@ -356,11 +379,20 @@
314 else
315 jointSort(node_corresp, nbnodes, false);
317 + med_int * node_correspMI = new med_int[nbnodes];
318 + for( int i=0; i < nbnodes; i++){
319 + node_correspMI[i] = node_corresp[i];
321 error=
322 - med_2_3::MEDjointEcr(fid, mesh_name, joint_name, node_corresp, nbnodes,
323 + med_2_3::MEDjointEcr(fid, mesh_name, joint_name, node_correspMI, nbnodes,
324 med_2_3::MED_NOEUD, med_2_3::MED_POINT1,med_2_3::MED_NOEUD, med_2_3::MED_POINT1);
325 if (error==-1) cout << "erreur creation de joint "<<endl;
328 + for( int i=0; i < nbnodes; i++){
329 + node_corresp[i] = node_correspMI[i];
331 + delete [] node_correspMI;
333 //writing cell/cell joint
334 writeElementJoint(MED_EN::MED_CELL, icz, idomain, idistant, mesh_name,joint_name,fid);
335 //writing face/face joint
336 @@ -382,8 +414,9 @@
338 int ncell=m_collection->getTopology()->getCellNumber(idomain);
339 int* array=new int[ncell];
340 + med_int * arrayMI = new med_int[ncell];
341 m_collection->getTopology()->getCellList(idomain,array);
342 - int offset=0;
343 + med_int offset=0;
345 MED_EN::MESH_ENTITIES::const_iterator currentEntity;
346 list<MED_EN::medGeometryElement>::const_iterator iter;
347 @@ -397,13 +430,14 @@
348 if (!m_collection->isDimensionOK(type,m_collection->getMeshDimension())) continue;
349 int ntype = (m_collection->getMesh())[idomain]->getNumberOfElementsWithPoly(MED_EN::MED_CELL,type);
350 if (ntype==0) continue;
351 - med_2_3::MEDglobalNumEcr(fid,meshchar, array+offset, ntype,
352 + med_2_3::MEDglobalNumEcr(fid,meshchar, arrayMI+offset, ntype,
353 med_2_3::MED_MAILLE, (med_2_3::med_geometrie_element)type);
354 offset+=ntype;
357 delete[] types;
358 delete[] array;
359 + delete [] arrayMI;
362 MED_EN::medEntityMesh constituent_entity;
363 @@ -417,11 +451,17 @@
364 //writing face global numbering
366 int * array;
367 - int offset=0;
368 + med_int * arrayMI;
369 + med_int offset=0;
370 int nface= m_collection->getTopology()->getFaceNumber(idomain);
371 - if (nface >0)
372 + if (nface >0){
373 array=new int[nface];
374 + arrayMI = new med_int[nface];
376 m_collection->getTopology()->getFaceList(idomain,array);
377 + for(int i = 0; i < nface; i++){
378 + arrayMI[i] = array[i];
380 strcpy(meshchar,(m_collection->getMesh())[idomain]->getName().c_str());
381 int nbfacetypes = (m_collection->getMesh())[idomain]->getNumberOfTypesWithPoly(constituent_entity);
382 MED_EN::medGeometryElement* facetypes;
383 @@ -435,12 +475,15 @@
385 int ntype = (m_collection->getMesh())[idomain]->getNumberOfElementsWithPoly(constituent_entity,type);
386 if (ntype==0) continue;
387 - med_2_3::MEDglobalNumEcr(fid,meshchar, array+offset, ntype,
388 + med_2_3::MEDglobalNumEcr(fid,meshchar, arrayMI+offset, ntype,
389 med_2_3::MED_MAILLE, (med_2_3::med_geometrie_element)type);
391 offset+=ntype;
393 - if (nface>0) delete[] array;
394 + if (nface>0) {
395 + delete[] array;
396 + delete[] arrayMI;
398 if (nbfacetypes>0) delete[] facetypes;
401 @@ -449,13 +492,18 @@
403 int nnode= m_collection->getTopology()->getNodeNumber(idomain);
404 int* array=new int[nnode];
405 + med_int * arrayMI = new med_int[nnode];
407 m_collection->getTopology()->getNodeList(idomain,array);
408 + for( int i=0; i < nnode; i++){
409 + arrayMI[i] = array[i];
412 - med_2_3::MEDglobalNumEcr(fid,meshchar, array, nnode,
413 + med_2_3::MEDglobalNumEcr(fid,meshchar, arrayMI, nnode,
414 med_2_3::MED_NOEUD, med_2_3::MED_POINT1);
416 delete[] array;
417 + delete [] arrayMI;
420 med_2_3::MEDfermer(fid);
421 @@ -508,12 +556,12 @@
423 MED_EN::medGeometryElement local_type = (m_collection->getMesh())[idomain]->getElementType(entity,1);
424 MED_EN::medGeometryElement distant_type = (m_collection->getMesh())[idistant]->getElementType(entity,1);
425 - vector<int> corresp;
426 + vector<med_int> corresp;
427 for (int i=0; i<nbcells; i++)
428 for (int icol = index[i]-1; icol<index[i+1]-1; icol++)
430 - corresp.push_back(i+1);
431 - corresp.push_back(value[icol]);
432 + corresp.push_back((med_int)(i+1));
433 + corresp.push_back((med_int)(value[icol]));
435 int size_joint = corresp.size()/2;
436 med_2_3::MEDjointEcr(fid, mesh_name, joint_name, &corresp[0],
437 @@ -543,9 +591,9 @@
438 for (iter= cellmap.begin(); iter != cellmap.end(); iter++)
440 int size= iter->second.size();
441 - int *corresp = new int[size];
442 + med_int *corresp = new med_int[size];
443 for (int ind=0; ind < size; ind++)
444 - corresp[ind]=(iter->second)[ind];
445 + corresp[ind]=(med_int) (iter->second)[ind];
446 med_2_3::med_geometrie_element local_geo_elem=(med_2_3::med_geometrie_element)iter->first.first;
447 med_2_3::med_geometrie_element distant_geo_elem=(med_2_3::med_geometrie_element)iter->first.second;
448 int size_joint=size/2;
449 diff -Naur MED_SRC_5.1.4.orig//src/MEDSPLITTER/Test/MEDSPLITTERTest_MESHCollection.cxx MED_SRC_5.1.4//src/MEDSPLITTER/Test/MEDSPLITTERTest_MESHCollection.cxx
450 --- MED_SRC_5.1.4.orig//src/MEDSPLITTER/Test/MEDSPLITTERTest_MESHCollection.cxx 2010-07-07 20:06:41.165948208 +0200
451 +++ MED_SRC_5.1.4//src/MEDSPLITTER/Test/MEDSPLITTERTest_MESHCollection.cxx 2010-07-09 15:23:45.334920907 +0200
452 @@ -300,13 +300,13 @@
453 char desc1[MED_TAILLE_DESC];
454 char maa_dist1[MED_TAILLE_NOM], jn1[MED_TAILLE_NOM];
455 char desc2[MED_TAILLE_DESC], maa_dist2[MED_TAILLE_NOM], jn2[MED_TAILLE_NOM];
456 - int dom1, dom2;
457 + med_2_3::med_int dom1, dom2;
458 med_2_3::MEDjointInfo(fid1, meshname1, 1, jn1, desc1, &dom1, maa_dist1);
459 med_2_3::MEDjointInfo(fid2, meshname2, 1, jn2, desc2, &dom2, maa_dist2);
460 CPPUNIT_ASSERT(strcmp(jn1,"joint_2")==0);
461 CPPUNIT_ASSERT(strcmp(jn2,"joint_1")==0);
462 - CPPUNIT_ASSERT_EQUAL(dom1,1);
463 - CPPUNIT_ASSERT_EQUAL(dom2,0);
464 + CPPUNIT_ASSERT_EQUAL(dom1,(med_2_3::med_int)1);
465 + CPPUNIT_ASSERT_EQUAL(dom2,(med_2_3::med_int)0);
467 // testing node-node correspondency
468 med_2_3::med_entite_maillage typ_ent_loc=med_2_3::MED_NOEUD;
469 @@ -467,11 +467,11 @@
470 char desc1[MED_TAILLE_DESC];
471 char maa_dist1[MED_TAILLE_NOM], jn1[MED_TAILLE_NOM];
472 char desc2[MED_TAILLE_DESC], maa_dist2[MED_TAILLE_NOM], jn2[MED_TAILLE_NOM];
473 - int dom1, dom2;
474 + med_2_3::med_int dom1, dom2;
475 med_2_3::MEDjointInfo(fid1, meshname1, 1, jn1, desc1, &dom1, maa_dist1);
476 med_2_3::MEDjointInfo(fid2, meshname2, 1, jn2, desc2, &dom2, maa_dist2);
477 - CPPUNIT_ASSERT_EQUAL(dom1,1);
478 - CPPUNIT_ASSERT_EQUAL(dom2,0);
479 + CPPUNIT_ASSERT_EQUAL(dom1,(med_2_3::med_int)1);
480 + CPPUNIT_ASSERT_EQUAL(dom2,(med_2_3::med_int)0);
482 // testing node-node correspondency
483 med_2_3::med_entite_maillage typ_ent_loc=med_2_3::MED_NOEUD;
484 @@ -549,7 +549,7 @@
485 //testing cells global numbering
486 num = new med_2_3::med_int[2];
487 MEDglobalNumLire(fid1, meshname1, num, 2, typ_ent_loc, typ_geo_loc);
488 - med_2_3::med_int* globcellref = new int[2];
489 + med_2_3::med_int* globcellref = new med_2_3::med_int[2];
490 globcellref[0]=1;
491 globcellref[1]=3;
493 @@ -778,8 +778,8 @@
494 med_2_3::med_int dom1, dom2;
495 med_2_3::MEDjointInfo(fid1, meshname1, 1, jn1, desc1, &dom1, maa_dist1);
496 med_2_3::MEDjointInfo(fid2, meshname2, 1, jn2, desc2, &dom2, maa_dist2);
497 - CPPUNIT_ASSERT_EQUAL(dom1,1);
498 - CPPUNIT_ASSERT_EQUAL(dom2,0);
499 + CPPUNIT_ASSERT_EQUAL(dom1,(med_2_3::med_int)1);
500 + CPPUNIT_ASSERT_EQUAL(dom2,(med_2_3::med_int)0);
502 // testing node-node correspondency
503 med_2_3::med_entite_maillage typ_ent_loc=med_2_3::MED_NOEUD;
504 @@ -1143,11 +1143,11 @@
505 char desc1[MED_TAILLE_DESC+1];
506 char maa_dist1[MED_TAILLE_NOM+1], jn1[MED_TAILLE_NOM+1];
507 char desc2[MED_TAILLE_DESC+1], maa_dist2[MED_TAILLE_NOM+1], jn2[MED_TAILLE_NOM+1];
508 - int dom1, dom2;
509 + med_2_3::med_int dom1, dom2;
510 med_2_3::MEDjointInfo(fid1, meshname1, 1, jn1, desc1, &dom1, maa_dist1);
511 med_2_3::MEDjointInfo(fid2, meshname2, 1, jn2, desc2, &dom2, maa_dist2);
512 - CPPUNIT_ASSERT_EQUAL(dom1,1);
513 - CPPUNIT_ASSERT_EQUAL(dom2,0);
514 + CPPUNIT_ASSERT_EQUAL(dom1,(med_2_3::med_int)1);
515 + CPPUNIT_ASSERT_EQUAL(dom2,(med_2_3::med_int)0);
518 int nbEdgesFamilies1= med_2_3::MEDnFam(fid1, meshname1);
519 diff -Naur MED_SRC_5.1.4.orig//src/MULTIPR/MULTIPR_Globals.hxx MED_SRC_5.1.4//src/MULTIPR/MULTIPR_Globals.hxx
520 --- MED_SRC_5.1.4.orig//src/MULTIPR/MULTIPR_Globals.hxx 2010-07-07 20:06:41.002664464 +0200
521 +++ MED_SRC_5.1.4//src/MULTIPR/MULTIPR_Globals.hxx 2010-07-09 15:24:26.441001881 +0200
522 @@ -35,6 +35,7 @@
524 #include <vector>
525 #include <set>
526 +#include <med.h>
528 //*****************************************************************************
529 // Some useful macros
530 @@ -47,7 +48,7 @@
531 * Pair of index.
532 * See definition of GaussIndexList.
534 -typedef std::pair < std::set<int>*, std::set<int> > IndexPair;
535 +typedef std::pair < std::set<med_int>*, std::set<med_int> > IndexPair;
538 * List of gauss index for optimized domain split.