Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 155974 | Differences between
and this patch

Collapse All | Expand All

(-)src5.1.3.orig/MED_SRC_5.1.3/src/MEDSPLITTER/MEDSPLITTER_MESHCollectionDriver.cxx (-11 / +11 lines)
Lines 189-195 Link Here
189
        
189
        
190
      int ncorr = med_2_3::MEDjointInfo(fid,meshname, ijoint+1, name, 
190
      int ncorr = med_2_3::MEDjointInfo(fid,meshname, ijoint+1, name, 
191
                joint_description,
191
                joint_description,
192
                &distant, name_distant);
192
                (med_int*)&distant, name_distant);
193
  
193
  
194
      for (int ic=0; ic<ncorr; ic++)
194
      for (int ic=0; ic<ncorr; ic++)
195
        {
195
        {
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_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_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_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_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_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_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_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_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 507-513 Link Here
507
							corresp.push_back(value[icol]);
507
							corresp.push_back(value[icol]);
508
						}
508
						}
509
				int size_joint = corresp.size()/2;
509
				int size_joint = corresp.size()/2;
510
				med_2_3::MEDjointEcr(fid, mesh_name, joint_name, &corresp[0], 
510
				med_2_3::MEDjointEcr(fid, mesh_name, joint_name, (med_int*)&corresp[0], 
511
														 size_joint, med_2_3::MED_MAILLE,
511
														 size_joint, med_2_3::MED_MAILLE,
512
														 (med_2_3::med_geometrie_element)local_type    ,med_2_3::MED_MAILLE, 
512
														 (med_2_3::med_geometrie_element)local_type    ,med_2_3::MED_MAILLE, 
513
														 (med_2_3::med_geometrie_element)distant_type    );
513
														 (med_2_3::med_geometrie_element)distant_type    );
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_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
				}
(-)src5.1.3.orig/MED_SRC_5.1.3/src/MULTIPR/MULTIPR_Globals.hxx (-1 / +2 lines)
Lines 34-39 Link Here
34
34
35
#include <vector>
35
#include <vector>
36
#include <set>
36
#include <set>
37
#include <med.h>
37
38
38
//*****************************************************************************
39
//*****************************************************************************
39
// Some useful macros
40
// Some useful macros
Lines 46-52 Link Here
46
 * Pair of index.
47
 * Pair of index.
47
 * See definition of GaussIndexList.
48
 * See definition of GaussIndexList.
48
 */
49
 */
49
typedef std::pair < std::set<int>*, std::set<int> > IndexPair;
50
typedef std::pair < std::set<med_int>*, std::set<med_int> > IndexPair;
50
51
51
/**
52
/**
52
 * List of gauss index for optimized domain split.
53
 * List of gauss index for optimized domain split.
(-)src5.1.3.orig/MED_SRC_5.1.3/src/ParaMEDMEM/MEDLoader/MEDLoader.cxx (-21 / +21 lines)
Lines 169-179 Link Here
169
      {
169
      {
170
        int ngro=MEDnGroupe(fid,(char *)meshName,i+1);
170
        int ngro=MEDnGroupe(fid,(char *)meshName,i+1);
171
        med_int natt=MEDnAttribut(fid,(char *)meshName,i+1);
171
        med_int natt=MEDnAttribut(fid,(char *)meshName,i+1);
172
        med_int *attide=new int[natt];
172
        med_int *attide=new med_int[natt];
173
        med_int *attval=new int[natt];
173
        med_int *attval=new med_int[natt];
174
        char *attdes=new char[MED_TAILLE_DESC*natt+1];
174
        char *attdes=new char[MED_TAILLE_DESC*natt+1];
175
        char *gro=new char[MED_TAILLE_LNOM*ngro+1];
175
        char *gro=new char[MED_TAILLE_LNOM*ngro+1];
176
        MEDfamInfo(fid,(char *)meshName,i+1,nomfam,&numfam,attide,attval,attdes,&natt,gro,&ngro);
176
        MEDfamInfo(fid,(char *)meshName,i+1,nomfam,&numfam,attide,attval,attdes,&natt,gro,(med_int*)&ngro);
177
        std::string cur=buildStringFromFortran(nomfam,sizeof(nomfam));
177
        std::string cur=buildStringFromFortran(nomfam,sizeof(nomfam));
178
        ret[i]=cur;
178
        ret[i]=cur;
179
        delete [] attdes;
179
        delete [] attdes;
Lines 196-206 Link Here
196
      {
196
      {
197
        int ngro=MEDnGroupe(fid,(char *)meshName,i+1);
197
        int ngro=MEDnGroupe(fid,(char *)meshName,i+1);
198
        med_int natt=MEDnAttribut(fid,(char *)meshName,i+1);
198
        med_int natt=MEDnAttribut(fid,(char *)meshName,i+1);
199
        med_int *attide=new int[natt];
199
        med_int *attide=new med_int[natt];
200
        med_int *attval=new int[natt];
200
        med_int *attval=new med_int[natt];
201
        char *attdes=new char[MED_TAILLE_DESC*natt+1];
201
        char *attdes=new char[MED_TAILLE_DESC*natt+1];
202
        char *gro=new char[MED_TAILLE_LNOM*ngro+1];
202
        char *gro=new char[MED_TAILLE_LNOM*ngro+1];
203
        MEDfamInfo(fid,(char *)meshName,i+1,nomfam,&numfam,attide,attval,attdes,&natt,gro,&ngro);
203
        MEDfamInfo(fid,(char *)meshName,i+1,nomfam,&numfam,attide,attval,attdes,&natt,gro,(med_int*)&ngro);
204
	for(int j=0;j<ngro;j++)
204
	for(int j=0;j<ngro;j++)
205
	  {
205
	  {
206
	    std::string cur=buildStringFromFortran(gro+j*MED_TAILLE_LNOM,MED_TAILLE_LNOM);
206
	    std::string cur=buildStringFromFortran(gro+j*MED_TAILLE_LNOM,MED_TAILLE_LNOM);
Lines 446-456 Link Here
446
      {
446
      {
447
        int ngro=MEDnGroupe(fid,(char *)meshName,i+1);
447
        int ngro=MEDnGroupe(fid,(char *)meshName,i+1);
448
        med_int natt=MEDnAttribut(fid,(char *)meshName,i+1);
448
        med_int natt=MEDnAttribut(fid,(char *)meshName,i+1);
449
        med_int *attide=new int[natt];
449
        med_int *attide=new med_int[natt];
450
        med_int *attval=new int[natt];
450
        med_int *attval=new med_int[natt];
451
        char *attdes=new char[MED_TAILLE_DESC*natt+1];
451
        char *attdes=new char[MED_TAILLE_DESC*natt+1];
452
        char *gro=new char[MED_TAILLE_LNOM*ngro+1];
452
        char *gro=new char[MED_TAILLE_LNOM*ngro+1];
453
        MEDfamInfo(fid,(char *)meshName,i+1,nomfam,&numfam,attide,attval,attdes,&natt,gro,&ngro);
453
        MEDfamInfo(fid,(char *)meshName,i+1,nomfam,&numfam,attide,attval,attdes,&natt,gro,(med_int*)&ngro);
454
        std::string cur=buildStringFromFortran(nomfam,sizeof(nomfam));
454
        std::string cur=buildStringFromFortran(nomfam,sizeof(nomfam));
455
	if(std::find(fams.begin(),fams.end(),cur)!=fams.end())
455
	if(std::find(fams.begin(),fams.end(),cur)!=fams.end())
456
	  ret.push_back(numfam);
456
	  ret.push_back(numfam);
Lines 474-484 Link Here
474
      {
474
      {
475
        int ngro=MEDnGroupe(fid,(char *)meshName,i+1);
475
        int ngro=MEDnGroupe(fid,(char *)meshName,i+1);
476
        med_int natt=MEDnAttribut(fid,(char *)meshName,i+1);
476
        med_int natt=MEDnAttribut(fid,(char *)meshName,i+1);
477
        med_int *attide=new int[natt];
477
        med_int *attide=new med_int[natt];
478
        med_int *attval=new int[natt];
478
        med_int *attval=new med_int[natt];
479
        char *attdes=new char[MED_TAILLE_DESC*natt+1];
479
        char *attdes=new char[MED_TAILLE_DESC*natt+1];
480
        char *gro=new char[MED_TAILLE_LNOM*ngro+1];
480
        char *gro=new char[MED_TAILLE_LNOM*ngro+1];
481
        MEDfamInfo(fid,(char *)meshName,i+1,nomfam,&numfam,attide,attval,attdes,&natt,gro,&ngro);
481
        MEDfamInfo(fid,(char *)meshName,i+1,nomfam,&numfam,attide,attval,attdes,&natt,gro,(med_int*)&ngro);
482
        std::string cur=buildStringFromFortran(nomfam,sizeof(nomfam));
482
        std::string cur=buildStringFromFortran(nomfam,sizeof(nomfam));
483
	for(int j=0;j<ngro;j++)
483
	for(int j=0;j<ngro;j++)
484
	  {
484
	  {
Lines 566-577 Link Here
566
            MEDLoader::MEDConnOfOneElemType elem(typmai2[i],connTab,0,fam,curNbOfElem,-1);
566
            MEDLoader::MEDConnOfOneElemType elem(typmai2[i],connTab,0,fam,curNbOfElem,-1);
567
            int *tmp=new int[curNbOfElem];
567
            int *tmp=new int[curNbOfElem];
568
            char *noms=new char[MED_TAILLE_PNOM*curNbOfElem+1];
568
            char *noms=new char[MED_TAILLE_PNOM*curNbOfElem+1];
569
            MEDelementsLire(fid,nommaa,Mdim,connTab,MED_FULL_INTERLACE,noms,&inoele,tmp,&inuele,fam,curNbOfElem,whichEntity,curMedType,MED_NOD);
569
            MEDelementsLire(fid,nommaa,Mdim,(med_int*)connTab,MED_FULL_INTERLACE,noms,&inoele,(med_int*)tmp,&inuele,(med_int*)fam,curNbOfElem,whichEntity,curMedType,MED_NOD);
570
            delete [] tmp;
570
            delete [] tmp;
571
            delete [] noms;
571
            delete [] noms;
572
            //trying to read global numbering
572
            //trying to read global numbering
573
            int *globArr=new int[curNbOfElem];
573
            int *globArr=new int[curNbOfElem];
574
            if(MEDglobalNumLire(fid,nommaa,globArr,curNbOfElem,whichEntity,curMedType)==0)
574
            if(MEDglobalNumLire(fid,nommaa,(med_int*)globArr,curNbOfElem,whichEntity,curMedType)==0)
575
              elem.setGlobal(globArr);
575
              elem.setGlobal(globArr);
576
            else
576
            else
577
              delete [] globArr;
577
              delete [] globArr;
Lines 590-598 Link Here
590
        int *index=new int[curNbOfPolyElem+1];
590
        int *index=new int[curNbOfPolyElem+1];
591
        int *locConn=new int[arraySize];
591
        int *locConn=new int[arraySize];
592
        int *fam=new int[curNbOfPolyElem];
592
        int *fam=new int[curNbOfPolyElem];
593
        MEDLoader::MEDConnOfOneElemType elem(INTERP_KERNEL::NORM_POLYGON,locConn,index,fam,curNbOfPolyElem,arraySize);
593
        MEDLoader::MEDConnOfOneElemType elem(INTERP_KERNEL::NORM_POLYGON,locConn,index,fam,curNbOfPolyElem,(int)arraySize);
594
        MEDpolygoneConnLire(fid,nommaa,index,curNbOfPolyElem+1,locConn,whichPolyEntity,MED_NOD);
594
        MEDpolygoneConnLire(fid,nommaa,(med_int*)index,curNbOfPolyElem+1,(med_int*)locConn,whichPolyEntity,MED_NOD);
595
        MEDfamLire(fid,nommaa,fam,curNbOfPolyElem,MED_MAILLE,MED_POLYGONE);
595
        MEDfamLire(fid,nommaa,(med_int*)fam,curNbOfPolyElem,MED_MAILLE,MED_POLYGONE);
596
        conn.push_back(elem);
596
        conn.push_back(elem);
597
      }
597
      }
598
    curNbOfPolyElem=MEDnEntMaa(fid,nommaa,MED_CONN,MED_MAILLE,MED_POLYEDRE,MED_NOD);
598
    curNbOfPolyElem=MEDnEntMaa(fid,nommaa,MED_CONN,MED_MAILLE,MED_POLYEDRE,MED_NOD);
Lines 604-611 Link Here
604
        int *indexFace=new int[indexFaceLgth];
604
        int *indexFace=new int[indexFaceLgth];
605
        int *locConn=new int[connFaceLgth];
605
        int *locConn=new int[connFaceLgth];
606
        int *fam=new int[curNbOfPolyElem];
606
        int *fam=new int[curNbOfPolyElem];
607
        MEDpolyedreConnLire(fid,nommaa,index,curNbOfPolyElem+1,indexFace,indexFaceLgth,locConn,MED_NOD);
607
        MEDpolyedreConnLire(fid,nommaa,(med_int*)index,curNbOfPolyElem+1,(med_int*)indexFace,indexFaceLgth,(med_int*)locConn,MED_NOD);
608
        MEDfamLire(fid,nommaa,fam,curNbOfPolyElem,MED_MAILLE,MED_POLYEDRE);
608
        MEDfamLire(fid,nommaa,(med_int*)fam,curNbOfPolyElem,MED_MAILLE,MED_POLYEDRE);
609
        int arraySize=connFaceLgth;
609
        int arraySize=connFaceLgth;
610
        for(int i=0;i<curNbOfPolyElem;i++)
610
        for(int i=0;i<curNbOfPolyElem;i++)
611
          arraySize+=index[i+1]-index[i]-1;
611
          arraySize+=index[i+1]-index[i]-1;
Lines 1051-1061 Link Here
1051
          std::vector<int> medConnIndex2;
1051
          std::vector<int> medConnIndex2;
1052
          int nbOfElt=buildMEDSubConnectivityOfOneType(conn,connIndex,curType,medConn,medConnIndex,medConnIndex2);
1052
          int nbOfElt=buildMEDSubConnectivityOfOneType(conn,connIndex,curType,medConn,medConnIndex,medConnIndex2);
1053
          if(curMedType!=MED_POLYGONE && curMedType!=MED_POLYEDRE)
1053
          if(curMedType!=MED_POLYGONE && curMedType!=MED_POLYEDRE)
1054
            MEDconnEcr(fid,maa,mesh->getMeshDimension(),&medConn[0],MED_FULL_INTERLACE,nbOfElt,MED_MAILLE,curMedType,MED_NOD);
1054
            MEDconnEcr(fid,maa,mesh->getMeshDimension(),(med_int*)&medConn[0],MED_FULL_INTERLACE,nbOfElt,MED_MAILLE,curMedType,MED_NOD);
1055
          else
1055
          else
1056
            {
1056
            {
1057
              if(curMedType==MED_POLYGONE)
1057
              if(curMedType==MED_POLYGONE)
1058
                MEDpolygoneConnEcr(fid,maa,&medConnIndex[0],medConnIndex.size(),&medConn[0],MED_MAILLE,MED_NOD);
1058
                MEDpolygoneConnEcr(fid,maa,(med_int*)&medConnIndex[0],medConnIndex.size(),(med_int*)&medConn[0],MED_MAILLE,MED_NOD);
1059
            }
1059
            }
1060
        }
1060
        }
1061
    }
1061
    }

Return to bug 155974