You can subscribe to this list here.
2003 |
Jan
|
Feb
(89) |
Mar
(219) |
Apr
(82) |
May
(33) |
Jun
(11) |
Jul
(129) |
Aug
(357) |
Sep
(34) |
Oct
(37) |
Nov
(42) |
Dec
(182) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(59) |
Feb
(74) |
Mar
(196) |
Apr
(205) |
May
(109) |
Jun
(268) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dico In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20934/dico Modified Files: DicoAnalyzer.java DicoCasAbstract.java DicoCasFileFormatVersion.java DicoCasInterface.java DicoCasReader.java DicoCasWriter.java DicoDataTypeGenerate.java DicoEntiteGenerate.java DicoFactory.java DicoGenerator.java DicoParams.java DicoParamsInterface.java Log Message: Maj version 0.05 prepro Index: DicoAnalyzer.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dico/DicoAnalyzer.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** DicoAnalyzer.java 12 Dec 2003 10:30:53 -0000 1.7 --- DicoAnalyzer.java 12 Feb 2004 15:32:43 -0000 1.8 *************** *** 57,61 **** return null; } ! DodicoAnalyze.Editor analyze_; private boolean dicoDynamique_; private File dicoFile_; --- 57,61 ---- return null; } ! DodicoAnalyze analyze_; private boolean dicoDynamique_; private File dicoFile_; *************** *** 267,271 **** String[] rTemp= DicoEntite.Vecteur.getValues(b.toString(), _sep); if (rTemp == null) { ! analyze_.addInfo( DicoResource.getS("Erreur avec la valeur par défaut") + CtuluLib.ESPACE --- 267,271 ---- String[] rTemp= DicoEntite.Vecteur.getValues(b.toString(), _sep); if (rTemp == null) { ! analyze_.getInfoCanal().addMessage( DicoResource.getS("Erreur avec la valeur par défaut") + CtuluLib.ESPACE *************** *** 276,280 **** if (r[i] == null) { r[i]= CtuluLib.EMPTY_STRING; ! analyze_.addInfo( DicoResource.getS("Erreur avec la valeur par défaut") + CtuluLib.ESPACE --- 276,280 ---- if (r[i] == null) { r[i]= CtuluLib.EMPTY_STRING; ! analyze_.getInfoCanal().addMessage( DicoResource.getS("Erreur avec la valeur par défaut") + CtuluLib.ESPACE *************** *** 345,349 **** } else { if (t > nbLanguage_) { ! analyze_.addInfo( DicoResource.getS( "Le mot-clé {0} propose trop de traduction", --- 345,349 ---- } else { if (t > nbLanguage_) { ! analyze_.getInfoCanal().addMessage( DicoResource.getS( "Le mot-clé {0} propose trop de traduction", *************** *** 422,426 **** if (type == null) { analyze_.addFatalError(DicoResource.getS("Type non reconnu"), ligne); ! analyze_.addInfo(noms[0], ligne); return; } --- 422,426 ---- if (type == null) { analyze_.addFatalError(DicoResource.getS("Type non reconnu"), ligne); ! analyze_.getInfoCanal().addMessage(noms[0], ligne); return; } *************** *** 446,450 **** DicoResource.getS("Erreur lors de l'analyse des choix"), ligne); ! analyze_.addInfo(noms[0], ligne); return; } --- 446,450 ---- DicoResource.getS("Erreur lors de l'analyse des choix"), ligne); ! analyze_.getInfoCanal().addMessage(noms[0], ligne); return; } *************** *** 459,463 **** DicoResource.getS("champ CONTROLE invalide"), ligne); ! analyze_.addInfo(noms[0], ligne); return; } --- 459,463 ---- DicoResource.getS("champ CONTROLE invalide"), ligne); ! analyze_.getInfoCanal().addMessage(noms[0], ligne); return; } *************** *** 469,473 **** } if (!b) { ! analyze_.addInfo( noms[0] + " " + DicoResource.getS("CONTROLE non supporté"), ligne); --- 469,473 ---- } if (!b) { ! analyze_.getInfoCanal().addMessage( noms[0] + " " + DicoResource.getS("CONTROLE non supporté"), ligne); *************** *** 518,522 **** keysChoice= type.getValues()[0]; if (keysChoice == null) { ! analyze_.addError("les choix sont nuls", ligne); return; } --- 518,522 ---- keysChoice= type.getValues()[0]; if (keysChoice == null) { ! analyze_.getErrorCanal().addMessage("les choix sont nuls", ligne); return; } *************** *** 533,537 **** arraytemp= findValues(kw_.getAide(), keys, mapEncours, true); if (arraytemp == null) { ! analyze_.addInfo(DicoResource.getS("Aide non trouvée"), ligne); } else { entite.setAides(arraytemp); --- 533,537 ---- arraytemp= findValues(kw_.getAide(), keys, mapEncours, true); if (arraytemp == null) { ! analyze_.getInfoCanal().addMessage(DicoResource.getS("Aide non trouvée"), ligne); } else { entite.setAides(arraytemp); *************** *** 541,545 **** if (s == null) { entite.setIndex(0); ! analyze_.addInfo( DicoResource.getS("INDEX mis à 0 pour") + CtuluLib.ESPACE --- 541,545 ---- if (s == null) { entite.setIndex(0); ! analyze_.getInfoCanal().addMessage( DicoResource.getS("INDEX mis à 0 pour") + CtuluLib.ESPACE *************** *** 552,556 **** if (s == null) { entite.setNiveau(0); ! analyze_.addInfo( DicoResource.getS("NIVEAU mis à 0 pour") + CtuluLib.ESPACE --- 552,556 ---- if (s == null) { entite.setNiveau(0); ! analyze_.getInfoCanal().addMessage( DicoResource.getS("NIVEAU mis à 0 pour") + CtuluLib.ESPACE *************** *** 583,589 **** arraytemp= findValues(kw_.getRubrique(), keys, mapEncours, false); if (arraytemp == null) { ! analyze_.addInfo(DicoResource.getS("Rubrique non trouvée"), ligne); } else { ! int l= arraytemp.length; // for (int j= 0; j < l; j++) { // arraytemp[j]= --- 583,589 ---- arraytemp= findValues(kw_.getRubrique(), keys, mapEncours, false); if (arraytemp == null) { ! analyze_.getInfoCanal().addMessage(DicoResource.getS("Rubrique non trouvée"), ligne); } else { ! //int l= arraytemp.length; // for (int j= 0; j < l; j++) { // arraytemp[j]= *************** *** 602,606 **** + DicoResource.getS("Les valeurs par défaut sont invalides"), ligne); ! analyze_.addInfo(stemp, ligne); return; } --- 602,606 ---- + DicoResource.getS("Les valeurs par défaut sont invalides"), ligne); ! analyze_.getInfoCanal().addMessage(stemp, ligne); return; } *************** *** 613,617 **** + DicoResource.getS("Les valeurs CHOIX sont invalides"), ligne); ! analyze_.addInfo(stemp, ligne); return; } --- 613,617 ---- + DicoResource.getS("Les valeurs CHOIX sont invalides"), ligne); ! analyze_.getInfoCanal().addMessage(stemp, ligne); return; } *************** *** 622,626 **** */ protected DodicoAnalyze read() { ! analyze_= new DodicoAnalyze.Editor(); ArrayList props= new ArrayList(200); HashMap nomLigne_= new HashMap(200); --- 622,626 ---- */ protected DodicoAnalyze read() { ! analyze_= new DodicoAnalyze(); ArrayList props= new ArrayList(200); HashMap nomLigne_= new HashMap(200); *************** *** 657,661 **** //lieu de aide et aide1 if (map.get(currentKey) != null) { ! analyze_.addInfo( DicoResource.getS( "Le champ {0} est présent plusieurs fois", --- 657,661 ---- //lieu de aide et aide1 if (map.get(currentKey) != null) { ! analyze_.getInfoCanal().addMessage( DicoResource.getS( "Le champ {0} est présent plusieurs fois", *************** *** 666,684 **** DicoResource.getS("Ce type d'erreur n'est pas corrigé"), reader_.getLineNumber()); ! analyze_.addInfo( (String)map.get("NOM"), reader_.getLineNumber()); ! return analyze_.toAnalyze(); } else { currentKey += "1"; } if (map.get(currentKey) != null) { ! analyze_.addError( DicoResource.getS("Ce type d'erreur n'est pas corrigé"), reader_); ! analyze_.addInfo( (String)map.get("NOM"), reader_.getLineNumber()); ! return analyze_.toAnalyze(); } } --- 666,684 ---- DicoResource.getS("Ce type d'erreur n'est pas corrigé"), reader_.getLineNumber()); ! analyze_.getInfoCanal().addMessage( (String)map.get("NOM"), reader_.getLineNumber()); ! return analyze_; } else { currentKey += "1"; } if (map.get(currentKey) != null) { ! analyze_.getErrorCanal().addMessage( DicoResource.getS("Ce type d'erreur n'est pas corrigé"), reader_); ! analyze_.getInfoCanal().addMessage( (String)map.get("NOM"), reader_.getLineNumber()); ! return analyze_; } } *************** *** 705,709 **** } } catch (FileNotFoundException e) { ! analyze_.addError( DicoResource.getS("Fichier non trouvé") + ": " --- 705,709 ---- } } catch (FileNotFoundException e) { ! analyze_.getErrorCanal().addMessage( DicoResource.getS("Fichier non trouvé") + ": " *************** *** 712,717 **** e.printStackTrace(); } catch (IOException e1) { ! DodicoAnalyze.manageException(e1, analyze_); ! return analyze_.toAnalyze(); } finally { if (reader_ != null) { --- 712,717 ---- e.printStackTrace(); } catch (IOException e1) { ! analyze_.manageException(e1); ! return analyze_; } finally { if (reader_ != null) { *************** *** 719,724 **** reader_.close(); } catch (IOException _e) { ! DodicoAnalyze.manageException(_e, analyze_); ! return analyze_.toAnalyze(); } } --- 719,724 ---- reader_.close(); } catch (IOException _e) { ! analyze_.manageException(_e); ! return analyze_; } } *************** *** 729,733 **** //Certains mots-cles dependent des autres : on gere cette dependance. computeConditionAffichage(); ! return analyze_.toAnalyze(); } public void setDicoKeyword(DicoKeyword _kw) { --- 729,733 ---- //Certains mots-cles dependent des autres : on gere cette dependance. computeConditionAffichage(); ! return analyze_; } public void setDicoKeyword(DicoKeyword _kw) { Index: DicoCasAbstract.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dico/DicoCasAbstract.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** DicoCasAbstract.java 25 Nov 2003 10:11:27 -0000 1.4 --- DicoCasAbstract.java 12 Feb 2004 15:32:43 -0000 1.5 *************** *** 8,11 **** --- 8,12 ---- */ package org.fudaa.dodico.dico; + import java.util.HashMap; import java.util.HashSet; import java.util.Hashtable; *************** *** 18,21 **** --- 19,23 ---- public class DicoCasAbstract implements DicoCasInterface { private Map list_; + private Map keyCommentaires_; private boolean printKeys_; private boolean printLongKeys_; *************** *** 26,32 **** list_= new Hashtable(100); } ! public DicoCasAbstract(Map _t) { list_= _t; } public synchronized void addKeyValue(DicoEntite _c, String _value) { if (_c == null) --- 28,49 ---- list_= new Hashtable(100); } ! public DicoCasAbstract(Map _t,Map _comment) { list_= _t; + keyCommentaires_=_comment; + } + + public void addCommentaire(DicoEntite _key, String _com) { + if (keyCommentaires_ == null) + keyCommentaires_= new HashMap(); + keyCommentaires_.put(_key, _com); + } + + public String getCommentaire(DicoEntite _e) { + if (keyCommentaires_ == null) + return null; + return (String)keyCommentaires_.get(_e); + } + public synchronized void addKeyValue(DicoEntite _c, String _value) { if (_c == null) *************** *** 116,121 **** * @see org.fudaa.dodico.telemac.io.TelemacCasInterface#getInputs() */ ! public Hashtable getInputs() { ! return new Hashtable(list_); } } --- 133,145 ---- * @see org.fudaa.dodico.telemac.io.TelemacCasInterface#getInputs() */ ! public Map getInputs() { ! return list_; } + /** + * + */ + public Map getComments() { + return keyCommentaires_; + } + } Index: DicoCasFileFormatVersion.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dico/DicoCasFileFormatVersion.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** DicoCasFileFormatVersion.java 25 Nov 2003 10:11:27 -0000 1.8 --- DicoCasFileFormatVersion.java 12 Feb 2004 15:32:43 -0000 1.9 *************** *** 30,33 **** --- 30,36 ---- return '/'; } + public String getCommentString() { + return "/"; + } public int getMaxCharPerLine() { return 72; Index: DicoCasInterface.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dico/DicoCasInterface.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** DicoCasInterface.java 25 Nov 2003 10:11:27 -0000 1.4 --- DicoCasInterface.java 12 Feb 2004 15:32:43 -0000 1.5 *************** *** 8,12 **** */ package org.fudaa.dodico.dico; ! import java.util.Hashtable; import java.util.Set; /** --- 8,12 ---- */ package org.fudaa.dodico.dico; ! import java.util.Map; import java.util.Set; /** *************** *** 24,34 **** public String getValue(DicoEntite _ent); /** * Renvoie les entites sous forme de set. */ public Set getEntiteSet(); /** ! * Renvoie les donnees TrDicoEntite->String */ ! public Hashtable getInputs(); public boolean containsEntite(DicoEntite _e); /** --- 24,43 ---- public String getValue(DicoEntite _ent); /** + * Les commentaires pour le mot-cle _e + */ + public String getCommentaire(DicoEntite _e); + /** * Renvoie les entites sous forme de set. */ public Set getEntiteSet(); /** ! * Renvoie les donnees DicoEntite->String */ ! public Map getInputs(); ! ! /** ! * Renvoie les donnees DicoEntite->String (commentaires) ! */ ! public Map getComments(); public boolean containsEntite(DicoEntite _e); /** Index: DicoCasReader.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dico/DicoCasReader.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** DicoCasReader.java 25 Nov 2003 10:11:27 -0000 1.8 --- DicoCasReader.java 12 Feb 2004 15:32:43 -0000 1.9 *************** *** 14,17 **** --- 14,20 ---- import java.io.LineNumberReader; import java.util.StringTokenizer; + + import org.fudaa.ctulu.CtuluLib; + import org.fudaa.dodico.commun.DodicoAnalyze; import org.fudaa.dodico.fichiers.FileFormatVersion; *************** *** 30,33 **** --- 33,37 ---- StringBuffer valueBuffer_; DicoEntite currentkey_; + StringBuffer commentairesEnCours_; public DicoCasReader(DicoCasFileFormatVersion _t) { ft_= _t; *************** *** 35,39 **** } public void setFile(File _f) { ! analyze_= new DodicoAnalyze.Editor(); analyze_.setRessource(_f.getAbsolutePath()); try { --- 39,43 ---- } public void setFile(File _f) { ! analyze_= new DodicoAnalyze(); analyze_.setRessource(_f.getAbsolutePath()); try { *************** *** 43,46 **** --- 47,54 ---- } } + /** + * Test rapide pour savoir si le fichier _f contient + * des donnees valides. + */ public boolean testFile(File _f) { LineNumberReader l; *************** *** 80,94 **** inter_= new DicoCasAbstract(); currentkey_= null; while ((line= in_.readLine()) != null) { ! //ligne vide ! if (line.trim().length() == 0) ! continue; ! if (quoteEnCours_) { splitLine(line, inter_); } else { //commentaire ! if (line.startsWith("/")) ! continue; ! else if (line.startsWith(ft_.getCommandStop())) { inter_.setCommandStop(true); } else if (line.startsWith(ft_.getCommandStopProgram())) { --- 88,108 ---- inter_= new DicoCasAbstract(); currentkey_= null; + commentairesEnCours_= new StringBuffer(); + //gestion des commentaires. + //pour separer les commentaires on suppose que les lignes vides + //sont des separateurs de commentaires. while ((line= in_.readLine()) != null) { ! //ligne vide on annule les commentaires ! if (line.trim().length() == 0) { ! commentairesEnCours_.setLength(0); ! } else if (quoteEnCours_) { splitLine(line, inter_); } else { //commentaire ! if (line.startsWith("/")) { ! if (commentairesEnCours_.length() > 0) ! commentairesEnCours_.append(CtuluLib.LINE_SEP); ! commentairesEnCours_.append(line.substring(1)); ! } else if (line.startsWith(ft_.getCommandStop())) { inter_.setCommandStop(true); } else if (line.startsWith(ft_.getCommandStopProgram())) { *************** *** 107,111 **** } } catch (IOException _ioe) { ! DodicoAnalyze.manageException(_ioe, analyze_); } if (currentkey_ != null) { --- 121,125 ---- } } catch (IOException _ioe) { ! analyze_.manageException(_ioe); } if (currentkey_ != null) { *************** *** 224,227 **** --- 238,246 ---- in_.getLineNumber()); } + //maj des commentaires + if (commentairesEnCours_.length() > 0) { + _m.addCommentaire(currentkey_, commentairesEnCours_.toString()); + commentairesEnCours_.setLength(0); + } currentkey_= null; } Index: DicoCasWriter.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dico/DicoCasWriter.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** DicoCasWriter.java 12 Dec 2003 10:30:53 -0000 1.7 --- DicoCasWriter.java 12 Feb 2004 15:32:43 -0000 1.8 *************** *** 33,37 **** String enteteFormat_; String enteteRubrique_; ! char com_; /** * @param _ft --- 33,37 ---- String enteteFormat_; String enteteRubrique_; ! String com_; /** * @param _ft *************** *** 39,43 **** public DicoCasWriter(DicoCasFileFormatVersion _ft) { version_= _ft; ! com_= version_.getCommentChar(); commentSep_= com_ --- 39,43 ---- public DicoCasWriter(DicoCasFileFormatVersion _ft) { version_= _ft; ! com_= version_.getCommentString(); commentSep_= com_ *************** *** 108,112 **** progress_.setProgression(95); } catch (IOException _e) { ! DodicoAnalyze.manageException(_e, analyze_); } } --- 108,112 ---- progress_.setProgression(95); } catch (IOException _e) { ! analyze_.manageException(_e); } } *************** *** 151,158 **** ent= _ent[i]; if (!version_.getDico().isKey(ent)) { ! analyze_.addWarning( "Entité inconnue pour ce format" + " " + ent.getNom(), -1); } else { String value= inter.getValue(ent); if (ent.containsStringDataType()) { --- 151,166 ---- ent= _ent[i]; if (!version_.getDico().isKey(ent)) { ! analyze_.addWarn( "Entité inconnue pour ce format" + " " + ent.getNom(), -1); } else { + writeln(); + String com=inter.getCommentaire(ent); + if((com!=null) && (com.trim().length()>0)){ + StringTokenizer t=new StringTokenizer(com,CtuluLib.LINE_SEP); + while(t.hasMoreTokens()){ + writeln(com_+formatToMaxChar(t.nextToken(),com_)); + } + } String value= inter.getValue(ent); if (ent.containsStringDataType()) { Index: DicoDataTypeGenerate.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dico/DicoDataTypeGenerate.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** DicoDataTypeGenerate.java 12 Dec 2003 10:30:53 -0000 1.6 --- DicoDataTypeGenerate.java 12 Feb 2004 15:32:43 -0000 1.7 *************** *** 12,15 **** --- 12,16 ---- import org.fudaa.ctulu.CtuluLib; + import org.fudaa.dodico.commun.DodicoLib; import org.fudaa.dodico.commun.DodicoResource; import org.fudaa.dodico.dico.DicoGenerator.DicoWriter; *************** *** 304,308 **** int n= _s.length - 1; for (int i= n; i >= 0; i--) { ! _s[i]= String.valueOf(Double.parseDouble(_s[i])); } } --- 305,313 ---- int n= _s.length - 1; for (int i= n; i >= 0; i--) { ! if (type_.isValide(_s[i])) { ! _s[i]= _s[i]; ! } else ! throw new IllegalArgumentException( ! "bad default value " + type_ + DodicoLib._printObject(_s, true)); } } Index: DicoEntiteGenerate.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dico/DicoEntiteGenerate.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** DicoEntiteGenerate.java 12 Dec 2003 10:30:53 -0000 1.6 --- DicoEntiteGenerate.java 12 Feb 2004 15:32:43 -0000 1.7 *************** *** 70,76 **** DicoEntiteGenerate[] _entites, List _m, ! DodicoAnalyze.Editor _analyze) { if ((_m != null) && (_m.size() > 0)) { ! _analyze.addError( noms_[0] + CtuluLib.ESPACE --- 70,76 ---- DicoEntiteGenerate[] _entites, List _m, ! DodicoAnalyze _analyze) { if ((_m != null) && (_m.size() > 0)) { ! _analyze.getErrorCanal().addMessage( noms_[0] + CtuluLib.ESPACE *************** *** 350,354 **** DicoEntiteGenerate[] _entites, List _m, ! DodicoAnalyze.Editor _analyze) { if ((_m == null) || (_m.size() <= 0)) return; --- 350,354 ---- DicoEntiteGenerate[] _entites, List _m, ! DodicoAnalyze _analyze) { if ((_m == null) || (_m.size() <= 0)) return; *************** *** 366,370 **** } if (rubrOuEntite == null) { ! _analyze.addWarning( noms_[0] + ": " --- 366,370 ---- } if (rubrOuEntite == null) { ! _analyze.getWarnCanal().addMessage( noms_[0] + ": " *************** *** 379,383 **** stemp= stemp.substring(stemp.indexOf(test) + test.length()); if (stemp.length() <= 0) { ! _analyze.addWarning( noms_[0] + ": " --- 379,383 ---- stemp= stemp.substring(stemp.indexOf(test) + test.length()); if (stemp.length() <= 0) { ! _analyze.getWarnCanal().addMessage( noms_[0] + ": " *************** *** 399,403 **** if ((s.startsWith("#\'")) && (s.indexOf("\' -") > 0)) { number= s.substring(s.indexOf("\' -")).trim(); ! _analyze.addError( noms_[0] + ": " --- 399,403 ---- if ((s.startsWith("#\'")) && (s.indexOf("\' -") > 0)) { number= s.substring(s.indexOf("\' -")).trim(); ! _analyze.getErrorCanal().addMessage( noms_[0] + ": " *************** *** 411,415 **** //il y erreur donc on passe else { ! _analyze.addWarning( noms_[0] + ": " --- 411,415 ---- //il y erreur donc on passe else { ! _analyze.getWarnCanal().addMessage( noms_[0] + ": " *************** *** 421,425 **** } } else { ! _analyze.addWarning( noms_[0] + ": " --- 421,425 ---- } } else { ! _analyze.getWarnCanal().addMessage( noms_[0] + ": " *************** *** 445,449 **** comportData_[index++]= c; } else ! _analyze.addWarning( noms_[0] + ": " --- 445,449 ---- comportData_[index++]= c; } else ! _analyze.getWarnCanal().addMessage( noms_[0] + ": " Index: DicoFactory.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dico/DicoFactory.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** DicoFactory.java 12 Dec 2003 10:30:53 -0000 1.5 --- DicoFactory.java 12 Feb 2004 15:32:43 -0000 1.6 *************** *** 49,69 **** } public DodicoAnalyze analyzeParametres() { ! DodicoAnalyze.Editor r= new DodicoAnalyze.Editor(); if (dico_ == null) { ! r.addError(DicoResource.getS("Fichier dico non spécifié")); } else if (!dico_.exists()) { ! r.addError(DicoResource.getS("Fichier dico non trouvé")); } if (dir_ == null) { r.addError( ! DicoResource.getS("Le répertoire de destination n'est pas spécifié")); } else { if (!dir_.isDirectory()) ! r.addError(DicoResource.getS("La cible n'est pas un répertoire")); } if (packageName_ == null) { ! r.addError(DicoResource.getS("Package de destination non spécifié")); } ! return r.containsErrors() ? r.toAnalyze() : null; } public DodicoAnalyze[] generate() { --- 49,69 ---- } public DodicoAnalyze analyzeParametres() { ! DodicoAnalyze r= new DodicoAnalyze(); if (dico_ == null) { ! r.addError(DicoResource.getS("Fichier dico non spécifié"),0); } else if (!dico_.exists()) { ! r.addError(DicoResource.getS("Fichier dico non trouvé"),0); } if (dir_ == null) { r.addError( ! DicoResource.getS("Le répertoire de destination n'est pas spécifié"),0); } else { if (!dir_.isDirectory()) ! r.addError(DicoResource.getS("La cible n'est pas un répertoire"),0); } if (packageName_ == null) { ! r.addError(DicoResource.getS("Package de destination non spécifié"),0); } ! return r.containsErrors() ? r : null; } public DodicoAnalyze[] generate() { Index: DicoGenerator.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dico/DicoGenerator.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** DicoGenerator.java 12 Dec 2003 10:30:53 -0000 1.7 --- DicoGenerator.java 12 Feb 2004 15:32:43 -0000 1.8 *************** *** 56,60 **** protected static final String varLanguageIndexName__= "languageIndex_"; protected ProgressionInterface progress_; ! private DodicoAnalyze.Editor analyze_; public void setProgressReceiver(ProgressionInterface _progressReceiver) { progress_= _progressReceiver; --- 56,60 ---- protected static final String varLanguageIndexName__= "languageIndex_"; protected ProgressionInterface progress_; ! private DodicoAnalyze analyze_; public void setProgressReceiver(ProgressionInterface _progressReceiver) { progress_= _progressReceiver; *************** *** 276,283 **** + " (" + _s ! + ")"); return false; } - // System.out.println(m.getName()); m.invoke(this, null); return true; --- 276,282 ---- + " (" + _s ! + ")",0); return false; } m.invoke(this, null); return true; *************** *** 379,383 **** if (temp < 0) { analyze_.addError( ! DicoResource.getS("Erreur interne: index non trouvé")); } if (i != 0) { --- 378,382 ---- if (temp < 0) { analyze_.addError( ! DicoResource.getS("Erreur interne: index non trouvé"),0); } if (i != 0) { *************** *** 436,440 **** } public DodicoAnalyze write() { ! analyze_= new DodicoAnalyze.Editor(); analyze_.setDesc(DicoResource.getS("Génération fichier dico")); writeDico(); --- 435,439 ---- } public DodicoAnalyze write() { ! analyze_= new DodicoAnalyze(); analyze_.setDesc(DicoResource.getS("Génération fichier dico")); writeDico(); *************** *** 445,449 **** e.printStackTrace(); } ! return analyze_.toAnalyze(); } /** --- 444,448 ---- e.printStackTrace(); } ! return analyze_; } /** *************** *** 467,471 **** } if (duplicateNameExists()) { ! analyze_.addError(DicoResource.getS("Noms en double")); } File f= new File(dir_, getFileName() + ".java"); --- 466,470 ---- } if (duplicateNameExists()) { ! analyze_.addError(DicoResource.getS("Noms en double"),0); } File f= new File(dir_, getFileName() + ".java"); *************** *** 492,500 **** } } catch (IllegalAccessException _e) { ! DodicoAnalyze.manageException(_e, analyze_); } catch (InvocationTargetException _e) { ! DodicoAnalyze.manageException(_e, analyze_); } catch (IOException _e) { ! DodicoAnalyze.manageException(_e, analyze_); } finally { try { --- 491,499 ---- } } catch (IllegalAccessException _e) { ! analyze_.manageException(_e); } catch (InvocationTargetException _e) { ! analyze_.manageException(_e); } catch (IOException _e) { ! analyze_.manageException(_e); } finally { try { *************** *** 506,510 **** } } catch (IOException _e) { ! DodicoAnalyze.manageException(_e, analyze_); } } --- 505,509 ---- } } catch (IOException _e) { ! analyze_.manageException(_e); } } Index: DicoParams.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dico/DicoParams.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** DicoParams.java 21 Jan 2004 10:59:09 -0000 1.15 --- DicoParams.java 12 Feb 2004 15:32:43 -0000 1.16 *************** *** 38,41 **** --- 38,42 ---- implements DicoEntiteComparator.ComparatorValueInterface, DicoParamsInterface { private Hashtable entitesValues_; + Hashtable entitesCommentaires_; private Set modelListener_; private Set badValues_; *************** *** 46,53 **** private boolean isModified_; private Map loadedEntiteState_; /** * */ ! public DicoParams(Map _inits, DicoCasFileFormatVersionAbstract _dico) { entitesValues_= (_inits == null ? new Hashtable() : new Hashtable(_inits)); ft_= _dico; --- 47,63 ---- private boolean isModified_; private Map loadedEntiteState_; + + public DicoParams( + DicoCasInterface _i, + DicoCasFileFormatVersionAbstract _dico) { + this(_i.getInputs(), _i.getComments(), _dico); + } /** * */ ! public DicoParams( ! Map _inits, ! Map _keysCommentaire, ! DicoCasFileFormatVersionAbstract _dico) { entitesValues_= (_inits == null ? new Hashtable() : new Hashtable(_inits)); ft_= _dico; *************** *** 57,62 **** } entitesFiles_= ft_.getDico().getFichierEntitesFor(entitesValues_); ! if(entitesFiles_==null) entitesFiles_=new HashSet(20); computeValide(); } public int getEntiteFileNb() { --- 67,75 ---- } entitesFiles_= ft_.getDico().getFichierEntitesFor(entitesValues_); ! if (entitesFiles_ == null) ! entitesFiles_= new HashSet(20); computeValide(); + if (_keysCommentaire != null) + entitesCommentaires_= new Hashtable(_keysCommentaire); } public int getEntiteFileNb() { *************** *** 64,67 **** --- 77,113 ---- } + /** + * Renvoie le commentaire pour le mot-cle e ou null si aucun commentaire. + */ + public String getComment(DicoEntite _e) { + return (entitesCommentaires_ == null) + ? null + : (String)entitesCommentaires_.get(_e); + } + + public Map getCommentMap(){ + return (entitesCommentaires_ == null) + ? null + : new Hashtable(entitesCommentaires_); + } + + /** + * Les commentaires ne sont pris en compte que si la valeur est modifiee. + */ + public void setComment(DicoEntite _e, String _s) { + if (isValueSetFor(_e)) { + if (entitesCommentaires_ == null) + entitesCommentaires_= new Hashtable(); + if ((!entitesCommentaires_.contains(_e)) + || !entitesCommentaires_.get(_e).equals(_s)) { + entitesCommentaires_.put(_e, _s); + //DEBUG to remove + System.err.println("saveCommentYes"); + isModified_= true; + fireProjectModifyStateChanged(); + } + } + } + public void setDicoEntiteMustBeEmpty(DicoEntite _e, boolean _b) { if (_b) { *************** *** 219,224 **** if (!isValueSetFor(ent)) { l.add(ent); - //DEBUG A ENLEVER - System.out.println("ent to save " + ent.getNom()); } } --- 265,268 ---- *************** *** 366,372 **** return ft_.getDico(); } ! public DicoCasInterface getDicoCasInterface() { ! return new DicoCasAbstract(getEntiteValues()); ! } public boolean contains(DicoEntite _ent) { return entitesValues_.contains(_ent); --- 410,420 ---- return ft_.getDico(); } ! // public DicoCasInterface getDicoCasInterface() { ! // return new DicoCasAbstract( ! // getEntiteValues(), ! // (entitesCommentaires_ == null ! // ? null ! // : new HashMap(entitesCommentaires_))); ! // } public boolean contains(DicoEntite _ent) { return entitesValues_.contains(_ent); *************** *** 408,412 **** */ public final String getValue(DicoEntite _ent) { ! if(_ent==null) return null; String r= (String)entitesValues_.get(_ent); if (r == null) --- 456,461 ---- */ public final String getValue(DicoEntite _ent) { ! if (_ent == null) ! return null; String r= (String)entitesValues_.get(_ent); if (r == null) *************** *** 424,428 **** */ public final boolean isValueSetFor(DicoEntite _ent) { ! return entitesValues_.containsKey(_ent); } /** --- 473,478 ---- */ public final boolean isValueSetFor(DicoEntite _ent) { ! ! return _ent == null ? false : entitesValues_.containsKey(_ent); } /** *************** *** 436,440 **** */ public final boolean removeValue(DicoEntite _ent) { ! if(_ent==null) return false; if (entitesValues_.containsKey(_ent)) { String old= getValue(_ent); --- 486,491 ---- */ public final boolean removeValue(DicoEntite _ent) { ! if (_ent == null) ! return false; if (entitesValues_.containsKey(_ent)) { String old= getValue(_ent); *************** *** 449,453 **** final DicoEntite _ent, final String _value) { ! if(_ent==null) return null; final String old= getValue(_ent); boolean b= _setValue(_ent, _value); --- 500,505 ---- final DicoEntite _ent, final String _value) { ! if (_ent == null) ! return null; final String old= getValue(_ent); boolean b= _setValue(_ent, _value); *************** *** 465,478 **** } public DodicoCommand removeValueAndGenerateCommand(final DicoEntite _ent) { ! if(_ent==null) return null; final String old= getValue(_ent); boolean b= removeValue(_ent); if (b) { return new DodicoCommand() { public void redo() { removeValue(_ent); } public void undo() { _setValue(_ent, old); } }; --- 517,545 ---- } public DodicoCommand removeValueAndGenerateCommand(final DicoEntite _ent) { ! if (_ent == null) ! return null; final String old= getValue(_ent); + final String oldCommentaire= getComment(_ent); + //il faut enlever d'abord le commentaire pour que l'evenement + //soit envoye avec le bon commentaire ! + if (entitesCommentaires_ != null) + entitesCommentaires_.remove(_ent); + final boolean com= + (oldCommentaire != null) && (oldCommentaire.trim().length() > 0); boolean b= removeValue(_ent); + if (b) { return new DodicoCommand() { public void redo() { + if (com && (entitesCommentaires_ != null)) + entitesCommentaires_.remove(_ent); removeValue(_ent); + } public void undo() { + if (com && (entitesCommentaires_ != null)) + entitesCommentaires_.put(_ent, oldCommentaire); _setValue(_ent, old); + } }; *************** *** 691,695 **** } } ! public DicoCasAbstract createCasWriterInterface(String _casFileName) { Map m= getEntiteValues(); if (casFileEntite_ != null) { --- 758,762 ---- } } ! public DicoCasInterface createCasWriterInterface(String _casFileName) { Map m= getEntiteValues(); if (casFileEntite_ != null) { *************** *** 697,702 **** m.put(casFileEntite_, _casFileName); } ! DicoCasAbstract inter= new DicoCasAbstract(m); ! return inter; } /** --- 764,772 ---- m.put(casFileEntite_, _casFileName); } ! return new DicoCasAbstract( ! m, ! (entitesCommentaires_ == null ! ? null ! : new HashMap(entitesCommentaires_))); } /** Index: DicoParamsInterface.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dico/DicoParamsInterface.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DicoParamsInterface.java 25 Nov 2003 10:11:30 -0000 1.3 --- DicoParamsInterface.java 12 Feb 2004 15:32:43 -0000 1.4 *************** *** 51,58 **** public abstract DicoCasFileFormat getDicoFileFormat(); public abstract DicoModelAbstract getDico(); ! public abstract DicoCasInterface getDicoCasInterface(); public abstract boolean contains(DicoEntite _ent); public abstract Set getEntiteFileSetList(); public abstract boolean isValide(); /** * --- 51,59 ---- public abstract DicoCasFileFormat getDicoFileFormat(); public abstract DicoModelAbstract getDico(); ! //public abstract DicoCasInterface getDicoCasInterface(); public abstract boolean contains(DicoEntite _ent); public abstract Set getEntiteFileSetList(); public abstract boolean isValide(); + public abstract String getComment(DicoEntite _e); /** * |
From: <de...@us...> - 2004-02-12 15:38:17
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/fichiers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20934/fichiers Modified Files: FileOpReadCharSimpleAbstract.java FileOpWriterCharSimpleAbstract.java FileOperationAbstract.java FileOperationSynthese.java FileReadOperationAbstract.java FileWriteOperationAbstract.java Log Message: Maj version 0.05 prepro Index: FileOpReadCharSimpleAbstract.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/fichiers/FileOpReadCharSimpleAbstract.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** FileOpReadCharSimpleAbstract.java 25 Nov 2003 10:11:34 -0000 1.5 --- FileOpReadCharSimpleAbstract.java 12 Feb 2004 15:32:44 -0000 1.6 *************** *** 25,34 **** extends FileReadOperationAbstract { protected FortranReader in_; public void setFile(File _f) { ! analyze_= new DodicoAnalyze.Editor(); analyze_.setRessource(_f.getAbsolutePath()); FileReader r= null; try { r= new FileReader(_f); } catch (FileNotFoundException _e) { analyze_.addFatalError(DodicoResource.getS("Fichier inconnu")); --- 25,36 ---- extends FileReadOperationAbstract { protected FortranReader in_; + public void setFile(File _f) { ! analyze_= new DodicoAnalyze(); analyze_.setRessource(_f.getAbsolutePath()); FileReader r= null; try { r= new FileReader(_f); + processFile(_f); } catch (FileNotFoundException _e) { analyze_.addFatalError(DodicoResource.getS("Fichier inconnu")); *************** *** 37,40 **** --- 39,46 ---- setFile(r); } + + protected void processFile(File _f){ + + } public final void setFile(File[] _f) { setFile(_f[0]); Index: FileOpWriterCharSimpleAbstract.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/fichiers/FileOpWriterCharSimpleAbstract.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** FileOpWriterCharSimpleAbstract.java 12 Dec 2003 10:30:53 -0000 1.5 --- FileOpWriterCharSimpleAbstract.java 12 Feb 2004 15:32:44 -0000 1.6 *************** *** 60,64 **** } public final void setFile(File _f) { ! analyze_= new DodicoAnalyze.Editor(); analyze_.setRessource(_f.getAbsolutePath()); FileWriter out= null; --- 60,64 ---- } public final void setFile(File _f) { ! analyze_= new DodicoAnalyze(); analyze_.setRessource(_f.getAbsolutePath()); FileWriter out= null; Index: FileOperationAbstract.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/fichiers/FileOperationAbstract.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** FileOperationAbstract.java 12 Dec 2003 10:30:53 -0000 1.6 --- FileOperationAbstract.java 12 Feb 2004 15:32:44 -0000 1.7 *************** *** 27,31 **** public abstract class FileOperationAbstract { protected ProgressionInterface progress_; ! protected DodicoAnalyze.Editor analyze_; public void setProgressReceiver(ProgressionInterface _progressReceiver) { progress_= _progressReceiver; --- 27,31 ---- public abstract class FileOperationAbstract { protected ProgressionInterface progress_; ! protected DodicoAnalyze analyze_; public void setProgressReceiver(ProgressionInterface _progressReceiver) { progress_= _progressReceiver; *************** *** 34,38 **** protected abstract FortranInterface getFortranInterface(); public abstract void setFile(File _f); ! public abstract FileFormatVersion getVersion(); protected final FileOperationSynthese closeOperation(Object _o) { FileOperationSynthese r= new FileOperationSynthese(); --- 34,38 ---- protected abstract FortranInterface getFortranInterface(); public abstract void setFile(File _f); ! // public abstract FileFormatVersion getVersion(); protected final FileOperationSynthese closeOperation(Object _o) { FileOperationSynthese r= new FileOperationSynthese(); *************** *** 41,49 **** r.setFileOp(out); analyze_.setDesc( ! getOperationDescription() ! + CtuluLib.EMPTY_STRING ! + DodicoResource.getS("Format") ! + ": " ! + getVersion()); r.setAnalyze(analyze_); r.setSource(_o); --- 41,46 ---- r.setFileOp(out); analyze_.setDesc( ! getOperationDescription()); ! r.setAnalyze(analyze_); r.setSource(_o); Index: FileOperationSynthese.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/fichiers/FileOperationSynthese.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** FileOperationSynthese.java 25 Nov 2003 10:11:34 -0000 1.6 --- FileOperationSynthese.java 12 Feb 2004 15:32:44 -0000 1.7 *************** *** 19,28 **** public class FileOperationSynthese { private String exClose_; ! private DodicoAnalyze.Editor analyze_; FortranInterface fileOp_; private Object source_; public void printAnalyze() { if (analyze_ != null) ! analyze_.toAnalyze().printResume(); else System.out.println("No error"); --- 19,28 ---- public class FileOperationSynthese { private String exClose_; ! private DodicoAnalyze analyze_; FortranInterface fileOp_; private Object source_; public void printAnalyze() { if (analyze_ != null) ! analyze_.printResume(); else System.out.println("No error"); *************** *** 36,40 **** // } public FileOperationSynthese() {} ! public DodicoAnalyze.Editor getAnalyze() { return analyze_; } --- 36,40 ---- // } public FileOperationSynthese() {} ! public DodicoAnalyze getAnalyze() { return analyze_; } *************** *** 81,85 **** * */ ! public void setAnalyze(DodicoAnalyze.Editor _editor) { analyze_= _editor; } --- 81,85 ---- * */ ! public void setAnalyze(DodicoAnalyze _editor) { analyze_= _editor; } Index: FileReadOperationAbstract.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/fichiers/FileReadOperationAbstract.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** FileReadOperationAbstract.java 12 Dec 2003 10:30:53 -0000 1.5 --- FileReadOperationAbstract.java 12 Feb 2004 15:32:44 -0000 1.6 *************** *** 21,30 **** protected abstract Object _read(); /** ! * */ public final FileOperationSynthese read() { if (progress_ != null) ! progress_.setDesc( ! getOperationDescription() + CtuluLib.ESPACE + getVersion()); return closeOperation(_read()); } --- 21,30 ---- protected abstract Object _read(); /** ! * lit le fichier et ferme le flux. Pour recuperer les donnees, ! * il suffit d'utiliser getSource. */ public final FileOperationSynthese read() { if (progress_ != null) ! progress_.setDesc(getOperationDescription()); return closeOperation(_read()); } *************** *** 40,44 **** */ protected String getOperationDescription() { ! return DodicoResource.getS("Lecture"); } } --- 40,46 ---- */ protected String getOperationDescription() { ! return DodicoResource.getS("Lecture") ! + CtuluLib.EMPTY_STRING ! + analyze_.getResource(); } } Index: FileWriteOperationAbstract.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/fichiers/FileWriteOperationAbstract.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** FileWriteOperationAbstract.java 12 Dec 2003 10:30:53 -0000 1.6 --- FileWriteOperationAbstract.java 12 Feb 2004 15:32:44 -0000 1.7 *************** *** 26,31 **** public final FileOperationSynthese write(Object _o) { if (progress_ != null) ! progress_.setDesc( ! getOperationDescription() + CtuluLib.ESPACE + getVersion()); _write(_o); return closeOperation(_o); --- 26,30 ---- public final FileOperationSynthese write(Object _o) { if (progress_ != null) ! progress_.setDesc(getOperationDescription()); _write(_o); return closeOperation(_o); *************** *** 43,51 **** */ protected String getOperationDescription() { ! return DodicoResource.getS("Ecriture"); } protected void _donneesInvalides(Object _o) { analyze_.addFatalError(DodicoResource.getS("Données invalides")); ! analyze_.addInfo(_o.getClass().toString()); } } --- 42,52 ---- */ protected String getOperationDescription() { ! return DodicoResource.getS("Ecriture") ! + CtuluLib.EMPTY_STRING ! + analyze_.getResource(); } protected void _donneesInvalides(Object _o) { analyze_.addFatalError(DodicoResource.getS("Données invalides")); ! analyze_.addInfo(_o.getClass().toString(), 0); } } |
From: <de...@us...> - 2004-02-12 15:38:16
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/fortran In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20934/fortran Modified Files: CsvReader.java FortranReader.java Added Files: CsvDoubleReader.java Log Message: Maj version 0.05 prepro --- NEW FILE: CsvDoubleReader.java --- (This appears to be a binary file; contents omitted.) Index: CsvReader.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/fortran/CsvReader.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** CsvReader.java 25 Nov 2003 10:11:34 -0000 1.6 --- CsvReader.java 12 Feb 2004 15:32:44 -0000 1.7 *************** *** 123,143 **** return r; } ! public static void main(String[] _args) { ! try { ! CsvReader rin= new CsvReader(new FileReader(_args[0])); ! rin.readFields(2); ! while (true) { ! rin.readFields(2); ! System.out.println( ! "" ! + rin.getLineNumber() ! + ": " ! + rin.doubleField(0) ! + " " ! + rin.doubleField(1)); ! } ! } catch (EOFException ex) {} catch (Exception ex) { ! ex.printStackTrace(); ! } ! } } --- 123,126 ---- return r; } ! } Index: FortranReader.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/fortran/FortranReader.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** FortranReader.java 25 Nov 2003 10:11:34 -0000 1.10 --- FortranReader.java 12 Feb 2004 15:32:44 -0000 1.11 *************** *** 127,130 **** --- 127,142 ---- commentChar_= _c; } + + private boolean jumpCommentLine_; + /** + * Si true, les lignes commencant par un commentaire + * seront ignoree lors d'un readField. + * ATTENTION : ne marche qui se setCommentInOneField a ete + * appele avec une valeur non nulle. + */ + public void setJumpCommentLine(boolean _b){ + jumpCommentLine_=_b; + + } /** * Retourne l'état de l'équivalence champ blanc/Zero *************** *** 232,238 **** } } if (commentChar_ != null) { if (line.startsWith(commentChar_)) { ! fields= new String[] { line }; return; } --- 244,259 ---- } } + //si le caractere de commentaire a ete defini if (commentChar_ != null) { + //si la ligne commence par le caractere if (line.startsWith(commentChar_)) { ! //on veut ignorer les lignes de commentaire ! if(jumpCommentLine_){ ! this.readFields(); ! } ! //on stocke la ligne ... ! else{ ! fields= new String[] { line }; ! } return; } |
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dunes/io In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20934/dunes/io Modified Files: DunesAdapter.java DunesFileFormat.java DunesInterface.java DunesReader.java DunesWriter.java Log Message: Maj version 0.05 prepro Index: DunesAdapter.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dunes/io/DunesAdapter.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** DunesAdapter.java 25 Nov 2003 10:11:31 -0000 1.5 --- DunesAdapter.java 12 Feb 2004 15:32:44 -0000 1.6 *************** *** 9,13 **** package org.fudaa.dodico.dunes.io; import org.fudaa.dodico.corba.geometrie.SMaillageIndex; ! import org.fudaa.dodico.h2d.H2dGrid; /** * --- 9,16 ---- package org.fudaa.dodico.dunes.io; import org.fudaa.dodico.corba.geometrie.SMaillageIndex; ! ! import org.fudaa.dodico.ef.EfGrid; ! import org.fudaa.dodico.ef.EfGridSourcesAbstract; ! import org.fudaa.dodico.fichiers.FileFormat; /** * *************** *** 15,25 **** * @version $Id$ */ ! public class DunesAdapter implements DunesInterface { ! H2dGrid maillage_; double[] adaptatif_; /** * @see org.fudaa.dodico.tr.reflux.DunesInterface#getMaillage() */ ! public H2dGrid getMaillage() { return maillage_; } --- 18,28 ---- * @version $Id$ */ ! public class DunesAdapter extends EfGridSourcesAbstract implements DunesInterface { ! EfGrid maillage_; double[] adaptatif_; /** * @see org.fudaa.dodico.tr.reflux.DunesInterface#getMaillage() */ ! public EfGrid getGrid() { return maillage_; } *************** *** 41,46 **** * @param maillage The maillage to set */ ! public void setMaillage(H2dGrid maillage) { maillage_= maillage; } } --- 44,56 ---- * @param maillage The maillage to set */ ! public void setMaillage(EfGrid maillage) { maillage_= maillage; } + /** + * + */ + public FileFormat getFileFormat() { + return DunesFileFormat.getInstance(); + } + } Index: DunesFileFormat.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dunes/io/DunesFileFormat.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** DunesFileFormat.java 19 Dec 2003 12:10:36 -0000 1.11 --- DunesFileFormat.java 12 Feb 2004 15:32:44 -0000 1.12 *************** *** 11,14 **** --- 11,18 ---- import org.fudaa.dodico.commun.ProgressionInterface; + import org.fudaa.dodico.ef.EfGrid; + import org.fudaa.dodico.ef.EfGridSource; + import org.fudaa.dodico.ef.EfLib; + import org.fudaa.dodico.ef.FileFormatGridVersion; import org.fudaa.dodico.fichiers.FileFormat; import org.fudaa.dodico.fichiers.FileFormatSoftware; *************** *** 17,22 **** import org.fudaa.dodico.fichiers.FileReadOperationAbstract; import org.fudaa.dodico.fichiers.FileWriteOperationAbstract; - import org.fudaa.dodico.h2d.H2dFileFormatMaillageVersion; - import org.fudaa.dodico.h2d.H2dGrid; import org.fudaa.dodico.h2d.H2dResource; import org.fudaa.dodico.h2d.type.H2dFileFormatType; --- 21,24 ---- *************** *** 35,39 **** private DunesFileFormat() { super(NB_FILE); ! extensions_= new String[] { "mail","geo" }; ID_= "DUNES"; nom_= "Dunes"; --- 37,41 ---- private DunesFileFormat() { super(NB_FILE); ! extensions_= new String[] { "mail", "geo" }; ID_= "DUNES"; nom_= "Dunes"; *************** *** 51,56 **** return LAST_VERSION; } ! ! public FileFormatVersion getLastVersionInstance(){ return getLastVersionImpl(); } --- 53,58 ---- return LAST_VERSION; } ! ! public FileFormatVersion getLastVersionInstance() { return getLastVersionImpl(); } *************** *** 61,65 **** public class DunesVersion extends FileFormatVersion ! implements H2dFileFormatMaillageVersion { /** * Returns the aDAPTATIF. --- 63,67 ---- public class DunesVersion extends FileFormatVersion ! implements FileFormatGridVersion { /** * Returns the aDAPTATIF. *************** *** 113,117 **** public FileOperationSynthese writeGrid( File _f, ! H2dGrid _m, ProgressionInterface _prog) { DunesAdapter inter= new DunesAdapter(); --- 115,119 ---- public FileOperationSynthese writeGrid( File _f, ! EfGrid _m, ProgressionInterface _prog) { DunesAdapter inter= new DunesAdapter(); *************** *** 119,122 **** --- 121,132 ---- return write(_f, inter, _prog); } + + public FileOperationSynthese writeGrid( + File _f, + EfGridSource _m, + ProgressionInterface _prog) { + return writeGrid(_f, _m.getGrid(), _prog); + } + /** * *************** *** 125,133 **** File _f, ProgressionInterface _prog) { ! FileOperationSynthese f= read(_f, _prog); ! DunesInterface interf= (DunesInterface)f.getSource(); ! if (interf != null) ! f.setSource(interf.getMaillage()); ! return f; } --- 135,139 ---- File _f, ProgressionInterface _prog) { ! return read(_f, _prog); } *************** *** 139,142 **** --- 145,159 ---- } + /** + * + */ + public FileOperationSynthese readListPoint( + File _f, + ProgressionInterface _prog) { + FileOperationSynthese s= readGrid(_f, _prog); + s.setSource(((EfGridSource)s.getSource()).getGrid()); + return s; + } + } } Index: DunesInterface.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dunes/io/DunesInterface.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** DunesInterface.java 25 Nov 2003 10:11:32 -0000 1.5 --- DunesInterface.java 12 Feb 2004 15:32:44 -0000 1.6 *************** *** 9,13 **** package org.fudaa.dodico.dunes.io; import org.fudaa.dodico.corba.geometrie.SMaillageIndex; ! import org.fudaa.dodico.h2d.H2dGrid; /** * --- 9,15 ---- package org.fudaa.dodico.dunes.io; import org.fudaa.dodico.corba.geometrie.SMaillageIndex; ! ! import org.fudaa.dodico.ef.EfGrid; ! import org.fudaa.dodico.ef.EfGridSource; /** * *************** *** 15,23 **** * @version $Id$ */ ! public interface DunesInterface { /** * Renvoie le maillage. */ ! H2dGrid getMaillage(); /** * Des valeurs sont ajoutes a chaque noeud pour un maillage adaptatif. --- 17,25 ---- * @version $Id$ */ ! public interface DunesInterface extends EfGridSource{ /** * Renvoie le maillage. */ ! EfGrid getGrid(); /** * Des valeurs sont ajoutes a chaque noeud pour un maillage adaptatif. Index: DunesReader.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dunes/io/DunesReader.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** DunesReader.java 12 Dec 2003 10:30:53 -0000 1.12 --- DunesReader.java 12 Feb 2004 15:32:44 -0000 1.13 *************** *** 14,24 **** import org.fudaa.dodico.commun.DodicoAnalyze; import org.fudaa.dodico.fichiers.FileFormat; import org.fudaa.dodico.fichiers.FileFormatVersion; import org.fudaa.dodico.fichiers.FileOpReadCharSimpleAbstract; - import org.fudaa.dodico.h2d.H2dElement; - import org.fudaa.dodico.h2d.H2dGrid; - import org.fudaa.dodico.h2d.H2dLib; - import org.fudaa.dodico.h2d.H2dPoint; import org.fudaa.dodico.h2d.H2dResource; /** --- 14,25 ---- import org.fudaa.dodico.commun.DodicoAnalyze; + import org.fudaa.dodico.commun.DodicoLib; + import org.fudaa.dodico.ef.EfElement; + import org.fudaa.dodico.ef.EfGrid; + import org.fudaa.dodico.ef.EfLib; + import org.fudaa.dodico.ef.EfNode; import org.fudaa.dodico.fichiers.FileFormat; import org.fudaa.dodico.fichiers.FileFormatVersion; import org.fudaa.dodico.fichiers.FileOpReadCharSimpleAbstract; import org.fudaa.dodico.h2d.H2dResource; /** *************** *** 44,49 **** private DunesInterface readDunes() { DunesAdapter source_= null; ! H2dPoint[] points= null; ! H2dElement[] elems= null; double[] adaptatifs= null; in_.setJumpBlankLine(true); --- 45,50 ---- private DunesInterface readDunes() { DunesAdapter source_= null; ! EfNode[] points= null; ! EfElement[] elems= null; double[] adaptatifs= null; in_.setJumpBlankLine(true); *************** *** 82,86 **** } //Creation du tableau de point. ! points= new H2dPoint[nbNoeuds]; // maillage.points = points; int pourc= 0; --- 83,87 ---- } //Creation du tableau de point. ! points= new EfNode[nbNoeuds]; // maillage.points = points; int pourc= 0; *************** *** 88,92 **** if (afficheAvance) progress_.setProgression(pourc); ! int step= H2dLib.getStep(nbNoeuds); int pourcStep= (int) (50 / step); int pas= (int) (nbNoeuds / step); --- 89,93 ---- if (afficheAvance) progress_.setProgression(pourc); ! int step= DodicoLib.getStep(nbNoeuds); int pourcStep= (int) (50 / step); int pas= (int) (nbNoeuds / step); *************** *** 115,119 **** } points[i]= ! new H2dPoint( in_.doubleField(1), in_.doubleField(2), --- 116,120 ---- } points[i]= ! new EfNode( in_.doubleField(1), in_.doubleField(2), *************** *** 122,126 **** in_.readFields(); if (in_.getNumberOfFields() != 1) { ! analyze_.addWarning( H2dResource.getS( "La ligne du coefficient adaptatif ne doit contenir qu'un champ"), --- 123,127 ---- in_.readFields(); if (in_.getNumberOfFields() != 1) { ! analyze_.addWarn( H2dResource.getS( "La ligne du coefficient adaptatif ne doit contenir qu'un champ"), *************** *** 158,164 **** } int nbElem= in_.intField(0); ! elems= new H2dElement[nbElem]; //Les donnees utiles pour l'etat d'avancement ! step= H2dLib.getStep(nbElem); pas= (int) (nbElem / step); pMax= pas; --- 159,165 ---- } int nbElem= in_.intField(0); ! elems= new EfElement[nbElem]; //Les donnees utiles pour l'etat d'avancement ! step= DodicoLib.getStep(nbElem); pas= (int) (nbElem / step); pMax= pas; *************** *** 214,218 **** index[j]= in_.intField(2 + j) - 1; } ! elems[i]= new H2dElement(index); if (afficheAvance) { if (i > pMax) { --- 215,219 ---- index[j]= in_.intField(2 + j) - 1; } ! elems[i]= new EfElement(index); if (afficheAvance) { if (i > pMax) { *************** *** 226,230 **** if (!"0 0 0 0".equals(in_.getLine().trim())) { if (in_.getLine().trim() != "") ! analyze_.addWarning( H2dResource.getS("Cette ligne et les suivantes sont ignorées"), in_); --- 227,231 ---- if (!"0 0 0 0".equals(in_.getLine().trim())) { if (in_.getLine().trim() != "") ! analyze_.addWarn( H2dResource.getS("Cette ligne et les suivantes sont ignorées"), in_); *************** *** 232,236 **** in_.readFields(); if (in_.getLine().trim() != "") ! analyze_.addWarning( H2dResource.getS("Cette ligne et les suivantes sont ignorées"), in_); --- 233,237 ---- in_.readFields(); if (in_.getLine().trim() != "") ! analyze_.addWarn( H2dResource.getS("Cette ligne et les suivantes sont ignorées"), in_); *************** *** 239,248 **** CtuluLib.debug("Dunes Read end"); } catch (NumberFormatException fe) { ! DodicoAnalyze.manageException(fe, analyze_, in_); } catch (IOException _e) { ! DodicoAnalyze.manageException(_e, analyze_); } //Le mot clef noeud est trouve, on peut creer le maillage. ! H2dGrid maillage= new H2dGrid(points, elems); source_= new DunesAdapter(); source_.setMaillage(maillage); --- 240,250 ---- CtuluLib.debug("Dunes Read end"); } catch (NumberFormatException fe) { ! analyze_.manageException(fe, in_); } catch (IOException _e) { ! analyze_.manageException(_e); } //Le mot clef noeud est trouve, on peut creer le maillage. ! EfGrid maillage= new EfGrid(points, elems); ! EfLib.orienteGrid(maillage, progress_, true, analyze_); source_= new DunesAdapter(); source_.setMaillage(maillage); Index: DunesWriter.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dunes/io/DunesWriter.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** DunesWriter.java 11 Dec 2003 12:41:27 -0000 1.11 --- DunesWriter.java 12 Feb 2004 15:32:44 -0000 1.12 *************** *** 9,23 **** package org.fudaa.dodico.dunes.io; import java.io.IOException; import org.fudaa.dodico.commun.DodicoAnalyze; import org.fudaa.dodico.commun.DodicoLib; import org.fudaa.dodico.commun.DodicoResource; import org.fudaa.dodico.fichiers.FileFormat; import org.fudaa.dodico.fichiers.FileFormatVersion; import org.fudaa.dodico.fichiers.FileOpWriterCharSimpleAbstract; import org.fudaa.dodico.fichiers.FileOperationSynthese; - import org.fudaa.dodico.h2d.H2dElement; - import org.fudaa.dodico.h2d.H2dLib; - import org.fudaa.dodico.h2d.H2dGrid; - import org.fudaa.dodico.h2d.H2dPoint; import org.fudaa.dodico.h2d.H2dResource; /** --- 9,23 ---- package org.fudaa.dodico.dunes.io; import java.io.IOException; + import org.fudaa.dodico.commun.DodicoAnalyze; import org.fudaa.dodico.commun.DodicoLib; import org.fudaa.dodico.commun.DodicoResource; + import org.fudaa.dodico.ef.EfElement; + import org.fudaa.dodico.ef.EfGrid; + import org.fudaa.dodico.ef.EfNode; import org.fudaa.dodico.fichiers.FileFormat; import org.fudaa.dodico.fichiers.FileFormatVersion; import org.fudaa.dodico.fichiers.FileOpWriterCharSimpleAbstract; import org.fudaa.dodico.fichiers.FileOperationSynthese; import org.fudaa.dodico.h2d.H2dResource; /** *************** *** 54,58 **** return; } ! H2dGrid maillage= dunes_.getMaillage(); if (maillage == null) { analyze_.addFatalError("Le maillage est nul"); --- 54,58 ---- return; } ! EfGrid maillage= dunes_.getGrid(); if (maillage == null) { analyze_.addFatalError("Le maillage est nul"); *************** *** 100,108 **** progress_.setDesc(H2dResource.getS("Ecriture fichier") + " dunes"); } ! int step= H2dLib.getStep(nPts); int pas= (int) (nPts / step); int pMax= pas; int pourcStep= (int) (50 / step); ! H2dPoint pt; try { for (int i= 0; i < nPts; i++) { --- 100,108 ---- progress_.setDesc(H2dResource.getS("Ecriture fichier") + " dunes"); } ! int step= DodicoLib.getStep(nPts); int pas= (int) (nPts / step); int pMax= pas; int pourcStep= (int) (50 / step); ! EfNode pt; try { for (int i= 0; i < nPts; i++) { *************** *** 138,147 **** b.append(lineSep_); //pour afficher l'etat d'avancement ! step= H2dLib.getStep(nElems); pas= (int) (nElems / step); pMax= pas; pourcStep= (int) (50 / step); //les points par elements ! H2dElement ppel; //le nombre de points par elements. int nppel; --- 138,147 ---- b.append(lineSep_); //pour afficher l'etat d'avancement ! step= DodicoLib.getStep(nElems); pas= (int) (nElems / step); pMax= pas; pourcStep= (int) (50 / step); //les points par elements ! EfElement ppel; //le nombre de points par elements. int nppel; *************** *** 173,177 **** out_.flush(); } catch (IOException _ex) { ! DodicoAnalyze.manageException(_ex, analyze_); } return; --- 173,177 ---- out_.flush(); } catch (IOException _ex) { ! analyze_.manageException(_ex); } return; |
From: <de...@us...> - 2004-02-12 15:38:15
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/commun In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20934/commun Modified Files: DodicoAnalyze.java DodicoLib.java ProgressionBuAdapter.java ProgressionDodicoAdapter.java ProgressionInterface.java ProgressionTestAdapter.java dodico_en.fr_txt Added Files: DodicoEnumType.java ProgressionUpdater.java Log Message: Maj version 0.05 prepro --- NEW FILE: DodicoEnumType.java --- /* * @file H2dEnumType.java * @creation 26 juin 2003 * @modification $Date: 2004/02/12 15:32:43 $ * @license GNU General Public License 2 * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne * @mail de...@fu... */ package org.fudaa.dodico.commun; import java.util.Comparator; import java.util.Iterator; import java.util.List; /** * @author deniger * @version $Id: DodicoEnumType.java,v 1.1 2004/02/12 15:32:43 deniger Exp $ */ public class DodicoEnumType implements Comparable { int id_; String nom_; /** * */ public DodicoEnumType(int _id, String _nom) { id_= _id; nom_= _nom; } public String getNom() { return nom_; } public String toString() { return nom_; } public int getId() { return id_; } public boolean equals(Object _o) { if (_o == this) return true; if (!(getClass().isInstance(_o))) { return false; } return id_ == ((DodicoEnumType)_o).id_; } /** * Compare selon le nom de le nom de l'enumeration */ public int compareTo(Object o) { if (o == this) return 0; if (o instanceof DodicoEnumType) { return nom_.compareTo(((DodicoEnumType)o).nom_); } else throw new IllegalArgumentException("compareTo " + getClass().getName()); } public static DodicoEnumType getIdInList(List _l, int _id) { for (Iterator it= _l.iterator(); it.hasNext();) { DodicoEnumType e= (DodicoEnumType)it.next(); if (e.id_ == _id) return e; } return null; } public static class H2dEnumIDComparator implements Comparator{ /** * */ public int compare(Object o1, Object o2) { if( (o1 instanceof DodicoEnumType) && (o2 instanceof DodicoEnumType)){ return ((DodicoEnumType)o1).id_-((DodicoEnumType)o2).id_; } throw new IllegalArgumentException("o1 and o2 must be H2dEnumType"); } } } --- NEW FILE: ProgressionUpdater.java --- /* * @file ProgressionUpdater.java * @creation 28 janv. 2004 * @modification $Date: 2004/02/12 15:32:43 $ * @license GNU General Public License 2 * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne * @mail de...@fu... */ package org.fudaa.dodico.commun; /** * Cette classe permet de mettre a jour automatiquement la progression * d'une boucle en donnant le nombre d'iteration attendu et le nombre de * mise a jour ( ou etape) voulue.Exemple<br> * <pre> * int nbEle=_getNombreElementATraiter(); * ProgressionUpdater prog=new ProgressionUpdater(_inter); * prog.setValue(4, nbEle); * for(int i=nbEle-1;i>=0;i--){ * //faire plein de chose * * prog.majAvancement(); * } * </pre> * L'updater possede un compteur interne qui est mis a jour * a chaque appel de {@link #majAvancement()} * @author deniger * @version $Id: ProgressionUpdater.java,v 1.1 2004/02/12 15:32:43 deniger Exp $ */ public class ProgressionUpdater { /** * La progression qui doit etre mise a jour */ ProgressionInterface progress_; int pourcStep_; int pas_; int nextPas_; int avancementEnCours_; int iEnCours_; public ProgressionUpdater() {} public ProgressionUpdater(ProgressionInterface _progress) { setProgress(_progress); iEnCours_= 0; } public ProgressionInterface getProgress() { return progress_; } public final void setProgress(ProgressionInterface _interface) { progress_= _interface; } /** * Permet d'initialiser cet updater avec le nombre d'étapes voulues * et le nombre d'iteration attendue. * Exemple:<br> vous avez une boucle qui contient 200 iteration et vous * voulez mettre a jour la progression tous les 50 (soit 4 étapes). * Il suffit d'appeler setValue(4,200). * Appelle la fonction setValue(int,int,0,100) * @see #setValue(int, int, int, int) */ public void setValue(int _nbStep, int nbIterationMax) { setValue(_nbStep, nbIterationMax, 0, 100); } /** * Permet d'initialiser cet updater avec le nombre d'étapes voulues * et le nombre d'iteration attendue. De plus, il est possible de * preciser le pourcentage initial et l'étendu du pourcentage. * Exemple:<br> * vous avez une boucle qui contient 300 iteration et vous * voulez mettre a jour la progression tous les 100 (soit 3 étapes). * Par contre, vous voulez que la progression commence à 20 et * qu'elle se finisse a 60 ( soit une étendue de 60) * Il suffit d'appeler setValue(3,300,20,60). * * Attention : si le nombre d'iteration pour chaque etape est trop * faible (<20) le nombre d'etape sera de 2. C'est pour eviter de * mettre a jour trop souvent l'interface * @see #getStep(int, int) */ public void setValue( int _nbStep, int nbIterationMax, int _pourcentOffSet, int _pourcentRange) { int step= (((int) (nbIterationMax / _nbStep)) < 20) ? 2 : _nbStep; pourcStep_= (int) (_pourcentRange / step); pas_= (int) (nbIterationMax / step); nextPas_= pas_; avancementEnCours_= _pourcentOffSet; iEnCours_= 0; } /** * Met a jour l'interface de progression uniquement */ public void majProgessionStateOnly() { if (progress_ != null) progress_.setProgression(avancementEnCours_); } /** * Met a jour l'interface de progression uniquement avec la * description <code>_message</code> */ public void majProgessionStateOnly(String _message) { if (progress_ != null) { progress_.setProgression(avancementEnCours_); progress_.setDesc(_message); } } /** * Calcul si i est superieur au pas attendu, et si oui, la progression * est mise a jour. */ public void majAvancement() { if (++iEnCours_ > nextPas_) { avancementEnCours_ += pourcStep_; nextPas_ += pas_; majProgessionStateOnly(); } } /** * Methode utilisée pour mettre a jour l'avancement. * Renvoie le nb d'etapes "acceptables" dans nbIteration. * Si le nombre d'iteration dans l'etape * est inf a 20, 2 etapes sont renvoyees. * Exemple :vous avez 100 iterations que vous voulez parcourir en 4 etapes * de 25 (sup a 20). La methode getStep(100,4) renvoie donc 4. * Par contre getStep(100,10) renvoie 2 :(étapes de 10 iterations inf a 25). * @deprecated used the ProgressionUpdater */ public final static int getStep(int nbIteration, int _nbStep) { return (((int) (nbIteration / _nbStep)) < 20) ? 2 : _nbStep; } } Index: DodicoAnalyze.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/commun/DodicoAnalyze.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** DodicoAnalyze.java 12 Dec 2003 10:30:52 -0000 1.10 --- DodicoAnalyze.java 12 Feb 2004 15:32:43 -0000 1.11 *************** *** 26,58 **** */ public class DodicoAnalyze { ! private DodicoAnalyze.Field[] errors_; ! private DodicoAnalyze.Field[] warns_; ! private DodicoAnalyze.Field[] infos_; private DodicoAnalyze.Field fatalError_; private String desc_; private String ressource_; ! public DodicoAnalyze(DodicoAnalyze.Editor _io) { ! if (_io != null) { ! errors_= _io.getErrors(); ! warns_= _io.getWarnings(); ! infos_= _io.getInfos(); ! fatalError_= _io.getFatalError(); ! desc_= _io.desc_; ! ressource_= _io.getRessource(); ! } ! } ! public boolean containsFatalError() { ! return fatalError_ != null; ! } ! public static DodicoAnalyze[] getAnalyze(DodicoAnalyze.Editor[] _io) { ! if (_io == null) ! return null; ! int nb= _io.length; ! DodicoAnalyze[] r= new DodicoAnalyze[nb]; ! for (int i= nb - 1; i >= 0; i--) { ! r[i]= _io[i].toAnalyze(); ! } ! return r; ! } public void printResume() { System.out.println(getResume()); --- 26,37 ---- */ public class DodicoAnalyze { ! private DodicoAnalyze.Canal errors_; ! private DodicoAnalyze.Canal warns_; ! private DodicoAnalyze.Canal infos_; private DodicoAnalyze.Field fatalError_; private String desc_; private String ressource_; ! public DodicoAnalyze() {} ! public void printResume() { System.out.println(getResume()); *************** *** 123,127 **** */ public DodicoAnalyze.Field[] getErrors() { ! return errors_; } /** --- 102,106 ---- */ public DodicoAnalyze.Field[] getErrors() { ! return errors_.getFields(); } /** *************** *** 130,134 **** */ public DodicoAnalyze.Field[] getWarnings() { ! return warns_; } /** --- 109,113 ---- */ public DodicoAnalyze.Field[] getWarnings() { ! return warns_.getFields(); } /** *************** *** 137,198 **** */ public DodicoAnalyze.Field[] getInfos() { ! return infos_; } public boolean containsErrors() { return ( ! (fatalError_ != null) || ((errors_ != null) && (errors_.length > 0))) ! ? true ! : false; } public boolean containsWarnings() { ! return ((warns_ != null) && (warns_.length > 0)) ? true : false; } public boolean containsInfos() { ! return ((infos_ != null) && (infos_.length > 0)) ? true : false; } public boolean isEmpty() { return (!containsErrors()) && (!containsWarnings()) && (!containsInfos()); } ! public static void manageException( ! FileNotFoundException _e, ! DodicoAnalyze.Editor _analyze) { ! _analyze.addError(DodicoResource.getS("Fichier non trouvé")); ! _analyze.addInfo(_e.getMessage()); if (CtuluLib.DEBUG) _e.printStackTrace(); } ! public static void manageException( ! IOException _e, ! DodicoAnalyze.Editor _analyze) { ! _analyze.addFatalError(DodicoResource.getS("Erreur d'entrée/sortie")); ! _analyze.addInfo(_e.getMessage()); if (CtuluLib.DEBUG) _e.printStackTrace(); } ! public static void manageException( NumberFormatException _e, - DodicoAnalyze.Editor _analyze, FortranReader _l) { ! _analyze.addFatalError( DodicoResource.getS("Format du champ incorrect"), _l); ! _analyze.addInfo(_e.getMessage()); if (CtuluLib.DEBUG) _e.printStackTrace(); } ! public static void manageException( ! IllegalArgumentException _e, ! DodicoAnalyze.Editor _analyze) { ! _analyze.addFatalError( DodicoResource.getS("Erreur interne: argument non valide")); ! _analyze.addInfo(_e.getMessage()); if (CtuluLib.DEBUG) _e.printStackTrace(); } ! public static void manageException( ! Exception _e, ! DodicoAnalyze.Editor _analyze) { ! _analyze.addFatalError(DodicoResource.getS("Erreur à l'exécution")); ! _analyze.addInfo(_e.getMessage()); if (CtuluLib.DEBUG) _e.printStackTrace(); --- 116,174 ---- */ public DodicoAnalyze.Field[] getInfos() { ! return infos_.getFields(); ! } ! ! public boolean containsFatalError() { ! return fatalError_ != null; } public boolean containsErrors() { return ( ! (fatalError_ != null) || ((errors_ != null) && (!errors_.isEmpty()))); } public boolean containsWarnings() { ! return ((warns_ != null) && (!warns_.isEmpty())); } public boolean containsInfos() { ! return ((infos_ != null) && (!infos_.isEmpty())); } + public boolean isEmpty() { return (!containsErrors()) && (!containsWarnings()) && (!containsInfos()); } ! public void manageException( ! FileNotFoundException _e) { ! getErrorCanal().addMessage( ! DodicoResource.getS("Fichier non trouvé")); ! getInfoCanal().addMessage(_e.getMessage()); if (CtuluLib.DEBUG) _e.printStackTrace(); } ! public void manageException(IOException _e) { ! addFatalError(DodicoResource.getS("Erreur d'entrée/sortie")); ! getInfoCanal().addMessage(_e.getMessage()); if (CtuluLib.DEBUG) _e.printStackTrace(); } ! public void manageException( NumberFormatException _e, FortranReader _l) { ! addFatalError( DodicoResource.getS("Format du champ incorrect"), _l); ! getInfoCanal().addMessage(_e.getMessage()); if (CtuluLib.DEBUG) _e.printStackTrace(); } ! public void manageException( ! IllegalArgumentException _e) { ! addFatalError( DodicoResource.getS("Erreur interne: argument non valide")); ! getInfoCanal().addMessage(_e.getMessage()); if (CtuluLib.DEBUG) _e.printStackTrace(); } ! public void manageException(Exception _e) { ! addFatalError(DodicoResource.getS("Erreur à l'exécution")); ! getInfoCanal().addMessage(_e.getMessage()); if (CtuluLib.DEBUG) _e.printStackTrace(); *************** *** 200,206 **** protected static String getResume( String _titre, ! DodicoAnalyze.Field[] _ls, String _prefix) { ! if ((_ls == null) || (_ls.length <= 0)) { return null; } --- 176,182 ---- protected static String getResume( String _titre, ! DodicoAnalyze.Canal _ls, String _prefix) { ! if ((_ls == null) || (_ls.isEmpty())) { return null; } *************** *** 212,218 **** StringBuffer _bufferStockage, String _titre, ! DodicoAnalyze.Field[] _ls, String _prefix) { ! if ((_ls == null) || (_ls.length <= 0)) { return false; } --- 188,194 ---- StringBuffer _bufferStockage, String _titre, ! DodicoAnalyze.Canal _ls, String _prefix) { ! if ((_ls == null) || (_ls.isEmpty())) { return false; } *************** *** 221,228 **** String lineSep= CtuluLib.LINE_SEP; Field element; ! int nb= _ls.length; for (int i= 0; i < nb; i++) { _bufferStockage.append(lineSep); ! element= _ls[i]; _bufferStockage.append(_prefix); int t= element.getOffset(); --- 197,204 ---- String lineSep= CtuluLib.LINE_SEP; Field element; ! int nb= _ls.messages_.size(); for (int i= 0; i < nb; i++) { _bufferStockage.append(lineSep); ! element= (Field)_ls.messages_.get(i); _bufferStockage.append(_prefix); int t= element.getOffset(); *************** *** 237,479 **** return true; } ! public static class Editor { ! String desc_; ! private ArrayList editorWarnings_; ! private ArrayList editorErrors_; ! private ArrayList editorInfos_; ! private DodicoAnalyze.Field editorFatalError_; ! String ressource_; ! public Editor() {} ! public DodicoAnalyze.Field getFatalError() { ! return editorFatalError_; ! } ! public void merge(DodicoAnalyze.Editor _a) { ! if ((_a == null) || _a.isEmpty()) ! return; ! editorWarnings_= merge(editorWarnings_, _a.editorWarnings_); ! editorInfos_= merge(editorInfos_, _a.editorInfos_); ! editorErrors_= merge(editorErrors_, _a.editorErrors_); ! } ! private ArrayList merge(ArrayList _target, ArrayList _s) { ! if ((_s == null) || (_s.isEmpty())) ! return _target; ! if (_target == null) ! return new ArrayList(_s); ! else { ! _target.addAll(_s); ! return _target; ! } ! } public void clear() { ! if (editorWarnings_ != null) ! editorWarnings_.clear(); ! if (editorErrors_ != null) ! editorErrors_.clear(); ! if (editorInfos_ != null) ! editorInfos_.clear(); ! } ! /** ! * Returns the erreurs. ! * @return Field[] ! */ ! public DodicoAnalyze.Field[] getErrors() { ! return getFieldArray(editorErrors_); ! } ! /** ! * Returns the warns. ! * @return Field[] ! */ ! public DodicoAnalyze.Field[] getWarnings() { ! return getFieldArray(editorWarnings_); ! } ! /** ! * Returns the warns. ! * @return Field[] ! */ ! public DodicoAnalyze.Field[] getInfos() { ! return getFieldArray(editorInfos_); ! } ! /** ! * Test pour savoir si l'analyse s'est passee sans erreur. ! * @return true si le tableau d'erreur est non null. ! */ ! public boolean containsErrors() { ! return editorErrors_ == null ? false : true; ! } ! public boolean containsInfos() { ! return editorInfos_ == null ? false : true; ! } ! public boolean containsWarnings() { ! return editorWarnings_ == null ? false : true; ! } ! public boolean isEmpty() { ! return ( ! (editorWarnings_ == null) ! && (editorInfos_ == null) ! && (editorErrors_ == null) ! && (editorFatalError_ == null)) ! ? true ! : false; } ! public DodicoAnalyze toAnalyze() { ! return (isEmpty()) ? null : new DodicoAnalyze(this); } ! /** ! * Renvoie dans un tableau le contenu de la liste <code>_list</code> (qui ne ! * contient que des Field). ! * @return null si la liste est null ou de taille nulle. ! * ! */ ! private static DodicoAnalyze.Field[] getFieldArray(Collection _list) { ! if ((_list == null) || (_list.size() == 0)) return null; ! int l= _list.size(); ! DodicoAnalyze.Field[] r= new DodicoAnalyze.Field[l]; ! _list.toArray(r); return r; } ! public Field addError(String _message) { ! return addError(_message, 0); ! } ! public Field addError(String _message, FortranReader _in) { ! return addError(_message, _in.getLineNumber()); ! } ! public Field addError(String _message, LineNumberReader _in) { ! return addError(_message, _in.getLineNumber()); ! } ! public boolean containsFatalError() { ! return editorFatalError_ != null; ! } ! public Field addFatalError(String _message) { ! return addFatalError(_message, 0); ! } ! public Field addFatalError(String _message, LineNumberReader _in) { ! return addFatalError(_message, _in.getLineNumber()); ! } ! public Field addFatalError(String _message, FortranReader _in) { ! return addFatalError(_message, _in.getLineNumber()); ! } ! public Field addFatalError(String _message, int _offset) { ! if (editorFatalError_ == null) { ! editorFatalError_= new DodicoAnalyze.Field(_message, _offset); ! } ! return editorFatalError_; ! } ! public synchronized Field addError(String _message, int _offset) { ! if (editorErrors_ == null) ! editorErrors_= new ArrayList(); ! if (_message == null) { ! return addField( ! editorErrors_, ! DodicoResource.getS("Erreur inconnue"), ! _offset); ! } ! return addField(editorErrors_, _message, _offset); ! } ! public Field addWarning(String _message, FortranReader _in) { ! return addWarning(_message, _in.getLineNumber()); } ! public synchronized Field addWarning(String _message, int _offset) { ! if (editorWarnings_ == null) ! editorWarnings_= new ArrayList(); ! if (_message == null) { ! return addField( ! editorWarnings_, ! DodicoResource.getS("Avertissement inconnu"), ! _offset); ! } ! return addField(editorWarnings_, _message, _offset); } ! public Field addInfo(String _message, FortranReader _in) { ! return addInfo(_message, _in.getLineNumber()); } ! public Field addInfo(String _message, LineNumberReader _in) { ! return addInfo(_message, _in.getLineNumber()); } ! public Field addInfo(String _message) { ! return addInfo(_message, 0); } ! public Field addInfo(String _message, int _offset) { ! if (editorInfos_ == null) ! editorInfos_= new ArrayList(); ! if (_message == null) { ! return addField( ! editorInfos_, ! DodicoResource.getS("Information inconnue"), _offset); ! } ! return addField(editorInfos_, _message, _offset); ! } ! /** ! * Appelle la methode complete avec _offset=0 et sans tranduction du ! * message. ! * @see #getField(String, int, boolean) ! */ ! public static DodicoAnalyze.Field createField(String _message) { ! return createField(_message, 0); ! } ! /** ! * Cree (si <code>_message</code> non null) un champ contenant les infos ! * passes en parametres. ! * @param _message le message ! * @param _offset la ligne (ou le byte) concerne ! */ ! public static DodicoAnalyze.Field createField( ! String _message, ! int _offset) { ! if (_message == null) ! return null; ! return new DodicoAnalyze.Field(_message, _offset); ! } ! /** ! * Ajoute le message <code>_message</code> a la collection ! * <code>_warns</code>.Le numero de ligne sera determine a partir de ! * la methode <code>_in.getLineNumber()</code>. ! * @see #addField(Collection, String, int) ! */ ! public static void addField( ! Collection _warns, ! String _message, ! FortranReader _in) { ! addField(_warns, _message, _in.getLineNumber()); ! } ! /** ! * Ajoute le message <code>_message</code>a la collection ! * <code>_warns</code>.Le numero de ligne sera determine a partir de ! * la methode <code>_in.getLineNumber()</code>. ! */ ! private static Field addField( ! Collection _warns, ! String _message, ! int _offset) { ! Field f= DodicoAnalyze.Editor.createField(_message, _offset); ! _warns.add(f); ! return f; ! } ! /** ! * ! */ ! public String getDesc() { ! return desc_; } ! /** ! * ! */ ! public void setDesc(String _string) { ! desc_= _string; } ! /** ! * ! */ ! public String getRessource() { ! return ressource_; } ! /** ! * ! */ ! public void setRessource(String _string) { ! ressource_= _string; } } public static class Field { /** --- 213,368 ---- return true; } ! public static class Canal { ! ArrayList messages_; ! public Canal() {} ! public void clear() { ! if (messages_ != null) ! messages_.clear(); } ! ! public void merge(Canal _c){ ! if(_c!=null) { ! if(messages_==null) messages_=_c.messages_; ! else if(_c.messages_!=null) messages_.addAll(_c.messages_); ! } } ! ! public DodicoAnalyze.Field[] getFields() { ! if (isEmpty()) return null; ! Field[] r= new Field[messages_.size()]; ! messages_.toArray(r); return r; } ! ! public boolean containsMessage() { ! return messages_ == null ? false : messages_.size() > 0; } ! public boolean isEmpty() { ! return !containsMessage(); } ! public Field addMessage(String _message) { ! return addMessage(_message, 0); } ! ! public Field addMessage(String _message, LineNumberReader _in) { ! return addMessage(_message, _in.getLineNumber()); } ! ! public Field addMessage(String _message, FortranReader _in) { ! return addMessage(_message, _in.getLineNumber()); } ! ! public synchronized Field addMessage(String _message, int _offset) { ! if (messages_ == null) ! messages_= new ArrayList(); ! Field r= ! new DodicoAnalyze.Field( ! _message == null ? DodicoResource.getS("Message inconnu") : _message, _offset); ! messages_.add(r); ! return r; } ! ! } ! ! public void clear() { ! if (warns_ != null) ! warns_.clear(); ! if (errors_ != null) ! errors_.clear(); ! if (infos_ != null) ! infos_.clear(); ! } ! ! public Field addFatalError(Field _f) { ! if (fatalError_ == null) { ! fatalError_= _f; } ! return fatalError_; ! } ! ! public Field addFatalError(String _m) { ! return addFatalError(_m, 0); ! } ! ! public Field addFatalError(String _m, LineNumberReader _in) { ! return addFatalError(new Field(_m, _in.getLineNumber())); ! } ! ! public Field addFatalError(String _m, FortranReader _in) { ! return addFatalError(new Field(_m, _in.getLineNumber())); ! } ! ! public Field addFatalError(String _m, int _index) { ! return addFatalError(new Field(_m, _index)); ! } ! ! public Field addError(String _m, FortranReader _in) { ! return getErrorCanal().addMessage(_m, _in.getLineNumber()); ! } ! ! public Field addError(String _m, LineNumberReader _in) { ! return getErrorCanal().addMessage(_m, _in.getLineNumber()); } ! ! public Field addError(String _m, int _index) { ! return getErrorCanal().addMessage(_m, _index); ! } ! ! public Field addWarn(String _m, FortranReader _in) { ! return getWarnCanal().addMessage(_m, _in.getLineNumber()); ! } ! ! public Field addWarn(String _m, LineNumberReader _in) { ! return getWarnCanal().addMessage(_m, _in.getLineNumber()); ! } ! ! public Field addWarn(String _m, int _index) { ! return getWarnCanal().addMessage(_m, _index); ! } ! ! public Field addInfo(String _m) { ! return addInfo(_m, -1); ! } ! ! public Field addInfo(String _m, FortranReader _in) { ! return getInfoCanal().addMessage(_m, _in.getLineNumber()); ! } ! ! public Field addInfo(String _m, LineNumberReader _in) { ! return getInfoCanal().addMessage(_m, _in.getLineNumber()); } + + public Field addInfo(String _m, int _index) { + return getInfoCanal().addMessage(_m, _index); + } + + public Canal getErrorCanal() { + if (errors_ == null) + errors_= new Canal(); + return errors_; + } + + public Canal getWarnCanal() { + if (warns_ == null) + warns_= new Canal(); + return warns_; } + + public Canal getInfoCanal() { + if (infos_ == null) + infos_= new Canal(); + return infos_; + } + + /** + * + */ + public void setRessource(String _string) { + ressource_= _string; + } + public static class Field { /** *************** *** 550,552 **** --- 439,451 ---- ressource_= _string; } + + public void merge(DodicoAnalyze _analyze){ + if(_analyze==null) return; + if(errors_==null) errors_=_analyze.errors_; + else errors_.merge(_analyze.errors_); + if(warns_==null) warns_=_analyze.warns_; + else warns_.merge(_analyze.warns_); + if(infos_==null) errors_=_analyze.infos_; + else infos_.merge(_analyze.infos_); + } } Index: DodicoLib.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/commun/DodicoLib.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** DodicoLib.java 19 Dec 2003 12:10:33 -0000 1.21 --- DodicoLib.java 12 Feb 2004 15:32:43 -0000 1.22 *************** *** 43,46 **** --- 43,48 ---- import com.memoire.fu.FuLib; + + import org.fudaa.dodico.ef.EfLib; /** * Des methodes statiques qui "semblent" utiles *************** *** 579,581 **** --- 581,590 ---- return r; } + + /** + * Appel la methode getStep(nbIteration,5) + */ + public final static int getStep(int nbIteration) { + return ProgressionUpdater.getStep(nbIteration, 5); + } } Index: ProgressionBuAdapter.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/commun/ProgressionBuAdapter.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ProgressionBuAdapter.java 25 Nov 2003 10:11:25 -0000 1.9 --- ProgressionBuAdapter.java 12 Feb 2004 15:32:43 -0000 1.10 *************** *** 34,36 **** --- 34,46 ---- t_.setName(_s); } + /** + * + */ + public void reset() { + if (t_ != null) { + t_.setName(null); + t_.setProgression(0); + } + } + } Index: ProgressionDodicoAdapter.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/commun/ProgressionDodicoAdapter.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ProgressionDodicoAdapter.java 25 Nov 2003 10:11:25 -0000 1.7 --- ProgressionDodicoAdapter.java 12 Feb 2004 15:32:43 -0000 1.8 *************** *** 8,11 **** --- 8,13 ---- */ package org.fudaa.dodico.commun; + import org.fudaa.ctulu.CtuluLib; + import org.fudaa.dodico.corba.calcul.SProgression; /** *************** *** 30,32 **** --- 32,42 ---- t_.operation= _s; } + + public void reset() { + if(t_!=null){ + t_.pourcentage=0; + t_.operation=CtuluLib.EMPTY_STRING; + } + } + } Index: ProgressionInterface.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/commun/ProgressionInterface.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ProgressionInterface.java 25 Nov 2003 10:11:25 -0000 1.7 --- ProgressionInterface.java 12 Feb 2004 15:32:43 -0000 1.8 *************** *** 17,19 **** --- 17,20 ---- void setProgression(int _v); void setDesc(String _s); + void reset(); } Index: ProgressionTestAdapter.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/commun/ProgressionTestAdapter.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ProgressionTestAdapter.java 25 Nov 2003 10:11:25 -0000 1.3 --- ProgressionTestAdapter.java 12 Feb 2004 15:32:43 -0000 1.4 *************** *** 31,33 **** --- 31,38 ---- System.out.println("progress desc : " + _s); } + /** + * + */ + public void reset() {} + } Index: dodico_en.fr_txt =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/commun/dodico_en.fr_txt,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** dodico_en.fr_txt 21 Jan 2004 10:59:09 -0000 1.7 --- dodico_en.fr_txt 12 Feb 2004 15:32:43 -0000 1.8 *************** *** 59,61 **** Fichier csv (texte)=File csv (text) Reflux crb=Reflux crb ! Reflux courbes transitoires (format binaire)=Reflux transient curves (binary format) \ No newline at end of file --- 59,110 ---- Fichier csv (texte)=File csv (text) Reflux crb=Reflux crb ! Reflux courbes transitoires (format binaire)=Reflux transient curves (binary format) ! Orientation des éléments=Element Orientation ! transformation T3->T6=T3->T6 transformation ! transformation T6->T3=T6->T3 transformation ! transformation T6 en 4 T3=T6->4 T3 transformation ! Recherche des frontières=Boundary edges search ! Classement des frontières=Boundary edges sort ! Orientation des frontières=Boundary edges orientation ! Nombre d'éléments mal orientés\: {0}=Number of element oriented in wrong direction\: {0} ! Pas de connexions trouvées pour le point {0}=No connection found for point {0} ! Recherche des connexions=Connection search ! Impossible de trouver les connexions=Connections can't be found ! Aucun point n'a pu être interpolé=No point interpolated ! {0} points n'ont pas été interpolés correctement={0} points are not correctly interpolated ! Points non interpolés correctement\: {0}=Points that are not correctly interpolated \: {0} ! Interpolation=Interpolation ! Seuls les maillages de type T3 ou T6 peuvent servir de référence=Only grids with T3 or T6 elements can be used as a reference for this interpolation ! Les indices suivants ont été extrapolés\: {0}=The following indices have been extrapolated \: {0} ! Recherche des éléments mal orientés=Search for bad oriented elements ! Contrôle de l'orientation des éléments=Element orientation control ! Ne pas faire de contrôle=No control ! Eléments orientés dans le sens trigo=Elements oriented in trigo direction ! Recherche des éléments orientés dans le sens trigo=Search for elements oriented in trigo direction ! Eléments orientés dans le sens horaire=Elements oriented in clockwise direction ! Recherche des éléments orientés dans le sens trigo=Search for elements oriented in clockwise direction ! Rechercher des éléments orientés dans le sens trigo=Search elements oriented in trigo direction ! Rechercher des éléments orientés dans le sens trigo=Search elements oriented in clockwise direction ! Contrôle des angles=Angles control ! Angle minimum (en degré)=Minimun angle (degree) ! Recherche des éléments plats=Search for flat elements ! Connexions=Connections ! Eléments surcontraints=Overstressed elements ! Recherche valable uniquement pour les triangles=Search available only in the case of triangle ! Triangle surcontraint\: triangle dont dont les 3 extrémités appartiennent à une frontière=Overstressed triangle\: triangle which 3 extremities belonging to a frontier ! Recherche des éléments surcontraints=Search for overstressed elements ! Recherche des éléments dont l'aire est inférieure à {0}=Search for elements wich area is less than {0} ! Petits éléments=Small elements ! Eléments ayant une aire inférieure à=Elements with an area less than ! Eléments ayant une aire inférieure à {0}=Elements with an area less than {0} ! Eléments ayant un angle inférieur à {0}=Elements with an angle less than {0} ! Aire inférieure à {0}=Area less than {0} ! Angle inférieur à {0}=Angle less than {0} ! Aire=Area ! Angle mini=Minus angle ! Nombre d'éléments détectés=Number of detected elements ! Tester=Test ! Elément=Element ! Comporte les définitions de points,polylignes et polygones=Contains nodes,polygons and polylines ! Ligne ignorée :Skipped line ! Nombre d'éléments/noeuds détectés=Number of elements/nodes detected \ No newline at end of file |
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/telemac In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20934/test/telemac Modified Files: SerafinArchConvertGUI.java TestCL.java TestCas.java TestClMng.java TestSerafin.java TestSerafinArchConvert.java TestSinusx.java cas.txt Added Files: TestTrigrid.java csv1.txt csv2.txt trigrid.geo trigrid.ngh Log Message: Maj version 0.05 prepro --- NEW FILE: TestTrigrid.java --- /* * @file TestTrigrid.java * @creation 27 janv. 2004 * @modification $Date: 2004/02/12 15:32:51 $ * @license GNU General Public License 2 * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne * @mail de...@fu... */ package org.fudaa.dodico.test.telemac; import java.io.File; import org.fudaa.ctulu.CtuluLib; import org.fudaa.dodico.commun.DodicoAnalyze; import org.fudaa.dodico.commun.DodicoLib; import org.fudaa.dodico.commun.ProgressionTestAdapter; import org.fudaa.dodico.ef.EfElement; import org.fudaa.dodico.ef.EfGrid; import org.fudaa.dodico.ef.EfGridSource; import org.fudaa.dodico.ef.EfLib; import org.fudaa.dodico.ef.EfNode; import org.fudaa.dodico.telemac.io.SerafinFileFormat; import org.fudaa.dodico.test.TestIO; import org.fudaa.dodico.trigrid.TrigridFileFormat; import org.fudaa.dodico.trigrid.TrigridReader; import org.fudaa.dodico.trigrid.TrigridWriter; /** * @author deniger * @version $Id: TestTrigrid.java,v 1.1 2004/02/12 15:32:51 deniger Exp $ */ public class TestTrigrid extends TestIO { EfGrid g_; /** * @param _fic */ public TestTrigrid() { super("trigrid.ngh"); g_=( (EfGridSource)TrigridFileFormat .getInstance() .getLastVersionImpl() .readGrid(fic_, null) .getSource()).getGrid(); } /** * */ public void testEcriture() { File f= createTempFile(); TrigridFileFormat.getInstance().getLastVersionImpl().write( f, g_,null); System.out.println(f.getAbsolutePath()); EfGrid g= ((EfGridSource)TrigridFileFormat .getInstance() .getLastVersionImpl() .readGrid(f, null) .getSource()).getGrid(); f.delete(); internTestGridWriter(g); } /** * Un test assez long sur le lecture de fichier serafin:<br> * 1- test de la conformite du maillage lu<br> * 2- Comparaison avec un maillage equivalent issu du fichier serafin * "trigrid.geo" * 3- Test pour retrouver les connexions */ public void testLecture() { assertNotNull(g_); internTestGrid(g_); File f= getFile("trigrid.geo"); EfGrid g2= ((EfGridSource)SerafinFileFormat .getInstance() .getLastVersionImpl() .readGrid(f, null) .getSource()).getGrid(); assertNotNull(g2); assertTrue(g2.isEquivalent(g_, false, 1e-3d)); g_.computeBord(null); g2.computeBord(null); g_.getFrontiers().isSame(g2.getFrontiers().getArray()); internTestConnectionFound(g_); } private void internTestConnectionFound(EfGrid _g) { DodicoAnalyze a= new DodicoAnalyze(); int[][] r= EfLib.getConnexionFor(_g, null, a); assertTrue(a.isEmpty()); assertEquals(_g.getPtsNb(), r.length); //test de la ligne suivante // 1 6813.839 7844.116 1 1.078 1534 3684 1547 0 0 0 0 0 int[] rToTest= r[0]; assertEquals(3, rToTest.length); assertTrue(DodicoLib.findInt(rToTest, 1533) >= 0); assertTrue(DodicoLib.findInt(rToTest, 3683) >= 0); assertTrue(DodicoLib.findInt(rToTest, 1546) >= 0); // 3214 6567.800 6187.305 0 1.245 3084 2247 2443 3102 2990 2432 0 0 rToTest= r[3213]; assertEquals(6, rToTest.length); assertTrue(DodicoLib.findInt(rToTest, 3083) >= 0); assertTrue(DodicoLib.findInt(rToTest, 2246) >= 0); assertTrue(DodicoLib.findInt(rToTest, 2442) >= 0); assertTrue(DodicoLib.findInt(rToTest, 3101) >= 0); assertTrue(DodicoLib.findInt(rToTest, 2989) >= 0); assertTrue(DodicoLib.findInt(rToTest, 2431) >= 0); } private void internTestGrid(EfGrid _g) { assertEquals(3724, _g.getPtsNb()); //Attention les index sont decales EfNode p= _g.getPt(0); assertDoubleEquals(6813.839, p.getX()); assertDoubleEquals(7844.116, p.getY()); assertDoubleEquals(1.078, p.getZ()); p= _g.getPt(1790); assertDoubleEquals(5104.207, p.getX()); assertDoubleEquals(5580.120, p.getY()); assertDoubleEquals(-0.372, p.getZ()); //le dernier point p= _g.getPt(3723); assertDoubleEquals(4987.752, p.getX()); assertDoubleEquals(5484.865, p.getY()); assertDoubleEquals(-0.182, p.getZ()); assertEquals(5788, _g.getEltNb()); EfElement el= _g.getElement(0); assertTrue(el.containsIndex(0)); assertTrue(el.containsIndex(1533)); assertTrue(el.containsIndex(3683)); el= _g.getElement(44); assertTrue(el.containsIndex(23)); assertTrue(el.containsIndex(1718)); assertTrue(el.containsIndex(1592)); el= _g.getElement(132); assertTrue(el.containsIndex(64)); assertTrue(el.containsIndex(904)); assertTrue(el.containsIndex(1941)); el= _g.getElement(5787); assertTrue(el.containsIndex(3633)); assertTrue(el.containsIndex(3681)); assertTrue(el.containsIndex(3625)); } private void internTestGridWriter(EfGrid _g) { assertEquals(3724, _g.getPtsNb()); //Attention les index sont decales EfNode p= _g.getPt(0); assertDoubleEquals(6813.839, p.getX()); assertDoubleEquals(7844.116, p.getY()); assertDoubleEquals(1.078, p.getZ()); p= _g.getPt(1790); assertDoubleEquals(5104.207, p.getX()); assertDoubleEquals(5580.120, p.getY()); assertDoubleEquals(-0.372, p.getZ()); //le dernier point p= _g.getPt(3723); assertDoubleEquals(4987.752, p.getX()); assertDoubleEquals(5484.865, p.getY()); assertDoubleEquals(-0.182, p.getZ()); assertEquals(5788, _g.getEltNb()); EfElement el= new EfElement(new int[] { 0, 1533, 3683 }); assertTrue(_g.isEltPresentInGrid(el)); el= new EfElement(new int[] { 23, 1718, 1592 }); assertTrue(_g.isEltPresentInGrid(el)); el= new EfElement(new int[] { 64, 904, 1941 }); assertTrue(_g.isEltPresentInGrid(el)); el= new EfElement(new int[] { 3633, 3681, 3625 }); assertTrue(_g.isEltPresentInGrid(el)); } } --- NEW FILE: csv1.txt --- #essai 1;2;3 3;4;5 7;8 --- NEW FILE: csv2.txt --- #essai 1 2 3 3 4 5 7 8 --- NEW FILE: trigrid.geo --- (This appears to be a binary file; contents omitted.) --- NEW FILE: trigrid.ngh --- 3724 8 6879.562 7958.460 4391.370 5030.580 1 6813.839 7844.116 1 1.078 1534 3684 1547 0 0 0 0 0 2 4393.200 5052.120 1 -0.971 7 1673 1620 0 0 0 0 0 3 6390.918 6791.710 1 0.959 892 1778 165 0 0 0 0 0 4 6853.990 7956.400 1 2.051 1308 2635 858 0 0 0 0 0 5 6822.140 7934.980 1 1.318 3619 543 1268 0 0 0 0 0 6 5359.598 5770.917 1 -0.209 1589 1800 809 0 0 0 0 0 7 4391.370 5061.510 1 -1.140 2 1673 1347 0 0 0 0 0 8 6696.120 7689.570 1 -0.079 3510 53 1601 0 0 0 0 0 9 6112.342 5694.353 1 1.000 3653 240 155 0 0 0 0 0 10 5798.769 6290.186 1 -0.220 2864 1065 1651 0 0 0 0 0 11 6069.023 6676.904 1 -0.209 594 3647 696 0 0 0 0 0 12 6021.854 5616.363 1 1.007 690 3648 1408 0 0 0 0 0 13 6606.516 6647.503 1 1.324 423 3639 355 0 0 0 0 0 14 6334.890 7034.820 1 0.011 1665 20 923 0 0 0 0 0 15 5703.275 6137.555 1 -0.304 1627 3715 1365 0 0 0 0 0 16 6737.217 7783.338 1 -0.087 1321 3659 1506 0 0 0 0 0 [...3688 lines suppressed...] 3705 6386.724 7216.995 0 -1.045 2251 3651 1726 1667 1682 3422 2588 0 3706 5850.226 5460.339 0 0.641 2855 2069 17 208 1889 1595 3476 0 3707 6675.620 7686.093 0 -0.247 1025 638 3325 3510 1959 3262 3512 0 3708 4891.340 5139.988 0 0.390 2185 1915 2737 1727 2026 3104 1898 0 3709 5095.257 5591.085 0 -0.568 2903 2388 3605 2109 1798 2526 1592 0 3710 6842.934 7275.417 0 0.628 3064 2679 2273 2946 1669 3133 1668 0 3711 6321.671 7090.289 0 -0.498 1092 1768 2975 2828 2959 1616 1786 0 3712 6817.005 7797.621 0 0.502 191 80 3700 1763 3445 2731 2426 0 3713 5222.328 5691.851 0 -0.543 2417 1700 1805 3629 1672 1718 2863 0 3714 5872.229 6385.787 0 -0.793 3187 1706 2742 1314 2331 3525 767 0 3715 5716.954 6129.873 0 -0.687 1627 15 3225 3338 1749 1365 2146 0 3716 5208.920 5210.450 0 0.127 1615 442 1856 3702 297 849 2190 0 3717 5252.227 5714.860 0 -0.529 1446 22 3083 2862 2748 1223 1968 0 3718 5836.290 5452.990 0 0.707 1606 1595 1289 1731 3476 1216 3675 0 3719 6104.099 6721.857 0 -0.319 2667 3551 1582 1739 2031 2704 1511 0 3720 6272.904 7031.573 0 -1.051 3296 3072 1944 3615 1703 1993 3722 0 3721 6839.679 6695.933 0 1.146 1742 3693 428 2162 3190 381 1681 0 3722 6275.182 7014.240 0 -0.575 1744 2603 1695 1703 3720 1637 1770 3072 3723 6548.375 7459.657 0 -0.436 3146 1095 2135 1750 1600 1787 2320 2460 3724 4987.752 5484.865 0 -0.182 431 2286 1712 1781 928 909 610 1746 Index: SerafinArchConvertGUI.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/telemac/SerafinArchConvertGUI.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** SerafinArchConvertGUI.java 25 Nov 2003 10:12:02 -0000 1.6 --- SerafinArchConvertGUI.java 12 Feb 2004 15:32:50 -0000 1.7 *************** *** 196,200 **** w.setFile(fileOut_); w.setProgressReceiver(progression_); ! DodicoAnalyze a= w.write(si_).getAnalyze().toAnalyze(); if (a != null) { new BuDialogMessage(null, null, a.getResume()); --- 196,200 ---- w.setFile(fileOut_); w.setProgressReceiver(progression_); ! DodicoAnalyze a= w.write(si_).getAnalyze(); if (a != null) { new BuDialogMessage(null, null, a.getResume()); *************** *** 238,242 **** FileOperationSynthese s= reader.read(); if (s.containsMessages()) ! s.getAnalyze().toAnalyze().printResume(); si_= (SerafinInterface)s.getSource(); isInSparc_= FortranBinaryInputStream.isSparc(reader.getMachineId()); --- 238,242 ---- FileOperationSynthese s= reader.read(); if (s.containsMessages()) ! s.getAnalyze().printResume(); si_= (SerafinInterface)s.getSource(); isInSparc_= FortranBinaryInputStream.isSparc(reader.getMachineId()); Index: TestCL.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/telemac/TestCL.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** TestCL.java 25 Nov 2003 10:12:02 -0000 1.13 --- TestCL.java 12 Feb 2004 15:32:51 -0000 1.14 *************** *** 195,199 **** null); if (syntheseR.containsMessages()) ! syntheseR.getAnalyze().toAnalyze().printResume(); assertFalse(syntheseR.containsMessages()); _interfaceTest(getInter(tmpFile)); --- 195,199 ---- null); if (syntheseR.containsMessages()) ! syntheseR.getAnalyze().printResume(); assertFalse(syntheseR.containsMessages()); _interfaceTest(getInter(tmpFile)); Index: TestCas.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/telemac/TestCas.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** TestCas.java 25 Nov 2003 10:12:02 -0000 1.8 --- TestCas.java 12 Feb 2004 15:32:51 -0000 1.9 *************** *** 48,51 **** --- 48,56 ---- t= inter.getValue(ent); assertEquals(t, "1600"); + ent= dico.getEntite("FICHIER DES PARAMETRES"); + assertNotNull(ent); + t=inter.getCommentaire(ent); + assertNotNull(t); + assertEquals("LE FICHIER QUI VA BIEN",t); } /** *************** *** 68,72 **** DicoCasInterface r= (DicoCasInterface)syntheseR.getSource(); if (syntheseR.containsMessages()) { ! syntheseR.getAnalyze().toAnalyze().printResume("Message: "); } assertFalse(syntheseR.containsMessages()); --- 73,77 ---- DicoCasInterface r= (DicoCasInterface)syntheseR.getSource(); if (syntheseR.containsMessages()) { ! syntheseR.getAnalyze().printResume("Message: "); } assertFalse(syntheseR.containsMessages()); Index: TestClMng.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/telemac/TestClMng.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** TestClMng.java 11 Dec 2003 12:41:29 -0000 1.7 --- TestClMng.java 12 Feb 2004 15:32:51 -0000 1.8 *************** *** 10,18 **** import java.io.File; import junit.framework.TestCase; import org.fudaa.dodico.fichiers.FileOperationSynthese; import org.fudaa.dodico.h2d.H2dBoundary; import org.fudaa.dodico.h2d.H2dBcFrontierBlockInterface; - import org.fudaa.dodico.h2d.H2dGrid; - import org.fudaa.dodico.h2d.H2dFrontier; import org.fudaa.dodico.h2d.telemac.H2dTelemacBoundary; import org.fudaa.dodico.h2d.telemac.H2dTelemacCLElementSource; --- 10,19 ---- import java.io.File; import junit.framework.TestCase; + + import org.fudaa.dodico.ef.EfFrontier; + import org.fudaa.dodico.ef.EfGrid; import org.fudaa.dodico.fichiers.FileOperationSynthese; import org.fudaa.dodico.h2d.H2dBoundary; import org.fudaa.dodico.h2d.H2dBcFrontierBlockInterface; import org.fudaa.dodico.h2d.telemac.H2dTelemacBoundary; import org.fudaa.dodico.h2d.telemac.H2dTelemacCLElementSource; *************** *** 30,34 **** */ public class TestClMng extends TestCase { ! H2dGrid m_; H2dTelemacCLSourceInterface cl_; public TestClMng() { --- 31,35 ---- */ public class TestClMng extends TestCase { ! EfGrid m_; H2dTelemacCLSourceInterface cl_; public TestClMng() { *************** *** 40,45 **** assertFalse(op.containsFatalError()); SerafinInterface inter= (SerafinInterface)op.getSource(); ! m_= inter.getMaillage(); ! H2dGrid.computeBord(m_, inter.getPtsFrontiere(), null); op= TelemacCLFileFormat.getInstance().getLastVersionImpl().read( --- 41,46 ---- assertFalse(op.containsFatalError()); SerafinInterface inter= (SerafinInterface)op.getSource(); ! m_= inter.getGrid(); ! EfGrid.computeBord(m_, inter.getPtsFrontiere(), null); op= TelemacCLFileFormat.getInstance().getLastVersionImpl().read( *************** *** 52,61 **** assertNotNull(m_); assertNotNull(m_.getFrontiers()); ! H2dFrontier frontiere= m_.getFrontiers(); assertEquals(2, frontiere.getNbFrontier()); //test extern frontier assertEquals(282, frontiere.getNbPt(0)); ! assertEquals(13, frontiere.getBordPrincPointIdx(0)); ! assertEquals(28, frontiere.getBordPrincPointIdx(281)); //test intern frontier assertEquals(16, frontiere.getNbPt(1)); --- 53,62 ---- assertNotNull(m_); assertNotNull(m_.getFrontiers()); ! EfFrontier frontiere= m_.getFrontiers(); assertEquals(2, frontiere.getNbFrontier()); //test extern frontier assertEquals(282, frontiere.getNbPt(0)); ! assertEquals(13, frontiere.getIdxGlobalPrinc(0)); ! assertEquals(28, frontiere.getIdxGlobalPrinc(281)); //test intern frontier assertEquals(16, frontiere.getNbPt(1)); Index: TestSerafin.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/telemac/TestSerafin.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** TestSerafin.java 11 Dec 2003 12:41:29 -0000 1.17 --- TestSerafin.java 12 Feb 2004 15:32:51 -0000 1.18 *************** *** 9,27 **** package org.fudaa.dodico.test.telemac; import java.io.File; ! import org.apache.tools.ant.taskdefs.TempFile; import org.fudaa.dodico.commun.DodicoLib; ! import org.fudaa.dodico.fichiers.FileFormat; ! import org.fudaa.dodico.fichiers.FileFormatVersion; import org.fudaa.dodico.fichiers.FileOperationSynthese; - import org.fudaa.dodico.h2d.H2dElement; - import org.fudaa.dodico.h2d.H2dLib; - import org.fudaa.dodico.h2d.H2dGrid; - import org.fudaa.dodico.h2d.H2dFrontier; - import org.fudaa.dodico.h2d.type.H2dElementType; import org.fudaa.dodico.mnt.MNTSemis; import org.fudaa.dodico.mnt.MNTZone; import org.fudaa.dodico.telemac.io.SerafinFileFormat; import org.fudaa.dodico.telemac.io.SerafinInterface; - import org.fudaa.dodico.telemac.io.SerafinMNTAdapter; import org.fudaa.dodico.telemac.io.SerafinWriter; import org.fudaa.dodico.test.TestIO; --- 9,22 ---- package org.fudaa.dodico.test.telemac; import java.io.File; ! import org.fudaa.dodico.commun.DodicoLib; ! import org.fudaa.dodico.ef.EfElementType; ! import org.fudaa.dodico.ef.EfFrontier; ! import org.fudaa.dodico.ef.EfGrid; import org.fudaa.dodico.fichiers.FileOperationSynthese; import org.fudaa.dodico.mnt.MNTSemis; import org.fudaa.dodico.mnt.MNTZone; import org.fudaa.dodico.telemac.io.SerafinFileFormat; import org.fudaa.dodico.telemac.io.SerafinInterface; import org.fudaa.dodico.telemac.io.SerafinWriter; import org.fudaa.dodico.test.TestIO; *************** *** 44,52 **** "MODELE MARITIME - CALCUL1 SERAPHIN"); //NBV1 ! assertEquals(_t.getNbv1(), 6); //TEXT ! String temp= _t.getVariable(0); assertEquals(temp, "VITESSE U"); ! temp= _t.getVariable(5); assertEquals(temp, "VITESSE SCALAIRE"); //LUNIT --- 39,47 ---- "MODELE MARITIME - CALCUL1 SERAPHIN"); //NBV1 ! assertEquals(_t.getValueNb(), 6); //TEXT ! String temp= _t.getValueId(0); assertEquals(temp, "VITESSE U"); ! temp= _t.getValueId(5); assertEquals(temp, "VITESSE SCALAIRE"); //LUNIT *************** *** 60,69 **** assertEquals(_t.getIdate(), 0); //NELEM ! H2dGrid maillage= _t.getMaillage(); assertEquals(maillage.getEltNb(), 3087); //NPOIN1 assertEquals(maillage.getPtsNb(), 1676); //NPPEL1 ! assertEquals(maillage.getEltType(), H2dElementType.T3); //IKLE1 assertEquals(maillage.getElement(0).getPtIndex(1), 1545); --- 55,64 ---- assertEquals(_t.getIdate(), 0); //NELEM ! EfGrid maillage= _t.getGrid(); assertEquals(maillage.getEltNb(), 3087); //NPOIN1 assertEquals(maillage.getPtsNb(), 1676); //NPPEL1 ! assertEquals(maillage.getEltType(), EfElementType.T3); //IKLE1 assertEquals(maillage.getElement(0).getPtIndex(1), 1545); *************** *** 85,96 **** eps_); //Nombre de pas temps ! int tempInt= _t.getNbPasDeTemps(); assertEquals(tempInt, 2); ! double tempDouble= _t.getPasDeTemps(1); assertEquals(tempDouble, (double)Float.intBitsToFloat(1153138688), eps_); //pas de temps 1, variable 3 //premiere variable assertEquals( ! _t.getDonnees(0, 2, 0), (double)Float.intBitsToFloat(1076258406), eps_); --- 80,91 ---- eps_); //Nombre de pas temps ! int tempInt= _t.getTimeStepNb(); assertEquals(tempInt, 2); ! double tempDouble= _t.getTimeStep(1); assertEquals(tempDouble, (double)Float.intBitsToFloat(1153138688), eps_); //pas de temps 1, variable 3 //premiere variable assertEquals( ! _t.getValue(2, 0, 0), (double)Float.intBitsToFloat(1076258406), eps_); *************** *** 98,142 **** //derniere variable assertEquals( ! _t.getDonnees(1, 3, maillage.getPtsNb() - 1), (double)Float.intBitsToFloat(1093124747), eps_); } ! public void testMntAdapter() { ! SerafinInterface t= inter_; ! assertNotNull(t); ! int id= SerafinMNTAdapter.getIndex(t, "HAUTEUR D'EAU"); ! assertEquals(id, 2); ! SerafinMNTAdapter a= new SerafinMNTAdapter(t, id, 0); ! try { ! String[] r= a.read(); ! if (r != null) ! DodicoLib.printStringArray(r); ! assertNull(r); ! MNTZone[] zones= a.getMNTZones(); ! assertNotNull(zones); ! assertNotNull(zones[0]); ! MNTSemis semis= zones[0].getSemis(); ! assertNotNull(semis); ! //X1 ! assertEquals( ! semis.getX(9), ! (double)Float.intBitsToFloat(1160462115), ! eps_); ! //Y1 ! assertEquals( ! semis.getY(11), ! (double)Float.intBitsToFloat(1140111573), ! eps_); ! assertEquals( ! semis.getZ(0), ! (double)Float.intBitsToFloat(1076258406), ! eps_); ! } catch (Exception _e) { ! _e.printStackTrace(); ! } ! } ! /** ! * ! */ public void testEcriture() { SerafinInterface inter= inter_; --- 93,101 ---- //derniere variable assertEquals( ! _t.getValue(3, maillage.getPtsNb() - 1, 1), (double)Float.intBitsToFloat(1093124747), eps_); } ! public void testEcriture() { SerafinInterface inter= inter_; *************** *** 162,174 **** public void testRechercheFrontiereWithIpobo() { SerafinInterface inter= inter_; ! H2dGrid.computeBordFast(inter.getMaillage(), inter.getPtsFrontiere(), null); ! H2dFrontier b= inter.getMaillage().getFrontiers(); assertEquals(b.getNbFrontierIntern(), 1); } public void testRechercheFrontiereinterne() { SerafinInterface inter= inter_; ! inter.getMaillage().computeBord(null); assertTrue( ! inter.getMaillage().getFrontiers().isSame(inter.getPtsFrontiere())); } /** --- 121,133 ---- public void testRechercheFrontiereWithIpobo() { SerafinInterface inter= inter_; ! EfGrid.computeBordFast(inter.getGrid(), inter.getPtsFrontiere(), null); ! EfFrontier b= inter.getGrid().getFrontiers(); assertEquals(b.getNbFrontierIntern(), 1); } public void testRechercheFrontiereinterne() { SerafinInterface inter= inter_; ! inter.getGrid().computeBord(null); assertTrue( ! inter.getGrid().getFrontiers().isSame(inter.getPtsFrontiere())); } /** Index: TestSerafinArchConvert.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/telemac/TestSerafinArchConvert.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** TestSerafinArchConvert.java 25 Nov 2003 10:12:03 -0000 1.6 --- TestSerafinArchConvert.java 12 Feb 2004 15:32:51 -0000 1.7 *************** *** 67,71 **** SerafinInterface sinter= (SerafinInterface)synthese.getSource(); if (synthese.containsMessages()) ! synthese.getAnalyze().toAnalyze().printResume(); if (t.getMachineId().equals(sortieID)) { System.out.println("les formats d'entree et de sortie sont identiques"); --- 67,71 ---- SerafinInterface sinter= (SerafinInterface)synthese.getSource(); if (synthese.containsMessages()) ! synthese.getAnalyze().printResume(); if (t.getMachineId().equals(sortieID)) { System.out.println("les formats d'entree et de sortie sont identiques"); *************** *** 77,81 **** System.out.println(""); if (synthese.containsMessages()) ! synthese.getAnalyze().toAnalyze().printResume(); } } --- 77,81 ---- System.out.println(""); if (synthese.containsMessages()) ! synthese.getAnalyze().printResume(); } } Index: TestSinusx.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/telemac/TestSinusx.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** TestSinusx.java 25 Nov 2003 10:12:03 -0000 1.9 --- TestSinusx.java 12 Feb 2004 15:32:51 -0000 1.10 *************** *** 10,26 **** import java.io.File; import java.io.FileReader; - import java.io.FileWriter; import java.io.IOException; - import java.io.PrintWriter; import java.net.URL; import junit.framework.TestCase; import com.memoire.bu.BuTask; import org.fudaa.dodico.commun.ProgressionBuAdapter; ! import org.fudaa.dodico.mnt.MNTPoint; import org.fudaa.dodico.mnt.MNTPolyligne; import org.fudaa.dodico.mnt.MNTSemis; import org.fudaa.dodico.mnt.MNTZone; import org.fudaa.dodico.telemac.io.SinusxReader; - import org.fudaa.dodico.telemac.io.SinusxWriter; /** * @version $Id$ --- 10,33 ---- import java.io.File; import java.io.FileReader; import java.io.IOException; import java.net.URL; + import junit.framework.TestCase; + import com.memoire.bu.BuTask; + + import org.fudaa.dodico.commun.DodicoLib; import org.fudaa.dodico.commun.ProgressionBuAdapter; ! import org.fudaa.dodico.fichiers.FileOperationSynthese; ! import org.fudaa.dodico.mnt.MNTPointMutable; ! import org.fudaa.dodico.mnt.ListMNTPoint; ! import org.fudaa.dodico.mnt.MNTCsvFileFormat; ! import org.fudaa.dodico.mnt.MNTCsvReader; ! import org.fudaa.dodico.mnt.MNTCsvWriter; import org.fudaa.dodico.mnt.MNTPolyligne; import org.fudaa.dodico.mnt.MNTSemis; import org.fudaa.dodico.mnt.MNTZone; + import org.fudaa.dodico.telemac.io.SinusxFileFormat; import org.fudaa.dodico.telemac.io.SinusxReader; /** * @version $Id$ *************** *** 46,63 **** assertNotNull(_f); assertTrue(_f.exists()); ! String nom= _f.getName(); ! SinusxReader r= ! new SinusxReader( ! new FileReader(_f), ! new ProgressionBuAdapter(new BuTask()), ! nom, ! (int)_f.length()); ! r.read(); ! MNTZone[] zones= r.getMNTZones(); assertEquals(1, zones.length); MNTZone zone= zones[0]; ! assertEquals(zone.getNom(), _f.getName()); assertEquals(zone.getNbPointsSemis(), 5); ! MNTPoint p= new MNTPoint(); double t; MNTSemis semis= zone.getSemis(); --- 53,64 ---- assertNotNull(_f); assertTrue(_f.exists()); ! FileOperationSynthese op= ! SinusxFileFormat.getInstance().getLastVersionInstance().read(_f, null); ! MNTZone[] zones= (MNTZone[])op.getSource(); assertEquals(1, zones.length); MNTZone zone= zones[0]; ! assertEquals(zone.getNom(), DodicoLib.getSansExtension(_f.getName())); assertEquals(zone.getNbPointsSemis(), 5); ! MNTPointMutable p= new MNTPointMutable(); double t; MNTSemis semis= zone.getSemis(); *************** *** 74,78 **** assertEquals(poly.getNbPoints(), 4); assertEquals(poly.getNom(), "courbe"); ! p= new MNTPoint(-1, -1, -1); for (int i= 0; i < 4; i++) { poly.getPoint(p, i); --- 75,79 ---- assertEquals(poly.getNbPoints(), 4); assertEquals(poly.getNom(), "courbe"); ! p= new MNTPointMutable(-1d, -1d, -1d); for (int i= 0; i < 4; i++) { poly.getPoint(p, i); *************** *** 85,89 **** assertEquals(poly.getNbPoints(), 2); assertEquals(poly.getNom(), "niveau"); ! p= new MNTPoint(-1, -1, -1); for (int i= 0; i < 2; i++) { poly.getPoint(p, i); --- 86,90 ---- assertEquals(poly.getNbPoints(), 2); assertEquals(poly.getNom(), "niveau"); ! p= new MNTPointMutable(-1, -1, -1); for (int i= 0; i < 2; i++) { poly.getPoint(p, i); *************** *** 105,111 **** f= File.createTempFile("testSinux", ".sx"); assertNotNull(f); ! SinusxWriter o= ! new SinusxWriter(new PrintWriter(new FileWriter(f)), zones); ! o.write(); lecture(f); } catch (Exception _e) { --- 106,113 ---- f= File.createTempFile("testSinux", ".sx"); assertNotNull(f); ! SinusxFileFormat.getInstance().getLastVersionInstance().write( ! f, ! zones, ! null); lecture(f); } catch (Exception _e) { *************** *** 127,129 **** --- 129,197 ---- return new File(url.getPath()); } + + public void testMNTCsv() { + File f= getFile("csv1.txt"); + assertNotNull(f); + MNTCsvReader reader= new MNTCsvReader(); + reader.setFile(f); + assertEquals(";", reader.getSepChar()); + FileOperationSynthese s= reader.read(); + ListMNTPoint l= (ListMNTPoint)s.getSource(); + assertEquals(3, l.nombre()); + assertEquals(1, l.renvoieX(0), 1e-15); + assertEquals(2, l.renvoieY(0), 1e-15); + assertEquals(3, l.renvoieZ(0), 1e-15); + assertEquals(3, l.renvoieX(1), 1e-15); + assertEquals(4, l.renvoieY(1), 1e-15); + assertEquals(5, l.renvoieZ(1), 1e-15); + assertEquals(7, l.renvoieX(2), 1e-15); + assertEquals(8, l.renvoieY(2), 1e-15); + assertEquals(0, l.renvoieZ(2), 1e-15); + f= getFile("csv2.txt"); + assertNotNull(f); + reader= new MNTCsvReader(); + reader.setFile(f); + assertEquals("\t", reader.getSepChar()); + s= reader.read(); + l= (ListMNTPoint)s.getSource(); + assertEquals(3, l.nombre()); + assertEquals(1, l.renvoieX(0), 1e-15); + assertEquals(2, l.renvoieY(0), 1e-15); + assertEquals(3, l.renvoieZ(0), 1e-15); + assertEquals(3, l.renvoieX(1), 1e-15); + assertEquals(4, l.renvoieY(1), 1e-15); + assertEquals(5, l.renvoieZ(1), 1e-15); + assertEquals(7, l.renvoieX(2), 1e-15); + assertEquals(8, l.renvoieY(2), 1e-15); + assertEquals(0, l.renvoieZ(2), 1e-15); + File fW= null; + try { + fW= File.createTempFile("fudaa", ".sx"); + } catch (IOException e) { + e.printStackTrace(); + } + if (fW != null) { + MNTCsvWriter w= new MNTCsvWriter(); + w.setFile(fW); + w.setSep("\t"); + w.write(l); + reader= new MNTCsvReader(); + reader.setFile(fW); + s= reader.read(); + assertEquals("\t", reader.getSepChar()); + l= (ListMNTPoint)s.getSource(); + assertEquals(3, l.nombre()); + assertEquals(1, l.renvoieX(0), 1e-15); + assertEquals(2, l.renvoieY(0), 1e-15); + assertEquals(3, l.renvoieZ(0), 1e-15); + assertEquals(3, l.renvoieX(1), 1e-15); + assertEquals(4, l.renvoieY(1), 1e-15); + assertEquals(5, l.renvoieZ(1), 1e-15); + assertEquals(7, l.renvoieX(2), 1e-15); + assertEquals(8, l.renvoieY(2), 1e-15); + assertEquals(0, l.renvoieZ(2), 1e-15); + fW.delete(); + } + + } } Index: cas.txt =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/telemac/cas.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** cas.txt 8 Oct 2003 11:54:19 -0000 1.3 --- cas.txt 12 Feb 2004 15:32:51 -0000 1.4 *************** *** 1,3 **** ! /---------------------------------------------------------------------- / TELEMAC-2D Version 5.2R0 - Septembre 2001 / Exemple d'initiation - Calcul numero 4 / Calcul d'écoulement sur zone sèche /---------------------------------------------------------------------- / ENVIRONNEMENT INFORMATIQUE /---------------------------------------------------------------------- / FICHIER DES PARAMETRES : './cas4.txt' FICHIER DES CONDITIONS AUX LIMITES : '../../matisse/cli2.txt' FICHIER DE GEOMETRIE : '../../matisse/geo1' FICHIER DES RESULTATS : './resu4.slf' / /---------------------------------------------------------------------- / OPTIONS GENERALES /---------------------------------------------------------------------- / TITRE : 'TELEMAC-2D - Initiation - Calcul numero 4' / VARIABLES POUR LES SORTIES GRAPHIQUES : 'U,V,S,B,H,Q,M,L' VARIABLES A IMPRIMER : '' PAS DE TEMPS : 1. DUREE DU CALCUL : 1600 PERIODE POUR LES SORTIES GRAPHIQUES : 15 PERIODE DE SORTIE LISTING : 15 SUITE DE CALCUL : NON --- 1,3 ---- ! /---------------------------------------------------------------------- / TELEMAC-2D Version 5.2R0 - Septembre 2001 / Exemple d'initiation - Calcul numero 4 / Calcul d'écoulement sur zone sèche /---------------------------------------------------------------------- / ENVIRONNEMENT INFORMATIQUE /---------------------------------------------------------------------- /LE FICHIER QUI VA BIEN FICHIER DES PARAMETRES : './cas4.txt' FICHIER DES CONDITIONS AUX LIMITES : '../../matisse/cli2.txt' FICHIER DE GEOMETRIE : '../../matisse/geo1' FICHIER DES RESULTATS : './resu4.slf' / /---------------------------------------------------------------------- / OPTIONS GENERALES /---------------------------------------------------------------------- / TITRE : 'TELEMAC-2D - Initiation - Calcul numero 4' / VARIABLES POUR LES SORTIES GRAPHIQUES : 'U,V,S,B,H,Q,M,L' VARIABLES A IMPRIMER : '' PAS DE TEMPS : 1. DUREE DU CALCUL : 1600 PERIODE POUR LES SORTIES GRAPHIQUES : 15 PERIODE DE SORTIE LISTING : 15 SUITE DE CALCUL : NON |
From: <de...@us...> - 2004-02-12 15:37:51
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/h2d In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20934/test/h2d Modified Files: TestBord.java TestMaillage.java TestTransformationCorEleBthSerafin.java Log Message: Maj version 0.05 prepro Index: TestBord.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/h2d/TestBord.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** TestBord.java 12 Dec 2003 10:30:55 -0000 1.8 --- TestBord.java 12 Feb 2004 15:32:50 -0000 1.9 *************** *** 105,114 **** assertEquals(0, b.isIntersectBy(19, 15, nbP)); assertEquals(-1, b.isIntersectBy(19, 11, nbP)); ! b.setBoundaryType(H2dBoundaryType.SOLIDE); ! assertEquals(0, b.isIntersectBy(0, 12, nbP)); ! assertEquals(0, b.isIntersectBy(13, 14, nbP)); ! assertEquals(1, b.isIntersectBy(14, 14, nbP)); ! assertEquals(2, b.isIntersectBy(19, 15, nbP)); ! assertEquals(-1, b.isIntersectBy(19, 12, nbP)); b.setIdxDeb(16); b.setIdxFin(5); --- 105,114 ---- assertEquals(0, b.isIntersectBy(19, 15, nbP)); assertEquals(-1, b.isIntersectBy(19, 11, nbP)); ! // b.setBoundaryType(H2dBoundaryType.SOLIDE); ! // assertEquals(0, b.isIntersectBy(0, 12, nbP)); ! // assertEquals(1, b.isIntersectBy(13, 14, nbP)); ! // assertEquals(1, b.isIntersectBy(14, 14, nbP)); ! // assertEquals(0, b.isIntersectBy(19, 15, nbP)); ! // assertEquals(-1, b.isIntersectBy(19, 12, nbP)); b.setIdxDeb(16); b.setIdxFin(5); *************** *** 119,128 **** assertEquals(1, b.isIntersectBy(17, 4, nbP)); assertEquals(2, b.isIntersectBy(15, 6, nbP)); ! b.setBoundaryType(H2dBoundaryType.SOLIDE); ! assertEquals(-1, b.isIntersectBy(5, 16, nbP)); ! assertEquals(0, b.isIntersectBy(4, 14, nbP)); ! assertEquals(0, b.isIntersectBy(18, 9, nbP)); ! assertEquals(1, b.isIntersectBy(19, 3, nbP)); ! assertEquals(2, b.isIntersectBy(16, 5, nbP)); } } --- 119,128 ---- assertEquals(1, b.isIntersectBy(17, 4, nbP)); assertEquals(2, b.isIntersectBy(15, 6, nbP)); ! // b.setBoundaryType(H2dBoundaryType.SOLIDE); ! // assertEquals(-1, b.isIntersectBy(5, 16, nbP)); ! // assertEquals(0, b.isIntersectBy(4, 14, nbP)); ! // assertEquals(0, b.isIntersectBy(18, 9, nbP)); ! // assertEquals(1, b.isIntersectBy(19, 3, nbP)); ! // assertEquals(2, b.isIntersectBy(16, 5, nbP)); } } Index: TestMaillage.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/h2d/TestMaillage.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** TestMaillage.java 11 Dec 2003 12:41:29 -0000 1.10 --- TestMaillage.java 12 Feb 2004 15:32:50 -0000 1.11 *************** *** 8,23 **** */ package org.fudaa.dodico.test.h2d; import gnu.trove.TIntArrayList; import gnu.trove.TIntIntHashMap; import gnu.trove.TObjectIntHashMap; import java.util.Arrays; import junit.framework.TestCase; import org.fudaa.dodico.commun.DodicoLib; import org.fudaa.dodico.commun.ProgressionTestAdapter; ! import org.fudaa.dodico.h2d.H2dElement; ! import org.fudaa.dodico.h2d.H2dGrid; ! import org.fudaa.dodico.h2d.H2dFrontier; ! import org.fudaa.dodico.h2d.H2dPoint; ! import org.fudaa.dodico.h2d.H2dSegment; /** * 8 --- 8,36 ---- */ package org.fudaa.dodico.test.h2d; + import gnu.trove.TDoubleArrayList; import gnu.trove.TIntArrayList; import gnu.trove.TIntIntHashMap; import gnu.trove.TObjectIntHashMap; + + import java.awt.Polygon; + import java.util.ArrayList; import java.util.Arrays; + + import org.fudaa.ctulu.CtuluGeometrie; + import junit.framework.TestCase; + + import org.fudaa.dodico.commun.DodicoAnalyze; import org.fudaa.dodico.commun.DodicoLib; import org.fudaa.dodico.commun.ProgressionTestAdapter; ! import org.fudaa.dodico.ef.EfElement; ! import org.fudaa.dodico.ef.EfFrontier; ! import org.fudaa.dodico.ef.EfGrid; ! import org.fudaa.dodico.ef.EfInterpolationGrid; ! import org.fudaa.dodico.ef.EfLib; ! import org.fudaa.dodico.ef.EfdSegment; ! import org.fudaa.dodico.ef.EfNode; ! import org.fudaa.dodico.interpolateur.Interpolateur; ! import org.fudaa.dodico.interpolateur.InterpolationNearestNeighborRef; /** * 8 *************** *** 37,41 **** */ public class TestMaillage extends TestCase { ! H2dGrid mail_; double eps_; ProgressionTestAdapter progress_; --- 50,54 ---- */ public class TestMaillage extends TestCase { ! EfGrid mail_; double eps_; ProgressionTestAdapter progress_; *************** *** 44,72 **** */ public TestMaillage() { ! progress_= new ProgressionTestAdapter(); eps_= 1E-15; } ! public static H2dGrid createMaillage() { ! H2dPoint[] pts= new H2dPoint[9]; ! pts[0]= new H2dPoint(0, 0, 15); ! pts[1]= new H2dPoint(2, -1, -15); ! pts[2]= new H2dPoint(1, 2, -5); ! pts[3]= new H2dPoint(2, 2, 30); ! pts[4]= new H2dPoint(0, 2, 30); ! pts[5]= new H2dPoint(1, 4, 30); ! pts[6]= new H2dPoint(10, 11, 30); ! pts[7]= new H2dPoint(0, 4, 30); ! pts[8]= new H2dPoint(2, 20, 30); ! H2dElement[] elt= new H2dElement[9]; ! elt[0]= new H2dElement(new int[] { 0, 2, 1 }); ! elt[1]= new H2dElement(new int[] { 1, 2, 3 }); ! elt[2]= new H2dElement(new int[] { 0, 4, 2 }); ! elt[3]= new H2dElement(new int[] { 4, 5, 2 }); ! elt[4]= new H2dElement(new int[] { 5, 6, 3 }); ! elt[5]= new H2dElement(new int[] { 5, 4, 7 }); ! elt[6]= new H2dElement(new int[] { 1, 3, 6 }); ! elt[7]= new H2dElement(new int[] { 7, 8, 5 }); ! elt[8]= new H2dElement(new int[] { 6, 5, 8 }); ! return new H2dGrid(pts, elt); } private void initMaillage() { --- 57,133 ---- */ public TestMaillage() { ! progress_= null; eps_= 1E-15; } ! ! public void testAireTriangle() { ! double x1= 0; ! double y1= 0; ! double x2= 5; ! double y2= 0; ! double x3= 0; ! double y3= 5; ! assertEquals( ! 12.5, ! CtuluGeometrie.aireTriangle(x1, y1, x2, y2, x3, y3), ! eps_); ! x3= -15; ! assertEquals( ! 12.5, ! CtuluGeometrie.aireTriangle(x1, y1, x2, y2, x3, y3), ! eps_); ! x3= 15; ! y3= -5; ! assertEquals( ! 12.5, ! CtuluGeometrie.aireTriangle(x1, y1, x2, y2, x3, y3), ! eps_); ! initMaillage(); ! int[] l= mail_.getSmallElement(null, 1); ! assertNotNull(l); ! assertEquals(3, l.length); ! Arrays.sort(l); ! assertEquals(2, l[0]); ! assertEquals(3, l[1]); ! assertEquals(5, l[2]); ! l= mail_.getSmallElement(null, 0.95); ! assertNull(l); ! ! initMaillageT6(); ! l= mail_.getSmallElement(null, 1); ! assertNotNull(l); ! assertEquals(3, l.length); ! Arrays.sort(l); ! assertEquals(2, l[0]); ! assertEquals(3, l[1]); ! assertEquals(5, l[2]); ! l= mail_.getSmallElement(null, 0.95); ! assertNull(l); ! ! } ! ! public static EfGrid createMaillage() { ! EfNode[] pts= new EfNode[9]; ! pts[0]= new EfNode(0, 0, 15); ! pts[1]= new EfNode(2, -1, -15); ! pts[2]= new EfNode(1, 2, -5); ! pts[3]= new EfNode(2, 2, 30); ! pts[4]= new EfNode(0, 2, 30); ! pts[5]= new EfNode(1, 4, 30); ! pts[6]= new EfNode(10, 11, 30); ! pts[7]= new EfNode(0, 4, 30); ! pts[8]= new EfNode(2, 20, 30); ! EfElement[] elt= new EfElement[9]; ! elt[0]= new EfElement(new int[] { 0, 2, 1 }); ! elt[1]= new EfElement(new int[] { 1, 2, 3 }); ! elt[2]= new EfElement(new int[] { 0, 4, 2 }); ! elt[3]= new EfElement(new int[] { 4, 5, 2 }); ! elt[4]= new EfElement(new int[] { 5, 6, 3 }); ! elt[5]= new EfElement(new int[] { 5, 4, 7 }); ! elt[6]= new EfElement(new int[] { 1, 3, 6 }); ! elt[7]= new EfElement(new int[] { 7, 8, 5 }); ! elt[8]= new EfElement(new int[] { 6, 5, 8 }); ! EfGrid r= new EfGrid(pts, elt); ! return r; } private void initMaillage() { *************** *** 76,141 **** mail_= createMaillageT6(); } ! public static H2dGrid createMaillageT6() { ! H2dPoint[] pts= new H2dPoint[27]; ! pts[0]= new H2dPoint(0, 0, 15); ! pts[1]= new H2dPoint(2, -1, -15); ! pts[2]= new H2dPoint(1, 2, -5); ! pts[3]= new H2dPoint(2, 2, 30); ! pts[4]= new H2dPoint(0, 2, 30); ! pts[5]= new H2dPoint(1, 4, 30); ! pts[6]= new H2dPoint(10, 11, 30); ! pts[7]= new H2dPoint(0, 4, 30); ! pts[8]= new H2dPoint(2, 20, 30); //elt 0 ! pts[9]= H2dPoint.createMilieu(pts[0], pts[2]); ! pts[10]= H2dPoint.createMilieu(pts[2], pts[1]); ! pts[11]= H2dPoint.createMilieu(pts[1], pts[0]); //elt 1 ! pts[12]= H2dPoint.createMilieu(pts[2], pts[3]); ! pts[13]= H2dPoint.createMilieu(pts[1], pts[3]); //pts10 //elt 2 ! pts[14]= H2dPoint.createMilieu(pts[0], pts[4]); ! pts[15]= H2dPoint.createMilieu(pts[4], pts[2]); //pts 9 // elt 3 ! pts[16]= H2dPoint.createMilieu(pts[5], pts[4]); ! pts[17]= H2dPoint.createMilieu(pts[5], pts[2]); //pts 15 // elt 4 ! pts[18]= H2dPoint.createMilieu(pts[5], pts[6]); ! pts[19]= H2dPoint.createMilieu(pts[3], pts[6]); ! pts[20]= H2dPoint.createMilieu(pts[5], pts[3]); // elt 5 ! pts[21]= H2dPoint.createMilieu(pts[4], pts[7]); ! pts[22]= H2dPoint.createMilieu(pts[5], pts[7]); //pts 16 // elt 6 //pts12 //pts19 ! pts[23]= H2dPoint.createMilieu(pts[6], pts[1]); // elt 7 ! pts[24]= H2dPoint.createMilieu(pts[7], pts[8]); ! pts[25]= H2dPoint.createMilieu(pts[8], pts[5]); //pts 21 // elt 8 ! pts[26]= H2dPoint.createMilieu(pts[6], pts[8]); //Pts 25 //pts 20 ! H2dElement[] elt= new H2dElement[9]; ! elt[0]= new H2dElement(new int[] { 0, 9, 2, 10, 1, 11 }); ! elt[1]= new H2dElement(new int[] { 1, 10, 2, 12, 3, 13 }); ! elt[2]= new H2dElement(new int[] { 0, 14, 4, 15, 2, 9 }); ! elt[3]= new H2dElement(new int[] { 4, 16, 5, 17, 2, 15 }); ! elt[4]= new H2dElement(new int[] { 5, 18, 6, 19, 3, 20 }); ! elt[5]= new H2dElement(new int[] { 5, 16, 4, 21, 7, 22 }); ! elt[6]= new H2dElement(new int[] { 1, 13, 3, 19, 6, 23 }); ! elt[7]= new H2dElement(new int[] { 7, 24, 8, 25, 5, 22 }); ! elt[8]= new H2dElement(new int[] { 6, 18, 5, 25, 8, 26 }); ! return new H2dGrid(pts, elt); } public void testTrigo() { initMaillage(); ! H2dElement el= mail_.getElement(0); assertEquals(el.getPtIndex(0), 0); assertEquals(el.getPtIndex(1), 2); --- 137,203 ---- mail_= createMaillageT6(); } ! public static EfGrid createMaillageT6() { ! EfNode[] pts= new EfNode[27]; ! pts[0]= new EfNode(0, 0, 15); ! pts[1]= new EfNode(2, -1, -15); ! pts[2]= new EfNode(1, 2, -5); ! pts[3]= new EfNode(2, 2, 30); ! pts[4]= new EfNode(0, 2, 30); ! pts[5]= new EfNode(1, 4, 30); ! pts[6]= new EfNode(10, 11, 30); ! pts[7]= new EfNode(0, 4, 30); ! pts[8]= new EfNode(2, 20, 30); //elt 0 ! pts[9]= EfNode.createMilieu(pts[0], pts[2]); ! pts[10]= EfNode.createMilieu(pts[2], pts[1]); ! pts[11]= EfNode.createMilieu(pts[1], pts[0]); //elt 1 ! pts[12]= EfNode.createMilieu(pts[2], pts[3]); ! pts[13]= EfNode.createMilieu(pts[1], pts[3]); //pts10 //elt 2 ! pts[14]= EfNode.createMilieu(pts[0], pts[4]); ! pts[15]= EfNode.createMilieu(pts[4], pts[2]); //pts 9 // elt 3 ! pts[16]= EfNode.createMilieu(pts[5], pts[4]); ! pts[17]= EfNode.createMilieu(pts[5], pts[2]); //pts 15 // elt 4 ! pts[18]= EfNode.createMilieu(pts[5], pts[6]); ! pts[19]= EfNode.createMilieu(pts[3], pts[6]); ! pts[20]= EfNode.createMilieu(pts[5], pts[3]); // elt 5 ! pts[21]= EfNode.createMilieu(pts[4], pts[7]); ! pts[22]= EfNode.createMilieu(pts[5], pts[7]); //pts 16 // elt 6 //pts12 //pts19 ! pts[23]= EfNode.createMilieu(pts[6], pts[1]); // elt 7 ! pts[24]= EfNode.createMilieu(pts[7], pts[8]); ! pts[25]= EfNode.createMilieu(pts[8], pts[5]); //pts 21 // elt 8 ! pts[26]= EfNode.createMilieu(pts[6], pts[8]); //Pts 25 //pts 20 ! EfElement[] elt= new EfElement[9]; ! elt[0]= new EfElement(new int[] { 0, 9, 2, 10, 1, 11 }); ! elt[1]= new EfElement(new int[] { 1, 10, 2, 12, 3, 13 }); ! elt[2]= new EfElement(new int[] { 0, 14, 4, 15, 2, 9 }); ! elt[3]= new EfElement(new int[] { 4, 16, 5, 17, 2, 15 }); ! elt[4]= new EfElement(new int[] { 5, 18, 6, 19, 3, 20 }); ! elt[5]= new EfElement(new int[] { 5, 16, 4, 21, 7, 22 }); ! elt[6]= new EfElement(new int[] { 1, 13, 3, 19, 6, 23 }); ! elt[7]= new EfElement(new int[] { 7, 24, 8, 25, 5, 22 }); ! elt[8]= new EfElement(new int[] { 6, 18, 5, 25, 8, 26 }); ! EfGrid r= new EfGrid(pts, elt); ! return r; } public void testTrigo() { initMaillage(); ! EfElement el= mail_.getElement(0); assertEquals(el.getPtIndex(0), 0); assertEquals(el.getPtIndex(1), 2); *************** *** 152,159 **** assertEquals(el.isSegmentInEltOrient(2, 3), 1); assertEquals(el.isSegmentInEltOrient(2, 2), 0); } public void testTrigoT6() { initMaillageT6(); ! H2dElement el= mail_.getElement(0); assertEquals(el.getPtIndex(0), 0); assertEquals(el.getPtIndex(1), 9); --- 214,274 ---- assertEquals(el.isSegmentInEltOrient(2, 3), 1); assertEquals(el.isSegmentInEltOrient(2, 2), 0); + double d= el.getAngle(mail_, 2) * 180 / Math.PI; + assertEquals(90, d, eps_); + d= el.getAngle(mail_, 0) * 180 / Math.PI; + assertEquals(18.4349, d, 1e-3); + d= el.getAngle(mail_, 1) * 180 / Math.PI; + assertEquals(90 - 18.4349, d, 1e-3); + } + + public void testOverstressed() { + initMaillage(); + int[] overI= mail_.getOverstressedElement(null); + assertNotNull(overI); + assertEquals(9, overI.length); + EfElement[] nElt= new EfElement[mail_.getEltNb() + 1]; + for (int i= 0; i < mail_.getEltNb(); i++) { + nElt[i]= new EfElement(mail_.getElement(i)); + } + nElt[mail_.getEltNb()]= new EfElement(new int[] { 2, 3, 5 }); + EfNode[] nPt= new EfNode[mail_.getPtsNb() + 1]; + for (int i= 0; i < mail_.getPtsNb(); i++) { + nPt[i]= new EfNode(mail_.getPt(i)); + } + EfGrid n= new EfGrid(nPt, nElt); + EfLib.orienteGrid(n, null, true, null); + n.computeBord(null); + assertNull(n.getOverstressedElement(null)); + + } + + public void testContains() { + initMaillage(); + mail_.computeBord(null); + // Polygon l=new Polygon(); + // + // for(int i=mail_.getFrontiers().getNbPt(0)-1;i>=0;i--){ + // l.addPoint((int)mail_.getPointOnFrontierExtern(i).getX(), + // (int)mail_.getPointOnFrontierExtern(i).getY()); + // } + // for(int i=mail_.getFrontiers().getNbPt(0)-1;i>=0;i--){ + // assertTrue(l.contains(mail_.getPointOnFrontierExtern(i).getX(),mail_.getPointOnFrontierExtern(i).getY())); + // } + // System.out.println("POLYGON OK"); + + for (int i= mail_.getFrontiers().getNbPt(0) - 1; i >= 0; i--) { + assertTrue(mail_.contientPoint(mail_.getPointOnFrontierExtern(i))); + } + + assertFalse(mail_.contientPoint(0, 5)); + assertFalse(mail_.contientPoint(2.1, 20)); + assertTrue(mail_.contientPoint(1, 12)); + assertEquals(1, mail_.getDistanceFromFrontier(-1, 1), eps_); + assertEquals(1, mail_.getDistanceFromFrontier(1, 1), eps_); + assertEquals(0, mail_.getDistanceFromFrontier(1, -0.5), eps_); } public void testTrigoT6() { initMaillageT6(); ! EfElement el= mail_.getElement(0); assertEquals(el.getPtIndex(0), 0); assertEquals(el.getPtIndex(1), 9); *************** *** 172,176 **** } private void _testMinMaxCommun() { ! H2dPoint p= mail_.getMaxPoint(); assertEquals(p.getX(), 10, eps_); assertEquals(p.getY(), 20, eps_); --- 287,291 ---- } private void _testMinMaxCommun() { ! EfNode p= mail_.getMaxPoint(); assertEquals(p.getX(), 10, eps_); assertEquals(p.getY(), 20, eps_); *************** *** 190,194 **** } public void _testBordCommun() { ! H2dFrontier bord= mail_.getFrontiers(); assertEquals(2, bord.getNbFrontier()); int[] eltContains4= mail_.getEltIdxContainsPtIdx(4); --- 305,309 ---- } public void _testBordCommun() { ! EfFrontier bord= mail_.getFrontiers(); assertEquals(2, bord.getNbFrontier()); int[] eltContains4= mail_.getEltIdxContainsPtIdx(4); *************** *** 223,227 **** } public void _testBordCommunT6() { ! H2dFrontier bord= mail_.getFrontiers(); assertEquals(bord.getNbFrontier(), 2); int[] eltContains4= mail_.getEltIdxContainsPtIdx(4); --- 338,342 ---- } public void _testBordCommunT6() { ! EfFrontier bord= mail_.getFrontiers(); assertEquals(bord.getNbFrontier(), 2); int[] eltContains4= mail_.getEltIdxContainsPtIdx(4); *************** *** 257,268 **** initMaillage(); TObjectIntHashMap segmentPtIdx= new TObjectIntHashMap(mail_.getEltNb() * 3); ! H2dGrid temp= mail_.maillageT3enT6(progress_, segmentPtIdx); assertEquals(temp.getEltNb(), 9); assertEquals(27, temp.getPtsNb()); initMaillageT6(); ! for (int i= 0; i < mail_.getPtsNb(); i++) { ! assertTrue(temp.getPt(i).isSame(mail_.getPt(i))); ! } ! H2dSegment s= new H2dSegment(0, 1); assertEquals(11, segmentPtIdx.get(s)); s.setPt1Idx(1); --- 372,381 ---- initMaillage(); TObjectIntHashMap segmentPtIdx= new TObjectIntHashMap(mail_.getEltNb() * 3); ! EfGrid temp= EfLib.maillageT3enT6(mail_, progress_, segmentPtIdx); assertEquals(temp.getEltNb(), 9); assertEquals(27, temp.getPtsNb()); initMaillageT6(); ! assertTrue(temp.isEquivalent(mail_, true, eps_)); ! EfdSegment s= new EfdSegment(0, 1); assertEquals(11, segmentPtIdx.get(s)); s.setPt1Idx(1); *************** *** 314,326 **** s.setPt2Idx(6); assertEquals(26, segmentPtIdx.get(s)); ! assertTrue(temp.isSame(mail_)); } public void testT61T3() { initMaillageT6(); TIntIntHashMap T6T3Corresp= new TIntIntHashMap(mail_.getPtsNb() / 2); ! System.out.println("element type " + mail_.getEltType()); ! H2dGrid temp= mail_.maillageT6enT3(progress_, T6T3Corresp); assertNotNull(temp); ! temp.isSame(mail_); assertEquals(9, T6T3Corresp.size()); for (int i= 0; i < 9; i++) { --- 427,438 ---- s.setPt2Idx(6); assertEquals(26, segmentPtIdx.get(s)); ! assertTrue(temp.isSameStrict(mail_)); } public void testT61T3() { initMaillageT6(); TIntIntHashMap T6T3Corresp= new TIntIntHashMap(mail_.getPtsNb() / 2); ! EfGrid temp= EfLib.maillageT6enT3(mail_, progress_, T6T3Corresp); assertNotNull(temp); ! temp.isSameStrict(mail_); assertEquals(9, T6T3Corresp.size()); for (int i= 0; i < 9; i++) { *************** *** 328,369 **** } //Autre essai ! H2dPoint[] pts= new H2dPoint[15]; ! pts[0]= new H2dPoint(0, 0, 0); ! pts[1]= new H2dPoint(1, 1, 0); ! pts[2]= new H2dPoint(2, 2, 0); ! pts[3]= new H2dPoint(3, 3, 0); ! pts[4]= new H2dPoint(4, 4, 0); ! pts[5]= new H2dPoint(5, 3, 0); ! pts[6]= new H2dPoint(6, 2, 0); ! pts[7]= new H2dPoint(7, 1, 0); ! pts[8]= new H2dPoint(8, 0, 0); ! pts[9]= new H2dPoint(6, 0, 0); ! pts[10]= new H2dPoint(4, 0, 0); ! pts[11]= new H2dPoint(2, 0, 0); ! pts[12]= new H2dPoint(3, 1, 0); ! pts[13]= new H2dPoint(4, 2, 0); ! pts[14]= new H2dPoint(5, 1, 0); ! H2dElement[] elt= new H2dElement[4]; ! elt[0]= new H2dElement(new int[] { 0, 1, 2, 12, 10, 11 }); ! elt[1]= new H2dElement(new int[] { 2, 3, 4, 5, 6, 13 }); ! elt[2]= new H2dElement(new int[] { 6, 7, 8, 9, 10, 14 }); ! elt[3]= new H2dElement(new int[] { 10, 12, 2, 13, 6, 14 }); //Attention a bien initialiser la table de correspondance. T6T3Corresp.clear(); ! H2dGrid t3calc= new H2dGrid(pts, elt).maillageT6enT3(null, T6T3Corresp); ! pts= new H2dPoint[6]; ! pts[0]= new H2dPoint(0, 0, 0); ! pts[1]= new H2dPoint(2, 2, 0); ! pts[2]= new H2dPoint(4, 4, 0); ! pts[3]= new H2dPoint(6, 2, 0); ! pts[4]= new H2dPoint(8, 0, 0); ! pts[5]= new H2dPoint(4, 0, 0); ! elt= new H2dElement[4]; ! elt[0]= new H2dElement(new int[] { 0, 1, 5 }); ! elt[1]= new H2dElement(new int[] { 1, 2, 3 }); ! elt[2]= new H2dElement(new int[] { 3, 4, 5 }); ! elt[3]= new H2dElement(new int[] { 5, 1, 3 }); ! H2dGrid t3final= new H2dGrid(pts, elt); ! assertTrue(t3calc.isSame(t3final)); for (int i= 0; i < pts.length; i++) { assertEquals(i, T6T3Corresp.get(2 * i)); --- 440,482 ---- } //Autre essai ! EfNode[] pts= new EfNode[15]; ! pts[0]= new EfNode(0, 0, 0); ! pts[1]= new EfNode(1, 1, 0); ! pts[2]= new EfNode(2, 2, 0); ! pts[3]= new EfNode(3, 3, 0); ! pts[4]= new EfNode(4, 4, 0); ! pts[5]= new EfNode(5, 3, 0); ! pts[6]= new EfNode(6, 2, 0); ! pts[7]= new EfNode(7, 1, 0); ! pts[8]= new EfNode(8, 0, 0); ! pts[9]= new EfNode(6, 0, 0); ! pts[10]= new EfNode(4, 0, 0); ! pts[11]= new EfNode(2, 0, 0); ! pts[12]= new EfNode(3, 1, 0); ! pts[13]= new EfNode(4, 2, 0); ! pts[14]= new EfNode(5, 1, 0); ! EfElement[] elt= new EfElement[4]; ! elt[0]= new EfElement(new int[] { 0, 1, 2, 12, 10, 11 }); ! elt[1]= new EfElement(new int[] { 2, 3, 4, 5, 6, 13 }); ! elt[2]= new EfElement(new int[] { 6, 7, 8, 9, 10, 14 }); ! elt[3]= new EfElement(new int[] { 10, 12, 2, 13, 6, 14 }); //Attention a bien initialiser la table de correspondance. T6T3Corresp.clear(); ! EfGrid t3calc= ! EfLib.maillageT6enT3(new EfGrid(pts, elt), null, T6T3Corresp); ! pts= new EfNode[6]; ! pts[0]= new EfNode(0, 0, 0); ! pts[1]= new EfNode(2, 2, 0); ! pts[2]= new EfNode(4, 4, 0); ! pts[3]= new EfNode(6, 2, 0); ! pts[4]= new EfNode(8, 0, 0); ! pts[5]= new EfNode(4, 0, 0); ! elt= new EfElement[4]; ! elt[0]= new EfElement(new int[] { 0, 1, 5 }); ! elt[1]= new EfElement(new int[] { 1, 2, 3 }); ! elt[2]= new EfElement(new int[] { 3, 4, 5 }); ! elt[3]= new EfElement(new int[] { 5, 1, 3 }); ! EfGrid t3final= new EfGrid(pts, elt); ! assertTrue(t3calc.isSameStrict(t3final)); for (int i= 0; i < pts.length; i++) { assertEquals(i, T6T3Corresp.get(2 * i)); *************** *** 372,379 **** public void testT6en4T3() { initMaillageT6(); ! H2dGrid temp= mail_.maillageT6en4T3(progress_); assertNotNull(temp); assertEquals(36, temp.getEltNb()); ! H2dElement t= temp.getElement(0); assertEquals(t.getPtIndex(0), 0); assertEquals(t.getPtIndex(1), 9); --- 485,492 ---- public void testT6en4T3() { initMaillageT6(); ! EfGrid temp= EfLib.maillageT6en4T3(mail_, progress_); assertNotNull(temp); assertEquals(36, temp.getEltNb()); ! EfElement t= temp.getElement(0); assertEquals(t.getPtIndex(0), 0); assertEquals(t.getPtIndex(1), 9); *************** *** 403,407 **** initMaillage(); int[] ipobo= new int[] { 0, 1, 6, 8, 7, 4, 2, 5, 3 }; ! H2dGrid.computeBordFast(mail_, ipobo, null); _testBordCommun(); } --- 516,520 ---- initMaillage(); int[] ipobo= new int[] { 0, 1, 6, 8, 7, 4, 2, 5, 3 }; ! EfGrid.computeBordFast(mail_, ipobo, null); _testBordCommun(); } *************** *** 410,417 **** initMaillage(); mail_.computeBord(null); ! System.out.println("alors"); ! System.out.println( ! DodicoLib._printObject(mail_.getFrontiers().getArray(), true)); ! for (H2dFrontier.FrontiereIdxIterator it= mail_.getFrontiers().getFrontierIterator(); it.hasNext(); --- 523,527 ---- initMaillage(); mail_.computeBord(null); ! for (EfFrontier.FrontiereIdxIterator it= mail_.getFrontiers().getFrontierIterator(); it.hasNext(); *************** *** 421,427 **** assertTrue(mail_.getFrontiers().isSame(l.toNativeArray())); } public void TestShiftElement() { ! H2dElement el= new H2dElement(new int[] { 1, 2, 3, 4, 5 }); ! H2dElement n= H2dElement.ShiftLeftElementIndex(el); assertEquals(n.getPtNb(), 5); assertEquals(n.getPtIndex(0), 2); --- 531,702 ---- assertTrue(mail_.getFrontiers().isSame(l.toNativeArray())); } + + public void testInterpRef() { + initMaillage(); + InterpolationNearestNeighborRef ref= mail_; + int[] d= new int[4]; + assertTrue(ref.getQuadrantIdx(1, -2, d)); + assertEquals(-1, d[0]); + assertEquals(-1, d[1]); + assertEquals(1, d[2]); + assertEquals(0, d[3]); + assertTrue(ref.getQuadrantIdx(1, 0, d)); + assertEquals(0, d[0]); + assertEquals(1, d[1]); + assertEquals(2, d[2]); + assertEquals(0, d[3]); + assertTrue(ref.getQuadrantIdx(0.5, 3, d)); + assertEquals(4, d[0]); + assertEquals(2, d[1]); + assertEquals(5, d[2]); + assertEquals(7, d[3]); + //pour verifier que les -1 sont bien remis + assertTrue(ref.getQuadrantIdx(1, -2, d)); + assertEquals(-1, d[0]); + assertEquals(-1, d[1]); + assertEquals(1, d[2]); + assertEquals(0, d[3]); + } + + public void testInterpolFromGrid() { + initMaillage(); + EfGrid target; + DodicoAnalyze a; + double[] d; + target= createMaillage(); + a= new DodicoAnalyze(); + EfLib.orienteGrid(mail_, null, true, null); + d= EfInterpolationGrid.interpolation(mail_, target, a, null); + if (!a.isEmpty()) { + a.printResume(); + } + assertTrue(a.isEmpty()); + assertEquals(target.getPtsNb(), d.length); + for (int i= target.getPtsNb() - 1; i >= 0; i--) { + assertEquals(d[i], target.getPt(i).getZ(), eps_); + } + initMaillageT6(); + EfLib.orienteGrid(mail_, null, true, null); + target= createMaillageT6(); + a= new DodicoAnalyze(); + d= EfInterpolationGrid.interpolation(mail_, target, a, null); + if (!a.isEmpty()) { + a.printResume(); + } + assertTrue(a.isEmpty()); + assertEquals(target.getPtsNb(), d.length); + for (int i= target.getPtsNb() - 1; i >= 0; i--) { + assertEquals(d[i], target.getPt(i).getZ(), eps_); + } + } + + private static double getInterpolValue( + double _d1, + double _z1, + double _d2, + double _z2) { + return (_z1 / (_d1 * _d1) + _z2 / (_d2 * _d2)) + / (1 / (_d1 * _d1) + 1 / (_d2 * _d2)); + } + + private static double getInterpolValue( + double _d1, + double _z1, + double _d2, + double _z2, + double _d3, + double _z3, + double _d4, + double _z4) { + return ( + _z1 / (_d1 * _d1) + + _z2 / (_d2 * _d2) + + _z3 / (_d3 * _d3) + + _z4 / (_d4 * _d4)) + / (1 / (_d1 * _d1) + 1 / (_d2 * _d2) + 1 / (_d3 * _d3) + 1 / (_d4 * _d4)); + } + + public void testInterpolation() { + initMaillage(); + EfGrid g2= createMaillage(); + //premier test primaire pour verifier l'interpolation + InterpolationNearestNeighborRef ref= g2; + DodicoAnalyze a= new DodicoAnalyze(); + + double[] z= Interpolateur.interpol(mail_, ref, 1, a, null); + assertTrue(a.isEmpty()); + assertEquals(g2.getPtsNb(), z.length); + for (int i= z.length - 1; i >= 0; i--) { + assertEquals(z[i], mail_.getPt(i).getZ(), eps_); + } + ArrayList l= new ArrayList(); + //le point 0 + l.add(new EfNode(-0.5, 0, 3)); + // le point 0 + l.add(new EfNode(0.5, -0.5, 14)); + l.add(new EfNode(0.5, 0.5, 4)); + //le point 4 + l.add(new EfNode(-0.5, 2, -4)); + //le point 4 et 2 + l.add(new EfNode(0.5, 2, 14)); + //le point 7 + l.add(new EfNode(-0.5, 4, 3)); + //le point 7 et 5 + l.add(new EfNode(0.5, 4, 34)); + //le point 5 + l.add(new EfNode(1.5, 4, 21354)); + //le point 2 et 3 + l.add(new EfNode(1.5, 2, 3)); + //le point 3 + l.add(new EfNode(3.5, 2, 45)); + //le point 1 + l.add(new EfNode(1.5, -1, 45)); + //le point 1 + l.add(new EfNode(2.5, -1, 1)); + //le point 6 + l.add(new EfNode(10, 11.5, 0)); + // le point 6 + l.add(new EfNode(10, 10.5, 14)); + //le point 8 qui ne sera pas pris en compte + //car les points ref en dehors de la frontiere et trop loin + l.add(new EfNode(-1, 20, 4)); + l.add(new EfNode(5, 20, 4)); + // les z attendus + TDoubleArrayList d= new TDoubleArrayList(); + //0 + double dist= CtuluGeometrie.getDistance(0, 0, 0.5, 0.5); + + d.add(getInterpolValue(0.5, 3, 0.5, 3, dist, 14, dist, 4)); + //1 + d.add(getInterpolValue(0.5, 1, 0.5, 45)); + //2 + d.add(getInterpolValue(0.5, 3, 0.5, 14)); + // 3 + d.add(getInterpolValue(1.5, 45, 0.5, 3)); + // 4 + d.add(getInterpolValue(0.5, 14, 0.5, -4)); + // 5 + d.add(getInterpolValue(0.5, 34, 0.5, 21354)); + //6 + double d6= getInterpolValue(0.5, 0, 0.5, 14); + d.add(d6); + //7 + d.add(getInterpolValue(0.5, 3, 0.5, 34)); + //8 idem que 6 + d.add(d6); + EfNode[] list= new EfNode[l.size()]; + l.toArray(list); + ref= new InterpolationNearestNeighborRef.ListOnZ(list); + z= Interpolateur.interpol(mail_, ref, 1, a, null); + assertFalse(a.isEmpty()); + assertEquals(z.length, d.size()); + for (int i= z.length - 1; i >= 0; i--) { + assertEquals(d.getQuick(i), z[i], eps_); + } + + } public void TestShiftElement() { ! EfElement el= new EfElement(new int[] { 1, 2, 3, 4, 5 }); ! EfElement n= EfElement.ShiftLeftElementIndex(el); assertEquals(n.getPtNb(), 5); assertEquals(n.getPtIndex(0), 2); Index: TestTransformationCorEleBthSerafin.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/h2d/TestTransformationCorEleBthSerafin.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TestTransformationCorEleBthSerafin.java 25 Nov 2003 10:12:00 -0000 1.4 --- TestTransformationCorEleBthSerafin.java 12 Feb 2004 15:32:50 -0000 1.5 *************** *** 12,20 **** import org.fudaa.dodico.commun.DodicoLib; import org.fudaa.dodico.commun.ProgressionTestAdapter; import org.fudaa.dodico.fichiers.FileFormat; import org.fudaa.dodico.fichiers.FileFormatVersion; import org.fudaa.dodico.fichiers.FileOperationSynthese; import org.fudaa.dodico.fortran.NativeBinaryInputStream; - import org.fudaa.dodico.h2d.H2dGrid; import org.fudaa.dodico.reflux.io.CorEleBthFileFormat; import org.fudaa.dodico.reflux.io.CorEleBthInterface; --- 12,21 ---- import org.fudaa.dodico.commun.DodicoLib; import org.fudaa.dodico.commun.ProgressionTestAdapter; + import org.fudaa.dodico.ef.EfGrid; + import org.fudaa.dodico.ef.EfLib; import org.fudaa.dodico.fichiers.FileFormat; import org.fudaa.dodico.fichiers.FileFormatVersion; import org.fudaa.dodico.fichiers.FileOperationSynthese; import org.fudaa.dodico.fortran.NativeBinaryInputStream; import org.fudaa.dodico.reflux.io.CorEleBthFileFormat; import org.fudaa.dodico.reflux.io.CorEleBthInterface; *************** *** 53,62 **** synth.printAnalyze(); CorEleBthInterface inter= (CorEleBthInterface)synth.getSource(); ! H2dGrid mail= inter.getMaillage(); long t1= System.currentTimeMillis(); mail.computeBord(null); long t2= System.currentTimeMillis(); System.out.println(t2 - t1); ! H2dGrid maillageSimpleT3= mail.maillageT6enT3(progres, null); t1= System.currentTimeMillis(); maillageSimpleT3.computeBord(null); --- 54,63 ---- synth.printAnalyze(); CorEleBthInterface inter= (CorEleBthInterface)synth.getSource(); ! EfGrid mail= inter.getGrid(); long t1= System.currentTimeMillis(); mail.computeBord(null); long t2= System.currentTimeMillis(); System.out.println(t2 - t1); ! EfGrid maillageSimpleT3= EfLib.maillageT6enT3(mail,progres, null); t1= System.currentTimeMillis(); maillageSimpleT3.computeBord(null); |
From: <de...@us...> - 2004-02-12 15:37:51
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/reflux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20934/test/reflux Modified Files: TestCorEleBth.java TestDunes.java TestINP.java Log Message: Maj version 0.05 prepro Index: TestCorEleBth.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/reflux/TestCorEleBth.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** TestCorEleBth.java 11 Dec 2003 12:41:29 -0000 1.12 --- TestCorEleBth.java 12 Feb 2004 15:32:50 -0000 1.13 *************** *** 13,20 **** import org.fudaa.dodico.commun.DodicoLib; import org.fudaa.dodico.commun.ProgressionBuAdapter; import org.fudaa.dodico.fichiers.FileOperationSynthese; - import org.fudaa.dodico.h2d.H2dElement; - import org.fudaa.dodico.h2d.H2dGrid; - import org.fudaa.dodico.h2d.type.H2dElementType; import org.fudaa.dodico.reflux.io.CorEleBthFileFormat; import org.fudaa.dodico.reflux.io.CorEleBthInterface; --- 13,20 ---- import org.fudaa.dodico.commun.DodicoLib; import org.fudaa.dodico.commun.ProgressionBuAdapter; + import org.fudaa.dodico.ef.EfElement; + import org.fudaa.dodico.ef.EfGrid; + import org.fudaa.dodico.ef.EfElementType; import org.fudaa.dodico.fichiers.FileOperationSynthese; import org.fudaa.dodico.reflux.io.CorEleBthFileFormat; import org.fudaa.dodico.reflux.io.CorEleBthInterface; *************** *** 34,40 **** assertNotNull(_inter); CorEleBthInterface t= _inter; ! H2dGrid maill= t.getMaillage(); assertNotNull(maill); ! assertEquals(maill.getEltType(), H2dElementType.T6); //H2dPoint[] pts= maill.getPts(); assertEquals(maill.getPtsNb(), 1791); --- 34,40 ---- assertNotNull(_inter); CorEleBthInterface t= _inter; ! EfGrid maill= t.getGrid(); assertNotNull(maill); ! assertEquals(maill.getEltType(), EfElementType.T6); //H2dPoint[] pts= maill.getPts(); assertEquals(maill.getPtsNb(), 1791); *************** *** 60,64 **** assertEquals(d, dLu, eps_); //test sur l'element 33 ! H2dElement ele=maill.getElement(33); assertEquals(maill.getEltNb(), 792); assertEquals(maill.getElement(33).getPtNb(), 6); --- 60,64 ---- assertEquals(d, dLu, eps_); //test sur l'element 33 ! EfElement ele=maill.getElement(33); assertEquals(maill.getEltNb(), 792); assertEquals(maill.getElement(33).getPtNb(), 6); *************** *** 138,144 **** FileOperationSynthese op= reader.read(); t= (CorEleBthInterface)op.getSource(); ! DodicoAnalyze analyse= op.getAnalyze().toAnalyze(); printAnalyze("FICHIERS cor,ele,bth", analyse); ! H2dGrid mail= t.getMaillage(); if (mail != null) { DodicoLib.printFields(mail, false); --- 138,144 ---- FileOperationSynthese op= reader.read(); t= (CorEleBthInterface)op.getSource(); ! DodicoAnalyze analyse= op.getAnalyze(); printAnalyze("FICHIERS cor,ele,bth", analyse); ! EfGrid mail= t.getGrid(); if (mail != null) { DodicoLib.printFields(mail, false); *************** *** 174,178 **** w.setProgressReceiver(new ProgressionBuAdapter(null)); System.out.println("Ecriture"); ! printAnalyze("FICHIER", w.write(t).getAnalyze().toAnalyze()); } /** --- 174,178 ---- w.setProgressReceiver(new ProgressionBuAdapter(null)); System.out.println("Ecriture"); ! printAnalyze("FICHIER", w.write(t).getAnalyze()); } /** *************** *** 180,197 **** */ public void testEcriture() { CorEleBthInterface inter= getInter(fic_); File tmpFile= createTempFile(); FileOperationSynthese syntheseR= CorEleBthFileFormat.getInstance().getLastVersionImpl().write( ! tmpFile, inter, null); ! assertNull(syntheseR.getAnalyze().toAnalyze()); ! _interfaceTest(getInter(tmpFile)); } public CorEleBthInterface getInter(File _f) { FileOperationSynthese syntheseR= CorEleBthFileFormat.getInstance().getLastVersionImpl().read(_f, null); ! assertNull(syntheseR.getAnalyze().toAnalyze()); return (CorEleBthInterface)syntheseR.getSource(); } --- 180,214 ---- */ public void testEcriture() { + assertTrue(fic_.exists()); CorEleBthInterface inter= getInter(fic_); File tmpFile= createTempFile(); + assertNotNull(tmpFile); + assertTrue(tmpFile.exists()); + File tmpFileEle= createTempFile(); + assertNotNull(tmpFileEle); + File tmpFileBth= createTempFile(); + assertNotNull(tmpFileBth); FileOperationSynthese syntheseR= CorEleBthFileFormat.getInstance().getLastVersionImpl().write( ! tmpFile,tmpFileEle,tmpFileBth, inter, null); ! assertTrue(syntheseR.getAnalyze().isEmpty()); ! assertTrue(tmpFile.exists()); ! CorEleBthReader r=new CorEleBthReader(CorEleBthFileFormat.getInstance().getLastVersionImpl()); ! r.setIn(tmpFile, tmpFileEle, tmpFileBth); ! syntheseR=r.read(); ! _interfaceTest((CorEleBthInterface)syntheseR.getSource()); ! ! tmpFile.delete(); ! tmpFileEle.delete(); ! tmpFileBth.delete(); } public CorEleBthInterface getInter(File _f) { FileOperationSynthese syntheseR= CorEleBthFileFormat.getInstance().getLastVersionImpl().read(_f, null); ! if(syntheseR.getAnalyze()!=null) syntheseR.getAnalyze().printResume(); ! assertTrue(syntheseR.getAnalyze().isEmpty()); ! return (CorEleBthInterface)syntheseR.getSource(); } Index: TestDunes.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/reflux/TestDunes.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** TestDunes.java 11 Dec 2003 12:41:29 -0000 1.13 --- TestDunes.java 12 Feb 2004 15:32:50 -0000 1.14 *************** *** 16,23 **** import org.fudaa.dodico.dunes.io.DunesFileFormat; import org.fudaa.dodico.dunes.io.DunesInterface; import org.fudaa.dodico.fichiers.FileOperationSynthese; - import org.fudaa.dodico.h2d.H2dElement; - import org.fudaa.dodico.h2d.H2dGrid; - import org.fudaa.dodico.h2d.H2dPoint; import org.fudaa.dodico.olb.OLBExec; import org.fudaa.dodico.test.TestIO; --- 16,23 ---- import org.fudaa.dodico.dunes.io.DunesFileFormat; import org.fudaa.dodico.dunes.io.DunesInterface; + import org.fudaa.dodico.ef.EfElement; + import org.fudaa.dodico.ef.EfGrid; + import org.fudaa.dodico.ef.EfNode; import org.fudaa.dodico.fichiers.FileOperationSynthese; import org.fudaa.dodico.olb.OLBExec; import org.fudaa.dodico.test.TestIO; *************** *** 46,54 **** assertEquals(adapt[7], 1d, eps_); assertEquals(adapt[8], 1d, eps_); ! assertNotNull(t.getMaillage()); ! H2dGrid m= t.getMaillage(); temp= m.getPtsNb(); assertEquals(temp, 9); ! H2dPoint pt= m.getPt(0); assertEquals(pt.getX(), 0d, eps_); assertEquals(pt.getY(), 0d, eps_); --- 46,54 ---- assertEquals(adapt[7], 1d, eps_); assertEquals(adapt[8], 1d, eps_); ! assertNotNull(t.getGrid()); ! EfGrid m= t.getGrid(); temp= m.getPtsNb(); assertEquals(temp, 9); ! EfNode pt= m.getPt(0); assertEquals(pt.getX(), 0d, eps_); assertEquals(pt.getY(), 0d, eps_); *************** *** 63,69 **** assertEquals(pt.getZ(), 0.1, eps_); //H2dElement[] elems = t.getMaillage().getElts(); ! temp= t.getMaillage().getEltNb(); assertEquals(temp, 9); ! H2dElement el=t.getMaillage().getElement(1); temp= el.getPtNb(); assertEquals(temp, 3); --- 63,69 ---- assertEquals(pt.getZ(), 0.1, eps_); //H2dElement[] elems = t.getMaillage().getElts(); ! temp= t.getGrid().getEltNb(); assertEquals(temp, 9); ! EfElement el=t.getGrid().getElement(1); temp= el.getPtNb(); assertEquals(temp, 3); *************** *** 71,75 **** assertEquals(el.getPtIndex(1), 0); assertEquals(el.getPtIndex(2), 5); ! el=t.getMaillage().getElement(6); temp= el.getPtNb(); assertEquals(temp, 3); --- 71,75 ---- assertEquals(el.getPtIndex(1), 0); assertEquals(el.getPtIndex(2), 5); ! el=t.getGrid().getElement(6); temp= el.getPtNb(); assertEquals(temp, 3); *************** *** 89,93 **** inter, null); ! assertNull(syntheseR.getAnalyze().toAnalyze()); _interfaceTest(getInter(tmpFile)); } --- 89,93 ---- inter, null); ! assertTrue(syntheseR.getAnalyze().isEmpty()); _interfaceTest(getInter(tmpFile)); } *************** *** 96,102 **** DunesFileFormat.getInstance().getLastVersionImpl().read(_f, null); DunesInterface r= (DunesInterface)syntheseR.getSource(); ! assertNull(syntheseR.getAnalyze().toAnalyze()); if (syntheseR.containsMessages()) ! syntheseR.getAnalyze().toAnalyze().printResume(); return r; } --- 96,102 ---- DunesFileFormat.getInstance().getLastVersionImpl().read(_f, null); DunesInterface r= (DunesInterface)syntheseR.getSource(); ! assertTrue(syntheseR.getAnalyze().isEmpty()); if (syntheseR.containsMessages()) ! syntheseR.getAnalyze().printResume(); return r; } *************** *** 109,115 **** public void testOlb(){ ! H2dGrid f=getInter(fic_).getMaillage(); OLBExec exec=new OLBExec(); ! H2dGrid f2=exec.computeGrid(f, null,DodicoUIDefault.INSTANCE); assertNotNull(f2); } --- 109,115 ---- public void testOlb(){ ! EfGrid f=getInter(fic_).getGrid(); OLBExec exec=new OLBExec(); ! EfGrid f2=exec.computeGrid(f, null,DodicoUIDefault.INSTANCE); assertNotNull(f2); } *************** *** 133,137 **** DunesInterface inter= (DunesInterface)op.getSource(); if (op.containsMessages()) ! op.getAnalyze().toAnalyze().printResume(); fileName= (String)arg.get("-out"); if (fileName == null) { --- 133,137 ---- DunesInterface inter= (DunesInterface)op.getSource(); if (op.containsMessages()) ! op.getAnalyze().printResume(); fileName= (String)arg.get("-out"); if (fileName == null) { *************** *** 150,154 **** progress); if (opw.containsMessages()) ! opw.getAnalyze().toAnalyze().printResume(); } } --- 150,154 ---- progress); if (opw.containsMessages()) ! opw.getAnalyze().printResume(); } } Index: TestINP.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/reflux/TestINP.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** TestINP.java 11 Dec 2003 12:41:29 -0000 1.14 --- TestINP.java 12 Feb 2004 15:32:50 -0000 1.15 *************** *** 15,24 **** import org.fudaa.dodico.commun.ProgressionTestAdapter; import org.fudaa.dodico.dico.DicoEntite; import org.fudaa.dodico.fichiers.FileOperationSynthese; - import org.fudaa.dodico.h2d.H2dElement; import org.fudaa.dodico.h2d.H2dTimeStepGroup; - import org.fudaa.dodico.h2d.H2dGrid; - import org.fudaa.dodico.h2d.H2dFrontier; - import org.fudaa.dodico.h2d.H2dPoint; import org.fudaa.dodico.h2d.H2dNodalPropertyMixte; import org.fudaa.dodico.h2d.type.H2dBoundaryType; --- 15,24 ---- import org.fudaa.dodico.commun.ProgressionTestAdapter; import org.fudaa.dodico.dico.DicoEntite; + import org.fudaa.dodico.ef.EfElement; + import org.fudaa.dodico.ef.EfFrontier; + import org.fudaa.dodico.ef.EfGrid; + import org.fudaa.dodico.ef.EfNode; import org.fudaa.dodico.fichiers.FileOperationSynthese; import org.fudaa.dodico.h2d.H2dTimeStepGroup; import org.fudaa.dodico.h2d.H2dNodalPropertyMixte; import org.fudaa.dodico.h2d.type.H2dBoundaryType; *************** *** 57,63 **** assertTrue( t.getEntiteValue().containsKey(version.getDico().getEntite("ITERATION"))); ! H2dGrid m= t.getMaillage(); assertEquals(m.getPtsNb(), 1791); ! H2dPoint pt= m.getPt(1790); assertEquals(pt.getX(), 1000, eps_); assertEquals(pt.getY(), 10, eps_); --- 57,63 ---- assertTrue( t.getEntiteValue().containsKey(version.getDico().getEntite("ITERATION"))); ! EfGrid m= t.getGrid(); assertEquals(m.getPtsNb(), 1791); ! EfNode pt= m.getPt(1790); assertEquals(pt.getX(), 1000, eps_); assertEquals(pt.getY(), 10, eps_); *************** *** 97,102 **** assertEquals(H2dBcType.PERMANENT, bord.getRugositeType()); assertEquals(3d, bord.getRugosite(), eps_); ! assertEquals(t.getMaillage().getEltNb(), 792); ! H2dElement el=t.getMaillage().getElement(791); assertEquals(el.getPtIndex(0), 1788); assertEquals(el.getPtIndex(1), 1789); --- 97,102 ---- assertEquals(H2dBcType.PERMANENT, bord.getRugositeType()); assertEquals(3d, bord.getRugosite(), eps_); ! assertEquals(t.getGrid().getEltNb(), 792); ! EfElement el=t.getGrid().getElement(791); assertEquals(el.getPtIndex(0), 1788); assertEquals(el.getPtIndex(1), 1789); *************** *** 179,184 **** INPInterface r= (INPInterface)syntheseR.getSource(); if (syntheseR.containsMessages()) ! syntheseR.getAnalyze().toAnalyze().printResume(); ! assertNull(syntheseR.getAnalyze().toAnalyze()); return r; } --- 179,184 ---- INPInterface r= (INPInterface)syntheseR.getSource(); if (syntheseR.containsMessages()) ! syntheseR.getAnalyze().printResume(); ! assertTrue(syntheseR.getAnalyze().isEmpty()); return r; } *************** *** 191,195 **** public void testAnalyze() { INPInterface inter= getInter(fic_); ! DodicoAnalyze.Editor anal= new DodicoAnalyze.Editor(); H2dRefluxParameters param= H2dRefluxParameters.init( --- 191,195 ---- public void testAnalyze() { INPInterface inter= getInter(fic_); ! DodicoAnalyze anal= new DodicoAnalyze(); H2dRefluxParameters param= H2dRefluxParameters.init( *************** *** 199,204 **** anal); assertTrue(anal.isEmpty()); ! assertNull(anal.toAnalyze()); ! H2dFrontier maillageBord= param.getMaillage().getFrontiers(); int[] pointsFr= maillageBord.getArray(); int n= pointsFr.length - 1; --- 199,203 ---- anal); assertTrue(anal.isEmpty()); ! EfFrontier maillageBord= param.getMaillage().getFrontiers(); int[] pointsFr= maillageBord.getArray(); int n= pointsFr.length - 1; *************** *** 250,254 **** version.read(f, new ProgressionTestAdapter()); INPInterface inpInter= (INPInterface)syntheseR.getSource(); ! DodicoAnalyze infos= syntheseR.getAnalyze().toAnalyze(); if (infos != null) infos.printResume(); --- 249,253 ---- version.read(f, new ProgressionTestAdapter()); INPInterface inpInter= (INPInterface)syntheseR.getSource(); ! DodicoAnalyze infos= syntheseR.getAnalyze(); if (infos != null) infos.printResume(); |
From: <de...@us...> - 2004-02-12 15:37:51
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20934/test Modified Files: TestIO.java Log Message: Maj version 0.05 prepro Index: TestIO.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/TestIO.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** TestIO.java 19 Dec 2003 12:10:37 -0000 1.7 --- TestIO.java 12 Feb 2004 15:32:49 -0000 1.8 *************** *** 38,41 **** --- 38,45 ---- return f; } + + public void assertDoubleEquals(double _v1,double _v2){ + super.assertEquals(_v1, _v2, eps_); + } public abstract void testEcriture(); protected final File getFile(String _f) { |
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/interpolateur In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20934/interpolateur Added Files: Interpolateur.java InterpolationNearestNeighborRef.java InterpolationRef.java InterpolationTarget.java Log Message: Maj version 0.05 prepro --- NEW FILE: Interpolateur.java --- (This appears to be a binary file; contents omitted.) --- NEW FILE: InterpolationNearestNeighborRef.java --- /* * @file EfInterpolationRef.java * @creation 29 janv. 2004 * @modification $Date: 2004/02/12 15:32:45 $ * @license GNU General Public License 2 * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne * @mail de...@fu... */ package org.fudaa.dodico.interpolateur; import java.util.Arrays; import org.fudaa.ctulu.CtuluGeometrie; import org.fudaa.dodico.mnt.*; /** * Un classe representant une source pour une interpolation des plus proches voisins. * @author deniger * @version $Id: InterpolationNearestNeighborRef.java,v 1.1 2004/02/12 15:32:45 deniger Exp $ */ public abstract class InterpolationNearestNeighborRef implements InterpolationRef{ /** * Rempli le tableau <code>_fourIndexToSet</code> ( qui doit avoir une taille * d'au moins 4) avec les indices des points les plus proches de (_x,_y) * dans les 4 quadrants. Si aucun trouve, l'indice sera mis a -1 * L'ordre est le suivant:<br> * <pre> * 3 | 2 * ----|---- * 0 | 1 * </pre> * @return false si le tableau a une taille <4 */ public boolean getQuadrantIdx(double _x, double _y, int[] _fourIndexToSet) { if ((_fourIndexToSet == null) || (_fourIndexToSet.length < 4)) return false; Arrays.fill(_fourIndexToSet, -1); double d0= Double.MAX_VALUE; double d1= Double.MAX_VALUE; double d2= Double.MAX_VALUE; double d3= Double.MAX_VALUE; double xref, yref; double diffx; double diffy; double dist; for (int i= getPtsNb() - 1; i >= 0; i--) { xref= getPtX(i); yref= getPtY(i); diffx= xref - _x; diffy= yref - _y; dist= CtuluGeometrie.getD2(xref, yref, _x, _y); if ((diffx <= 0) && (diffy <= 0) && (dist < d0)) { d0= dist; _fourIndexToSet[0]= i; } if ((diffx >= 0) && (diffy <= 0) && (dist < d1)) { d1= dist; _fourIndexToSet[1]= i; } if ((diffx >= 0) && (diffy >= 0) && (dist < d2)) { d2= dist; _fourIndexToSet[2]= i; } if ((diffx <= 0) && (diffy >= 0) && (dist < d3)) { d3= dist; _fourIndexToSet[3]= i; } } return true; } public static class ListOnZ extends InterpolationNearestNeighborRef{ MNTPoint[] list_; public ListOnZ(MNTPoint[] _l){ list_=_l; } /** * */ public int getPtsNb() { return list_.length; } /** * */ public double getV(int _i) { return list_[_i].getZ(); } /** * */ public double getPtX(int _i) { return list_[_i].getX(); } /** * */ public double getPtY(int _i) { return list_[_i].getY(); } } } --- NEW FILE: InterpolationRef.java --- (This appears to be a binary file; contents omitted.) --- NEW FILE: InterpolationTarget.java --- (This appears to be a binary file; contents omitted.) |
From: <de...@us...> - 2004-02-12 15:35:20
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/trigrid In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20569/trigrid Log Message: Directory /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/trigrid added to the repository |
From: <de...@us...> - 2004-02-12 15:28:02
|
Update of /cvsroot/fudaa/fudaa_devel/ctulu/src/org/fudaa/ctulu In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19092 Added Files: CtuluGeometrie.java Log Message: Fonction de base : distance en 2D --- NEW FILE: CtuluGeometrie.java --- /* * @file CtuluGeometrie.java * @creation 29 janv. 2004 * @modification $Date: 2004/02/12 15:23:01 $ * @license GNU General Public License 2 * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne * @mail de...@fu... */ package org.fudaa.ctulu; /** * @author deniger * @version $Id: CtuluGeometrie.java,v 1.1 2004/02/12 15:23:01 deniger Exp $ */ public class CtuluGeometrie { private CtuluGeometrie() {} /** * Renvoie la distance entre le point p1(_x1,_y1) et le * point p2(_x2,_y2) */ public final static double getDistance( double _x1, double _y1, double _x2, double _y2) { return Math.sqrt((_x2 - _x1) * (_x2 - _x1) + (_y2 - _y1) * (_y2 - _y1)); } /** * Renvoie la norme au carre. */ public final static double getD2( double _x1, double _y1, double _x2, double _y2) { return (_x2 - _x1) * (_x2 - _x1) + (_y2 - _y1) * (_y2 - _y1); } /** * Renvoie la distance entre le point p(_x,_y) et * le segment [P1,P2] P1=_segX1,_segY1. * Tester dans ebli */ public final static double distanceFromSegment( double _segX1, double _segY1, double _segX2, double _segY2, double _x, double _y) { if ((_segX1 == _segX2) && (_segY1 == _segY2)) { return getDistance(_segX1, _segY1, _x, _y); } //P1=(_x1,_y1) //P2=(_x2,_y2) //X=thisPoint //vecteur A=X-P1 //vecteur B=P2-P1 //On calcule la projection de A sur B //le produit scalaire double p= (_x - _segX1) * (_segX2 - _segX1) + (_y - _segY1) * (_segY2 - _segY1); //si le point est "en dehors" du segment ,on prend la distance X P1 if (p < 0) return getDistance(_x, _y, _segX1, _segY1); //le produit scalaire/norme de B p= p / ((_segX2 - _segX1) * (_segX2 - _segX1) + (_segY2 - _segY1) * (_segY2 - _segY1)); //si p>1 p est en dehors du segment if (p > 1) { return getDistance(_x, _y, _segX2, _segY2); } //le vecteur projete a pour coordonnees PROJ: double projx= p * (_segX2 - _segX1); double projy= p * (_segY2 - _segY1); //le vecteur de norme (on reutilise le variable projx) projx= (_x - _segX1) - projx; projy= (_y - _segY1) - projy; return Math.sqrt(projx * projx + projy * projy); } /** * Tester dans dodico TestMaillage */ public final static double aireTriangle( double _x1, double _y1, double _x2, double _y2, double _x3, double _y3) { double p= (_x3 - _x1) * (_x2 - _x1) + (_y3 - _y1) * (_y2 - _y1); double d1d2= getDistance(_x1, _y1, _x2, _y2); //le produit scalaire/norme de B p= p / (d1d2 * d1d2); //le vecteur projete a pour coordonnees PROJ: double projx= p * (_x2 - _x1); double projy= p * (_y2 - _y1); //le vecteur de norme (on reutilise le variable projx) projx= (_x3 - _x1) - projx; projy= (_y3 - _y1) - projy; return d1d2 * Math.sqrt(projx * projx + projy * projy) / 2; } } |
From: <de...@us...> - 2004-02-12 15:25:07
|
Update of /cvsroot/fudaa/fudaa_devel/aide/src/prepro In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18294 Modified Files: build.xml readme.txt Log Message: maj de l'aide version 0.05 Index: build.xml =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/aide/src/prepro/build.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** build.xml 21 Jan 2004 10:42:31 -0000 1.1 --- build.xml 12 Feb 2004 15:19:36 -0000 1.2 *************** *** 8,18 **** <property name="project.dir" location="${basedir}"/> <tstamp> ! <format property="lastUpdate" locale="fr" pattern="dd MMMM yyyy"/> </tstamp> <property name="html.dir" location="html"/> <property name="dist.dir" location="dist"/> ! <property name="dist.html.dir" location="dist/html"/> <property name="src.dir" location="src"/> <property name="src.web.dir" location="src_web"/> <property name="init.ext" value=".xml"/> <property name="dest.ext" value=".html"/> --- 8,22 ---- <property name="project.dir" location="${basedir}"/> <tstamp> ! <format property="lastUpdate" locale="fr" pattern="yyyy-MM-dd "/> </tstamp> <property name="html.dir" location="html"/> <property name="dist.dir" location="dist"/> ! <property name="dist.web.dir" location="${dist.dir}/web"/> ! <property name="dist.devel.dir" location="${dist.web.dir}/devel/"/> ! <property name="src.dir" location="src"/> <property name="src.web.dir" location="src_web"/> + <property name="src.devel.dir" location="src_devel"/> + <property name="init.ext" value=".xml"/> <property name="dest.ext" value=".html"/> *************** *** 22,30 **** <property name="template.xsl" location="template/sort-menu.xsl"/> <property name="base.xsl" location="template/template.xsl"/> ! <patternset id="sort.files" includes="**/index${dest.ext},**/alphabetique${dest.ext}"/> ! <patternset id="style.files" includes="**/*${init.ext}"/> ! <patternset id="resources.files" includes="**/images/**,**/common/**" excludes="**/${filelist}"/> ! <mkdir dir="${html.dir}"/> </target> --- 26,44 ---- <property name="template.xsl" location="template/sort-menu.xsl"/> <property name="base.xsl" location="template/template.xsl"/> + <property name="style.css" location="template/style.css"/> ! <patternset id="sort.files" includes="**/alphabetique${dest.ext}"/> ! <patternset id="style.files" includes="**/*${init.ext}" excludes="**/*.inc.xml,**/pdf.xml"/> ! <patternset id="pdf.files" includes="**/pdf.xml"/> ! ! <patternset id="resources.files" includes="**/images/**" excludes="**/${filelist}"/> ! ! <dependset> ! <srcfileset dir="${src.dir}" includes="**/*.dtd"/> ! <srcfileset dir="${basedir}/template/" includes="**/*.*" excludes="**/*.css"/> ! <srcfilelist dir="${basedir}" files="build.xml"/> ! <targetfileset dir="${html.dir}" includes="**/*${dest.ext},**/*.pdf" /> ! <targetfileset dir="${dist.dir}" includes="**/*${dest.ext},**/*.pdf" /> ! </dependset> </target> *************** *** 33,50 **** includes="FileList.java" debug="on"/> <taskdef classname="FileList" name="fileList" classpath="${task.dir}"/> ! <fileList file="${filelist}"> <dirset dir="${src.dir}" includes="?*/**" excludes="**/images/**,**/common/**"/> </fileList> </target> - <target name="generate" depends=".initialisation"> ! <dependset> ! <srcfileset dir="${src.dir}" includes="**/*.dtd"/> ! <srcfileset dir="${basedir}/template/" includes="**/*.*"/> ! <srcfilelist dir="${basedir}" files="build.xml"/> ! <targetfileset dir="${html.dir}" includes="**/*${dest.ext}" /> ! <targetfileset dir="${dist.dir}" includes="**/*${dest.ext}" /> ! </dependset> <copy todir="${html.dir}"> <fileset dir="${src.dir}"> --- 47,62 ---- includes="FileList.java" debug="on"/> <taskdef classname="FileList" name="fileList" classpath="${task.dir}"/> ! <fileList file="${filelist}" includes="*.xml" excludes="*.inc.xml"> <dirset dir="${src.dir}" includes="?*/**" excludes="**/images/**,**/common/**"/> </fileList> </target> ! <target name="pdf" depends="build"> ! ! ! </target> ! <target name="build_aide" depends="filelist"> ! <mkdir dir="${html.dir}"/> <copy todir="${html.dir}"> <fileset dir="${src.dir}"> *************** *** 52,55 **** --- 64,68 ---- </fileset> </copy> + <copy file="${style.css}" todir="${html.dir}" /> <style destdir="${html.dir}" basedir="${src.dir}" *************** *** 59,66 **** <param name="destExt" expression="${dest.ext}"/> </style> ! </target> ! ! <target name="build_doc" depends="filelist,generate"> ! <replace dir="${html.dir}" token='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'> <patternset refid="sort.files"/> </replace> --- 72,76 ---- <param name="destExt" expression="${dest.ext}"/> </style> ! <replace dir="${html.dir}" token='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'> <patternset refid="sort.files"/> </replace> *************** *** 77,86 **** </target> ! <target name="build" depends="build_doc" description="Construit le dossier html et dist et genere les fichiers html"> ! <mkdir dir="${dist.html.dir}"/> ! <copy todir="${dist.html.dir}/doc"> <fileset dir="${html.dir}"/> </copy> ! <style destdir="${dist.html.dir}" basedir="${src.web.dir}" style="${base.xsl}" extension="${dest.ext}"> <patternset refid="style.files"/> --- 87,119 ---- </target> ! <target name="build_devel" depends=".initialisation" description="Construit le dossier dist/web/devel"> ! <mkdir dir="${dist.devel.dir}"/> ! <copy file="${style.css}" todir="${dist.devel.dir}" /> ! <copy todir="${dist.devel.dir}"> ! <fileset dir="${src.devel.dir}"> ! <patternset refid="resources.files"/> ! </fileset> ! </copy> ! <style destdir="${dist.devel.dir}" basedir="${src.devel.dir}" ! style="${base.xsl}" extension="${dest.ext}"> ! <patternset refid="style.files"/> ! <param name="lastUpdate" expression="${lastUpdate}"/> ! <param name="destExt" expression="${dest.ext}"/> ! </style> ! </target> ! ! ! <target name="build_web" depends="build_aide" description="Construit le dossier html et dist et genere les fichiers html"> ! <mkdir dir="${dist.web.dir}"/> ! <copy todir="${dist.web.dir}/doc"> <fileset dir="${html.dir}"/> </copy> ! <copy file="${style.css}" todir="${dist.web.dir}" /> ! <copy todir="${dist.web.dir}"> ! <fileset dir="${src.web.dir}"> ! <patternset refid="resources.files"/> ! </fileset> ! </copy> ! <style destdir="${dist.web.dir}" basedir="${src.web.dir}" style="${base.xsl}" extension="${dest.ext}"> <patternset refid="style.files"/> *************** *** 89,92 **** --- 122,138 ---- </style> </target> + <target name="build" depends="build_aide,build_web,build_devel"> + + </target> + + <target name="valideHtml" depends="build" + description="valide les fichiers html dans le dossier ${dist.dir}"> + <xmlvalidate failonerror="no" lenient="false" warn="yes" + classname="org.apache.xerces.parsers.SAXParser"> + <fileset dir="${dist.dir}" includes="**/*.html"/> + <dtd publicId="-//W3C//DTD XHTML 1.0 Strict//EN" location="template/dtd/xhtml1-strict.dtd"/> + </xmlvalidate> + </target> + <target name="clean" description="Efface les dossiers html et dist" depends=".initialisation"> *************** *** 96,104 **** <target name="buildDist" depends="build" description="Creer les archives pour la doc et pour le site dans dist/"> ! <zip destfile="${dist.dir}/html/prepro_doc.zip"> ! <zipfileset dir="${dist.dir}/html/doc" prefix="fudaa_prepro"/> </zip> <tar tarfile="${dist.dir}/prepro_web.tar.bz2" compression="bzip2"> ! <tarfileset dir="${dist.dir}/html" prefix="prepro_web"/> </tar> </target> --- 142,150 ---- <target name="buildDist" depends="build" description="Creer les archives pour la doc et pour le site dans dist/"> ! <zip destfile="${dist.web.dir}/prepro_doc.zip"> ! <zipfileset dir="${dist.web.dir}/doc" prefix="fudaa_prepro"/> </zip> <tar tarfile="${dist.dir}/prepro_web.tar.bz2" compression="bzip2"> ! <tarfileset dir="${dist.web.dir}" prefix="prepro_web"/> </tar> </target> Index: readme.txt =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/aide/src/prepro/readme.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** readme.txt 21 Jan 2004 17:21:41 -0000 1.1 --- readme.txt 12 Feb 2004 15:19:36 -0000 1.2 *************** *** 24,26 **** pour le téléchargement depuis le site web - crée l'archive dist/prepro_web.tar.bz2 contenant le dossier ! dist/html : pour mettre à jour le site web + rapidement \ No newline at end of file --- 24,26 ---- pour le téléchargement depuis le site web - crée l'archive dist/prepro_web.tar.bz2 contenant le dossier ! dist/html : pour mettre à jour le site web + rapidement \ No newline at end of file |
From: <de...@us...> - 2004-02-12 15:24:41
|
Update of /cvsroot/fudaa/fudaa_devel/aide/src/prepro/src_web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18294/src_web Modified Files: download.xml fonctionnalites.xml historique.xml index.xml Log Message: maj de l'aide version 0.05 Index: download.xml =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/aide/src/prepro/src_web/download.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** download.xml 21 Jan 2004 10:46:29 -0000 1.1 --- download.xml 12 Feb 2004 15:19:38 -0000 1.2 *************** *** 1,5 **** <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE xhtml SYSTEM "../template/default.dtd"[ ! <!ENTITY url "doc/"> <!ENTITY title-section " "> ]> --- 1,5 ---- <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE xhtml SYSTEM "../template/default.dtd"[ ! <!ENTITY url "./"> <!ENTITY title-section " "> ]> Index: fonctionnalites.xml =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/aide/src/prepro/src_web/fonctionnalites.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** fonctionnalites.xml 21 Jan 2004 10:46:29 -0000 1.1 --- fonctionnalites.xml 12 Feb 2004 15:19:38 -0000 1.2 *************** *** 1,5 **** <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE xhtml SYSTEM "../template/default.dtd"[ ! <!ENTITY url "doc/"> <!ENTITY title-section " "> ]> --- 1,5 ---- <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE xhtml SYSTEM "../template/default.dtd"[ ! <!ENTITY url "./"> <!ENTITY title-section " "> ]> *************** *** 25,29 **** pré-processeur pendant l'exécution du calcul</li> <li>Visualiser les informations générales du projet</li> - <li>Visualisation du maillage</li> <li>Edition des paramètres généraux, des conditions limites,des paramètres physiques et des courbes temporelles </li> --- 25,28 ---- *************** *** 31,35 **** <li>Recherche et/ou édition d'un élément à partir de son index. L'élément peut être un point ou une frontière ( telemac) </li> <li>Exporter le maillage du projet sous un autre format</li> ! <li>Support des formats serafin, dunes et "cor ele bth"</li> <li>Importation des courbes temporelles à partir des formats csv (excel), crb (reflux), clv ( reflux) et du format des fichiers "frontières liquides" --- 30,35 ---- <li>Recherche et/ou édition d'un élément à partir de son index. L'élément peut être un point ou une frontière ( telemac) </li> <li>Exporter le maillage du projet sous un autre format</li> ! <li>Exporter la vue courant en fichier gif</li> ! <li>Support des formats serafin, dunes,trigrid,"cor ele bth"</li> <li>Importation des courbes temporelles à partir des formats csv (excel), crb (reflux), clv ( reflux) et du format des fichiers "frontières liquides" *************** *** 37,40 **** --- 37,41 ---- <li>Les courbes temporelles sont automatiquement adaptées â la durée de la simulation </li> + <li>Pré-visualisation de maillages et contrôle</li> </ul> <h2>Reflux</h2> *************** *** 51,54 **** --- 52,56 ---- opération.</li> <li>Editeur "avancé" de fichiers cas</li> + <li>Commentaires par mot-clé</li> <li>Plusieurs filtres proposé :rubrique, niveau, nom,....</li> <li>Aide et contrôle pour chaque mot-clé</li> Index: historique.xml =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/aide/src/prepro/src_web/historique.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** historique.xml 21 Jan 2004 10:46:29 -0000 1.1 --- historique.xml 12 Feb 2004 15:19:38 -0000 1.2 *************** *** 1,5 **** <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE xhtml SYSTEM "../template/default.dtd"[ ! <!ENTITY url "doc/"> <!ENTITY title-section " "> ]> --- 1,5 ---- <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE xhtml SYSTEM "../template/default.dtd"[ ! <!ENTITY url "./"> <!ENTITY title-section " "> ]> *************** *** 11,16 **** &header-web; <h1> ! Préprocesseur version 0.04</h1> <h2>Historique</h2> <h3>Version 0.04 ( diffusée le 20 janvier 2004)</h3> <ul> --- 11,34 ---- &header-web; <h1> ! Préprocesseur version &version;</h1> <h2>Historique</h2> + <h3>Version 0.05 ( diffusée le 12 février 2004)</h3> + <ul> + <li>Export gif</li> + <li>Télémac: commentaires dans les fichiers cas</li> + <li>Windows : wordpad utilisé à la place de notepad</li> + <li>Support fichier trigrid (pas encore de menu)</li> + <li>Vérification de maillage: éléments surcontraints, aire,angle,... ( cf menu Applications>mesh view)</li> + </ul> + <p>Bogues corrigés:</p> + <ul> + <li>Mise à jour automatique du panneau d'information</li> + <li>Lors de la fermeture de l'application, l'enregistrement etait annulee si une + erreur survenait ( droit d'acces,fichiers existants)</li> + <li>Les noms des calques ont été modifiés : points -> noeuds et + polygones -> éléments</li> + </ul> + + <h3>Version 0.04 ( diffusée le 20 janvier 2004)</h3> <ul> Index: index.xml =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/aide/src/prepro/src_web/index.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** index.xml 21 Jan 2004 10:46:29 -0000 1.1 --- index.xml 12 Feb 2004 15:19:38 -0000 1.2 *************** *** 1,5 **** <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE xhtml SYSTEM "../template/default.dtd"[ ! <!ENTITY url "doc/"> <!ENTITY title-section "Bienvenue"> ]> --- 1,5 ---- <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE xhtml SYSTEM "../template/default.dtd"[ ! <!ENTITY url "./"> <!ENTITY title-section "Bienvenue"> ]> *************** *** 24,49 **** nécessaires à une étude. La liste complète des fonctionnalités et des travaux en cours est accessible <a href="fonctionnalites.html">ici</a>.</p> <p>Le logiciel est distribué sous licence <a href="http://gnu.org/copyleft/gpl.html">GPL</a>.</p> ! <h4>Téléchargement de la dernière version</h4> ! <p>Dernière version : <span class="imp">&version;</span> du <span class="imp">20 janvier 2004</span> (<a href="historique.html">historique</a>)</p> <table> <tr><td>Tout système: </td><td><a href="&download-jar-url;"> Fudaa_Prepro_&version-file;_Setup.jar</a></td></tr> <tr><td>Windows: </td><td><a href="&download-exe-url;"> Fudaa_Prepro_&version-file;_Setup.exe</a></td></tr> <tr><td> </td><td> </td></tr> ! <tr><td>Reflux: </td><td><a href="http://www.utc.fr/fudaa/distrib/prepro/">pré-processeur et les exécutables reflux/olb</a> (accès protégé)</td></tr> </table> - <p>Les instructions d'installation sont disponibles sur la page de <a href="download.html">téléchargement</a>.</p> ! <h4>Documentation</h4> ! <p>La documentation peut-être consultée en <a href="doc/index.html">ligne </a> ou être <a href="prepro_doc.zip">téléchargée</a>.</p> ! <h4>Contact</h4> ! <p>Les questions, suggestions et rapports de bogues peuvent être envoyées à &resp-mail;. ! Dans le cas d'un rapport de bogue, il est recommandé de joindre le fichier "ts.log" qui se trouve dans le répertoire d'installation du logiciel. </p> ! <h4>Développement</h4> <p>Le logiciel se base sur la plate-forme de développement <a href="http://fudaa.sf.net">fudaa</a>. Les sources peuvent être récupérées à partir du site de <a href="http://sf.net/projects/fudaa/">développement</a> hébergé par <a href="http://sf.net">sourceforge</a>. </p> ! <div class="right"> <a href="http://www.sourceforge.net"><img class="in-text" src="http://sourceforge.net/sflogo.php?group_id=67907&type=1" alt="" width="88px" height="31px" title="sourceforge"/></a> --- 24,56 ---- nécessaires à une étude. La liste complète des fonctionnalités et des travaux en cours est accessible <a href="fonctionnalites.html">ici</a>.</p> <p>Le logiciel est distribué sous licence <a href="http://gnu.org/copyleft/gpl.html">GPL</a>.</p> ! ! <h3>Téléchargement de la dernière version</h3> ! ! <p>Dernière version : <span class="imp">&version;</span> (&version-date;)<br/> <a href="historique.html">historique</a></p> <table> <tr><td>Tout système: </td><td><a href="&download-jar-url;"> Fudaa_Prepro_&version-file;_Setup.jar</a></td></tr> <tr><td>Windows: </td><td><a href="&download-exe-url;"> Fudaa_Prepro_&version-file;_Setup.exe</a></td></tr> <tr><td> </td><td> </td></tr> ! <tr><td><span class="underline">Reflux</span>: </td><td><a href="http://www.utc.fr/fudaa/distrib/prepro/">le pré-processeur et les exécutables reflux/olb</a> (accès protégé)</td></tr> </table> <p>Les instructions d'installation sont disponibles sur la page de <a href="download.html">téléchargement</a>.</p> ! <h3>Documentation utilisateur</h3> ! <p>La documentation peut-être consultée en <a href="doc/index.html">ligne </a> ou être <a href="prepro_doc.zip">téléchargée</a>. ! Elle est également fournie avec le logiciel. </p> ! <h3>Contact</h3> ! <p>Les questions, suggestions et rapports de bogues peuvent être envoyés à &resp-mail;. ! <br/>Dans le cas d'un rapport de bogue, il est recommandé de joindre le fichier "ts.log" qui se trouve dans le répertoire d'installation du logiciel. ! </p> ! <h3>Développement</h3> <p>Le logiciel se base sur la plate-forme de développement <a href="http://fudaa.sf.net">fudaa</a>. Les sources peuvent être récupérées à partir du site de <a href="http://sf.net/projects/fudaa/">développement</a> hébergé par <a href="http://sf.net">sourceforge</a>. </p> ! <ul> ! <li><a href="devel/index.html">La documentation utilisateur</a> (En cours ...)</li> ! <li><a href="http://sf.net/pm/task.php?group_project_id=31402&group_id=67907&func=browse">Les développements en cours</a></li> ! <li><a href="http://sf.net/tracker/?&group_id=67907&atid=519385">Les Bugs</a></li> ! </ul> <div class="right"> <a href="http://www.sourceforge.net"><img class="in-text" src="http://sourceforge.net/sflogo.php?group_id=67907&type=1" alt="" width="88px" height="31px" title="sourceforge"/></a> |
Update of /cvsroot/fudaa/fudaa_devel/aide/src/prepro/template In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18294/template Modified Files: default.dtd editor2D.xml header-doc.xml header-web.xml menu-web.xml menu.xml template.xsl Added Files: header-devel.xml style.css Log Message: maj de l'aide version 0.05 --- NEW FILE: header-devel.xml --- (This appears to be a binary file; contents omitted.) --- NEW FILE: style.css --- body{ background-color: #FFFFFF; } .centerH,.centerH-padding{ text-align: center; } a img{ border: none; } span.blue{ color:#0000DD; } span.red{ color:#DD0000; } code{ font-style: oblique; font-size:small; color:#000033; font-family: sans-serif; } .centerH-padding{ padding:15px; } br.page-break{ page-break-after:always; } img.icone,img.float-left{ padding-left: 5px; padding-right: 5px; margin: 5px; } .bizarre,.bizarre li{ margin-left:15px; } img.in-text{ vertical-align :middle; padding: 0px; margin-left: 5px; margin-right: 5px; margin-top: 0 px; margin-bottom: 0 px; } .legende{ text-decoration:underline; font-style:oblique; } .underline{ text-decoration:underline; } .float-left{ float:left; margin-right:2px; margin-bottom:10px; padding-top :10px; } img.float-left{ margin-bottom: 5px; } .spacer{ clear:both; padding-top:15px; } table.bord-noir,table.bord-noir-free{ margin-left:auto; margin-right:auto; text-align:justify; padding: 5px; border: 1px solid black; border-collapse: collapse; } table.bord-noir td,table.bord-noir th,table.bord-noir-free td,table.bord-noir-free th{ background-color: #FFFFFF; border: 1px solid black; padding: 5px; } table.bord-noir{ width:80%; } .imp{ font-weight:bold; } h1 {color: #996600; font-family: helvetica sans-serif; text-align: center; margin-top:10px; } h2 {color: #996600; font-family: helvetica sans-serif; text-align: left; margin-left:10px margin-top:20px; border-bottom:1px solid #996600; } h3 {color: #996600; font-family: helvetica sans-serif; text-align: left; margin-top:15px; margin-left:15px; } h4 {color: #996600; font-family: helvetica sans-serif; text-align: left; margin-top:10px; margin-bottom:10px; margin-left:15px; } h5{ margin-left:15px; } a:visited{ color:#0000FF; } div.top-page{ text-align: right; padding:2px; } p.pres{ width:70%; padding:5px; text-align: justify; color:#333333; margin-left:auto; margin-right:auto; font-weight:bold; } table.centerH{ margin-left:auto; margin-right:auto; } p,.float-left,table{ margin-left:20px; } p,.float-left{ text-align: justify; margin-top:10px; } div.bloc-color{ text-align:center; vertical-align:middle; margin:auto; width:70%; background-color:#FFFFCC; border:1px solid black; } div.bloc-color pre{ text-align:left; margin:auto; padding:auto; width:80%; } #menu{ padding:0px; background-color:#666666; color:#FFFFFF; text-align:right; margin-left:auto; border-bottom: 2px solid #CCCCCC; } #menu a{ color:#FFFFFF; font-weight: bold; font-family: "Arial", serif; text-decoration:none; padding:0px; } #menu a:focus,#menu a:hover{ color:#C39900; text-decoration: underline; } #header{ border-collapse:separate; border-spacing:1px; padding: 5px; border-top: 2px solid #CCCCCC; vertical-align: middle; } #header a{ color:#FFFFFF; font-size:large; font-weight: bold; font-family: "Arial", serif; text-decoration: none; } #header a img{ vertical-align: middle; margin:auto; border:none; } #header,#header-title{ background-color:#6699FF; margin:Opx; } #header-title{ margin-left:auto; margin-right:auto; font-size:x-large; color:#FFFFFF; text-align:center; font-weight: bold; padding-bottom:5px; border-bottom: 2px solid #CCCCCC; } ul.menu li,ul.menu li { list-style:none; } ul.menu { border:1px dotted #AAAAAA; padding:5px; } ul.menu ul { margin-left:0px; } ul.menu li.sub-menu{ font-size: smaller; margin-left:10px; } .smaller{ font-size: smaller; } #footer{ margin-top: 15px; border-top:solid 1px #996600; font-size:smaller; color: #666666; } #footer div.version{ float: left; } #footer div.date{ text-align:right; } p.note,p.astuce,p.warn{ margin-left:30px; } .hide{ visibility:collapse; } ul{ list-style: outside; margin-left:25px; } ul.num li{ list-style-type:decimal; } li{ margin-top: 5px; } ul.none li{ list-style-type:none; } div.entete{ font-size:smaller; } Index: default.dtd =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/aide/src/prepro/template/default.dtd,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** default.dtd 21 Jan 2004 10:50:13 -0000 1.1 --- default.dtd 12 Feb 2004 15:19:38 -0000 1.2 *************** *** 4,9 **** <!ATTLIST xhtml path CDATA #REQUIRED> <!ENTITY site-url "http://fudaa.sf.net/prepro/"> ! <!ENTITY version "0.04"> ! <!ENTITY version-file "004"> <!ENTITY url "./"> <!ENTITY editor2D SYSTEM "editor2D.xml"> --- 4,14 ---- <!ATTLIST xhtml path CDATA #REQUIRED> <!ENTITY site-url "http://fudaa.sf.net/prepro/"> ! <!ENTITY version "0.05"> ! <!ENTITY version-date "2004-02-12"> ! <!ENTITY version-file "005"> ! ! <!ENTITY date "2004-02-12"> ! <!ATTLIST xhtml date CDATA #FIXED "&date;"> ! <!ATTLIST xhtml version CDATA #FIXED "&version;"> <!ENTITY url "./"> <!ENTITY editor2D SYSTEM "editor2D.xml"> *************** *** 14,21 **** --- 19,29 ---- <!ENTITY header-doc "&top-doc;&menu-doc;"> + <!ENTITY top-web SYSTEM "header-web.xml"> <!ENTITY menu-web SYSTEM "menu-web.xml"> <!ENTITY header-web "&top-web;&menu-web;"> + <!ENTITY header-devel SYSTEM "header-devel.xml"> + <!ENTITY title-section "Documentation"> <!ENTITY haut-page " Index: editor2D.xml =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/aide/src/prepro/template/editor2D.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** editor2D.xml 21 Jan 2004 10:42:32 -0000 1.1 --- editor2D.xml 12 Feb 2004 15:19:38 -0000 1.2 *************** *** 202,205 **** --- 202,206 ---- possible de modifier ce comportement en utilisant les modificateurs suivants: </p> + <div class="centerH"> <table class="bord-noir-free"> <tr> *************** *** 229,232 **** --- 230,234 ---- </tr> </table> + </div> <h3>Sélectionner des points entre 2 éléments</h3> <p>Cette fonctionnalité concerne uniquement les calques du groupe <code>Conditions *************** *** 261,267 **** de zoomer directement sur les objets et/ou de les éditer (si possible). Exemple: </p> ! <p><img alt="vue de l'exemple de recherche" src="../images/rechercher-panel.jpg" width="281px" height="261px" ! class="float-left"/> - le calque <code>points de bord</code> sera activé,<br/> - les points ayant comme index de frontière <code>1,34 ou 3</code> seront recherchés puis édités,<br/> - la --- 263,269 ---- de zoomer directement sur les objets et/ou de les éditer (si possible). Exemple: </p> ! <img alt="vue de l'exemple de recherche" src="../images/rechercher-panel.jpg" width="281px" height="261px" ! class="float-left"/><p> - le calque <code>points de bord</code> sera activé,<br/> - les points ayant comme index de frontière <code>1,34 ou 3</code> seront recherchés puis édités,<br/> - la Index: header-doc.xml =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/aide/src/prepro/template/header-doc.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** header-doc.xml 21 Jan 2004 10:42:32 -0000 1.1 --- header-doc.xml 12 Feb 2004 15:19:38 -0000 1.2 *************** *** 1,9 **** <?xml version="1.0" encoding="iso-8859-1"?> ! <table id="header"> ! <tr> ! <td class="top"> ! ! </td> ! </tr> ! <tr><td class="middle">&title-section;</td></tr> ! </table> \ No newline at end of file --- 1,9 ---- <?xml version="1.0" encoding="iso-8859-1"?> ! <div id="header"> ! <a href="&site-url;"> ! <img src="&url;images/fudaa.jpg" width="28px" height="28px" alt="" /> ! pré-processeur Reflux/Telemac ! </a> ! </div> ! <div id="header-title">&title-section;</div> ! Index: header-web.xml =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/aide/src/prepro/template/header-web.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** header-web.xml 21 Jan 2004 10:42:32 -0000 1.1 --- header-web.xml 12 Feb 2004 15:19:38 -0000 1.2 *************** *** 1,12 **** <?xml version="1.0" encoding="iso-8859-1"?> ! <table id="header"> ! <tr> ! <td class="top"> <a href="&site-url;"> <img src="&url;images/fudaa.jpg" width="28px" height="28px" alt="" /> pré-processeur Reflux/Telemac </a> ! </td> ! </tr> ! <tr><td class="middle"> </td></tr> ! </table> \ No newline at end of file --- 1,8 ---- <?xml version="1.0" encoding="iso-8859-1"?> ! <div id="header"> <a href="&site-url;"> <img src="&url;images/fudaa.jpg" width="28px" height="28px" alt="" /> pré-processeur Reflux/Telemac </a> ! </div> ! <div id="header-title"> </div> \ No newline at end of file Index: menu-web.xml =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/aide/src/prepro/template/menu-web.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** menu-web.xml 21 Jan 2004 10:42:32 -0000 1.1 --- menu-web.xml 12 Feb 2004 15:19:38 -0000 1.2 *************** *** 1,15 **** <?xml version="1.0" encoding="iso-8859-1"?> ! <table id="sous-menu"> ! <tr><td> ! </td> ! <td> ! <table> ! <tr> ! <td> ! <a href="index.html">Accueil</a>|</td><td><a ! href="fonctionnalites.html">Fonctionnalités</a>|</td><td><a ! href="download.html">Téléchargement</a> ! </td> ! </tr></table> ! </td></tr> ! </table> \ No newline at end of file --- 1,7 ---- <?xml version="1.0" encoding="iso-8859-1"?> ! <div id="menu"> ! <a href="index.html"> Accueil </a>|<a ! href="fonctionnalites.html"> Fonctionnalités </a>| ! <a href="download.html"> Téléchargement </a> ! </div> ! Index: menu.xml =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/aide/src/prepro/template/menu.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** menu.xml 21 Jan 2004 10:42:32 -0000 1.1 --- menu.xml 12 Feb 2004 15:19:38 -0000 1.2 *************** *** 1,15 **** <?xml version="1.0" encoding="iso-8859-1"?> ! <table id="sous-menu"> ! <tr><td> ! prepro version &version;</td> ! <td> ! <table> ! <tr> ! <td> ! <a href="&url;index.html">Doc</a>|</td><td><a ! href="&url;reflux/index.html">Reflux</a>|</td><td><a ! href="&url;telemac/index.html">Telemac</a> ! </td> ! </tr></table> ! </td></tr> ! </table> \ No newline at end of file --- 1,6 ---- <?xml version="1.0" encoding="iso-8859-1"?> ! <div id="menu"> ! <a href="&url;index.html"> Accueil </a>|<a ! href="&url;reflux/index.html"> Reflux </a>|<a ! href="&url;telemac/index.html"> Telemac </a> ! </div> \ No newline at end of file Index: template.xsl =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/aide/src/prepro/template/template.xsl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** template.xsl 21 Jan 2004 10:42:32 -0000 1.1 --- template.xsl 12 Feb 2004 15:19:38 -0000 1.2 *************** *** 7,10 **** --- 7,12 ---- <xsl:param name="destExt" select="'.html'"/> <xsl:param name="path" select="xhtml/@path"/> + <xsl:param name="version" select="xhtml/@version"/> + <xsl:param name="date" select="xhtml/@date"/> <!--<xsl:import href=""/>--> <xsl:template match="node()|@*"> *************** *** 13,20 **** </xsl:copy> </xsl:template> <xsl:template match="html|xhtml"> <html> <head> ! <link type="text/css" rel="stylesheet" href="{$path}common/style.css" /> <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type" /> --- 15,24 ---- </xsl:copy> </xsl:template> + <!--Le noeud de base--> + <!--Ajoute la feuille de style,le titre --> <xsl:template match="html|xhtml"> <html> <head> ! <link type="text/css" rel="stylesheet" href="{$path}style.css" /> <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type" /> *************** *** 24,27 **** --- 28,32 ---- </html> </xsl:template> + <!--le body a un id pour permettre un lien retour haut de la page --> <!--body--> <xsl:template match="body"> *************** *** 31,34 **** --- 36,41 ---- </body> </xsl:template> + + <!--Permet de recopier les balises --> <xsl:template match="node()|@*"> <xsl:copy> *************** *** 37,43 **** </xsl:template> <!--Insere la date--> ! <xsl:template match="lastUpdate"> ! <xsl:value-of select="$lastUpdate"/> ! </xsl:template> <!--Un icone sera ajoute pour les paragraphes p class="astuce"--> <xsl:template match="p[@class='astuce']"> --- 44,49 ---- </xsl:template> <!--Insere la date--> ! ! <!--Un icone sera ajoute pour les paragraphes p class="astuce"--> <xsl:template match="p[@class='astuce']"> *************** *** 48,51 **** --- 54,59 ---- </p> </xsl:template> + + <!--Un icone sera ajoute pour les paragraphes p class="warn"--> <xsl:template match="p[@class='warn']"> <p class="warn"> *************** *** 55,95 **** </p> </xsl:template> ! <xsl:template match="div[@class='menu-dir']/a"> ! <xsl:if test="not(contains(text(),'index')) and contains(text(),'.xml')"> ! <li> ! <a href="{concat(substring-before(text(),'.'),$destExt)}"> ! <xsl:value-of select="document(@href)//h1[1]"/> ! </a> ! </li> ! </xsl:if> ! </xsl:template> ! <xsl:template name="footer"> ! <div id="footer"> ! <p> mise à jour le <xsl:value-of select="$lastUpdate"/></p> </div> </xsl:template> ! <!--Lister les fichiers d'un dossier en evitant le fichier index--> <xsl:template match="div[@class='menu-dir']"> <div class="menu-dir"> <ul> ! <xsl:apply-templates/> </ul> </div> </xsl:template> ! <xsl:template name="getTitre"> ! <xsl:param name="file"></xsl:param> ! <xsl:value-of select="document($file)//xhtml/head/title"/> ! </xsl:template> ! <!--Faire un menu global pour un dossier: ref alphabetique--> <xsl:template match="div[@class='menu-alpha']"> <xsl:variable name="dirToList" select="text()"/> <div class="menu-dir"> <ul> ! <xsl:apply-templates/> </ul> </div> </xsl:template> ! <xsl:template match="div[@class='menu-alpha']/a"> <xsl:if test="not(contains(text(),'alphabetique'))"> <xsl:variable name="contenu" select="document(@href)"/> --- 63,117 ---- </p> </xsl:template> ! ! <!--cf explication pour div[@class='menu-dir'] ci-dessous ! --> ! ! <xsl:template name="footer"> ! <div id="footer"> ! <div class="version"> ! version <xsl:value-of select="$version"/> ! </div> ! <div class="date"> ! <xsl:value-of select="$date"/> </div> + </div> </xsl:template> ! <!--les balises du style <div class="menu-dir"> contiennent, tout le temps, ! des liens vers des fichiers sous la forme ! <a href="/path/absolu/vers/le/fichier">lefichier</a>. Ces liens sont ! générés par par la tache ant "filelist" et sont contenus dans les fichier ! de type file.lst ! Lister les fichiers d'un dossier en evitant le fichier index--> <xsl:template match="div[@class='menu-dir']"> <div class="menu-dir"> <ul> ! <xsl:for-each select=".//a"> ! <xsl:sort select="document(@href)//h1[1]"/> ! <xsl:if test="not(contains(text(),'index')) and contains(text(),'.xml')"> ! <li> ! <a href="{concat(substring-before(text(),'.'),$destExt)}"> ! <xsl:value-of select="document(@href)//h1[1]"/> ! </a> ! </li> ! </xsl:if> ! </xsl:for-each> </ul> </div> </xsl:template> ! ! ! <!--Faire un menu global pour un dossier: ref alphabetique ! Le fonctionnement est identique a <div class="menu-dir"> ! --> <xsl:template match="div[@class='menu-alpha']"> <xsl:variable name="dirToList" select="text()"/> <div class="menu-dir"> <ul> ! <xsl:apply-templates select=".//a"/> </ul> </div> </xsl:template> ! <xsl:template match="div[@class='menu-alpha']//a"> <xsl:if test="not(contains(text(),'alphabetique'))"> <xsl:variable name="contenu" select="document(@href)"/> *************** *** 101,114 **** </xsl:if> </xsl:template> ! <!--Creer le menu du corps html--> ! <xsl:template match="body" mode="menu"> ! <ul class="menu"> ! <li> ! <span class="imp">Sommaire:</span> ! </li> ! <xsl:apply-templates select="h2|h3|div[@class='include']" mode="menu"/> ! </ul> ! </xsl:template> ! <xsl:template match="h1|h2|h3" mode="alpha"> <xsl:param name="ref"></xsl:param> <xsl:variable name="theId"> --- 123,129 ---- </xsl:if> </xsl:template> ! <!--appele par <div class="menu-alpha"> :permet de faire le menu d'un fichier ! --> ! <xsl:template match="h1|h2|h3" mode="alpha"> <xsl:param name="ref"></xsl:param> <xsl:variable name="theId"> *************** *** 132,135 **** --- 147,153 ---- </li> </xsl:template> + + + <!--Ajoute un identifiant au chapite. Utile pour les menus --> <xsl:template match="h1|h2|h3"> <xsl:copy> *************** *** 148,175 **** </xsl:copy> </xsl:template> ! <xsl:template match="div[@class='include']" mode="menu"> ! <xsl:apply-templates select="h2|h3" mode="menu"/> ! </xsl:template> ! <xsl:template match="h2|h3" mode="menu"> ! <li> ! <xsl:if test="name()='h3'"> ! <xsl:attribute name="class"> ! <xsl:text>sub-menu</xsl:text> ! </xsl:attribute> ! </xsl:if> ! <xsl:call-template name="makeLink"> ! <xsl:with-param name="theText"> ! <xsl:apply-templates select="text()"/> ! </xsl:with-param> ! <xsl:with-param name="theId"> ! <xsl:text>chap_</xsl:text> ! <xsl:number level="any" from="h1" count="h2"/> ! <xsl:text>.</xsl:text> ! <xsl:number level="any" from="h2" count="h3"/> ! </xsl:with-param> ! </xsl:call-template> ! </li> ! </xsl:template> ! <!--faire un lien--> <xsl:template name="makeLink"> <xsl:param name="theText"></xsl:param> --- 166,175 ---- </xsl:copy> </xsl:template> ! ! ! <!--Methode pour faire un lien ! parametres :theText :le texte a mettre entre les balise a ! theId : le lien (href="theId") ! --> <xsl:template name="makeLink"> <xsl:param name="theText"></xsl:param> *************** *** 190,194 **** </xsl:choose> </xsl:template> ! <!--Lien vers le premier h1--> <xsl:template match="div[@class='top-page']"> <div class="top-page"> --- 190,199 ---- </xsl:choose> </xsl:template> ! ! <!--Lien vers le premier le body ! en mettant <div class="top-page"> dans le fichier xml, un lien vers le haut de la page ! sera inclus dans le fichier html ! --> ! <xsl:template match="div[@class='top-page']"> <div class="top-page"> *************** *** 197,205 **** </div> </xsl:template> ! <!--Menu d'un fichier a l'aide des balises h2 et h3--> <xsl:template match="div[@class='menu-file']"> <xsl:apply-templates select="//body" mode="menu"/> </xsl:template> <xsl:template match="div[@class='include']"> <xsl:apply-templates/> --- 202,277 ---- </div> </xsl:template> ! ! <!--Menu d'un fichier a l'aide des balises h2 et h3 ! Les balise <div class="menu-file"> sont remplacees par le menu du fichier ! Parcours a nouveau l'arbre xml dans le mode "menu". Cf les templates ! suivants ! --> <xsl:template match="div[@class='menu-file']"> <xsl:apply-templates select="//body" mode="menu"/> </xsl:template> + <!--Creer le menu du corps html + Ce template est appele lorsque pour faire le menu d'un fichier --> + <xsl:template match="body" mode="menu"> + <ul class="menu"> + <li> + <span class="imp">Sommaire:</span> + </li> + <xsl:apply-templates select="h2|h3|div[@class='include']" mode="menu"/> + </ul> + </xsl:template> + + <xsl:template match="p[@class='pres']"> + <div class="centerH"> + <p class="pres"> + <xsl:apply-templates/> + </p> + </div> + </xsl:template> + + + <!--<div class="include"> est utilise lorsqu'on insere un autre fichier dans + le corps d'un document xml : le fichier doit être bien forme et donc etre + totalement inclus dans des balises. Les balises :<div class="include"> --> + <xsl:template match="div[@class='include']" mode="menu"> + <xsl:apply-templates select="h2|h3|div[@class='include']" mode="menu"/> + </xsl:template> + + + <!--Lorsque le fichier pdf est genere on ne veut pas les sommaires--> + <xsl:template match="div[@class='include-glob']//div[@class='menu-file']|div[@class='include-glob']//p[@class='pres']"> + </xsl:template> + + <xsl:template match="div[@class='include-glob']"> + <xsl:apply-templates/> + </xsl:template> + + + <xsl:template match="h2|h3" mode="menu"> + <li> + <xsl:if test="name()='h3'"> + <xsl:attribute name="class"> + <xsl:text>sub-menu</xsl:text> + </xsl:attribute> + </xsl:if> + <xsl:call-template name="makeLink"> + <xsl:with-param name="theText"> + <xsl:apply-templates select="text()"/> + </xsl:with-param> + <xsl:with-param name="theId"> + <xsl:text>chap_</xsl:text> + <xsl:number level="any" from="h1" count="h2"/> + <xsl:text>.</xsl:text> + <xsl:number level="any" from="h2" count="h3"/> + </xsl:with-param> + </xsl:call-template> + </li> + </xsl:template> + + + <!--<div class="include"> est utilise lorsqu'on insere un autre fichier dans + le corps d'un document xml : le fichier doit être bien forme et donc etre + totalement inclus dans des balises. Les balises :<div class="include"> --> <xsl:template match="div[@class='include']"> <xsl:apply-templates/> |
From: <de...@us...> - 2004-02-12 15:24:41
|
Update of /cvsroot/fudaa/fudaa_devel/aide/src/prepro/template/task In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18294/template/task Modified Files: FileList.java Added Files: .cvsignore Log Message: maj de l'aide version 0.05 --- NEW FILE: .cvsignore --- FileList.class Index: FileList.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/aide/src/prepro/template/task/FileList.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FileList.java 21 Jan 2004 10:42:32 -0000 1.1 --- FileList.java 12 Feb 2004 15:19:38 -0000 1.2 *************** *** 12,15 **** --- 12,17 ---- protected Vector filesets= new Vector(); protected String file= null; + protected String includes= null; + protected String excludes= null; public FileList() {} *************** *** 17,24 **** // The method executing the task public void execute() throws BuildException { ! DirectoryScanner s=new DirectoryScanner(); s.addDefaultExcludes(); ! s.setExcludes(new String[]{file}); ! for (int i= filesets.size()-1; i >=0 ; i--) { DirSet fs= (DirSet)filesets.elementAt(i); DirectoryScanner ds= fs.getDirectoryScanner(project); --- 19,27 ---- // The method executing the task public void execute() throws BuildException { ! DirectoryScanner s= new DirectoryScanner(); ! s.setIncludes(computeIncludes(includes)); ! s.setExcludes(computeExcludes()); s.addDefaultExcludes(); ! for (int i= filesets.size() - 1; i >= 0; i--) { DirSet fs= (DirSet)filesets.elementAt(i); DirectoryScanner ds= fs.getDirectoryScanner(project); *************** *** 26,61 **** String[] dirFiles= ds.getIncludedDirectories(); for (int j= dirFiles.length - 1; j >= 0; j--) { ! File destFile=new File(fromDir,dirFiles[j]); s.setBasedir(destFile); s.scan(); ! writeListFile(destFile,s.getIncludedFiles()); ! } } } ! ! ! private void writeListFile(File destDir,String[] filenames){ ! Writer out=null; try { ! out= new FileWriter(new File(destDir,file)); for (int j= filenames.length - 1; j >= 0; j--) { ! out.write("<a href=\""+new File(destDir,filenames[j]).getAbsolutePath()+"\">"+filenames[j]+"</a>\n"); } ! } catch (IOException _e) {} ! finally{ ! if(out!=null){ ! try{ ! out.close(); ! } ! catch(Exception e){ ! e.printStackTrace(); ! } ! } ! } } ! public void setFile(String _f) { ! file=_f; } public void addDirset(DirSet set) { filesets.addElement(set); --- 29,107 ---- String[] dirFiles= ds.getIncludedDirectories(); for (int j= dirFiles.length - 1; j >= 0; j--) { ! File destFile= new File(fromDir, dirFiles[j]); s.setBasedir(destFile); s.scan(); ! writeListFile(destFile, s.getIncludedFiles()); } } ! } ! ! ! public static String[] computeIncludes(String _s){ ! if(_s!=null){ ! StringTokenizer s=new StringTokenizer(_s,","); ! String[] r=new String[s.countTokens()]; ! int i=0; ! while(s.hasMoreTokens()){ ! r[i++]=s.nextToken(); ! } ! return r; ! } ! return null; ! } ! ! public String[] computeExcludes(){ ! if(excludes!=null){ ! StringTokenizer s=new StringTokenizer(excludes,","); ! String[] r=new String[s.countTokens()+1]; ! int i=0; ! r[i++]=file; ! while(s.hasMoreTokens()){ ! r[i++]=s.nextToken(); ! } ! return r; ! } ! return new String[] { file }; ! } ! ! ! ! private void writeListFile(File destDir, String[] filenames) { ! Writer out= null; try { ! out= new FileWriter(new File(destDir, file)); ! out.write("<div>"); for (int j= filenames.length - 1; j >= 0; j--) { ! out.write( ! "<a href=\"" ! + new File(destDir, filenames[j]).getAbsolutePath() ! + "\">" ! + filenames[j] ! + "</a>\n"); } ! out.write("</div>"); ! } catch (IOException _e) {} finally { ! if (out != null) { ! try { ! out.close(); ! } catch (Exception e) { ! e.printStackTrace(); ! } ! } ! } } ! public void setFile(String _f) { ! file= _f; ! } ! ! public void setIncludes(String _f) { ! includes= _f; ! } ! ! public void setExcludes(String _f) { ! excludes= _f; } + public void addDirset(DirSet set) { filesets.addElement(set); |
From: <de...@us...> - 2004-02-12 15:24:40
|
Update of /cvsroot/fudaa/fudaa_devel/aide/src/prepro/src/reflux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18294/src/reflux Modified Files: p-reflux-editeur-2D.xml p-reflux-general.xml p-reflux-time-curves.xml presentation-general.xml Added Files: p-reflux-editeur-2D.inc.xml p-reflux-general.inc.xml p-reflux-time-curves.inc.xml presentation-general.inc.xml Log Message: maj de l'aide version 0.05 --- NEW FILE: p-reflux-editeur-2D.inc.xml --- (This appears to be a binary file; contents omitted.) --- NEW FILE: p-reflux-general.inc.xml --- (This appears to be a binary file; contents omitted.) --- NEW FILE: p-reflux-time-curves.inc.xml --- (This appears to be a binary file; contents omitted.) --- NEW FILE: presentation-general.inc.xml --- (This appears to be a binary file; contents omitted.) Index: p-reflux-editeur-2D.xml =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/aide/src/prepro/src/reflux/p-reflux-editeur-2D.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** p-reflux-editeur-2D.xml 21 Jan 2004 10:42:32 -0000 1.1 --- p-reflux-editeur-2D.xml 12 Feb 2004 15:19:37 -0000 1.2 *************** *** 1,4 **** <?xml version="1.0" encoding="iso-8859-1"?> ! <!DOCTYPE xhtml SYSTEM "reflux.dtd"> <xhtml path="&url;"> <head> --- 1,6 ---- <?xml version="1.0" encoding="iso-8859-1"?> ! <!DOCTYPE xhtml SYSTEM "reflux.dtd"[ ! <!ENTITY inc SYSTEM "p-reflux-editeur-2D.inc.xml"> ! ]> <xhtml path="&url;"> <head> *************** *** 8,64 **** </head> <body> ! &entete; ! <h1>Editeur 2D</h1> ! <p class="pres">Ce document concerne l'éditeur 2d (les calques). Il est accessible ! par le menu <code>Projet>Editeur 2D</code> ou par le ! raccourci clavier <code>Ctrl+Alt-V</code>.<br/> ! Dans un ! premier temps, la partie générique est présentée. Les derniers chapitres ! présentent les calques et actions spécifiques à reflux.</p> ! <div class="menu-file"/> ! &editor2D; ! <h2>Le calque "Bord"</h2> ! <p>Ce calque permet de modifier les propriétés d'une arête et celles des ! points de cette arête. Pour éditer les arêtes sélectionnées, vous pouvez ! utiliser le menu contextuel ou le menu général <code>Editeur ! 2D>Bords>Editer bords</code>. </p> ! <p> ! <img class="float-left" alt="Vue de l'éditeur de bord" ! src="../images/reflux-edition-bord.jpg" width="421px" height="385px"/> ! </p> ! <p>L'éditeur de bord permet de modifier le type des arêtes sélectionnées. ! Il y a 4 types possibles:<br/>Liquide, Liquide débit imposé, Solide et Solide ! avec frottement.</p> ! <p>La zone "propriétés nodales" permet de modifier les paramètres aux ! noeuds. Dans l'exemple ci-contre, seule la caractéristique "Débit" peut ! être modifiée du fait que les arêtes sont de type "Liquide débit imposé". ! Pour chaque paramètre, vous pouvez choisir un mode : libre, permanent ou ! transitoire.</p> ! <p>La dernière partie de l'éditeur contient le paramètre "Rugosité" qui est ! spécifique au bord "Solide avec frottement"</p> ! <p class="spacer"/> ! <p class="warn">Pour utiliser le mode "transitoire", des courbes doivent ! être chargées par le pré-processeur. Pour cela, vous pouvez utiliser le ! menu <code>Fichier>Importer>Courbes temporelles</code></p> ! <h2>Le calque "Points de Bord"</h2> ! <p>Ce calque est utilisé, en général, pour spécifier des valeurs sur des ! points spécifiques. Pour cela, vous pouvez utiliser l'action "Editer ! points". Le panneau d'édition des points est équivalent à celui des ! bords.</p> ! <p>Ce calque permet également de modifier les arêtes. Pour cela, il suffit ! de <span class="imp">sélectionner des points milieux</span> et d'utiliser ! l'action "Editer bords". Seuls les bords dont le point milieu est ! sélectionné seront modifiés.</p> ! <h2>Le calque "Polygone"</h2> ! <p>A partir de ce calque, vous pouvez modifier les paramètres ! "élémentaires": </p> ! <ul> ! <li>Perte de charge</li> ! <li>Rugosité</li> ! <li>Viscosité</li> ! <li>Alpha longueur de mélange ( pour un projet de type ! "courantologie 2D longueur de mélange" uniquement)</li> ! </ul> ! &haut-page; </body> </xhtml> \ No newline at end of file --- 10,16 ---- </head> <body> ! &entete; ! &inc; ! &haut-page; </body> </xhtml> \ No newline at end of file Index: p-reflux-general.xml =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/aide/src/prepro/src/reflux/p-reflux-general.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** p-reflux-general.xml 21 Jan 2004 10:42:32 -0000 1.1 --- p-reflux-general.xml 12 Feb 2004 15:19:37 -0000 1.2 *************** *** 1,305 **** <?xml version="1.0" encoding="iso-8859-1"?> ! <!DOCTYPE xhtml SYSTEM "reflux.dtd"> <xhtml path="&url;"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta content="Fred Deniger" name="author" /> ! <link rel="stylesheet" type="text/css" href="style.css" /> ! <title>Editeur des paramètres généraux</title> </head> <body> ! &entete; ! <h1>Editeur des paramètres généraux</h1> ! <p class="pres">Cet éditeur contient les données générales du projet et ! permet de modifier les paramètres généraux du projet. Il est accessible ! par le menu <code>Projet>Paramètres généraux</code> ou par le ! raccourci clavier <code>Ctrl+Alt-G</code>.</p> ! <div class="menu-file" /> ! <h2>Le menu "Projet"</h2> ! <div class="centerH"> ! <table class="bord-noir"> ! <tr> ! <td class="imp">Intégration en temps</td> ! <td> ! <p>Active une fenêtre de dialogue afin de modifier les paramètres ! concernant le temps ( stationnaire,transitoire, méthode, ...) du ! projet.</p> ! </td> ! </tr> ! <tr> ! <td class="imp">Calculer</td> ! <td> ! <p>Permet de lancer le calcul du projet en cours dans une fenêtre ! indépendante. Vous pouvez ainsi quitter l'application après le ! lancement de l'exécutable reflux.</p> ! </td> ! </tr> ! <tr> ! <td class="imp">Paramètres généraux</td> ! <td> ! <p>Active cet éditeur</p> ! </td> ! </tr> ! <tr> ! <td class="imp">Editeur 2D</td> ! <td> ! <p>Active l'éditeur graphique des objets géométriques. Cet éditeur ! permet de modifier les conditions limites, les paramètres ! physiques,...</p> ! </td> ! </tr> ! <tr> ! <td class="imp">Courbes temporelles</td> ! <td> ! <p>Active l'éditeur pour les courbes temporelles utilisées pour les ! conditions limites liquides.</p> ! </td> ! </tr> ! </table> ! </div> ! <h2>Panneau "projet"</h2> ! <p><img class="float-left" alt="Vue du panneau projet" width="501px" ! height="109px" src="../images/reflux-project-panel.jpg" /> Ce panneau ! donne les informations suivantes:</p> ! <ul class="bizarre"> ! <li>Le chemin absolu du fichier ( il est possible de l'éditer )</li> ! <li>La date du dernier enregistrement</li> ! <li>Son état actuel : modifié ou non par le pré-processeur</li> ! <li>Le type du projet. Il est possible d'ajouter le caractère "LMG" ( ! longueur de mélange) au projet.</li> ! </ul> ! <div class="spacer" /> ! <h2>Panneau "Propriétés du calcul"</h2> ! <p><img class="float-left" alt="Vue du panneau projet" width="512px" ! height="332px" src="../images/reflux-keyword-panel.jpg" /> Ce panneau est ! séparé en deux parties: la colonne de gauche regroupe les filtres, la ! colonne principale contient le tableau des paramètres et le panneau ! d'information. En plaçant la souris entre ces 2 colonnes, vous pouvez ! redimensionner la colonne de gauche ou la fermer complètement.</p> ! <p>Les paramètres modifiés sont affichés en bleu et les erreurs en rouge.</p> ! <h3 class="spacer">Les filtres</h3> ! <p>Plusieurs types de filtre peuvent être combinés:</p> ! <div class="centerH"> ! <table class="bord-noir"> ! <tr> ! <td class="imp">Nom</td> ! <td> ! <p>Permet d'afficher les mot-clés contenant la chaîne de caractère ! saisie (les majuscules/minuscules sont ignorées).</p> ! <p class="astuce">Le raccourci <code>Ctrl-F</code> permet d'accéder ! directement à la zone de saisie.</p> ! </td> ! </tr> ! <tr> ! <td class="imp">Etat</td> ! <td> ! <p>Affiche les mot-clés modifiés, non-modifiés ou comportant des ! erreurs.</p> ! </td> ! </tr> ! <tr> ! <td class="imp">Mode</td> ! <td> ! <p>Permet de spécifier le type d'utilisateur.</p> ! </td> ! </tr> ! <tr> ! <td class="imp">Rubrique</td> ! <td> ! <p>Permet d'afficher les mot-clés d'une rubrique spécifique. ! Vous pouvez sélectionner ! plusieurs rubriques grâce aux modificateurs <code>Ctrl</code> et ! <code>Maj</code>. Pour déselectionner une rubrique, utiliser ! la touche <code>Ctrl</code>.</p> ! </td> ! </tr> ! </table> ! </div> ! <h3>Annuler les filtres</h3> ! <p>En cliquant-droit sur un filtre, un menu vous permettra d'initialiser ce ! filtre. Pour initialiser TOUS les filtres, vous devez utiliser le menu ! contextuel du tableau (voir ci-dessous) et choisir l'item ! <code>Aucun</code> .</p> ! <h3>Modifier l'affichage et menu contextuel</h3> ! <p><img class="float-left" src="../images/telemac-general-keyword-menu.jpg" ! alt="Vue du menu contextuel" width="202px" height="180px" /> Pour accéder ! à ce menu, il suffit de cliquer avec le bouton droit dans la colonne ! centrale. La première partie (<code>Filtre</code>) du menu permet de ! modifier les filtres en cours. La deuxième partie ! (<code>Affichage</code>) offre la possibilité de choisir les colonnes à ! afficher.</p> ! <p class="spacer">L'entête du tableau permet de dimensionner/déplacer les colonnes ! ou de classer leur contenu.</p> ! <p class="astuce">Les modifications sont automatiquement enregistrées et ! seront rétablies à la prochaine session.</p> ! <h3>Editer les mot-clés</h3> ! <p>Pour modifier un mot-clé, vous pouvez:</p> ! <ul> ! <li>Cliquer sur le champ à modifier dans la colonne ! <code>Valeur</code></li> ! <li>Si une ligne est sélectionnée, utiliser le bouton <img ! class="in-text" alt="" width="16px" height="16px" ! src="../images/editer_16.gif" /> "editer" ( <code>Ctrl+E</code>)</li> ! </ul> ! <p>Pour annuler la modification d'un (ou de plusieurs) mot-clé, il suffit de ! sélectionner la (ou les) ligne correspondante et d'utiliser le bouton ! <img class="in-text" alt="" width="16px" height="16px" ! src="../images/annuler_16.gif" /> "annuler" ( <code>Ctrl+D</code>).</p> ! <h2>L'éditeur "Intégration en temps"</h2> ! <p>L'intégration en temps vous permet de définir les paramètres nécessaires ! à la résolution stationnaire ou transitoire, le schéma d'intégration et ! la méthode de résolution.</p> ! <h3> Cas stationnaire</h3> ! <div class="centerH"> ! <img src="../images/reflux-stationnaire.jpg" height="239px" width="378px" ! alt="vue du panneau pour le cas stationnaire"/> ! </div> ! <p>Lorsque vous sélectionnez le cas Stationnaire, seule 1 colonne apparaît ! dans la table "méthodes de résolution".Pour modifier la méthode et ses ! coefficients, cliquez sur le bouton <code>Modifier...</code>. Une boîte ! de dialogue apparaît reflétant les informations supplémentaires de la ! méhode.La liste <code>Méthode</code> contient la liste des méthodes ! utilisables pour un cas stationnaire. Suivant la méthode, les ! coefficients à définir peuvent être différents. Les tableaux ci dessous ! donnent un résumé des différentes méthodes et des coefficients ! susceptibles de leur être associés.</p> ! <div class="centerH"> ! <table class="bord-noir"> ! <tr> ! <th>Méthode</th> ! <th>Signification</th> ! </tr> ! <tr> ! <td>Linéaire</td> ! <td>Une itération de point fixe avec la même matrice pour tous les ! pas d'un même groupe</td> ! </tr> ! <tr> ! <td>Newton Raphson </td> ! <td>Méthode itérative de Newton-Raphson </td> ! </tr> ! <tr> ! <td>Newton Raphson + bancs c/d </td> ! <td>Méthode itérative de Newton-Raphson avec option bancs ! couvrants-découvrants </td> ! </tr> ! <tr> ! <td>Newton Raphson + lmg </td> ! <td>Méthode itérative de Newton-Raphson avec calcul de la longueur de ! mélange </td> ! </tr> ! <tr> ! <td>Selected Lumping </td> ! <td>Méthode explicite de Kawahara (Méthode Selected Lumping) </td> ! </tr> ! <tr> ! <td>Selected Lumping + bancs c/d </td> ! <td>Méthode explicite de Kawahara (Méthode Selected Lumping) avec ! option bancs couvrants-découvrants </td> ! </tr> ! </table> ! </div> ! <p>Les méthodes utilisables sont spécifiques du type de projet.</p> ! <div class="centerH"> ! <table class="bord-noir"> ! <tr> ! <th>Coefficients </th> ! <th> Signification</th> ! </tr> ! <tr> ! <td>Relaxation </td> ! <td>Relaxation. En principe = 1.</td> ! </tr> ! <tr> ! <td>Précision Newton Raphson </td> ! <td>Précision de convergence du calcul. Reflux considère que le ! calcul a convergé si la variation des variables entre 2 itérations ! est inférieure à cette valeur </td> ! </tr> ! <tr> ! <td>Précision bancs couvrants -découvrants </td> ! <td>Définition d'un noeud sec ou mouillé. Un noeud est sec si la ! hauteur d'eau sur celui ci est inférieure à cette valeur </td> ! </tr> ! <tr> ! <td>Nombre d'itérations maxi </td> ! <td>Nombre d'itérations maximum autorisé pour atteindre la ! convergence </td> ! </tr> ! </table> ! </div> ! <h3> Cas transitoire</h3> ! <div class="centerH"> ! <img src="../images/reflux-transitoire.jpg" height="258px" width="428px" ! alt="vue du panneau pour le cas transitoire"/> ! </div> ! <p>Lorsque vous sélectionnez le cas Transitoire, un nombre important de ! colonnes apparaît dans la table Groupes de pas de temps.</p> ! <p>Chaque ligne de cette table contient les informations relatives à un ! groupe de pas de temps, un groupe de pas de temps définissant une durée ! sur laquelle la valeur du pas de temps, le schéma et/ou la méthode ! peuvent être différents du groupe de pas de temps précédent.</p> ! <p>Pour ajouter un groupe de pas de temps, sélectionnez une ligne de la ! table de Groupes de pas de temps, puis cliquez sur le bouton ! <code>Ajouter...</code>. Un nouveau groupe sera ajouté à l'emplacement de ! la ligne sélectionnée en copiant les informations issues de cette ligne. ! Les débuts et fin des groupes suivant seront automatiquement ! recalculés.</p> ! <p>Pour supprimer un groupe de pas de temps, sélectionnez le dans la table, ! puis cliquez sur le bouton <code>Supprimer</code></p> ! <p>Pour modifier un groupe de pas de temps, cliquez sur la ligne ! correspondante, puis sur le bouton <code>Modifier...</code> du panneau de ! gestion des groupes de pas de temps. Une boîte de dialogue apparaît ! reflétant les informations du groupe sélectionné.</p> ! <p>Nous vous conseillons de ne pas utiliser plusieurs groupes ! de pas de temps, la complexité du réglage pour arriver à la convergence ! du problème augmentant de manière considérable.</p> ! <p class="hidde"> Utilisez à la place la reprise de calcul, chaque reprise ! étant équivalent à un nouveau groupe de pas de temps sur lequel vous ! aurez modifié les paramètres de valeur de pas de temps, schéma et/ou ! méthode. </p> ! <h4>Temps</h4> ! <p>Vous pouvez modifier le "Nombre de pas de temps" et la "Valeur du pas de ! temps" (donnée en secondes). Dans ce cas, les groupes de pas de temps ! suivants verront leurs temps de début et de fin modifiés ! automatiquement.</p> ! <p>Vous pouvez également décaler le t0 du calcul par rapport au t0 des ! courbes transitoires en précisant une valeur de début de calcul autre que ! 0 dans le champs <code>Début</code>.</p> ! <p>La "Fréquence de stockage des résultats" indique au bout de combien de ! pas de temps le résultat est écrit sur le fichier des résultats. Si la ! fréquence est supérieure au nombre de pas de temps, seul le dernier pas ! de temps sera stocké.</p> ! <h4>Schéma</h4> ! <p>La colonne "Schéma" contient la liste des schémas utilisables pour un ! cas transitoire. Le tableau ci dessous donne un résumé des différents ! schémas et du coefficient qui leur est associé.</p> ! <div class="centerH"> ! <table class="bord-noir"> ! <tr> ! <th> Schéma </th> ! <th>Signification</th> ! </tr> ! <tr> ! <td>Euler</td> ! <td>Schéma d'Euler explicite, implicite ou semi implicite<br/>Valeurs ! du coefficient : 0 : Explicite, 0.5 : Semi ! implicite, 1.0 : Implicite. Théoriquement, le coefficient peut ! aussi varier de 0 à 1.</td> ! </tr> ! <tr> ! <td>Kawahara </td> ! <td>Schéma de KAWAHARA explicite<br/>Valeur du coefficient : ! 0.92. Théoriquement, le coefficient peut aussi varier de 0 à 1.</td> ! </tr> ! </table> ! </div> ! <p>Le changement de schéma influence la méthode de résolution.</p> ! <h4>Méthode</h4> ! <p>La colonne "Méthode" contient la liste des méthodes utilisables pour un ! cas transitoire. Suivant la méthode, les coefficients à définir peuvent ! être différents. Les méthodes et coefficients qui peuvent leur être ! associés sont les mêmes que pour un cas de calcul transitoire.</p> ! &haut-page; </body> </xhtml> \ No newline at end of file --- 1,16 ---- <?xml version="1.0" encoding="iso-8859-1"?> ! <!DOCTYPE xhtml SYSTEM "reflux.dtd"[ ! <!ENTITY inc SYSTEM "p-reflux-general.inc.xml"> ! ]> <xhtml path="&url;"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta content="Fred Deniger" name="author" /> ! <title>Editeur 2D</title> </head> <body> ! &entete; ! &inc; ! &haut-page; </body> </xhtml> \ No newline at end of file Index: p-reflux-time-curves.xml =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/aide/src/prepro/src/reflux/p-reflux-time-curves.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** p-reflux-time-curves.xml 21 Jan 2004 10:42:32 -0000 1.1 --- p-reflux-time-curves.xml 12 Feb 2004 15:19:37 -0000 1.2 *************** *** 1,19 **** <?xml version="1.0" encoding="iso-8859-1"?> ! <!DOCTYPE xhtml SYSTEM "reflux.dtd"> <xhtml path="&url;"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta content="Fred Deniger" name="author" /> ! <link rel="stylesheet" type="text/css" href="style.css" /> ! <title>Editeur courbes temporelles</title> </head> <body> ! &entete; ! <h1>Editeur Courbes temporelles</h1> ! <p class="pres">Cet éditeur contient les courbes utilisées ( ou importées) ! par le projet.Il est accessible par le menu ! <code>Projet>Editeur</code> ou par le raccourci clavier ! <code>Ctrl+Alt-C</code>.</p> ! <div class="menu-file" /> ! &timeCurves; ! </body></xhtml> \ No newline at end of file --- 1,16 ---- <?xml version="1.0" encoding="iso-8859-1"?> ! <!DOCTYPE xhtml SYSTEM "reflux.dtd"[ ! <!ENTITY inc SYSTEM "p-reflux-time-curves.inc.xml"> ! ]> <xhtml path="&url;"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta content="Fred Deniger" name="author" /> ! <title>Editeur 2D</title> </head> <body> ! &entete; ! &inc; ! &haut-page; ! </body> ! </xhtml> \ No newline at end of file Index: presentation-general.xml =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/aide/src/prepro/src/reflux/presentation-general.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** presentation-general.xml 21 Jan 2004 10:42:32 -0000 1.1 --- presentation-general.xml 12 Feb 2004 15:19:37 -0000 1.2 *************** *** 1,15 **** <?xml version="1.0" encoding="iso-8859-1"?> ! <!DOCTYPE xhtml SYSTEM "reflux.dtd"> <xhtml path="&url;"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta content="Fred Deniger" name="author" /> ! <link rel="stylesheet" type="text/css" href="style.css" /> ! <title>Présentation générale</title> </head> <body> ! &entete; ! &general-presentation; ! &haut-page; ! </body> </xhtml> \ No newline at end of file --- 1,16 ---- <?xml version="1.0" encoding="iso-8859-1"?> ! <!DOCTYPE xhtml SYSTEM "reflux.dtd"[ ! <!ENTITY inc SYSTEM "presentation-general.inc.xml"> ! ]> <xhtml path="&url;"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta content="Fred Deniger" name="author" /> ! <title>Editeur 2D</title> </head> <body> ! &entete; ! &inc; ! &haut-page; ! </body> </xhtml> \ No newline at end of file |
From: <de...@us...> - 2004-02-12 15:24:40
|
Update of /cvsroot/fudaa/fudaa_devel/aide/src/prepro/src_devel/images In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18294/src_devel/images Added Files: fudaa.jpg packages.png Log Message: maj de l'aide version 0.05 --- NEW FILE: fudaa.jpg --- (This appears to be a binary file; contents omitted.) --- NEW FILE: packages.png --- (This appears to be a binary file; contents omitted.) |
From: <de...@us...> - 2004-02-12 15:24:40
|
Update of /cvsroot/fudaa/fudaa_devel/aide/src/prepro/src_devel/template In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18294/src_devel/template Added Files: packages.dia Log Message: maj de l'aide version 0.05 --- NEW FILE: packages.dia --- (This appears to be a binary file; contents omitted.) |
From: <de...@us...> - 2004-02-12 15:24:38
|
Update of /cvsroot/fudaa/fudaa_devel/aide/src/prepro/src/telemac In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18294/src/telemac Modified Files: p-telemac-editeur2D.xml p-telemac-general.xml presentation-general.xml Log Message: maj de l'aide version 0.05 Index: p-telemac-editeur2D.xml =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/aide/src/prepro/src/telemac/p-telemac-editeur2D.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** p-telemac-editeur2D.xml 21 Jan 2004 10:42:32 -0000 1.1 --- p-telemac-editeur2D.xml 12 Feb 2004 15:19:37 -0000 1.2 *************** *** 39,45 **** modifier les valeurs du fichier "conditions limites" et du fichier "frontière liquide" contenant les courbes temporelles.</p> ! <p> <img class="float-left" src="../images/telemac-edition-cl.jpg" alt="vue de l'éditeur des conditions limites" width="412px" ! height="475px"/> <br/> Le premier composant permet de choisir le type du bord. </p> <p> <span class="imp">"Conditions variables en temps"</span>: cette zone --- 39,45 ---- modifier les valeurs du fichier "conditions limites" et du fichier "frontière liquide" contenant les courbes temporelles.</p> ! <img class="float-left" src="../images/telemac-edition-cl.jpg" alt="vue de l'éditeur des conditions limites" width="412px" ! height="475px"/> <p>Le premier composant permet de choisir le type du bord. </p> <p> <span class="imp">"Conditions variables en temps"</span>: cette zone *************** *** 87,93 **** paramètres correspondants au type de bord sont modifiables (cf exemple ci-dessous). </p> ! <p> <img class="float-left" src="../images/telemac-edition-cl-points.jpg" alt="vue de l'éditeur des points frontières" width="256px" ! height="205px"/> <br/> Ce composant concerne un bord de type "liquide hauteur imposée"<br/> Le champ "côte eau" est en rouge car la valeur du champ ne sera pas prise en compte par le système telemac :le mot-clé --- 87,93 ---- paramètres correspondants au type de bord sont modifiables (cf exemple ci-dessous). </p> ! <img class="float-left" src="../images/telemac-edition-cl-points.jpg" alt="vue de l'éditeur des points frontières" width="256px" ! height="205px"/> <p> Ce composant concerne un bord de type "liquide hauteur imposée"<br/> Le champ "côte eau" est en rouge car la valeur du champ ne sera pas prise en compte par le système telemac :le mot-clé Index: p-telemac-general.xml =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/aide/src/prepro/src/telemac/p-telemac-general.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** p-telemac-general.xml 21 Jan 2004 10:42:32 -0000 1.1 --- p-telemac-general.xml 12 Feb 2004 15:19:37 -0000 1.2 *************** *** 68,72 **** des autres fichiers ( fichier de géométrie, fichier conditions limites, ...), il suffit d'utiliser l'action ! <code>Charges les fichiers</code>. L'affichage de ces fichiers sera modifié dans l'éditeur.</p> </td> --- 68,72 ---- des autres fichiers ( fichier de géométrie, fichier conditions limites, ...), il suffit d'utiliser l'action ! <code>Charger les fichiers</code>. L'affichage de ces fichiers sera modifié dans l'éditeur.</p> </td> *************** *** 278,285 **** <h3>Modifier l'affichage et menu contextuel</h3> ! ! <p><img class="float-left" src="../images/telemac-general-keyword-menu.jpg" alt="Vue du menu contextuel" width="202px" height="180px" /> Pour accéder à ce menu, il suffit de cliquer avec le bouton droit dans la colonne centrale. La première partie --- 278,285 ---- <h3>Modifier l'affichage et menu contextuel</h3> ! <img class="float-left" src="../images/telemac-general-keyword-menu.jpg" alt="Vue du menu contextuel" width="202px" height="180px" /> + <p> Pour accéder à ce menu, il suffit de cliquer avec le bouton droit dans la colonne centrale. La première partie *************** *** 340,343 **** --- 340,392 ---- frontière liquide avec débit n'est définie, le mot-clé <code>DEBIT IMPOSE</code> ne doit pas être défini (erreur).</p> + + + <h2>Les commentaires par mot-clé</h2> + <p>Le panneau d'information possède un onglet "commentaire". Cet onglet permet + d'ajouter un commentaire au mot-clé sélectionné.</p> + <p class="warn">Les modifications dans l'onglet "commentaire" ne sont pas "enregistrées" + : les actions "défaire/refaire" ne fonctionnent pas.</p> + + <h3>Enregistrement des commentaires dans les fichiers cas</h3> + <p>Les commentaires sont ajoutés avant chaque mot-clé. Une ligne blanche + permet de séparer les commentaires. Vous trouverez ci-dessous un exemple + de fichier cas. Les commentaires sont en bleu et les mot-clés en rouge.</p> + <div class="centerH"> + <div class="bloc-color"> + + <pre> + + <span class="blue"> + /---------------------------------------------------------------------- + / TELEMAC-2D Version 5.2R0 - Septembre 2001 + / Exemple d'initiation - Calcul numero 4 + / Calcul d'écoulement sur zone sèche + /---------------------------------------------------------------------- + / ENVIRONNEMENT INFORMATIQUE + /---------------------------------------------------------------------- + </span> + + <span class="blue"> + /Début du commentaire du mot-clé "FICHIER DES PARAMETRES". + /L'entête du fichier n'est pas pris en compte grâce à la ligne vide + / + / + /FIN du commentaire du mot-clé "FICHIER DES PARAMETRES"</span> + <span class="red">FICHIER DES PARAMETRES</span> : './cas4.txt' + + <span class="blue"> + /Commentaire de FICHIER DES CONDITIONS AUX LIMITES</span> + <span class="red">FICHIER DES CONDITIONS AUX LIMITES</span> : '../../matisse/cli2.txt' + + <span class="blue"> + /Commentaire de FICHIER DE GEOMETRIE</span> + <span class="red">FICHIER DE GEOMETRIE</span> : '../../matisse/geo1' + + <span class="blue"> + /le mot-clé FICHIER DES RESULTATS n'a pas de commentaire (ligne vide)</span> + + <span class="red">FICHIER DES RESULTATS</span> : './resu4.slf' + </pre> + </div> </div> &haut-page; </body> Index: presentation-general.xml =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/aide/src/prepro/src/telemac/presentation-general.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** presentation-general.xml 21 Jan 2004 10:42:32 -0000 1.1 --- presentation-general.xml 12 Feb 2004 15:19:37 -0000 1.2 *************** *** 11,13 **** --- 11,20 ---- &entete; &general-presentation; + <h2>Les éditeurs</h2> + <ul> + <li><a href="p-telemac-general.html">L'éditeur du projet et des mot-clés</a></li> + <li><a href="p-telemac-editeur2D.html">L'éditeur 2D</a></li> + <li><a href="p-telemac-time-curves.html">L'éditeur des courbes temporelles</a></li> + </ul> + &haut-page; </body></xhtml> \ No newline at end of file |
From: <de...@us...> - 2004-02-12 15:24:37
|
Update of /cvsroot/fudaa/fudaa_devel/aide/src/prepro/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18294/src Modified Files: index.xml Log Message: maj de l'aide version 0.05 Index: index.xml =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/aide/src/prepro/src/index.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** index.xml 21 Jan 2004 10:42:32 -0000 1.1 --- index.xml 12 Feb 2004 15:19:36 -0000 1.2 *************** *** 13,18 **** <h4>Contact, Site</h4> ! <p>Les questions, suggestions et rapport de bogues peuvent etre envoyés à &resp-mail;. ! En cas de rapport de bogue, il est recommandé de joindre le fichier "ts.log" qui se trouve dans le répertoire d'installation du logiciel. </p> <p>Les nouvelles versions du pré-processeur sont disponibles --- 13,18 ---- <h4>Contact, Site</h4> ! <p>Les questions, suggestions et rapports de bogues peuvent être envoyés à &resp-mail;. ! <br/>En cas de rapport de bogue, il est recommandé de joindre le fichier "ts.log" qui se trouve dans le répertoire d'installation du logiciel. </p> <p>Les nouvelles versions du pré-processeur sont disponibles |
From: <de...@us...> - 2004-02-12 15:24:37
|
Update of /cvsroot/fudaa/fudaa_devel/aide/src/prepro/src/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18294/src/common Removed Files: style.css Log Message: maj de l'aide version 0.05 --- style.css DELETED --- |
From: <de...@us...> - 2004-02-12 15:24:37
|
Update of /cvsroot/fudaa/fudaa_devel/aide/src/prepro/src_devel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18294/src_devel Added Files: index.xml Log Message: maj de l'aide version 0.05 --- NEW FILE: index.xml --- <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE xhtml SYSTEM "../template/default.dtd"[ <!ENTITY url "./"> <!ENTITY title-section "Bienvenue"> ]> <xhtml path="&url;"> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"/> <title>pré-processeur: Développement</title> <meta content="Frederic Deniger" name="author"/> </head> <body> &header-devel; <h1>Organisation des sources</h1> <h2>Organisation des packages</h2> <p>Les sources sont séparés en 2 grandes parties (les noms ne sont pas définitifs):</p> <ul><li><span class="imp">dodico</span> : les modèles ( package h2d ) et les classes d'entrée/sortie</li> <li><span class="imp">fudaa.tr</span> : interface graphique</li> </ul> <div class="centerH"> <img alt="vue de l'organisation des packages" src="&url;/images/packages.png"/> </div> <h2>Les Tests</h2> <p>Le package <code>org.fudaa.dodico.test</code> contient tous les tests unitaires effectués à chaque modification des sources des modèles ou des classes d'entrée/sortie. Les tests sont regroupés en 4 parties: test.h2d ( les tests communs), reflux, rubar et reflux. </p> </body> </xhtml> |
From: <de...@us...> - 2004-02-12 15:17:44
|
Update of /cvsroot/fudaa/fudaa_devel/aide/src/prepro/src_devel/images In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17107/images Log Message: Directory /cvsroot/fudaa/fudaa_devel/aide/src/prepro/src_devel/images added to the repository |
From: <de...@us...> - 2004-02-12 15:17:38
|
Update of /cvsroot/fudaa/fudaa_devel/aide/src/prepro/src_devel/template In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17107/template Log Message: Directory /cvsroot/fudaa/fudaa_devel/aide/src/prepro/src_devel/template added to the repository |