aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEtienne Lorriaux <etienne.lorriaux@gmail.com>2010-04-05 01:03:18 +0200
committerEtienne Lorriaux <etienne.lorriaux@gmail.com>2010-04-05 01:03:18 +0200
commit4423c859702d6ae0ccb3140e3027979ba0430829 (patch)
treec23d071e80d3f0bf3c59ae217230d7c3b4ccb30e /sci-misc/salome-med/files
parentChanged DEPEND of media-libs/SoQt from 1.4.2_alpha4181 to 1.4.2_alpha1841 (diff)
downloadsci-4423c859702d6ae0ccb3140e3027979ba0430829.tar.gz
sci-4423c859702d6ae0ccb3140e3027979ba0430829.tar.bz2
sci-4423c859702d6ae0ccb3140e3027979ba0430829.zip
sci-misc/salome-*: changed fetch URL + cleaning (thanks Oliver), new
patch + modifs to (partially) solve med_int issues on amd64
Diffstat (limited to 'sci-misc/salome-med/files')
-rw-r--r--sci-misc/salome-med/files/salome-med-5.1.3-med_int.patch297
1 files changed, 297 insertions, 0 deletions
diff --git a/sci-misc/salome-med/files/salome-med-5.1.3-med_int.patch b/sci-misc/salome-med/files/salome-med-5.1.3-med_int.patch
new file mode 100644
index 000000000..6db1510a4
--- /dev/null
+++ b/sci-misc/salome-med/files/salome-med-5.1.3-med_int.patch
@@ -0,0 +1,297 @@
+diff -ur src5.1.3.orig/MED_SRC_5.1.3/src/MEDSPLITTER/MEDSPLITTER_MESHCollectionDriver.cxx src5.1.3/MED_SRC_5.1.3/src/MEDSPLITTER/MEDSPLITTER_MESHCollectionDriver.cxx
+--- src5.1.3.orig/MED_SRC_5.1.3/src/MEDSPLITTER/MEDSPLITTER_MESHCollectionDriver.cxx 2010-03-15 17:07:56.860301255 +0100
++++ src5.1.3/MED_SRC_5.1.3/src/MEDSPLITTER/MEDSPLITTER_MESHCollectionDriver.cxx 2010-03-15 17:33:59.740251721 +0100
+@@ -189,7 +189,7 @@
+
+ int ncorr = med_2_3::MEDjointInfo(fid,meshname, ijoint+1, name,
+ joint_description,
+- &distant, name_distant);
++ (med_int*)&distant, name_distant);
+
+ for (int ic=0; ic<ncorr; ic++)
+ {
+@@ -209,7 +209,7 @@
+ {
+
+ med_2_3::MEDjointLire(fid, meshname, name,
+- node_corresp,ncouples,
++ (med_int*)node_corresp,ncouples,
+ cor_typent_local, cor_typgeo_local,
+ cor_typent_dist, cor_typgeo_dist
+ );
+@@ -247,7 +247,7 @@
+ if (!m_collection->isDimensionOK(type,m_collection->getMeshDimension())) continue;
+ int ntype = (m_collection->getMesh())[idomain]->getNumberOfElementsWithPoly(MED_EN::MED_CELL,type);
+ if (ntype==0) continue;
+- med_2_3::MEDglobalNumLire(fid,meshname, array+offset, ntype,
++ med_2_3::MEDglobalNumLire(fid,meshname, (med_int*)array+offset, ntype,
+ med_2_3::MED_MAILLE, (med_2_3::med_geometrie_element)type);
+ offset+=ntype;
+ }
+@@ -259,7 +259,7 @@
+ int nnode= (m_collection->getMesh())[idomain]->getNumberOfNodes();
+ {
+ int* array=new int[nnode];
+- med_2_3::MEDglobalNumLire(fid,meshname, array, nnode,
++ med_2_3::MEDglobalNumLire(fid,meshname, (med_int*)array, nnode,
+ med_2_3::MED_NOEUD, med_2_3::MED_POINT1);
+ nodeglobal[idomain]=array;
+ }
+@@ -280,7 +280,7 @@
+
+ int ntype = (m_collection->getMesh())[idomain]->getNumberOfElementsWithPoly(MED_EN::MED_FACE,type);
+ if (ntype==0) continue;
+- med_2_3::MEDglobalNumLire(fid,meshname, array+offset, ntype,
++ med_2_3::MEDglobalNumLire(fid,meshname, (med_int*)array+offset, ntype,
+ med_2_3::MED_MAILLE, (med_2_3::med_geometrie_element)type);
+ offset+=ntype;
+ }
+@@ -348,7 +348,7 @@
+ jointSort(node_corresp, nbnodes, false);
+
+ error=
+- med_2_3::MEDjointEcr(fid, mesh_name, joint_name, node_corresp, nbnodes,
++ med_2_3::MEDjointEcr(fid, mesh_name, joint_name, (med_int*)node_corresp, nbnodes,
+ med_2_3::MED_NOEUD, med_2_3::MED_POINT1,med_2_3::MED_NOEUD, med_2_3::MED_POINT1);
+ if (error==-1) cout << "erreur creation de joint "<<endl;
+
+@@ -388,7 +388,7 @@
+ if (!m_collection->isDimensionOK(type,m_collection->getMeshDimension())) continue;
+ int ntype = (m_collection->getMesh())[idomain]->getNumberOfElementsWithPoly(MED_EN::MED_CELL,type);
+ if (ntype==0) continue;
+- med_2_3::MEDglobalNumEcr(fid,meshchar, array+offset, ntype,
++ med_2_3::MEDglobalNumEcr(fid,meshchar, (med_int*)array+offset, ntype,
+ med_2_3::MED_MAILLE, (med_2_3::med_geometrie_element)type);
+ offset+=ntype;
+
+@@ -426,7 +426,7 @@
+
+ int ntype = (m_collection->getMesh())[idomain]->getNumberOfElementsWithPoly(constituent_entity,type);
+ if (ntype==0) continue;
+- med_2_3::MEDglobalNumEcr(fid,meshchar, array+offset, ntype,
++ med_2_3::MEDglobalNumEcr(fid,meshchar, (med_int*)array+offset, ntype,
+ med_2_3::MED_MAILLE, (med_2_3::med_geometrie_element)type);
+
+ offset+=ntype;
+@@ -443,7 +443,7 @@
+
+ m_collection->getTopology()->getNodeList(idomain,array);
+
+- med_2_3::MEDglobalNumEcr(fid,meshchar, array, nnode,
++ med_2_3::MEDglobalNumEcr(fid,meshchar, (med_int*)array, nnode,
+ med_2_3::MED_NOEUD, med_2_3::MED_POINT1);
+
+ delete[] array;
+@@ -507,7 +507,7 @@
+ corresp.push_back(value[icol]);
+ }
+ int size_joint = corresp.size()/2;
+- med_2_3::MEDjointEcr(fid, mesh_name, joint_name, &corresp[0],
++ med_2_3::MEDjointEcr(fid, mesh_name, joint_name, (med_int*)&corresp[0],
+ size_joint, med_2_3::MED_MAILLE,
+ (med_2_3::med_geometrie_element)local_type ,med_2_3::MED_MAILLE,
+ (med_2_3::med_geometrie_element)distant_type );
+@@ -541,7 +541,7 @@
+ med_2_3::med_geometrie_element distant_geo_elem=(med_2_3::med_geometrie_element)iter->first.second;
+ int size_joint=size/2;
+ //med_2_3::med_err error =
+- med_2_3::MEDjointEcr(fid, mesh_name, joint_name, corresp, size_joint, med_2_3::MED_MAILLE,
++ med_2_3::MEDjointEcr(fid, mesh_name, joint_name, (med_int*)corresp, size_joint, med_2_3::MED_MAILLE,
+ local_geo_elem,med_2_3::MED_MAILLE, distant_geo_elem);
+ delete[] corresp;
+ }
+diff -ur src5.1.3.orig/MED_SRC_5.1.3/src/MULTIPR/MULTIPR_Globals.hxx src5.1.3/MED_SRC_5.1.3/src/MULTIPR/MULTIPR_Globals.hxx
+--- src5.1.3.orig/MED_SRC_5.1.3/src/MULTIPR/MULTIPR_Globals.hxx 2010-03-15 17:07:56.624073897 +0100
++++ src5.1.3/MED_SRC_5.1.3/src/MULTIPR/MULTIPR_Globals.hxx 2010-03-15 17:42:31.140322486 +0100
+@@ -34,6 +34,7 @@
+
+ #include <vector>
+ #include <set>
++#include <med.h>
+
+ //*****************************************************************************
+ // Some useful macros
+@@ -46,7 +47,7 @@
+ * Pair of index.
+ * See definition of GaussIndexList.
+ */
+-typedef std::pair < std::set<int>*, std::set<int> > IndexPair;
++typedef std::pair < std::set<med_int>*, std::set<med_int> > IndexPair;
+
+ /**
+ * List of gauss index for optimized domain split.
+diff -ur src5.1.3.orig/MED_SRC_5.1.3/src/ParaMEDMEM/MEDLoader/MEDLoader.cxx src5.1.3/MED_SRC_5.1.3/src/ParaMEDMEM/MEDLoader/MEDLoader.cxx
+--- src5.1.3.orig/MED_SRC_5.1.3/src/ParaMEDMEM/MEDLoader/MEDLoader.cxx 2010-03-15 17:07:55.512824126 +0100
++++ src5.1.3/MED_SRC_5.1.3/src/ParaMEDMEM/MEDLoader/MEDLoader.cxx 2010-03-15 17:23:57.950316309 +0100
+@@ -169,11 +169,11 @@
+ {
+ int ngro=MEDnGroupe(fid,(char *)meshName,i+1);
+ med_int natt=MEDnAttribut(fid,(char *)meshName,i+1);
+- med_int *attide=new int[natt];
+- med_int *attval=new int[natt];
++ med_int *attide=new med_int[natt];
++ med_int *attval=new med_int[natt];
+ char *attdes=new char[MED_TAILLE_DESC*natt+1];
+ char *gro=new char[MED_TAILLE_LNOM*ngro+1];
+- MEDfamInfo(fid,(char *)meshName,i+1,nomfam,&numfam,attide,attval,attdes,&natt,gro,&ngro);
++ MEDfamInfo(fid,(char *)meshName,i+1,nomfam,&numfam,attide,attval,attdes,&natt,gro,(med_int*)&ngro);
+ std::string cur=buildStringFromFortran(nomfam,sizeof(nomfam));
+ ret[i]=cur;
+ delete [] attdes;
+@@ -196,11 +196,11 @@
+ {
+ int ngro=MEDnGroupe(fid,(char *)meshName,i+1);
+ med_int natt=MEDnAttribut(fid,(char *)meshName,i+1);
+- med_int *attide=new int[natt];
+- med_int *attval=new int[natt];
++ med_int *attide=new med_int[natt];
++ med_int *attval=new med_int[natt];
+ char *attdes=new char[MED_TAILLE_DESC*natt+1];
+ char *gro=new char[MED_TAILLE_LNOM*ngro+1];
+- MEDfamInfo(fid,(char *)meshName,i+1,nomfam,&numfam,attide,attval,attdes,&natt,gro,&ngro);
++ MEDfamInfo(fid,(char *)meshName,i+1,nomfam,&numfam,attide,attval,attdes,&natt,gro,(med_int*)&ngro);
+ for(int j=0;j<ngro;j++)
+ {
+ std::string cur=buildStringFromFortran(gro+j*MED_TAILLE_LNOM,MED_TAILLE_LNOM);
+@@ -446,11 +446,11 @@
+ {
+ int ngro=MEDnGroupe(fid,(char *)meshName,i+1);
+ med_int natt=MEDnAttribut(fid,(char *)meshName,i+1);
+- med_int *attide=new int[natt];
+- med_int *attval=new int[natt];
++ med_int *attide=new med_int[natt];
++ med_int *attval=new med_int[natt];
+ char *attdes=new char[MED_TAILLE_DESC*natt+1];
+ char *gro=new char[MED_TAILLE_LNOM*ngro+1];
+- MEDfamInfo(fid,(char *)meshName,i+1,nomfam,&numfam,attide,attval,attdes,&natt,gro,&ngro);
++ MEDfamInfo(fid,(char *)meshName,i+1,nomfam,&numfam,attide,attval,attdes,&natt,gro,(med_int*)&ngro);
+ std::string cur=buildStringFromFortran(nomfam,sizeof(nomfam));
+ if(std::find(fams.begin(),fams.end(),cur)!=fams.end())
+ ret.push_back(numfam);
+@@ -474,11 +474,11 @@
+ {
+ int ngro=MEDnGroupe(fid,(char *)meshName,i+1);
+ med_int natt=MEDnAttribut(fid,(char *)meshName,i+1);
+- med_int *attide=new int[natt];
+- med_int *attval=new int[natt];
++ med_int *attide=new med_int[natt];
++ med_int *attval=new med_int[natt];
+ char *attdes=new char[MED_TAILLE_DESC*natt+1];
+ char *gro=new char[MED_TAILLE_LNOM*ngro+1];
+- MEDfamInfo(fid,(char *)meshName,i+1,nomfam,&numfam,attide,attval,attdes,&natt,gro,&ngro);
++ MEDfamInfo(fid,(char *)meshName,i+1,nomfam,&numfam,attide,attval,attdes,&natt,gro,(med_int*)&ngro);
+ std::string cur=buildStringFromFortran(nomfam,sizeof(nomfam));
+ for(int j=0;j<ngro;j++)
+ {
+@@ -566,12 +566,12 @@
+ MEDLoader::MEDConnOfOneElemType elem(typmai2[i],connTab,0,fam,curNbOfElem,-1);
+ int *tmp=new int[curNbOfElem];
+ char *noms=new char[MED_TAILLE_PNOM*curNbOfElem+1];
+- MEDelementsLire(fid,nommaa,Mdim,connTab,MED_FULL_INTERLACE,noms,&inoele,tmp,&inuele,fam,curNbOfElem,whichEntity,curMedType,MED_NOD);
++ MEDelementsLire(fid,nommaa,Mdim,(med_int*)connTab,MED_FULL_INTERLACE,noms,&inoele,(med_int*)tmp,&inuele,(med_int*)fam,curNbOfElem,whichEntity,curMedType,MED_NOD);
+ delete [] tmp;
+ delete [] noms;
+ //trying to read global numbering
+ int *globArr=new int[curNbOfElem];
+- if(MEDglobalNumLire(fid,nommaa,globArr,curNbOfElem,whichEntity,curMedType)==0)
++ if(MEDglobalNumLire(fid,nommaa,(med_int*)globArr,curNbOfElem,whichEntity,curMedType)==0)
+ elem.setGlobal(globArr);
+ else
+ delete [] globArr;
+@@ -590,9 +590,9 @@
+ int *index=new int[curNbOfPolyElem+1];
+ int *locConn=new int[arraySize];
+ int *fam=new int[curNbOfPolyElem];
+- MEDLoader::MEDConnOfOneElemType elem(INTERP_KERNEL::NORM_POLYGON,locConn,index,fam,curNbOfPolyElem,arraySize);
+- MEDpolygoneConnLire(fid,nommaa,index,curNbOfPolyElem+1,locConn,whichPolyEntity,MED_NOD);
+- MEDfamLire(fid,nommaa,fam,curNbOfPolyElem,MED_MAILLE,MED_POLYGONE);
++ MEDLoader::MEDConnOfOneElemType elem(INTERP_KERNEL::NORM_POLYGON,locConn,index,fam,curNbOfPolyElem,(int)arraySize);
++ MEDpolygoneConnLire(fid,nommaa,(med_int*)index,curNbOfPolyElem+1,(med_int*)locConn,whichPolyEntity,MED_NOD);
++ MEDfamLire(fid,nommaa,(med_int*)fam,curNbOfPolyElem,MED_MAILLE,MED_POLYGONE);
+ conn.push_back(elem);
+ }
+ curNbOfPolyElem=MEDnEntMaa(fid,nommaa,MED_CONN,MED_MAILLE,MED_POLYEDRE,MED_NOD);
+@@ -604,8 +604,8 @@
+ int *indexFace=new int[indexFaceLgth];
+ int *locConn=new int[connFaceLgth];
+ int *fam=new int[curNbOfPolyElem];
+- MEDpolyedreConnLire(fid,nommaa,index,curNbOfPolyElem+1,indexFace,indexFaceLgth,locConn,MED_NOD);
+- MEDfamLire(fid,nommaa,fam,curNbOfPolyElem,MED_MAILLE,MED_POLYEDRE);
++ MEDpolyedreConnLire(fid,nommaa,(med_int*)index,curNbOfPolyElem+1,(med_int*)indexFace,indexFaceLgth,(med_int*)locConn,MED_NOD);
++ MEDfamLire(fid,nommaa,(med_int*)fam,curNbOfPolyElem,MED_MAILLE,MED_POLYEDRE);
+ int arraySize=connFaceLgth;
+ for(int i=0;i<curNbOfPolyElem;i++)
+ arraySize+=index[i+1]-index[i]-1;
+@@ -1051,11 +1051,11 @@
+ std::vector<int> medConnIndex2;
+ int nbOfElt=buildMEDSubConnectivityOfOneType(conn,connIndex,curType,medConn,medConnIndex,medConnIndex2);
+ if(curMedType!=MED_POLYGONE && curMedType!=MED_POLYEDRE)
+- MEDconnEcr(fid,maa,mesh->getMeshDimension(),&medConn[0],MED_FULL_INTERLACE,nbOfElt,MED_MAILLE,curMedType,MED_NOD);
++ MEDconnEcr(fid,maa,mesh->getMeshDimension(),(med_int*)&medConn[0],MED_FULL_INTERLACE,nbOfElt,MED_MAILLE,curMedType,MED_NOD);
+ else
+ {
+ if(curMedType==MED_POLYGONE)
+- MEDpolygoneConnEcr(fid,maa,&medConnIndex[0],medConnIndex.size(),&medConn[0],MED_MAILLE,MED_NOD);
++ MEDpolygoneConnEcr(fid,maa,(med_int*)&medConnIndex[0],medConnIndex.size(),(med_int*)&medConn[0],MED_MAILLE,MED_NOD);
+ }
+ }
+ }
+--- src5.1.3.orig/MED_SRC_5.1.3/src/MEDSPLITTER/Test/MEDSPLITTERTest_MESHCollection.cxx 2010-03-21 20:24:36.370545867 +0100
++++ src5.1.3/MED_SRC_5.1.3/src/MEDSPLITTER/Test/MEDSPLITTERTest_MESHCollection.cxx 2010-03-21 20:30:11.329293723 +0100
+@@ -300,8 +300,8 @@
+ char maa_dist1[MED_TAILLE_NOM], jn1[MED_TAILLE_NOM];
+ char desc2[MED_TAILLE_DESC], maa_dist2[MED_TAILLE_NOM], jn2[MED_TAILLE_NOM];
+ int dom1, dom2;
+- med_2_3::MEDjointInfo(fid1, meshname1, 1, jn1, desc1, &dom1, maa_dist1);
+- med_2_3::MEDjointInfo(fid2, meshname2, 1, jn2, desc2, &dom2, maa_dist2);
++ med_2_3::MEDjointInfo(fid1, meshname1, 1, jn1, desc1,(med_int*)&dom1, maa_dist1);
++ med_2_3::MEDjointInfo(fid2, meshname2, 1, jn2, desc2,(med_int*)&dom2, maa_dist2);
+ CPPUNIT_ASSERT(strcmp(jn1,"joint_2")==0);
+ CPPUNIT_ASSERT(strcmp(jn2,"joint_1")==0);
+ CPPUNIT_ASSERT_EQUAL(dom1,1);
+@@ -467,8 +467,8 @@
+ char maa_dist1[MED_TAILLE_NOM], jn1[MED_TAILLE_NOM];
+ char desc2[MED_TAILLE_DESC], maa_dist2[MED_TAILLE_NOM], jn2[MED_TAILLE_NOM];
+ int dom1, dom2;
+- med_2_3::MEDjointInfo(fid1, meshname1, 1, jn1, desc1, &dom1, maa_dist1);
+- med_2_3::MEDjointInfo(fid2, meshname2, 1, jn2, desc2, &dom2, maa_dist2);
++ med_2_3::MEDjointInfo(fid1, meshname1, 1, jn1, desc1, (med_int*)&dom1, maa_dist1);
++ med_2_3::MEDjointInfo(fid2, meshname2, 1, jn2, desc2, (med_int*)&dom2, maa_dist2);
+ CPPUNIT_ASSERT_EQUAL(dom1,1);
+ CPPUNIT_ASSERT_EQUAL(dom2,0);
+
+@@ -548,7 +548,7 @@
+ //testing cells global numbering
+ num = new med_2_3::med_int[2];
+ MEDglobalNumLire(fid1, meshname1, num, 2, typ_ent_loc, typ_geo_loc);
+- med_2_3::med_int* globcellref = new int[2];
++ med_2_3::med_int* globcellref = new med_int[2];
+ globcellref[0]=1;
+ globcellref[1]=3;
+
+@@ -773,10 +773,10 @@
+ char maa_dist1[MED_TAILLE_NOM], jn1[MED_TAILLE_NOM];
+ char desc2[MED_TAILLE_DESC];
+ char maa_dist2[MED_TAILLE_NOM], jn2[MED_TAILLE_NOM];
+- //int dom1, dom2;
+- med_2_3::med_int dom1, dom2;
+- med_2_3::MEDjointInfo(fid1, meshname1, 1, jn1, desc1, &dom1, maa_dist1);
+- med_2_3::MEDjointInfo(fid2, meshname2, 1, jn2, desc2, &dom2, maa_dist2);
++ int dom1, dom2;
++// med_2_3::med_int dom1, dom2;
++ med_2_3::MEDjointInfo(fid1, meshname1, 1, jn1, desc1, (med_int*)&dom1, maa_dist1);
++ med_2_3::MEDjointInfo(fid2, meshname2, 1, jn2, desc2, (med_int*)&dom2, maa_dist2);
+ CPPUNIT_ASSERT_EQUAL(dom1,1);
+ CPPUNIT_ASSERT_EQUAL(dom2,0);
+
+@@ -1143,8 +1143,8 @@
+ char maa_dist1[MED_TAILLE_NOM+1], jn1[MED_TAILLE_NOM+1];
+ char desc2[MED_TAILLE_DESC+1], maa_dist2[MED_TAILLE_NOM+1], jn2[MED_TAILLE_NOM+1];
+ int dom1, dom2;
+- med_2_3::MEDjointInfo(fid1, meshname1, 1, jn1, desc1, &dom1, maa_dist1);
+- med_2_3::MEDjointInfo(fid2, meshname2, 1, jn2, desc2, &dom2, maa_dist2);
++ med_2_3::MEDjointInfo(fid1, meshname1, 1, jn1, desc1, (med_int*)&dom1, maa_dist1);
++ med_2_3::MEDjointInfo(fid2, meshname2, 1, jn2, desc2, (med_int*)&dom2, maa_dist2);
+ CPPUNIT_ASSERT_EQUAL(dom1,1);
+ CPPUNIT_ASSERT_EQUAL(dom2,0);
+