X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2Ftepal2med%2Fghs3dprl_mesh_wrap.cxx;h=706d32ec01c703a3cc32d0e36f11759f50a973a8;hb=0ea36edbeccaeb6c1540fb055fe4f27e9b8bdee1;hp=ef2aa54e297d76cfbca8875c0f9d8db85b6ef428;hpb=4b60fc505e821f3ba0ace997045ebc21f4796478;p=plugins%2Fghs3dprlplugin.git diff --git a/src/tepal2med/ghs3dprl_mesh_wrap.cxx b/src/tepal2med/ghs3dprl_mesh_wrap.cxx index ef2aa54..706d32e 100644 --- a/src/tepal2med/ghs3dprl_mesh_wrap.cxx +++ b/src/tepal2med/ghs3dprl_mesh_wrap.cxx @@ -238,7 +238,7 @@ bool familles::get_number_of_new_family(int sign, med_int *ires, QString *tmp) //std::cout<<"no family found!!! - groups of "<add(tmp,(*it).first); @@ -253,9 +253,9 @@ bool familles::get_number_of_new_family(int sign, med_int *ires, QString *tmp) { QString nom1,nom2; fagr::iterator it1,it2; - nom1=nom1.sprintf("%d",fam1); + nom1=nom1.sprintf("%d",(int)fam1); it1=fam.find(nom1); - nom2=nom2.sprintf("%d",fam2); + nom2=nom2.sprintf("%d",(int)fam2); it2=fam.find(nom2); if ( (it1==fam.end())||(it2==fam.end()) ) { std::cerr<<"***fuse_goups*** non existing family "<filename<CVWtab_deallocate(); + /*ok=*/this->CVWtab_deallocate(); //remove temporary file if (this->filename!="_NO_FILE") { @@ -489,7 +489,7 @@ bool ghs3dprl_mesh_wrap::ReadFileMSGnew(const QString FileName) std::fstream Ff(FileName.toLatin1().constData(),std::ios_base::in); std::string line; long i,count,nbneighbour,ineighbour; - bool ok; + //bool ok; if (!Ff.is_open()) { @@ -511,7 +511,7 @@ bool ghs3dprl_mesh_wrap::ReadFileMSGnew(const QString FileName) CVWtab *montab=new CVWtab(count,tmint); tmp=tmp.sprintf("MS%ld NE%ld VE SE",this->nofile,ineighbour); - ok=this->insert_key(tmp,montab); + /*ok=*/this->insert_key(tmp,montab); } if (!CVW_FindString("nofile,ineighbour); - ok=this->insert_key(tmp,montab); + /*ok=*/this->insert_key(tmp,montab); } if (!CVW_FindString("nofile,ineighbour); - ok=this->insert_key(tmp,montab); + /*ok=*/this->insert_key(tmp,montab); } if (!CVW_FindString("nofile,ineighbour); - ok=this->insert_key(tmp,montab); + /*ok=*/this->insert_key(tmp,montab); } } @@ -559,8 +559,7 @@ bool ghs3dprl_mesh_wrap::TestExistingFileMESHnew(const QString FileName) QString tmp; std::fstream Ff(FileName.toLatin1().constData(),std::ios_base::in); std::string line; - long i,count,meshversion,maxline; - bool ok; + long maxline; if (!Ff.is_open()) { @@ -587,7 +586,7 @@ bool ghs3dprl_mesh_wrap::ReadFileGLO(const QString FileName) std::fstream Ff(FileName.toLatin1().constData(),std::ios_base::in); std::string line; long count; - bool ok; + //bool ok; if (!Ff.is_open()) { @@ -606,7 +605,7 @@ bool ghs3dprl_mesh_wrap::ReadFileGLO(const QString FileName) CVWtab *montab=new CVWtab(count,tmint); tmp=tmp.sprintf("GL%ld VE",this->nofile); - ok=this->insert_key(tmp,montab); + /*ok=*/this->insert_key(tmp,montab); } if (!CVW_FindString("nofile); - ok=this->insert_key(tmp,montab); + /*ok=*/this->insert_key(tmp,montab); } if (!CVW_FindString("nofile); - ok=this->insert_key(tmp,montab); + /*ok=*/this->insert_key(tmp,montab); } if (!CVW_FindString("nofile); - ok=this->insert_key(tmp,montab); + /*ok=*/this->insert_key(tmp,montab); } //Ferme le fichier : Ff.close(); @@ -664,7 +663,7 @@ bool ghs3dprl_mesh_wrap::ReadFileGLOBAL(const QString FileName) long vert=0,edge=0,tria=0,tetr=0,count=0; med_int *tmint; CVWtab *montab; - bool ok; + //bool ok; if (verbose>=6) std::cout<<"Read file '"<nofile); - ok=this->insert_key(tmp,montab); + /*ok=*/this->insert_key(tmp,montab); count=edge; tmint=new med_int[count]; @@ -720,7 +719,7 @@ bool ghs3dprl_mesh_wrap::ReadFileGLOBAL(const QString FileName) montab=new CVWtab(count,tmint); tmp=tmp.sprintf("GL%ld ED",this->nofile); - ok=this->insert_key(tmp,montab); + /*ok=*/this->insert_key(tmp,montab); count=tria; tmint=new med_int[count]; @@ -729,7 +728,7 @@ bool ghs3dprl_mesh_wrap::ReadFileGLOBAL(const QString FileName) montab=new CVWtab(count,tmint); tmp=tmp.sprintf("GL%ld FA",this->nofile); - ok=this->insert_key(tmp,montab); + /*ok=*/this->insert_key(tmp,montab); count=tetr; tmint=new med_int[count]; @@ -738,7 +737,7 @@ bool ghs3dprl_mesh_wrap::ReadFileGLOBAL(const QString FileName) montab=new CVWtab(count,tmint); tmp=tmp.sprintf("GL%ld EL",this->nofile); - ok=this->insert_key(tmp,montab); + /*ok=*/this->insert_key(tmp,montab); //Ferme le fichier : Ff.close(); @@ -754,7 +753,7 @@ bool ghs3dprl_mesh_wrap::ReadFileDefaultGLOBAL(long vert, long edge, long tria, long count=0; med_int *tmint; CVWtab *montab; - bool ok; + //bool ok; //Simule les donnees : std::cout<<"Default Global numerotation nb verts "<nofile); - ok=this->insert_key(tmp,montab); + /*ok=*/this->insert_key(tmp,montab); count=edge; tmint=new med_int[count]; @@ -775,7 +774,7 @@ bool ghs3dprl_mesh_wrap::ReadFileDefaultGLOBAL(long vert, long edge, long tria, montab=new CVWtab(count,tmint); tmp=tmp.sprintf("GL%ld ED",this->nofile); - ok=this->insert_key(tmp,montab); + /*ok=*/this->insert_key(tmp,montab); count=tria; tmint=new med_int[count]; @@ -784,7 +783,7 @@ bool ghs3dprl_mesh_wrap::ReadFileDefaultGLOBAL(long vert, long edge, long tria, montab=new CVWtab(count,tmint); tmp=tmp.sprintf("GL%ld FA",this->nofile); - ok=this->insert_key(tmp,montab); + /*ok=*/this->insert_key(tmp,montab); count=tetr; tmint=new med_int[count]; @@ -793,7 +792,7 @@ bool ghs3dprl_mesh_wrap::ReadFileDefaultGLOBAL(long vert, long edge, long tria, montab=new CVWtab(count,tmint); tmp=tmp.sprintf("GL%ld EL",this->nofile); - ok=this->insert_key(tmp,montab); + /*ok=*/this->insert_key(tmp,montab); return true; } @@ -1069,7 +1068,7 @@ bool ghs3dprl_mesh_wrap::ReadFileNOBOITE(const QString FileName) QString tmp; std::fstream Ff(FileName.toLatin1().constData(),std::ios_base::in); long ne,np,npfixe,subnumber,reste; - bool ok; + //bool ok; if (!Ff.is_open()){ std::cerr<<"Problem File '"<nofile); - ok=this->insert_key(tmp,montab); + /*ok=*/this->insert_key(tmp,montab); med_float *tmflo=new med_float[np*3]; for (int i=0; i>tmflo[i]; @@ -1100,7 +1099,7 @@ bool ghs3dprl_mesh_wrap::ReadFileNOBOITE(const QString FileName) montab=new CVWtab(np*3,tmflo); tmp=tmp.sprintf("NB%ld VC",this->nofile); - ok=this->insert_key(tmp,montab); + /*ok=*/this->insert_key(tmp,montab); Ff>>subnumber; if (verbose>2) std::cout<<"NumberOfSubdomains="<nofile); - ok=this->insert_key(tmp,montab); + /*ok=*/this->insert_key(tmp,montab); //swap on file if too big for memory in one cpu //default 1GOctet/8(for double)/10(for arrays in memory at the same time) @@ -1149,7 +1148,7 @@ bool ghs3dprl_mesh_wrap::ReadFileNOBOITEB(const QString FileName) //but NOT parameter option of tepal //idem ReadFileNOBOITE with read unformatted { - bool ok; + //bool ok; QString tmp; std::cerr<<"Problem function ReadFileNOBOITEB\n" <<"(no FORTRAN binary format files in tepal)\n\n"; @@ -1193,7 +1192,7 @@ bool ghs3dprl_mesh_wrap::ReadFileNOBOITEB(const QString FileName) CVWtab *montab=new CVWtab(ne*4,tmint); tmp=tmp.sprintf("NB%ld EV",this->nofile); - ok=this->insert_key(tmp,montab); + /*ok=*/this->insert_key(tmp,montab); fread(&reste,sizeof(long),1,Ff); //std::cout<<"info "<nofile); - ok=this->insert_key(tmp,montab); + /*ok=*/this->insert_key(tmp,montab); fread(&reste,sizeof(long),1,Ff); fread(&subnumber,sizeof(long),1,Ff); @@ -1224,7 +1223,7 @@ bool ghs3dprl_mesh_wrap::ReadFileNOBOITEB(const QString FileName) delete tlong; montab=new CVWtab(subnumber*3,tmint); tmp=tmp.sprintf("NB%ld SN",this->nofile); - ok=this->insert_key(tmp,montab); + /*ok=*/this->insert_key(tmp,montab); //swap on file if too big for memory in one cpu //default 1GOctet/8(for double)/10(for arrays in memory at the same time) @@ -1401,7 +1400,7 @@ long ghs3dprl_mesh_wrap::SwapOutOfMemory_key_mesh_wrap(const QRegExp &rxp, //swap on file if not yet and if size greater than ifgreaterthan { long nb=0; - bool ok; + //bool ok; QHashIterator it(this->mestab); while ( it.hasNext() ) { it.next(); @@ -1413,7 +1412,7 @@ long ghs3dprl_mesh_wrap::SwapOutOfMemory_key_mesh_wrap(const QRegExp &rxp, it.key().toLatin1().constData()<< " size "<size<<">"<path,it.value(),this->verbose); + /*ok=*/SwapOnFile(it.key(),this->path,it.value(),this->verbose); } } } @@ -1444,7 +1443,7 @@ bool ghs3dprl_mesh_wrap::insert_key(const QString &key,CVWtab *tab) //si tableaux contenus on dimension superieure //alors swap disque dans getenv(tmp) fichier temporaire binaire { - bool ok; + //bool ok; if (verbose>4) std::cout<<"insert key "<path,tab,this->verbose); + /*ok=*/SwapOnFile(key,this->path,tab,this->verbose); } this->mestab.insert(key,tab); return true; @@ -1710,7 +1709,7 @@ bool ghs3dprl_mesh_wrap::Find_VerticesDomainToVerticesSkin() if (!cooskin) return false; if (verbose>4)std::cout<<"NumberVerticesSKIN="<size/3<nbfiles; ifile++) + for (long ifile=1; ifile<=this->nbfiles; ifile++) { key1=key1.sprintf("NB%ld VC",ifile); coodom=this->restore_key(key1); @@ -1788,7 +1787,7 @@ bool ghs3dprl_mesh_wrap::Write_masterxmlMEDfile() med_int majeur,mineur,release; //Quelle version de MED est utilisee MEDlibraryNumVersion(&majeur,&mineur,&release); - if (verbose>0) fprintf(stdout,"File write %s with MED V%d.%d.%d\n",filemaster.c_str(),majeur,mineur,release); + if (verbose>0) fprintf(stdout,"File write %s with MED V%d.%d.%d\n",filemaster.c_str(),(int)majeur,(int)mineur,(int)release); node = xmlNewChild(root_node, 0, BAD_CAST "version",0); //xmlNewProp(node, BAD_CAST "maj", BAD_CAST int2string2(majeur).c_str()); xmlNewProp(node, BAD_CAST "maj", BAD_CAST i2a(majeur).c_str()); @@ -1840,7 +1839,7 @@ bool ghs3dprl_mesh_wrap::Write_masterxmlMEDfile() //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!all calls add xml idom node { - fprintf(stdout,"Xml node write %s idom %d\n",filemaster.c_str(), idom); + fprintf(stdout,"Xml node write %s idom %d\n",filemaster.c_str(), (int)idom); char *hostname = getenv("HOSTNAME"); node = xmlNewChild(files_node,0,BAD_CAST "subfile",0); xmlNewProp(node, BAD_CAST "id", BAD_CAST i2a(idom).c_str()); @@ -1878,10 +1877,10 @@ bool ghs3dprl_mesh_wrap::Write_masterxmlMEDfile() } //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!last call - fprintf(stdout,"xml node idom %d/%d nb tetras total %d\n", idom, nbfilestot, nbtetrastotal); + fprintf(stdout,"xml node idom %d/%ld nb tetras total %ld\n", (int)idom, nbfilestot, nbtetrastotal); if (idom==nbfilestot) { - fprintf(stdout,"File write %s as last idom nb tetras total %d\n",filemaster.c_str(), nbtetrastotal); + fprintf(stdout,"File write %s as last idom nb tetras total %ld\n",filemaster.c_str(), nbtetrastotal); node2 = xmlNewChild(info_node, 0, BAD_CAST "global",0); xmlNewProp(node2, BAD_CAST "tetrahedra_number", BAD_CAST i2a(nbtetrastotal).c_str()); //save masterfile @@ -1894,10 +1893,10 @@ bool ghs3dprl_mesh_wrap::Write_masterxmlMEDfile() //************************************ -bool ghs3dprl_mesh_wrap::Write_MEDfiles_v2(bool deletekeys) +bool ghs3dprl_mesh_wrap::Write_MEDfiles_v2(bool /*deletekeys*/) //deletekeys=true to delete non utils keys and arrays "au fur et a mesure" { - bool ok=true,oktmp; + bool ok=true/*,oktmp*/; QString tmp,cmd; char description[MED_COMMENT_SIZE]; char dtunit[MED_SNAME_SIZE+1]="_NO_UNIT"; @@ -1919,7 +1918,7 @@ bool ghs3dprl_mesh_wrap::Write_MEDfiles_v2(bool deletekeys) } //create file resume DOMAIN.joints.med of all joints for quick display (...may be...) - tmp=path+medname+tmp.sprintf("_joints.med",idom); + tmp=path+medname+tmp.sprintf("_joints.med"); charendnull(distfilename,tmp,MED_COMMENT_SIZE); fidjoint=MEDfileOpen(distfilename,MED_ACC_CREAT); if (fidjoint<0) std::cerr<<"Problem MEDfileOpen "<3) std::cout<<"--deletegroups matches \"All_Nodes\"\n"; famalltria3=0; if (QString("All_Faces").contains(deletegroups)==0){ - oktmp=families.get_number_of_new_family(-1,&famalltria3,&tmp); + /*oktmp=*/families.get_number_of_new_family(-1,&famalltria3,&tmp); families.add(tmp,"All_Faces"); } else if (verbose>3) std::cout<<"--deletegroups matches \"All_Faces\"\n"; famalltetra4=0; if (QString("All_Tetrahedra").contains(deletegroups)==0){ - oktmp=families.get_number_of_new_family(-1,&famalltetra4,&tmp); + /*oktmp=*/families.get_number_of_new_family(-1,&famalltetra4,&tmp); families.add(tmp,"All_Tetrahedra"); } else if (verbose>3) std::cout<<"--deletegroups matches \"All_Tetrahedra\"\n"; famnewnodes=0; if (QString("New_Nodes").contains(deletegroups)==0){ - oktmp=families.get_number_of_new_family(1,&famnewnodes,&tmp); + /*oktmp=*/families.get_number_of_new_family(1,&famnewnodes,&tmp); families.add(tmp,"New_Nodes"); } else if (verbose>3) std::cout<<"--deletegroups matches \"New_Nodes\"\n"; famnewtria3=0; if (QString("New_Faces").contains(deletegroups)==0){ - oktmp=families.get_number_of_new_family(-1,&famnewtria3,&tmp); + /*oktmp=*/families.get_number_of_new_family(-1,&famnewtria3,&tmp); families.add(tmp,"New_Faces"); } else if (verbose>3) std::cout<<"--deletegroups matches \"New_Faces\"\n"; famnewtetra4=0; if (QString("New_Tetrahedra").contains(deletegroups)==0){ - oktmp=families.get_number_of_new_family(-1,&famnewtetra4,&tmp); + /*oktmp=*/families.get_number_of_new_family(-1,&famnewtetra4,&tmp); families.add(tmp,"New_Tetrahedra"); } else if (verbose>3) std::cout<<"--deletegroups matches \"New_Tetrahedra\"\n"; @@ -2016,7 +2015,7 @@ bool ghs3dprl_mesh_wrap::Write_MEDfiles_v2(bool deletekeys) //restore initial context of families if (idom>1) families=intermediatesfamilies; //if (idom>1) continue; - tmp=path+medname+tmp.sprintf("_%d.med",idom); + tmp=path+medname+tmp.sprintf("_%d.med",(int)idom); charendnull(distfilename,tmp,MED_COMMENT_SIZE); //std::cout<<"<"<"<4) std::cout<<"Description : "<restore_key(key); //tab1=this->mestab[key1]; if (!tab) { if (!for_tetrahpc) { @@ -2130,9 +2129,9 @@ bool ghs3dprl_mesh_wrap::idom_nodes() tab=this->restore_key(key); //tab1=this->mestab[key1]; if (!tab) return false; } - tmp=tmp.sprintf("NB%d SN",idom); + tmp=tmp.sprintf("NB%d SN",(int)idom); //qt3 xx=this->remove_key_mesh_wrap(QRegExp(tmp,true,true)); - xx=this->remove_key_mesh_wrap(QRegExp(tmp,Qt::CaseSensitive,QRegExp::RegExp)); + /*xx=*/this->remove_key_mesh_wrap(QRegExp(tmp,Qt::CaseSensitive,QRegExp::RegExp)); nbnodes=this->nbvert; // for current idom err=MEDmeshNodeCoordinateWr(fid,nomfinal,MED_NO_DT,MED_NO_IT,0.,MED_FULL_INTERLACE,nbnodes,tab->tmflo); @@ -2148,7 +2147,7 @@ bool ghs3dprl_mesh_wrap::idom_nodes() // if (!for_multithread) { - key1=key1.sprintf("GL%d VE",idom); //global numerotation + key1=key1.sprintf("GL%d VE",(int)idom); //global numerotation tab1=this->restore_key(key1); //tab1=this->mestab[key1]; if (!tab1) { if (!for_tetrahpc) { @@ -2165,10 +2164,10 @@ bool ghs3dprl_mesh_wrap::idom_nodes() } if (nbnodes!=tab1->size){std::cerr<<"Problem size GLi VE!=nbnodes!"<restore_key(key2); //tab1=this->mestab[key1]; med_int nbskin=0; - if (tab2) med_int nbskin=tab2->size; + if (tab2) nbskin=tab2->size; //for (i=0; itmint[i]<restore_key(key1); //tab1=this->mestab[key1]; if (!tab1) { tmp=pathini+casename+tmp.sprintf(format.toLatin1().constData(),nbfilestot,idom)+".faces"; @@ -2348,12 +2347,12 @@ bool ghs3dprl_mesh_wrap::idom_faces() //GLx FA=files.GLo FAces // if (!for_multithread) { - key1=key1.sprintf("GL%d FA",idom); + key1=key1.sprintf("GL%d FA",(int)idom); tab1=this->restore_key(key1); //tab1=this->mestab[key1]; if (nbtria3!=tab1->size){std::cerr<<"Problem size GLi FA!=nbtria3!"<restore_key(key2); //tab1=this->mestab[key1]; med_int nbskin=0; if (tab2) nbskin=tab2->size; @@ -2381,13 +2380,13 @@ bool ghs3dprl_mesh_wrap::idom_faces() err=MEDmeshGlobalNumberWr(fid,nomfinal,MED_NO_DT,MED_NO_IT,MED_CELL,MED_TRIA3,tab1->size,tab1->tmint); if (err<0){std::cerr<<"Problem MEDmeshGlobalNumberWr faces"<remove_key_mesh_wrap(QRegExp("FC*",true,true)); - tmp=tmp.sprintf("GL%d FA",idom); - //qt3 xx=this->remove_key_mesh_wrap(QRegExp(tmp,true,true)); - xx=this->remove_key_mesh_wrap(QRegExp(tmp,Qt::CaseSensitive,QRegExp::RegExp)); - tmp=tmp.sprintf("GL%d VE",idom); - //qt3 xx=this->remove_key_mesh_wrap(QRegExp(tmp,true,true)); - xx=this->remove_key_mesh_wrap(QRegExp(tmp,Qt::CaseSensitive,QRegExp::RegExp)); + ///*xx=*/this->remove_key_mesh_wrap(QRegExp("FC*",true,true)); + tmp=tmp.sprintf("GL%d FA",(int)idom); + //qt3 /*xx=*/this->remove_key_mesh_wrap(QRegExp(tmp,true,true)); + /*xx=*/this->remove_key_mesh_wrap(QRegExp(tmp,Qt::CaseSensitive,QRegExp::RegExp)); + tmp=tmp.sprintf("GL%d VE",(int)idom); + //qt3 /*xx=*/this->remove_key_mesh_wrap(QRegExp(tmp,true,true)); + /*xx=*/this->remove_key_mesh_wrap(QRegExp(tmp,Qt::CaseSensitive,QRegExp::RegExp)); } return ok; @@ -2399,21 +2398,21 @@ bool ghs3dprl_mesh_wrap::idom_joints() bool ok=true; QString tmp,namejoint,key,key1,key2; CVWtab *tab,*tab1,*tab2; - med_int ineig,ii,jj,i,j,k,*arrayi,nb,famjoint,*fammore,*inodes,*arrayfaces; + med_int ineig,ii,jj,i,j,k,*arrayi,nb,famjoint,*inodes,*arrayfaces; med_float *arraynodes; char namejnt[MED_NAME_SIZE+1]; //no more 32 char namedist[MED_NAME_SIZE+1]; char descjnt[MED_COMMENT_SIZE+1]; - med_int numfam_ini_wrap=100; + //med_int numfam_ini_wrap=100; joints_node=xmlNewNode(NULL, BAD_CAST "joints"); //masterfile.xml med_int nbjoints=0,nbnodesneig,nbtria3neig; std::string sjoints=""; //which domains are neighbourg - int xx; + //int xx; char dtunit[MED_SNAME_SIZE+1]="_NO_UNIT"; char axisname[MED_SNAME_SIZE*3+1]="x y z "; char axisunit[MED_SNAME_SIZE*3+1]="_NO_UNIT _NO_UNIT _NO_UNIT "; - tmp=tmp.sprintf("MS%d *",idom); + tmp=tmp.sprintf("MS%d *",(int)idom); //read file .msg if not done //qt3 if (this->nb_key_mesh_wrap(QRegExp(tmp,true,true))<=0) { if (this->nb_key_mesh_wrap(QRegExp(tmp,Qt::CaseSensitive,QRegExp::RegExp))<=0) { @@ -2439,10 +2438,10 @@ bool ghs3dprl_mesh_wrap::idom_joints() //!*************nodes //std::cout<<"\n nodes joints\n"; - key1=key1.sprintf("MS%d NE%d VE SE",idom,ineig); //SE or RE identicals + key1=key1.sprintf("MS%d NE%d VE SE",(int)idom,(int)ineig); //SE or RE identicals tab1=restore_key(key1); if (!tab1) continue; //case (ifile,ineig) are not neighbours=>no joints - key1=key1.sprintf("MS%d NE%d VE SE",ineig,idom); //SE or RE identicals + key1=key1.sprintf("MS%d NE%d VE SE",(int)ineig,(int)idom); //SE or RE identicals tab2=this->restore_key(key1); //if not yet loaded (first time) try to load necessary file msg of neighbourg if (!tab2) { @@ -2476,11 +2475,11 @@ bool ghs3dprl_mesh_wrap::idom_joints() sjoints=sjoints+" "+i2a(ineig); if (verbose>4) std::cout<<"NumberOfNodesOfJoint_"<restore_key(key); //tab1=this->mestab[key1]; nbnodes=tab->size/3; @@ -2529,7 +2528,7 @@ bool ghs3dprl_mesh_wrap::idom_joints() //writing correspondence triangles-triangles //std::cout<<"\n faces joints\n"; nbtria3neig=0; - key1=key1.sprintf("MS%d NE%d FA SE",idom,ineig); //SE or RE identicals + key1=key1.sprintf("MS%d NE%d FA SE",(int)idom,(int)ineig); //SE or RE identicals tab1=this->restore_key(key1); //tab1=this->mestab[key1]; if (!tab1){ if (verbose>4) @@ -2538,7 +2537,7 @@ bool ghs3dprl_mesh_wrap::idom_joints() } else //have to set xml may be no faces but nodes in a joint! { - key1=key1.sprintf("MS%d NE%d FA SE",ineig,idom); //SE or RE identicals + key1=key1.sprintf("MS%d NE%d FA SE",(int)ineig,(int)idom); //SE or RE identicals tab2=this->restore_key(key1); if (!tab2) std::cerr<<"Problem existing triangles of joint in domain "<"<restore_key(key); //tab1=this->mestab[key1]; med_int nb=tab1->size; nbtria3neig=nb; @@ -2582,11 +2581,11 @@ bool ghs3dprl_mesh_wrap::idom_joints() arrayfaces[jj]=inodes[tab->tmint[k+1]-1]; jj++; arrayfaces[jj]=inodes[tab->tmint[k+2]-1]; jj++; } - int happens=0; + //int happens=0; for (i=0; i0) delete[] arrayfaces; + if (nbtria3neig>0) delete[] arrayfaces; // todo: arrayfaces may be used uninitialized delete[] inodes; //!masterfile.xml @@ -2664,18 +2663,18 @@ bool ghs3dprl_mesh_wrap::idom_joints() xmlNewProp(joints_node, BAD_CAST "number", BAD_CAST i2a(nbjoints).c_str()); xmlNewChild(joints_node, 0, BAD_CAST "id_neighbours", BAD_CAST sjoints.substr(1).c_str()); - tmp=tmp.sprintf("NB%d VC",idom); + tmp=tmp.sprintf("NB%d VC",(int)idom); //qt3 xx=this->remove_key_mesh_wrap(QRegExp(tmp,true,true)); - xx=this->remove_key_mesh_wrap(QRegExp(tmp,Qt::CaseSensitive,QRegExp::RegExp)); + /*xx=*/this->remove_key_mesh_wrap(QRegExp(tmp,Qt::CaseSensitive,QRegExp::RegExp)); //tmp=tmp.sprintf("MS%d NE*",idom); //qt3 xx=this->remove_key_mesh_wrap(QRegExp(tmp,true,true)); - //xx=this->remove_key_mesh_wrap(QRegExp(tmp,Qt::CaseSensitive,QRegExp::RegExp)); - tmp=tmp.sprintf("FC%d",idom); + ///*xx=*/this->remove_key_mesh_wrap(QRegExp(tmp,Qt::CaseSensitive,QRegExp::RegExp)); + tmp=tmp.sprintf("FC%d",(int)idom); //qt3 xx=this->remove_key_mesh_wrap(QRegExp(tmp,true,true)); - xx=this->remove_key_mesh_wrap(QRegExp(tmp,Qt::CaseSensitive,QRegExp::RegExp)); - tmp=tmp.sprintf("GL%d *",idom); + /*xx=*/this->remove_key_mesh_wrap(QRegExp(tmp,Qt::CaseSensitive,QRegExp::RegExp)); + tmp=tmp.sprintf("GL%d *",(int)idom); //qt3 xx=this->remove_key_mesh_wrap(QRegExp(tmp,true,true)); - xx=this->remove_key_mesh_wrap(QRegExp(tmp,Qt::CaseSensitive,QRegExp::RegExp)); + /*xx=*/this->remove_key_mesh_wrap(QRegExp(tmp,Qt::CaseSensitive,QRegExp::RegExp)); return ok; } @@ -2686,10 +2685,10 @@ bool ghs3dprl_mesh_wrap::idom_tetras() QString tmp,key1; CVWtab *tab1; med_int i,*arrayi; - int xx; + //int xx; //writing connectivity of tetrahedra by nodes - key1=key1.sprintf("NB%d EV",idom); //files.NoBoite Elements Vertices (tetra only) + key1=key1.sprintf("NB%d EV",(int)idom); //files.NoBoite Elements Vertices (tetra only) tab1=this->restore_key(key1); //tab1=this->mestab[key1]; nbtetra4=tab1->size/4; this->nbtetr=nbtetra4; // for current idom @@ -2714,7 +2713,7 @@ bool ghs3dprl_mesh_wrap::idom_tetras() { //writing tetrahedra global numbering //GLx EL=files.GLo ELements - key1=key1.sprintf("GL%d EL",idom); + key1=key1.sprintf("GL%d EL",(int)idom); tab1=this->restore_key(key1); //tab1=this->mestab[key1]; if (!tab1) { //tmp=pathini+casename+tmp.sprintf(format.toLatin1().constData(),nbfilestot,idom)+".glo"; @@ -2743,9 +2742,9 @@ bool ghs3dprl_mesh_wrap::idom_tetras() if (err<0){std::cerr<<"Problem MEDmeshGlobalNumberWr tetrahedra"<remove_key_mesh_wrap(QRegExp(tmp,true,true)); - xx=this->remove_key_mesh_wrap(QRegExp(tmp,Qt::CaseSensitive,QRegExp::RegExp)); + /*xx=*/this->remove_key_mesh_wrap(QRegExp(tmp,Qt::CaseSensitive,QRegExp::RegExp)); return ok; } @@ -2756,9 +2755,9 @@ med_int ghs3dprl_mesh_wrap::create_families(med_idt fid, int sign) { med_int pas,ires; char nomfam[MED_NAME_SIZE+1]; //it.current()->name; - char attdes[MED_COMMENT_SIZE+1]="_NO_DESCRIPTION"; + //char attdes[MED_COMMENT_SIZE+1]="_NO_DESCRIPTION"; char *gro; - med_int i,attide=1,attval=1,natt=1,num,ngro; + med_int i,/*attide=1,*//*attval=1,*//*natt=1,*/num,ngro; if (sign>=0) pas=1; else pas=-1; ires=0; @@ -2793,13 +2792,13 @@ med_int ghs3dprl_mesh_wrap::create_families(med_idt fid, int sign) med_int ghs3dprl_mesh_wrap::create_family_zero(med_idt fid, QString nameMesh) { - med_int pas,ires; + med_int /*pas,*/ires; ires=0; char nomfam[MED_NAME_SIZE+1]="FAMILLE_ZERO"; //it.current()->name; - char attdes[MED_COMMENT_SIZE+1]="_NO_DESCRIPTION"; + //char attdes[MED_COMMENT_SIZE+1]="_NO_DESCRIPTION"; char *gro; - med_int i,attide=1,attval=1,natt=1,num=0,ngro=0; + med_int /*attide=1,*//*attval=1,*//*natt=1,*/num=0,ngro=0; gro=new char[MED_LNAME_SIZE*ngro+2]; if (verbose>3)std::cout<<"\ncreate_family_ZERO "<