From: Jean-Marc L. <jm_...@us...> - 2004-04-09 19:48:44
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30672/fudaa/src/org/fudaa/fudaa/hydraulique1d Modified Files: Hydraulique1dImport.java Log Message: Index: Hydraulique1dImport.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/Hydraulique1dImport.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Hydraulique1dImport.java 5 Mar 2004 13:16:18 -0000 1.9 --- Hydraulique1dImport.java 9 Apr 2004 19:34:53 -0000 1.10 *************** *** 23,26 **** --- 23,27 ---- import java.util.*; import javax.swing.*; + import org.fudaa.fudaa.hydraulique1d.tableau.Hydraulique1dLigneLigneDEauTableau; /** * @version $Revision$ $Date$ by $Author$ *************** *** 250,254 **** new FudaaParamEvent(this, 0, LidoResource.PRO, imports[i], "profil "+imports[i].numProfil)); ***/ ! bief.profils(imports); return imports; } --- 251,255 ---- new FudaaParamEvent(this, 0, LidoResource.PRO, imports[i], "profil "+imports[i].numProfil)); ***/ ! if (imports != null) bief.profils(imports); return imports; } *************** *** 706,710 **** return bief.profils(); } ! public static ILigneEauPoint[] importLigneEau_Txt( ILigneEauInitiale ligneEau, File fichier) { --- 707,711 ---- return bief.profils(); } ! public static Hydraulique1dLigneLigneDEauTableau[] importLigneEau_Txt( ILigneEauInitiale ligneEau, File fichier) { *************** *** 714,718 **** int lineNb= 0; String line= null; ! ILigneEauPoint[] tableau= null; try { BufferedReader fic= new BufferedReader(new FileReader(fichier)); --- 715,719 ---- int lineNb= 0; String line= null; ! Hydraulique1dLigneLigneDEauTableau[] tableau= null; try { BufferedReader fic= new BufferedReader(new FileReader(fichier)); *************** *** 763,767 **** return tableau; } ! public static ILigneEauPoint[] importLigneEau_LidoPerm( ILigneEauInitiale ligneEau, File fichier) { --- 764,768 ---- return tableau; } ! public static Hydraulique1dLigneLigneDEauTableau[] importLigneEau_LidoPerm( ILigneEauInitiale ligneEau, File fichier) { *************** *** 786,790 **** Vector vecQmin= new Vector(); Vector vecQmaj= new Vector(); ! ILigneEauPoint[] res= null; String line= null; try { --- 787,791 ---- Vector vecQmin= new Vector(); Vector vecQmaj= new Vector(); ! Hydraulique1dLigneLigneDEauTableau[] res= null; String line= null; try { *************** *** 799,803 **** } else if (etat.equals("nombre section")) { String NbSectionChaine= line.substring(7, 12); ! res= ligneEau.creePoints(Integer.parseInt(NbSectionChaine.trim())); etat= "nouvelle variable"; } else if (etat.equals("nouvelle variable")) { --- 800,807 ---- } else if (etat.equals("nombre section")) { String NbSectionChaine= line.substring(7, 12); ! res = new Hydraulique1dLigneLigneDEauTableau[Integer.parseInt(NbSectionChaine.trim())]; ! for (int i = 0; i < res.length; i++) { ! res[i] = new Hydraulique1dLigneLigneDEauTableau(); ! } etat= "nouvelle variable"; } else if (etat.equals("nouvelle variable")) { *************** *** 814,818 **** switch (variableCourante) { case X : ! res[nbSectionLu].abscisse(valeur); break; case Z : --- 818,822 ---- switch (variableCourante) { case X : ! res[nbSectionLu].absc(valeur); break; case Z : *************** *** 830,843 **** break; case COEF_MIN : ! res[nbSectionLu].coefFrottementMin(valeur); break; case COEF_MAJ : ! res[nbSectionLu].coefFrottementMaj(valeur); break; case STRICKLER_MIN : ! res[nbSectionLu].coefFrottementMin(valeur); break; case STRICKLER_MAJ : ! res[nbSectionLu].coefFrottementMaj(valeur); break; } --- 834,847 ---- break; case COEF_MIN : ! // res[nbSectionLu].coefFrottementMin(valeur); break; case COEF_MAJ : ! // res[nbSectionLu].coefFrottementMaj(valeur); break; case STRICKLER_MIN : ! // res[nbSectionLu].coefFrottementMin(valeur); break; case STRICKLER_MAJ : ! // res[nbSectionLu].coefFrottementMaj(valeur); break; } *************** *** 852,856 **** fic.close(); if (!Qexiste) { ! if ((vecQmaj.size() == res.length) && (vecQmin.size() == res.length)) { for (int i= 0; i < res.length; i++) { double q= --- 856,860 ---- fic.close(); if (!Qexiste) { ! if ((vecQmaj.size() >= res.length) && (vecQmin.size() >= res.length)) { for (int i= 0; i < res.length; i++) { double q= *************** *** 888,892 **** + "'\n"; } catch (IOException e) { ! my_perror(e); } new BuDialogMessage( --- 892,918 ---- + "'\n"; } catch (IOException e) { ! my_perror( ! "Problème d'entrée-sortie " ! + lineNb ! + " '" ! + line ! + "'"); ! logMsg += "Problème d'entrée-sortie " ! + lineNb ! + " '" ! + line ! + "'\n"; ! } catch (Exception e) { ! my_perror( ! "Problème inconnue " ! + lineNb ! + " '" ! + line ! + "'"); ! logMsg += "Problème inconnue " ! + lineNb ! + " '" ! + line ! + "'\n"; } new BuDialogMessage( *************** *** 1085,1098 **** } else if ((!finBathyTrouve) && (bathyTrouve) && (lit.equals("T"))) { finBathyTrouve= true; ! indiceLitMinDr= i; } } if (nouveauProfil != null) { nouveauProfil.points(pts); - nouveauProfil.indiceLitMajDr(indiceLitMajDr); nouveauProfil.indiceLitMajGa(indiceLitMajGa); - nouveauProfil.indiceLitMinDr(indiceLitMinDr); nouveauProfil.indiceLitMinGa(indiceLitMinGa); ! } } public static IProfil[] importProfilsPRO_RIVICAD(File filename, IBief bief) { --- 1111,1124 ---- } else if ((!finBathyTrouve) && (bathyTrouve) && (lit.equals("T"))) { finBathyTrouve= true; ! indiceLitMinDr= i - 1; } } if (nouveauProfil != null) { nouveauProfil.points(pts); nouveauProfil.indiceLitMajGa(indiceLitMajGa); nouveauProfil.indiceLitMinGa(indiceLitMinGa); ! nouveauProfil.indiceLitMinDr(indiceLitMinDr); ! nouveauProfil.indiceLitMajDr(indiceLitMajDr); ! } } public static IProfil[] importProfilsPRO_RIVICAD(File filename, IBief bief) { *************** *** 1450,1457 **** return false; } ! ILigneEauPoint transformeMetier() { ! ILigneEauPoint pt= CDodico.findUsine().creeHydraulique1dLigneEauPoint(); ! pt.numeroBief(numBief); ! pt.abscisse(x); pt.cote(z); pt.debit(q); --- 1476,1483 ---- return false; } ! Hydraulique1dLigneLigneDEauTableau transformeMetier() { ! Hydraulique1dLigneLigneDEauTableau pt= new Hydraulique1dLigneLigneDEauTableau(); ! pt.iBief(numBief); ! pt.absc(x); pt.cote(z); pt.debit(q); *************** *** 1470,1476 **** * @return le tableau d'objet metier corba. */ ! ILigneEauPoint[] transformeTableauMetier() { int taille= points.size(); ! ILigneEauPoint[] res= new ILigneEauPoint[taille]; for (int i= 0; i < res.length; i++) { res[i]= ((PtLigneEau)points.get(i)).transformeMetier(); --- 1496,1502 ---- * @return le tableau d'objet metier corba. */ ! Hydraulique1dLigneLigneDEauTableau[] transformeTableauMetier() { int taille= points.size(); ! Hydraulique1dLigneLigneDEauTableau[] res= new Hydraulique1dLigneLigneDEauTableau[taille]; for (int i= 0; i < res.length; i++) { res[i]= ((PtLigneEau)points.get(i)).transformeMetier(); |