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
|
|
From: <de...@us...> - 2003-12-19 12:10:58
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/ressource In directory sc8-pr-cvs1:/tmp/cvs-serv28766/ressource Modified Files: livre-ouvert-modif_16.png livre-ouvert-modif_20.png Log Message: General update for prepro Index: livre-ouvert-modif_16.png =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/ressource/livre-ouvert-modif_16.png,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsxbCuzT and /tmp/cvs2Gl3WC differ Index: livre-ouvert-modif_20.png =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/ressource/livre-ouvert-modif_20.png,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsvZ0NnU and /tmp/cvsu5xKzE differ |
|
From: <de...@us...> - 2003-12-19 12:10:58
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/commun/undo
In directory sc8-pr-cvs1:/tmp/cvs-serv28766/commun/undo
Modified Files:
FudaaUndoPaneFille.java
Log Message:
General update for prepro
Index: FudaaUndoPaneFille.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/commun/undo/FudaaUndoPaneFille.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** FudaaUndoPaneFille.java 11 Dec 2003 12:50:53 -0000 1.3
--- FudaaUndoPaneFille.java 19 Dec 2003 12:10:55 -0000 1.4
***************
*** 65,72 ****
listener.add(_mng);
}
! protected Component getSelectedComponent() {
return pane_==null?null:pane_.getSelectedComponent();
}
! protected DodicoCommandManager getActiveCmdMng() {
FudaaUndoCmdMngContainer cpt=
(FudaaUndoCmdMngContainer)pane_.getSelectedComponent();
--- 65,72 ----
listener.add(_mng);
}
! public Component getSelectedComponent() {
return pane_==null?null:pane_.getSelectedComponent();
}
! public DodicoCommandManager getActiveCmdMng() {
FudaaUndoCmdMngContainer cpt=
(FudaaUndoCmdMngContainer)pane_.getSelectedComponent();
|
|
From: <de...@us...> - 2003-12-19 12:10:57
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/commun In directory sc8-pr-cvs1:/tmp/cvs-serv28766/commun Added Files: FudaaImportCsvPanel.java Log Message: General update for prepro --- NEW FILE: FudaaImportCsvPanel.java --- (This appears to be a binary file; contents omitted.) |
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/io
In directory sc8-pr-cvs1:/tmp/cvs-serv28839/telemac/io
Modified Files:
SerafinFileFormat.java Telemac2dFileFormat.java
TelemacDicoFileFormatVersion.java
TelemacLiquideFileFormat.java
Log Message:
Update for h2d model
Add support for evolution
Index: SerafinFileFormat.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/io/SerafinFileFormat.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** SerafinFileFormat.java 11 Dec 2003 12:41:28 -0000 1.11
--- SerafinFileFormat.java 19 Dec 2003 12:10:37 -0000 1.12
***************
*** 134,138 ****
*
*/
! public FileOperationSynthese writeMaillage(
File _f,
H2dGrid _m,
--- 134,138 ----
*
*/
! public FileOperationSynthese writeGrid(
File _f,
H2dGrid _m,
Index: Telemac2dFileFormat.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/io/Telemac2dFileFormat.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** Telemac2dFileFormat.java 25 Nov 2003 10:11:58 -0000 1.7
--- Telemac2dFileFormat.java 19 Dec 2003 12:10:37 -0000 1.8
***************
*** 41,50 ****
super(getInstance(), _dico);
}
- public DicoEntite getCLLiquideEntiteFile() {
- return getEntiteFor(
- new String[] {
- "FICHIER DES FRONTIERES LIQUIDES",
- "LIQUID BOUNDARIES FILE" });
- }
public TelemacLiquideFileFormat
.TelemacLiquideVersion getDefaultTelemacLiquideFormat() {
--- 41,44 ----
***************
*** 58,62 ****
if (r == null) {
if (ent.equals(getCLLiquideEntiteFile()))
! return H2dFileFormatType.CL_LIQUIDE;
}
return r;
--- 52,56 ----
if (r == null) {
if (ent.equals(getCLLiquideEntiteFile()))
! return H2dFileFormatType.COURBE_TRANSITOIRE;
}
return r;
Index: TelemacDicoFileFormatVersion.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/io/TelemacDicoFileFormatVersion.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** TelemacDicoFileFormatVersion.java 12 Dec 2003 10:30:55 -0000 1.8
--- TelemacDicoFileFormatVersion.java 19 Dec 2003 12:10:37 -0000 1.9
***************
*** 193,195 ****
--- 193,225 ----
return CtuluLib.TROIS.equals(_v);
}
+ /**
+ *
+ */
+ public DicoEntite getDureeDuCalcul() {
+ return getEntiteFor(
+ new String[] {
+ "DUREE DU CALCUL",
+ "DURATION" });
+ }
+
+ /**
+ *
+ */
+ public DicoEntite getNbPasTemps() {
+ return getEntiteFor(
+ new String[] {
+ "NOMBRE DE PAS DE TEMPS",
+ "NUMBER OF TIME STEPS" });
+ }
+
+ /**
+ *
+ */
+ public DicoEntite getPasTemps() {
+ return getEntiteFor(
+ new String[] {
+ "PAS DE TEMPS",
+ "TIME STEP" });
+ }
+
}
Index: TelemacLiquideFileFormat.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/io/TelemacLiquideFileFormat.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** TelemacLiquideFileFormat.java 11 Dec 2003 12:41:29 -0000 1.8
--- TelemacLiquideFileFormat.java 19 Dec 2003 12:10:37 -0000 1.9
***************
*** 9,12 ****
--- 9,13 ----
package org.fudaa.dodico.telemac.io;
import java.io.File;
+
import org.fudaa.dodico.commun.ProgressionInterface;
import org.fudaa.dodico.fichiers.FileFormat;
***************
*** 16,19 ****
--- 17,23 ----
import org.fudaa.dodico.fichiers.FileReadOperationAbstract;
import org.fudaa.dodico.fichiers.FileWriteOperationAbstract;
+ import org.fudaa.dodico.h2d.H2dEvolution;
+ import org.fudaa.dodico.h2d.H2dEvolutionFrontiereLiquide;
+ import org.fudaa.dodico.h2d.H2dFileFormatEvolutionVersion;
import org.fudaa.dodico.h2d.H2dResource;
import org.fudaa.dodico.h2d.type.H2dFileFormatType;
***************
*** 29,37 ****
return INSTANCE;
}
protected TelemacLiquideFileFormat() {
super(NB_FILE);
extensions_= new String[] { "liq" };
ID_= "TELEMAC_FL";
! nom_= H2dResource.getS("Frontières Liquides transitoire");
description_=
H2dResource.getS(
--- 33,42 ----
return INSTANCE;
}
+ private static TelemacLiquideVersion lastVersion_;
protected TelemacLiquideFileFormat() {
super(NB_FILE);
extensions_= new String[] { "liq" };
ID_= "TELEMAC_FL";
! nom_= H2dResource.getS("Frontières Liquides (Télémac)");
description_=
H2dResource.getS(
***************
*** 39,49 ****
mode_= MODE_ASCII;
software_= FileFormatSoftware.TELEMAC_IS;
! type_= H2dFileFormatType.CL_LIQUIDE.getId();
}
!
! public FileFormatVersion getLastVersionInstance(){
return getLastVersionImpl();
}
! public class TelemacLiquideVersion extends FileFormatVersion {
TelemacLiquideVersion(String _b) {
super(getInstance(), _b);
--- 44,56 ----
mode_= MODE_ASCII;
software_= FileFormatSoftware.TELEMAC_IS;
! type_= H2dFileFormatType.COURBE_TRANSITOIRE.getId();
}
!
! public FileFormatVersion getLastVersionInstance() {
return getLastVersionImpl();
}
! public class TelemacLiquideVersion
! extends FileFormatVersion
! implements H2dFileFormatEvolutionVersion {
TelemacLiquideVersion(String _b) {
super(getInstance(), _b);
***************
*** 82,85 ****
--- 89,111 ----
return w.write(_source);
}
+ /**
+ *
+ */
+ public FileOperationSynthese readEvolutions(
+ File _f,
+ ProgressionInterface _prog) {
+ FileOperationSynthese op= read(_f, _prog);
+ TelemacLiquideInterface source= (TelemacLiquideInterface)op.getSource();
+ H2dEvolutionFrontiereLiquide[] evolLiq=
+ source.getEvolutionsFrontieresLiquides();
+ int n= evolLiq.length;
+ H2dEvolution[] evol= new H2dEvolution[n];
+ for (int i= 0; i < n; i++) {
+ evol[i]=evolLiq[i].getEvol();
+ }
+ op.setSource(evol);
+ return op;
+ }
+
}
/**
***************
*** 90,94 ****
}
public TelemacLiquideVersion getLastVersionImpl() {
! return new TelemacLiquideVersion(getLastVersion());
}
}
--- 116,122 ----
}
public TelemacLiquideVersion getLastVersionImpl() {
! if (lastVersion_ == null)
! lastVersion_= new TelemacLiquideVersion(getLastVersion());
! return lastVersion_;
}
}
|
|
From: <de...@us...> - 2003-12-19 12:10:41
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test
In directory sc8-pr-cvs1:/tmp/cvs-serv28839/test
Modified Files:
TestIO.java
Added Files:
TestEvolution.java courbes.txt courbesFortran.txt
Log Message:
Update for h2d model
Add support for evolution
--- NEW FILE: TestEvolution.java ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: courbes.txt ---
#essai
t;c1;c2;c3
1;3;4;5
a b
2;4;5;6
3;5;6;7
4;10;11;12
--- NEW FILE: courbesFortran.txt ---
100230
a b
200430
300630
400830
5001030
Index: TestIO.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/TestIO.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** TestIO.java 25 Nov 2003 10:11:59 -0000 1.6
--- TestIO.java 19 Dec 2003 12:10:37 -0000 1.7
***************
*** 35,38 ****
--- 35,39 ----
e.printStackTrace();
}
+ f.deleteOnExit();
return f;
}
|
|
From: <de...@us...> - 2003-12-19 12:10:41
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/reflux
In directory sc8-pr-cvs1:/tmp/cvs-serv28839/test/reflux
Added Files:
TestCrb.java canal_t.crb
Log Message:
Update for h2d model
Add support for evolution
--- NEW FILE: TestCrb.java ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: canal_t.crb ---
*!$ Version 5.11
Lido - Profil1 16
3600.0 16.325
7200.0 16.325
10800.0 16.434
14400.0 16.539
18000.0 16.591
21600.0 16.64
25200.0 16.689
28800.0 16.737
32400.0 16.69
36000.0 16.641
39600.0 16.591
43200.0 16.54
46800.0 16.436
50400.0 16.325
54000.0 16.325
57600.0 16.325
Lido - Profil3 16
3600.0 13.353
7200.0 13.353
10800.0 13.6
14400.0 13.865
18000.0 14.007
21600.0 14.14
25200.0 14.273
28800.0 14.405
32400.0 14.293
36000.0 14.16
39600.0 14.027
43200.0 13.894
46800.0 13.637
50400.0 13.371
54000.0 13.353
57600.0 13.353
|
|
From: <de...@us...> - 2003-12-19 12:10:40
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/reflux/io In directory sc8-pr-cvs1:/tmp/cvs-serv28839/reflux/io Modified Files: CLTransitoireFileFormat.java CorEleBthFileFormat.java INPAdapter.java INPFileFormat.java INPWriter.java Added Files: CrbFileFormat.java CrbReader.java CrbWriter.java Log Message: Update for h2d model Add support for evolution --- NEW FILE: CrbFileFormat.java --- (This appears to be a binary file; contents omitted.) --- NEW FILE: CrbReader.java --- (This appears to be a binary file; contents omitted.) --- NEW FILE: CrbWriter.java --- (This appears to be a binary file; contents omitted.) Index: CLTransitoireFileFormat.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/reflux/io/CLTransitoireFileFormat.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** CLTransitoireFileFormat.java 11 Dec 2003 12:41:28 -0000 1.5 --- CLTransitoireFileFormat.java 19 Dec 2003 12:10:37 -0000 1.6 *************** *** 9,12 **** --- 9,14 ---- package org.fudaa.dodico.reflux.io; import java.io.File; + + import org.fudaa.dodico.commun.DodicoResource; import org.fudaa.dodico.commun.ProgressionInterface; import org.fudaa.dodico.fichiers.FileFormat; *************** *** 17,20 **** --- 19,23 ---- import org.fudaa.dodico.fichiers.FileWriteOperationAbstract; import org.fudaa.dodico.h2d.H2dEvolution; + import org.fudaa.dodico.h2d.H2dFileFormatEvolutionVersion; import org.fudaa.dodico.h2d.H2dResource; import org.fudaa.dodico.h2d.type.H2dFileFormatType; *************** *** 34,43 **** private CLTransitoireFileFormat() { super(1); ! nom_= "cl transitoire"; extensions_= new String[] { "clv" }; ! ID_= "CL"; description_= H2dResource.getS("Fichier contenant les conditions limites transitoire"); ! mode_= MODE_ASCII; software_= FileFormatSoftware.REFLUX_IS; type_= H2dFileFormatType.COURBE_TRANSITOIRE.getId(); --- 37,46 ---- private CLTransitoireFileFormat() { super(1); ! nom_= DodicoResource.getS("courbes transitoires (preflux, format binaire)"); extensions_= new String[] { "clv" }; ! ID_= "REFLUX_CLV"; description_= H2dResource.getS("Fichier contenant les conditions limites transitoire"); ! mode_= MODE_BINAIRE; software_= FileFormatSoftware.REFLUX_IS; type_= H2dFileFormatType.COURBE_TRANSITOIRE.getId(); *************** *** 56,60 **** return getLastVersionImpl(); } ! public class CLVersion extends FileFormatVersion { public CLVersion() { super(getInstance(), "1.0"); --- 59,63 ---- return getLastVersionImpl(); } ! public class CLVersion extends FileFormatVersion implements H2dFileFormatEvolutionVersion{ public CLVersion() { super(getInstance(), "1.0"); *************** *** 87,90 **** --- 90,102 ---- return new CLVWriter(this); } + /** + * + */ + public FileOperationSynthese readEvolutions( + File _f, + ProgressionInterface _prog) { + return read(_f, _prog); + } + } } Index: CorEleBthFileFormat.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/reflux/io/CorEleBthFileFormat.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** CorEleBthFileFormat.java 11 Dec 2003 12:41:28 -0000 1.10 --- CorEleBthFileFormat.java 19 Dec 2003 12:10:37 -0000 1.11 *************** *** 114,118 **** * */ ! public FileOperationSynthese writeMaillage( File _f, H2dGrid _m, --- 114,118 ---- * */ ! public FileOperationSynthese writeGrid( File _f, H2dGrid _m, Index: INPAdapter.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/reflux/io/INPAdapter.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** INPAdapter.java 25 Nov 2003 10:11:50 -0000 1.10 --- INPAdapter.java 19 Dec 2003 12:10:37 -0000 1.11 *************** *** 32,35 **** --- 32,36 ---- private boolean isVentLecturePasDeTemps_; private boolean isRadiationsLecturePasDeTemps_; + private double timeBeginning_; // private int nbPNTransitoires_; // private int nbCLTransitoires_; *************** *** 293,295 **** --- 294,303 ---- // ptsExtremitesElement_=_ptIdx; // } + /** + * + */ + public double getTimeBeginningForTrans() { + return timeBeginning_; + } + } Index: INPFileFormat.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/reflux/io/INPFileFormat.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** INPFileFormat.java 11 Dec 2003 12:41:28 -0000 1.13 --- INPFileFormat.java 19 Dec 2003 12:10:37 -0000 1.14 *************** *** 486,490 **** * */ ! public FileOperationSynthese writeMaillage( File _f, H2dGrid _m, --- 486,490 ---- * */ ! public FileOperationSynthese writeGrid( File _f, H2dGrid _m, Index: INPWriter.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/reflux/io/INPWriter.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** INPWriter.java 12 Dec 2003 10:30:54 -0000 1.11 --- INPWriter.java 19 Dec 2003 12:10:37 -0000 1.12 *************** *** 913,920 **** out_.doubleField(i, 0d); } ! System.out.println("vale="+viscosityVal.doubleValue()); out_.doubleField(0, viscosityVal.doubleValue()); out_.writeFields(fmt2); ! } out_.println(); --- 913,920 ---- out_.doubleField(i, 0d); } ! System.out.println("vale=" + viscosityVal.doubleValue()); out_.doubleField(0, viscosityVal.doubleValue()); out_.writeFields(fmt2); ! } out_.println(); *************** *** 1037,1041 **** --- 1037,1059 ---- } //cl + Map oldEvolNewEvol= null; + double[] timeStep= null; + double min, max; + min= max= 0; + StringBuffer nameEvolBad= null; if (clTransitoireCourbeList.size() > 0) { + max= + H2dTimeStepGroup.getMaxTime( + _inter.getTimeBeginningForTrans(), + _inter.getGroupePasTemps()); + min= + H2dTimeStepGroup.getMinTime( + _inter.getTimeBeginningForTrans(), + _inter.getGroupePasTemps()); + timeStep= + H2dTimeStepGroup.getTimeStep( + _inter.getTimeBeginningForTrans(), + _inter.getGroupePasTemps()); + oldEvolNewEvol= new HashMap(clTransitoireCourbeList.size() * 2); String ficCl= version_.getCLTransitoireFichier(_inter.getFichiers()); if (ficCl == null) { *************** *** 1045,1051 **** } else { File fic= new File(baseDir_, ficCl); ! System.out.println("write " + fic.getAbsolutePath()); ! H2dEvolution[] evols= new H2dEvolution[clTransitoireCourbeList.size()]; ! clTransitoireCourbeList.toArray(evols); CLVWriter w= version_.createCLVWriter(); analyze_.merge(w.write(evols, fic, progress_).getAnalyze()); --- 1063,1086 ---- } else { File fic= new File(baseDir_, ficCl); ! if (CtuluLib.DEBUG) ! CtuluLib.debug("write " + fic.getAbsolutePath()); ! int n= clTransitoireCourbeList.size(); ! H2dEvolution[] evols= new H2dEvolution[n]; ! for (int i= 0; i < n; i++) { ! H2dEvolution e= (H2dEvolution)clTransitoireCourbeList.get(i); ! if (oldEvolNewEvol.containsKey(e)) { ! evols[i]= (H2dEvolution)oldEvolNewEvol.get(e); ! } else { ! if ((!e.isTimeInclude(min)) || (!e.isTimeInclude(max))) { ! if (nameEvolBad == null) { ! nameEvolBad= new StringBuffer(); ! nameEvolBad.append(e.getNom()); ! } else ! nameEvolBad.append(", ").append(e.getNom()); ! } ! evols[i]= e.createH2dEvolutionFromInterpolation(timeStep); ! oldEvolNewEvol.put(e, evols[i]); ! } ! } CLVWriter w= version_.createCLVWriter(); analyze_.merge(w.write(evols, fic, progress_).getAnalyze()); *************** *** 1054,1057 **** --- 1089,1109 ---- //pn if (pnTransitoireCourbeList.size() > 0) { + if (timeStep == null) { + max= + H2dTimeStepGroup.getMaxTime( + _inter.getTimeBeginningForTrans(), + _inter.getGroupePasTemps()); + min= + H2dTimeStepGroup.getMinTime( + _inter.getTimeBeginningForTrans(), + _inter.getGroupePasTemps()); + timeStep= + H2dTimeStepGroup.getTimeStep( + _inter.getTimeBeginningForTrans(), + _inter.getGroupePasTemps()); + } + if (oldEvolNewEvol == null) { + oldEvolNewEvol= new HashMap(pnTransitoireCourbeList.size()); + } String ficPn= version_.getPnTransitoireFichier(_inter.getFichiers()); if (ficPn == null) { *************** *** 1061,1070 **** } else { File fic= new File(baseDir_, ficPn); ! System.out.println("ecriture " + fic.getAbsolutePath()); ! H2dEvolution[] evols= new H2dEvolution[pnTransitoireCourbeList.size()]; ! pnTransitoireCourbeList.toArray(evols); CLVWriter w= version_.createCLVWriter(); analyze_.merge(w.write(evols, fic, progress_).getAnalyze()); } } } --- 1113,1146 ---- } else { File fic= new File(baseDir_, ficPn); ! if (CtuluLib.DEBUG) ! CtuluLib.debug("write " + fic.getAbsolutePath()); ! int n= pnTransitoireCourbeList.size(); ! H2dEvolution[] evols= new H2dEvolution[n]; ! for (int i= 0; i < n; i++) { ! H2dEvolution e= (H2dEvolution)pnTransitoireCourbeList.get(i); ! if (oldEvolNewEvol.containsKey(e)) { ! evols[i]= (H2dEvolution)oldEvolNewEvol.get(e); ! } else { ! if ((!e.isTimeInclude(min)) || (!e.isTimeInclude(max))) { ! if (nameEvolBad == null) { ! nameEvolBad= new StringBuffer(); ! nameEvolBad.append(e.getNom()); ! } else ! nameEvolBad.append(", ").append(e.getNom()); ! } ! evols[i]= e.createH2dEvolutionFromInterpolation(timeStep); ! oldEvolNewEvol.put(e, evols[i]); ! } ! } CLVWriter w= version_.createCLVWriter(); analyze_.merge(w.write(evols, fic, progress_).getAnalyze()); } + } + if (nameEvolBad != null) { + analyze_.addError( + H2dResource.getS( + "Les courbes suivantes ne contiennent pas les bornes de la simulation") + + CtuluLib.LINE_SEP + + nameEvolBad.toString()); } } |
|
From: <de...@us...> - 2003-12-19 12:10:40
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/mesure
In directory sc8-pr-cvs1:/tmp/cvs-serv28839/mesure
Modified Files:
DEvolutionSerieIrreguliere.java
Added Files:
EvolutionListener.java EvolutionListenerDispatcher.java
EvolutionListenerDispatcherDefault.java EvolutionManager.java
EvolutionReader.java EvolutionReguliere.java
Log Message:
Update for h2d model
Add support for evolution
--- NEW FILE: EvolutionListener.java ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: EvolutionListenerDispatcher.java ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: EvolutionListenerDispatcherDefault.java ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: EvolutionManager.java ---
/*
* @file H2dEvolutionManager.java
* @creation 14 nov. 2003
* @modification $Date: 2003/12/19 12:10:37 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.mesure;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import java.util.Vector;
import javax.swing.ComboBoxModel;
import javax.swing.DefaultComboBoxModel;
import org.fudaa.ctulu.CtuluLib;
import org.fudaa.dodico.commun.DodicoResource;
/**
* @author deniger
* @version $Id: EvolutionManager.java,v 1.1 2003/12/19 12:10:37 deniger Exp $
*/
public class EvolutionManager {
protected ArrayList evols_;
protected EvolutionListenerDispatcher listener_;
public EvolutionManager() {
this(null);
}
/**
*
*/
public EvolutionManager(EvolutionListenerDispatcher _listener) {
evols_= new ArrayList();
listener_= _listener;
}
public EvolutionManager(EvolutionListenerDispatcher _listener, Set _s) {
listener_= _listener;
evols_= new ArrayList(_s);
for (Iterator it= evols_.iterator(); it.hasNext();) {
((EvolutionReguliere)it.next()).setListener(listener_);
}
Collections.sort(evols_);
}
public boolean containsName(String _n) {
return indexOf(_n) >= 0;
}
public void remove(EvolutionReguliere _evol) {
if (evols_.remove(_evol))
fireEvolRemove(_evol);
}
public void remove(EvolutionReguliere[] _evol) {
if (_evol != null) {
for (int i= _evol.length - 1; i >= 0; i--) {
remove(_evol[i]);
}
}
}
public boolean containsEvol(EvolutionReguliere _evol) {
//rapide car recherche binaire
if (!containsName(_evol.getNom()))
return false;
//recherche normal.
return evols_.contains(_evol);
}
public int indexOf(String _n) {
return indexOfNameEvol(_n, evols_);
}
public static int indexOfNameEvol(String _n, List _evol) {
int low= 0;
int high= _evol.size() - 1;
while (low <= high) {
int mid= (low + high) / 2;
int cmp= ((EvolutionReguliere)_evol.get(mid)).getNom().compareTo(_n);
if (cmp < 0)
low= mid + 1;
else if (cmp > 0)
high= mid - 1;
else
return mid;
}
return - (low + 1);
}
public static double[] getXMinMaxYMinMax(List _l) {
if (_l == null)
return null;
double[] r= new double[4];
if (_l.size() == 0)
return r;
int n= _l.size() - 1;
EvolutionReguliere e= (EvolutionReguliere)_l.get(n);
r[0]= e.getMinX();
r[1]= e.getMaxX();
r[2]= e.getMinY();
r[3]= e.getMaxY();
double temp;
for (int i= n - 1; i >= 0; i--) {
e= (EvolutionReguliere)_l.get(i);
temp= e.getMinX();
if (temp < r[0])
r[0]= temp;
temp= e.getMinY();
if (temp < r[2])
r[2]= temp;
temp= e.getMaxX();
if (temp > r[1])
r[1]= temp;
temp= e.getMaxY();
if (temp > r[3])
r[3]= temp;
}
return r;
}
public synchronized void add(EvolutionReguliere[] _l) {
if (_l != null) {
for (int i= _l.length - 1; i >= 0; i--) {
add(_l[i]);
}
}
}
public void addListener(EvolutionListener _l) {
listener_.addEvolutionListener(_l);
}
public void removeListener(EvolutionListener _l) {
listener_.removeEvolutionListener(_l);
}
public boolean containsListener(EvolutionListener _l) {
return listener_.containsEvolutionListener(_l);
}
public synchronized void add(EvolutionReguliere _l) {
if (addEvol(_l))
fireEvolAdd(_l);
}
private synchronized boolean addEvol(EvolutionReguliere _l) {
if (_l != null) {
if (!containsEvol(_l)) {
if ((_l.getNom() == null) || (_l.getNom().length() == 0))
_l.setNom(DodicoResource.getS("Inconnu"));
int i= indexOf(_l.getNom());
if (i < 0) {
if (-i > evols_.size()) {
evols_.add(_l);
} else
evols_.add(-i - 1, _l);
_l.setListener(listener_);
return true;
}
if (i >= 0) {
_l.setNom(changeNom(i, evols_));
i= indexOf(_l.getNom());
if (i >= 0) {
new Throwable().printStackTrace();
return false;
} else {
if (-i > evols_.size()) {
evols_.add(_l);
} else
evols_.add(-i - 1, _l);
_l.setListener(listener_);
return true;
}
}
}
}
return false;
}
public static String changeNom(int _idx, List _l) {
//le nom en doublon est n.
//on recherche un nouveau nom non contenu dans la list l.
String n= ((EvolutionReguliere)_l.get(_idx)).getNom();
//les noms crees seront du type nom - idx
int nameIdx= getNomIdx(n);
if (nameIdx < 0) {
n= n + "-" + CtuluLib.UN;
nameIdx= indexOfNameEvol(n, _l);
if (nameIdx < 0)
return n;
else
return changeNom(nameIdx, _l);
} else {
int max= nameIdx;
String pref= n.substring(0, n.lastIndexOf('-')).trim();
//les evolutions sont rangees dans l'ordre, donc il suffit de partir de _idx
//dans l'ordre croissant
for (int i= _idx; i < _l.size(); i++) {
n= ((EvolutionReguliere)_l.get(i)).getNom();
if (n.startsWith(pref)) {
nameIdx= getNomIdx(n);
if (nameIdx > max)
max= nameIdx;
} else
break;
}
//dans l'ordre decroissant
for (int i= _idx - 1; i >= 0; i--) {
n= ((EvolutionReguliere)_l.get(i)).getNom();
if (n.startsWith(pref)) {
nameIdx= getNomIdx(n);
if (nameIdx > max)
max= nameIdx;
} else
break;
}
n= pref + "-" + CtuluLib.getString(max + 1);
if (indexOfNameEvol(n, _l) >= 0) {
new Throwable().printStackTrace();
return null;
}
return n;
}
}
public static int getNomIdx(String _name) {
if (_name == null) {
new Throwable().printStackTrace();
return -1;
}
int idx= _name.lastIndexOf('-');
if (idx < 0)
return -1;
int rf= -1;
try {
rf= Integer.parseInt(_name.substring(idx + 1).trim());
} catch (NumberFormatException e) {}
return rf;
}
public int getNbEvol() {
return evols_.size();
}
public List createList() {
return new ArrayList(evols_);
}
public Vector createVector() {
return new Vector(evols_);
}
public ComboBoxModel createComboBoxModel() {
return new DefaultComboBoxModel(createVector());
}
private void fireEvolAdd(EvolutionReguliere _evol) {
if (listener_ != null)
listener_.evolutionAdd(_evol);
}
private void fireEvolRemove(EvolutionReguliere _evol) {
if (listener_ != null)
listener_.evolutionRemove(_evol);
}
public ComboBoxModel createComboBoxModelWithEmpty(EvolutionReguliere _empty) {
Vector v= new Vector(getNbEvol() + 1);
v.add(_empty);
v.addAll(evols_);
return new DefaultComboBoxModel(v);
}
public static void main(String[] args) {
System.out.println(getNomIdx("toto -1") + "=1");
System.out.println(getNomIdx("toto - 100") + "=100");
System.out.println(getNomIdx("toto - 10a0") + "=-1");
}
}
--- NEW FILE: EvolutionReader.java ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: EvolutionReguliere.java ---
/*
* @file DodicoDoubleDoubleSortedList.java
* @creation 26 juin 2003
* @modification $Date: 2003/12/19 12:10:37 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.mesure;
import gnu.trove.TDoubleArrayList;
import gnu.trove.TDoubleHashSet;
import org.fudaa.ctulu.CtuluLib;
/**
* Une evolution reguliere qui n'utilise pas les objets corba.
* @see org.fudaa.dodico.test.TestEvolution
* @author deniger
* @version $Id: EvolutionReguliere.java,v 1.1 2003/12/19 12:10:37 deniger Exp $
*/
public class EvolutionReguliere implements Comparable {
TDoubleArrayList t_;
TDoubleArrayList val_;
String nom_;
String unite_;
protected EvolutionListenerDispatcher listener_;
public EvolutionReguliere() {
t_= new TDoubleArrayList();
val_= new TDoubleArrayList();
}
public EvolutionReguliere(String _s) {
this();
nom_= _s;
}
public double[] getArrayX(){
return t_.toNativeArray();
}
public EvolutionReguliere(EvolutionReguliere _l) {
initFromEvolutionReguliere(_l);
}
/**
*
*/
public EvolutionListenerDispatcher getListener() {
return listener_;
}
/**
*
*/
public void setListener(EvolutionListenerDispatcher _listener) {
listener_= _listener;
}
protected final void initFromEvolutionReguliere(EvolutionReguliere _evol) {
nom_= _evol.nom_;
unite_= _evol.unite_;
t_= new TDoubleArrayList(_evol.t_.toNativeArray());
val_= new TDoubleArrayList(_evol.val_.toNativeArray());
}
/**
*
*/
public int compareTo(Object o) {
if (o instanceof EvolutionReguliere) {
return nom_.compareTo(((EvolutionReguliere)o).getNom());
} else
throw new IllegalAccessError();
}
/**
* Recupere la valeur en y correspondant a t (en interpolant si nécessaire).
* Si _t est en dehors des bornes, renvoie la valeur de la borne la plus proche.
*/
public double getValue(double _t) {
if (_t >= getMaxX()) {
return val_.isEmpty() ? 0 : val_.getQuick(t_.size() - 1);
} else if (_t <= getMinX())
return val_.isEmpty() ? 0 : val_.getQuick(0);
else {
int index= indexOfKey(_t);
//chance: la valeur existe
if (index >= 0)
return val_.getQuick(index);
//interpolation
else {
index= -index - 2;
//l'index d'insertion. _t se trouve entre index-2 et index-1
double y0= val_.getQuick(index);
double x0= t_.getQuick(index);
return (val_.getQuick(index + 1) - y0)
* (_t - x0)
/ (t_.getQuick(index + 1) - x0)
+ y0;
}
}
}
/**
* Cree une nouvelle evolution avec comme base de temps le tableau
* <code>_newT</code> et comme valeurs les interpolations issues
* de cette evolution
* Create a new evolution containing the time step <code>_newT</code>
* and the value are interpolated from this evolution
*/
public EvolutionReguliere createEvolutionFromInterpolation(double[] _newT) {
if (_newT == null)
return null;
EvolutionReguliere r= new EvolutionReguliere(_newT.length);
int n= _newT.length;
for (int i= 0; i < n; i++) {
r.put(_newT[i], getValue(_newT[i]));
}
return r;
}
/**
* Ajoute tous les instants du tableau <code>_newT</code> en interpolant les valeurs.
* Add all the time step from the array <code>_newT</code> and the values are
* interpolated.
*/
public void addNewInterpolationValues(double[] _newT) {
if (_newT == null)
return;
int n= _newT.length;
for (int i= 0; i < n; i++) {
put(_newT[i], getValue(_newT[i]));
}
}
/**
* @return true si l'instant t est compris dans les bornes de cette evolution.
* @return true if the time t is included in this evolution
*/
public boolean isInclude(double _t) {
return (getMinX() <= _t) && (getMaxX() >= _t);
}
public boolean isEquivalentTo(EvolutionReguliere _e) {
if (_e == null)
return false;
if (_e.size() != size())
return false;
return (_e.t_.equals(t_)) && (_e.val_.equals(val_));
}
public boolean containsKey(double _key) {
return indexOfKey(_key) >= 0;
}
public void ensureCapacity(int _c) {
t_.ensureCapacity(_c);
val_.ensureCapacity(_c);
}
public double getMinX() {
return (t_.size() == 0) ? 0 : t_.getQuick(0);
}
public double getMaxX() {
int n= t_.size() - 1;
return n < 0 ? 0 : t_.getQuick(n);
}
public double getMinY() {
int n= t_.size() - 1;
if (n < 0)
return 0;
double r= val_.getQuick(n);
double temp;
for (int i= n - 1; i >= 0; i--) {
temp= val_.getQuick(i);
if (temp < r)
r= temp;
}
return r;
}
public double getMaxY() {
int n= t_.size() - 1;
if (n < 0)
return 0;
double r= val_.getQuick(n);
double temp;
for (int i= n - 1; i >= 0; i--) {
temp= val_.getQuick(i);
if (temp > r)
r= temp;
}
return r;
}
/**
*
*/
public EvolutionReguliere(int _n) {
t_= new TDoubleArrayList(_n);
val_= new TDoubleArrayList(_n);
}
public int size() {
return t_.size();
}
public void put(double _t, double _val) {
if (t_.size() == 0) {
t_.add(_t);
val_.add(_val);
} else {
int k= t_.binarySearch(_t);
if (k < 0) {
k= -k;
if (k > t_.size()) {
t_.add(_t);
val_.add(_val);
} else {
t_.insert(k - 1, _t);
val_.insert(k - 1, _val);
}
} else {
val_.set(k, _val);
}
}
}
public void removeKey(double _key) {
int index= indexOfKey(_key);
if (index >= 0) {
t_.remove(index);
val_.remove(index);
}
}
public void removeValue(double _val) {
int index= indexOfValue(_val);
if (index >= 0) {
t_.remove(index);
val_.remove(index);
}
}
/**
* Recherche binaire pour le temps _t
* @see TDoubleArrayList#binarySearch(double)
*/
public int indexOfKey(double _t) {
return t_.binarySearch(_t);
}
public int indexOfValue(double _val) {
return val_.binarySearch(_val);
}
public double getKeyAtIndex(int _offset) {
return t_.get(_offset);
}
public double getQuickKeyAtIndex(int _offset) {
return t_.getQuick(_offset);
}
public double getValueAtIndex(int _offset) {
return val_.get(_offset);
}
public double getQuickValueAtIndex(int _offset) {
return val_.getQuick(_offset);
}
public double getValueForKey(double _key) {
int i= indexOfKey(_key);
return i < 0 ? (double)0 : val_.getQuick(i);
}
public double getKeyForValue(double _val) {
int i= indexOfValue(_val);
return i < 0 ? (double)0 : t_.getQuick(i);
}
public static void main(String[] args) {
EvolutionReguliere l= new EvolutionReguliere(15);
l.put(1d, 1d);
l.put(3d, 3d);
l.put(5d, 5d);
l.put(4d, 5d);
l.put(0d, 0d);
l.put(4d, 4d);
System.out.println(l.toString());
System.out.println(l.getValueForKey(1d));
System.out.println(l.getKeyForValue(5d));
System.out.println(l.containsKey(0d));
l.removeKey(4d);
l.removeValue(1d);
System.out.println(l.toString());
}
/**
*
*/
public String getNom() {
return nom_;
}
/**
*
*/
public String getUnite() {
return unite_;
}
/**
*
*/
public void setNom(String _string) {
nom_= _string;
}
/**
*
*/
public void setUnite(String _string) {
unite_= _string;
}
public String toString() {
return nom_;
}
public String getDescriptionTotale() {
StringBuffer b= new StringBuffer();
b.append(toString()).append(CtuluLib.LINE_SEP);
StringBuffer t= new StringBuffer();
StringBuffer v= new StringBuffer();
for (int i= 0; i < size(); i++) {
if (i > 0) {
t.append(",");
v.append(",");
}
t.append(getQuickKeyAtIndex(i));
v.append(getQuickValueAtIndex(i));
}
b.append("time steps=[").append(t.toString()).append("]").append(
CtuluLib.LINE_SEP);
b.append("values=[").append(v.toString()).append("]").append(
CtuluLib.LINE_SEP);
return b.toString();
}
/**
* Compare les X de cette evolution avec <code>_toCompare</code>. Si les x sont différents
* renvoie false et stocke dans <code>_commonX</code> l'union des valeurs des x.
*/
public boolean isEvolutionWithSameX(
EvolutionReguliere _toCompare,
TDoubleHashSet _commonX) {
if(_toCompare==null) return false;
if (t_.equals(_toCompare.t_))
return true;
else {
if (_commonX != null) {
_commonX.ensureCapacity(t_.size() + _toCompare.t_.size());
_commonX.addAll(t_.toNativeArray());
_commonX.addAll(_toCompare.t_.toNativeArray());
}
return false;
}
}
}
Index: DEvolutionSerieIrreguliere.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/mesure/DEvolutionSerieIrreguliere.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** DEvolutionSerieIrreguliere.java 25 Nov 2003 10:11:43 -0000 1.6
--- DEvolutionSerieIrreguliere.java 19 Dec 2003 12:10:37 -0000 1.7
***************
*** 105,109 ****
this,
"La valeur demandee est en dehors de l'intervalle "
! + "de definition de l'evolution");
return serie_[i];
}
--- 105,109 ----
this,
"La valeur demandee est en dehors de l'intervalle "
! + "de definition de l'evolution (en dessous)");
return serie_[i];
}
***************
*** 112,116 ****
this,
"La valeur demandee est en dehors de l'intervalle "
! + "de definition de l'evolution");
return serie_[u.length - 1];
}
--- 112,116 ----
this,
"La valeur demandee est en dehors de l'intervalle "
! + "de definition de l'evolution (au dessus)");
return serie_[u.length - 1];
}
|
|
From: <de...@us...> - 2003-12-19 12:10:40
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/olb
In directory sc8-pr-cvs1:/tmp/cvs-serv28839/olb
Modified Files:
OLBExec.java
Log Message:
Update for h2d model
Add support for evolution
Index: OLBExec.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/olb/OLBExec.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** OLBExec.java 11 Dec 2003 12:41:28 -0000 1.1
--- OLBExec.java 19 Dec 2003 12:10:37 -0000 1.2
***************
*** 100,105 ****
_ui.error("OLB", op.getAnalyze().getFatalError().getMessage());
}
! // if(inFile!=null) inFile.delete();
! // if(outFile!=null) outFile.delete();
DunesInterface r=(DunesInterface)op.getSource();
if(r!=null) return r.getMaillage();
--- 100,105 ----
_ui.error("OLB", op.getAnalyze().getFatalError().getMessage());
}
! if(inFile!=null) inFile.delete();
! if(outFile!=null) outFile.delete();
DunesInterface r=(DunesInterface)op.getSource();
if(r!=null) return r.getMaillage();
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d
In directory sc8-pr-cvs1:/tmp/cvs-serv28839/h2d
Modified Files:
H2dEvolution.java H2dEvolutionFrontiereLiquide.java
H2dEvolutionListener.java H2dEvolutionListenerDispatcher.java
H2dEvolutionManager.java H2dFileFormatMaillageVersion.java
H2dTimeStepGroup.java h2d_en.fr_txt
Added Files:
H2dCSVFileFormat.java
H2dEvolutionListenerDispatcherDefault.java
H2dFileFormatEvolutionVersion.java
Removed Files:
MaillageReader.java
Log Message:
Update for h2d model
Add support for evolution
--- NEW FILE: H2dCSVFileFormat.java ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: H2dEvolutionListenerDispatcherDefault.java ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: H2dFileFormatEvolutionVersion.java ---
(This appears to be a binary file; contents omitted.)
Index: H2dEvolution.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/H2dEvolution.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** H2dEvolution.java 12 Dec 2003 10:30:53 -0000 1.6
--- H2dEvolution.java 19 Dec 2003 12:10:36 -0000 1.7
***************
*** 8,23 ****
*/
package org.fudaa.dodico.h2d;
! import org.fudaa.ctulu.CtuluLib;
!
! import org.fudaa.dodico.commun.DodicoDoubleDoubleSortedList;
/**
* @author deniger
* @version $Id$
*/
! public class H2dEvolution implements Comparable{
! String nom_;
! String unite_;
! DodicoDoubleDoubleSortedList list_;
! private H2dEvolutionListenerDispatcher listener_;
int used_;
/**
--- 8,19 ----
*/
package org.fudaa.dodico.h2d;
! import org.fudaa.dodico.mesure.EvolutionListenerDispatcher;
! import org.fudaa.dodico.mesure.EvolutionReguliere;
/**
* @author deniger
* @version $Id$
*/
! public class H2dEvolution extends EvolutionReguliere {
!
int used_;
/**
***************
*** 26,90 ****
public H2dEvolution() {
used_= 0;
- list_= new DodicoDoubleDoubleSortedList();
}
public H2dEvolution(int _n) {
! list_= new DodicoDoubleDoubleSortedList(_n);
}
public H2dEvolution(H2dEvolution _evol) {
initFrom(_evol);
}
!
! public boolean isUsed(){
! return used_>0;
}
private final void initFrom(H2dEvolution _init) {
! nom_=_init.nom_;
! unite_=_init.unite_;
! listener_=_init.listener_;
! used_=_init.used_;
! list_=new DodicoDoubleDoubleSortedList(_init.list_);
}
public H2dEvolution(String _nom) {
this();
! nom_= _nom;
}
public int getUsed() {
return used_;
}
!
! protected void fireEvolutionUsedChanged(int _old){
! if(listener_!=null)
! listener_.evolutionUsedChanged(this, _old, used_);
}
public void setUsed() {
! int old=used_;
used_++;
fireEvolutionUsedChanged(old);
}
public void setUnUsed() {
! int old=used_;
used_--;
fireEvolutionUsedChanged(old);
}
!
! public double getMaxY() {
! return list_.getMaxY();
! }
!
! public double getMaxX() {
! return list_.getMaxX();
! }
! public double getMinY() {
! return list_.getMinY();
! }
! public double getMinX() {
! return list_.getMinX();
! }
! /**
! *
! */
! public H2dEvolutionListenerDispatcher getListener() {
! return listener_;
! }
/**
*
--- 22,71 ----
public H2dEvolution() {
used_= 0;
}
public H2dEvolution(int _n) {
! super(_n);
}
public H2dEvolution(H2dEvolution _evol) {
initFrom(_evol);
}
!
! public H2dEvolution(EvolutionReguliere _evolReg) {
! initFromEvolutionReguliere(_evolReg);
! }
!
! public boolean isUsed() {
! return used_ > 0;
}
private final void initFrom(H2dEvolution _init) {
! initFromEvolutionReguliere(_init);
! listener_= _init.listener_;
! used_= _init.used_;
}
public H2dEvolution(String _nom) {
this();
! setNom(_nom);
}
public int getUsed() {
return used_;
}
!
! protected void fireEvolutionUsedChanged(int _old) {
! if (listener_ != null)
! ((H2dEvolutionListenerDispatcher)listener_).evolutionUsedChanged(
! this,
! _old,
! used_);
}
public void setUsed() {
! int old= used_;
used_++;
fireEvolutionUsedChanged(old);
}
public void setUnUsed() {
! int old= used_;
used_--;
fireEvolutionUsedChanged(old);
}
!
/**
*
***************
*** 93,177 ****
listener_= _listener;
}
protected void add(double t_, double _value) {
! list_.put(t_, _value);
}
public int getPasTempNb() {
! return list_.size();
}
public double getPasDeTemps(int _index) {
! return list_.getKeyAtIndex(_index);
}
public double getQuickPasDeTemps(int _index) {
! return list_.getQuickKeyAtIndex(_index);
}
public double getValue(int _index) {
! return list_.getValueAtIndex(_index);
}
public double getQuickValue(int _index) {
! return list_.getQuickValueAtIndex(_index);
! }
! protected void ensureCapacity(int _c) {
! list_.ensureCapacity(_c);
! }
!
!
! /**
! *
! */
! public String getNom() {
! return nom_;
! }
! /**
! *
! */
! public String getUnite() {
! return unite_;
}
! /**
! *
! */
! public void setNom(String _string) {
! nom_= _string;
}
/**
*
*/
! public void setUnite(String _string) {
! unite_= _string;
}
/**
*
*/
! public String toString() {
! return nom_;
! }
! public String getDescriptionTotale() {
! StringBuffer b= new StringBuffer();
! b.append(toString()).append(CtuluLib.LINE_SEP);
! StringBuffer t= new StringBuffer();
! StringBuffer v= new StringBuffer();
! for (int i= 0; i < list_.size(); i++) {
! if (i > 0) {
! t.append(",");
! v.append(",");
! }
! t.append(list_.getQuickKeyAtIndex(i));
! v.append(list_.getQuickValueAtIndex(i));
! }
! b.append("time steps=[").append(t.toString()).append("]").append(
! CtuluLib.LINE_SEP);
! b.append("values=[").append(v.toString()).append("]").append(
! CtuluLib.LINE_SEP);
! return b.toString();
}
/**
*
*/
! public int compareTo(Object o) {
! if(o instanceof H2dEvolution){
! return nom_.compareTo(((H2dEvolution)o).getNom());
! }
! else throw new IllegalAccessError();
}
}
--- 74,129 ----
listener_= _listener;
}
+
protected void add(double t_, double _value) {
! put(t_, _value);
}
public int getPasTempNb() {
! return size();
}
public double getPasDeTemps(int _index) {
! return getKeyAtIndex(_index);
}
public double getQuickPasDeTemps(int _index) {
! return getQuickKeyAtIndex(_index);
}
public double getValue(int _index) {
! return getValueAtIndex(_index);
}
public double getQuickValue(int _index) {
! return getQuickValueAtIndex(_index);
}
!
! public boolean isTimeInclude(double _t) {
! return isInclude(_t);
}
+
/**
*
*/
! public H2dEvolution createH2dEvolutionFromInterpolation(double[] _newT) {
! H2dEvolution r= new H2dEvolution(createEvolutionFromInterpolation(_newT));
! r.setNom(getNom());
! r.setUnite(getUnite());
! return r;
}
+
/**
*
*/
! public boolean isEvolutionEquivalentTo(H2dEvolution _e) {
! return super.isEquivalentTo(_e);
}
+
/**
*
*/
! public void setListener(EvolutionListenerDispatcher _listener) {
! if(_listener==null) setListener(null);
! else if (_listener instanceof H2dEvolutionListenerDispatcher) {
! super.setListener(_listener);
! } else
! new Throwable().printStackTrace();
}
+
}
Index: H2dEvolutionFrontiereLiquide.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/H2dEvolutionFrontiereLiquide.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** H2dEvolutionFrontiereLiquide.java 11 Dec 2003 12:41:27 -0000 1.6
--- H2dEvolutionFrontiereLiquide.java 19 Dec 2003 12:10:36 -0000 1.7
***************
*** 9,12 ****
--- 9,13 ----
package org.fudaa.dodico.h2d;
import org.fudaa.dodico.h2d.type.H2dVariableType;
+ import org.fudaa.dodico.mesure.*;
/**
* @author deniger
***************
*** 28,31 ****
--- 29,36 ----
}
+ public void setEvolution(H2dEvolution _evol){
+ evol_=_evol;
+ }
+
public int getPasTempNb(){
return evol_.getPasTempNb();
***************
*** 72,76 ****
*
*/
! public H2dEvolutionListenerDispatcher getListener() {
return evol_.getListener();
}
--- 77,81 ----
*
*/
! public EvolutionListenerDispatcher getListener() {
return evol_.getListener();
}
Index: H2dEvolutionListener.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/H2dEvolutionListener.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** H2dEvolutionListener.java 11 Dec 2003 12:41:27 -0000 1.1
--- H2dEvolutionListener.java 19 Dec 2003 12:10:36 -0000 1.2
***************
*** 9,19 ****
package org.fudaa.dodico.h2d;
/**
* @author deniger
* @version $Id$
*/
! public interface H2dEvolutionListener {
! public void evolutionChanged(H2dEvolution _e);
public void evolutionUsedChanged(H2dEvolution _e,int _old,int _new);
-
}
--- 9,19 ----
package org.fudaa.dodico.h2d;
+ import org.fudaa.dodico.mesure.EvolutionListener;
+
/**
* @author deniger
* @version $Id$
*/
! public interface H2dEvolutionListener extends EvolutionListener{
public void evolutionUsedChanged(H2dEvolution _e,int _old,int _new);
}
Index: H2dEvolutionListenerDispatcher.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/H2dEvolutionListenerDispatcher.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** H2dEvolutionListenerDispatcher.java 11 Dec 2003 12:41:27 -0000 1.1
--- H2dEvolutionListenerDispatcher.java 19 Dec 2003 12:10:36 -0000 1.2
***************
*** 1,5 ****
/*
* @file H2dEvolutionListenerDispatcher.java
! * @creation 2 déc. 2003
* @modification $Date$
* @license GNU General Public License 2
--- 1,5 ----
/*
* @file H2dEvolutionListenerDispatcher.java
! * @creation 16 déc. 2003
* @modification $Date$
* @license GNU General Public License 2
***************
*** 9,23 ****
package org.fudaa.dodico.h2d;
/**
* @author deniger
* @version $Id$
*/
! public interface H2dEvolutionListenerDispatcher extends H2dEvolutionListener {
!
! public void addEvolutionListener(H2dEvolutionListener _l);
! public void removeEvolutionListener(H2dEvolutionListener _l);
! public boolean containsEvolutionListener(H2dEvolutionListener _l);
!
!
!
! }
--- 9,18 ----
package org.fudaa.dodico.h2d;
+ import org.fudaa.dodico.mesure.EvolutionListenerDispatcher;
+
/**
* @author deniger
* @version $Id$
*/
! public interface H2dEvolutionListenerDispatcher
! extends EvolutionListenerDispatcher,H2dEvolutionListener {}
Index: H2dEvolutionManager.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/H2dEvolutionManager.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** H2dEvolutionManager.java 12 Dec 2003 10:30:53 -0000 1.4
--- H2dEvolutionManager.java 19 Dec 2003 12:10:36 -0000 1.5
***************
*** 9,36 ****
package org.fudaa.dodico.h2d;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
- import java.util.TreeSet;
import java.util.Vector;
! import javax.swing.AbstractListModel;
import javax.swing.ComboBoxModel;
import javax.swing.DefaultComboBoxModel;
- import javax.swing.event.ListDataListener;
! import org.fudaa.dodico.h2d.reflux.H2dRefluxParameters;
/**
* @author deniger
* @version $Id$
*/
! public class H2dEvolutionManager implements H2dEvolutionListener {
! TreeSet evols_;
! H2dEvolutionListenerDispatcher listener_;
/**
*
*/
public H2dEvolutionManager(H2dEvolutionListenerDispatcher _listener) {
! evols_= new TreeSet();
! listener_= _listener;
}
--- 9,37 ----
package org.fudaa.dodico.h2d;
import java.util.ArrayList;
+ import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import java.util.Vector;
!
import javax.swing.ComboBoxModel;
import javax.swing.DefaultComboBoxModel;
! import org.fudaa.ctulu.CtuluLib;
!
! import org.fudaa.dodico.commun.DodicoResource;
! import org.fudaa.dodico.mesure.EvolutionListener;
! import org.fudaa.dodico.mesure.EvolutionManager;
! import org.fudaa.dodico.mesure.EvolutionReguliere;
/**
* @author deniger
* @version $Id$
*/
! public class H2dEvolutionManager extends EvolutionManager {
/**
*
*/
public H2dEvolutionManager(H2dEvolutionListenerDispatcher _listener) {
! super(_listener);
}
***************
*** 38,86 ****
H2dEvolutionListenerDispatcher _listener,
Set _s) {
! listener_= _listener;
! evols_= new TreeSet(_s);
for (Iterator it= evols_.iterator(); it.hasNext();) {
((H2dEvolution)it.next()).setListener(listener_);
}
}
! public static double[] getXMinMaxYMinMax(List _l) {
! if (_l == null)
! return null;
! double[] r= new double[4];
! if (_l.size() == 0)
! return r;
!
! int n= _l.size() - 1;
! H2dEvolution e= (H2dEvolution)_l.get(n);
! r[0]= e.getMinX();
! r[1]= e.getMaxX();
! r[2]= e.getMinY();
! r[3]= e.getMaxY();
! double temp;
! for (int i= n - 1; i >= 0; i--) {
! e= (H2dEvolution)_l.get(i);
! temp= e.getMinX();
! if (temp < r[0])
! r[0]= temp;
! temp= e.getMinY();
! if (temp < r[2])
! r[2]= temp;
! temp= e.getMaxX();
! if (temp > r[1])
! r[1]= temp;
! temp= e.getMaxY();
! if (temp > r[3])
! r[3]= temp;
! }
! return r;
! }
! public final void add(H2dEvolution[] _l) {
! if (_l != null) {
! for (int i= _l.length - 1; i >= 0; i--) {
! evols_.add(_l[i]);
! _l[i].setListener(listener_);
}
}
}
--- 39,75 ----
H2dEvolutionListenerDispatcher _listener,
Set _s) {
! super(_listener);
! evols_= new ArrayList(_s);
for (Iterator it= evols_.iterator(); it.hasNext();) {
((H2dEvolution)it.next()).setListener(listener_);
}
+ Collections.sort(evols_);
}
! public boolean isUsedCurveNotEnoughWidth(double _min, double _max) {
! H2dEvolution e;
! for (Iterator it= evols_.iterator(); it.hasNext();) {
! e= (H2dEvolution)it.next();
! if (e.isUsed()) {
! if ((e.getMinX() > _min) || (e.getMaxX() < _max))
! return true;
}
}
+ return false;
+ }
+
+ public void setDispatcher(H2dEvolutionListenerDispatcher _l) {
+ listener_= _l;
+ }
+
+ public synchronized final void add(H2dEvolution[] _l) {
+ super.add(_l);
+ }
+
+ public synchronized final void add(EvolutionReguliere[] _l) {
+ if (_l instanceof H2dEvolution[]) {
+ super.add(_l);
+ } else
+ new Throwable().printStackTrace();
}
***************
*** 96,129 ****
listener_.addEvolutionListener(_l);
}
- public void removeListener(H2dEvolutionListener _l) {
- listener_.removeEvolutionListener(_l);
- }
- public boolean containsListener(H2dEvolutionListener _l) {
- return listener_.containsEvolutionListener(_l);
- }
- public final void add(H2dEvolution _l) {
- if (_l != null) {
- evols_.add(_l);
- _l.setListener(listener_);
- }
- }
- public int getNbEvol() {
- return evols_.size();
- }
- public List createList() {
- return new ArrayList(evols_);
- }
- public Vector createVector() {
- return new Vector(evols_);
- }
- public ComboBoxModel createComboBoxModel() {
- return new DefaultComboBoxModel(createVector());
- }
! public ComboBoxModel createComboBoxModelWithEmpty(H2dEvolution _empty) {
! Vector v= new Vector(getNbEvol() + 1);
! v.add(_empty);
! v.addAll(evols_);
! return new DefaultComboBoxModel(v);
}
--- 85,94 ----
listener_.addEvolutionListener(_l);
}
! public void addListener(EvolutionListener _l) {
! if (_l instanceof H2dEvolutionListener)
! listener_.addEvolutionListener(_l);
! else
! new Throwable().printStackTrace();
}
***************
*** 131,139 ****
*
*/
! public void evolutionChanged(H2dEvolution _e) {}
! /**
! *
! */
! public void evolutionUsedChanged(H2dEvolution _e, int _old, int _new) {}
}
--- 96,109 ----
*
*/
! public synchronized void add(EvolutionReguliere _l) {
! if (_l instanceof H2dEvolution)
! super.add(_l);
! else
! new Throwable().printStackTrace();
! }
!
! public synchronized final void add(H2dEvolution _l) {
! super.add(_l);
! }
}
Index: H2dFileFormatMaillageVersion.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/H2dFileFormatMaillageVersion.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** H2dFileFormatMaillageVersion.java 11 Dec 2003 12:41:27 -0000 1.5
--- H2dFileFormatMaillageVersion.java 19 Dec 2003 12:10:36 -0000 1.6
***************
*** 20,27 ****
public FileFormat getFileFormat();
public boolean canWriteOnlyGrid();
! public FileOperationSynthese writeMaillage(
File _f,
H2dGrid _m,
ProgressionInterface _prog);
public FileOperationSynthese readGrid(File _f, ProgressionInterface _prog);
! }
--- 20,27 ----
public FileFormat getFileFormat();
public boolean canWriteOnlyGrid();
! public FileOperationSynthese writeGrid(
File _f,
H2dGrid _m,
ProgressionInterface _prog);
public FileOperationSynthese readGrid(File _f, ProgressionInterface _prog);
! }
Index: H2dTimeStepGroup.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/H2dTimeStepGroup.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** H2dTimeStepGroup.java 11 Dec 2003 12:41:27 -0000 1.3
--- H2dTimeStepGroup.java 19 Dec 2003 12:10:36 -0000 1.4
***************
*** 8,17 ****
*/
package org.fudaa.dodico.h2d;
! import java.util.TreeMap;
!
! import org.fudaa.dodico.corba.simulation.typeAffichage;
import gnu.trove.TObjectDoubleHashMap;
import gnu.trove.TObjectDoubleProcedure;
- import gnu.trove.TObjectProcedure;
import org.fudaa.dodico.commun.DodicoLib;
--- 8,14 ----
*/
package org.fudaa.dodico.h2d;
! import gnu.trove.TDoubleArrayList;
import gnu.trove.TObjectDoubleHashMap;
import gnu.trove.TObjectDoubleProcedure;
import org.fudaa.dodico.commun.DodicoLib;
***************
*** 55,60 ****
*
*/
! public H2dTimeStepGroup() {
! }
public H2dTimeStepGroup(H2dTimeStepGroup _init) {
initFrom(_init);
--- 52,56 ----
*
*/
! public H2dTimeStepGroup() {}
public H2dTimeStepGroup(H2dTimeStepGroup _init) {
initFrom(_init);
***************
*** 79,92 ****
return false;
}
!
! public static H2dTimeStepGroup createDefaultStationnaire(){
! H2dTimeStepGroup r=new H2dTimeStepGroup();
r.setSchema(H2dResolutionSchemaType.STATIONNAIRE);
r.setMethode(H2dResolutionMethodType.LINEAIRE);
return r;
}
!
! public static H2dTimeStepGroup createDefaultTransient(){
! H2dTimeStepGroup r=new H2dTimeStepGroup();
r.setSchema(H2dResolutionSchemaType.EULER);
r.setMethode(H2dResolutionMethodType.LINEAIRE);
--- 75,88 ----
return false;
}
!
! public static H2dTimeStepGroup createDefaultStationnaire() {
! H2dTimeStepGroup r= new H2dTimeStepGroup();
r.setSchema(H2dResolutionSchemaType.STATIONNAIRE);
r.setMethode(H2dResolutionMethodType.LINEAIRE);
return r;
}
!
! public static H2dTimeStepGroup createDefaultTransient() {
! H2dTimeStepGroup r= new H2dTimeStepGroup();
r.setSchema(H2dResolutionSchemaType.EULER);
r.setMethode(H2dResolutionMethodType.LINEAIRE);
***************
*** 96,101 ****
return r;
}
!
!
public static Double isViscosityTransitUsed(H2dTimeStepGroup[] _step) {
for (int i= 0; i < _step.length; i++) {
--- 92,96 ----
return r;
}
!
public static Double isViscosityTransitUsed(H2dTimeStepGroup[] _step) {
for (int i= 0; i < _step.length; i++) {
***************
*** 106,116 ****
return null;
}
!
! public double getTimeLength(){
! if(schema_.isUsed(H2dVariableType.NB_TIME_STEP_SCHEMA))
! return getValeurPasTemps()*getNbPasTemps();
return 0d;
}
!
public final void initFrom(H2dTimeStepGroup _init) {
varValueMethode_=
--- 101,111 ----
return null;
}
!
! public double getTimeLength() {
! if (schema_.isUsed(H2dVariableType.NB_TIME_STEP_SCHEMA))
! return getValeurPasTemps() * getNbPasTemps();
return 0d;
}
!
public final void initFrom(H2dTimeStepGroup _init) {
varValueMethode_=
***************
*** 255,260 ****
if ((varValueMethode_ != null) && (varValueMethode_.contains(_t))) {
return varValueMethode_.get(_t);
! } else{
! return getDefaultValue(_t);
}
--- 250,255 ----
if ((varValueMethode_ != null) && (varValueMethode_.contains(_t))) {
return varValueMethode_.get(_t);
! } else {
! return getDefaultValue(_t);
}
***************
*** 265,274 ****
}
return getDefaultValue(_t);
! // new Throwable().printStackTrace();
! // return 0;
}
public void setSchemaValue(H2dVariableType _t, double _v) {
! if (schema_.isUsed(_t)){
! if(varValueSchema_==null) varValueSchema_=new TObjectDoubleHashMap();
varValueSchema_.put(_t, _v);
}
--- 260,270 ----
}
return getDefaultValue(_t);
! // new Throwable().printStackTrace();
! // return 0;
}
public void setSchemaValue(H2dVariableType _t, double _v) {
! if (schema_.isUsed(_t)) {
! if (varValueSchema_ == null)
! varValueSchema_= new TObjectDoubleHashMap();
varValueSchema_.put(_t, _v);
}
***************
*** 276,281 ****
}
public void setMethodeValue(H2dVariableType _t, double _v) {
! if (methode_.isUsed(_t)){
! if(varValueMethode_==null) varValueMethode_=new TObjectDoubleHashMap();
varValueMethode_.put(_t, _v);
}
--- 272,278 ----
}
public void setMethodeValue(H2dVariableType _t, double _v) {
! if (methode_.isUsed(_t)) {
! if (varValueMethode_ == null)
! varValueMethode_= new TObjectDoubleHashMap();
varValueMethode_.put(_t, _v);
}
***************
*** 332,335 ****
--- 329,376 ----
+ (varValueMethode_ == null ? 0 : varValueMethode_.hashCode())
+ (varValueSchema_ == null ? 0 : varValueSchema_.hashCode());
+ }
+
+ public static double getMinTime(double _beginTime, H2dTimeStepGroup[] _gp) {
+ if (_gp == null)
+ return 0;
+ return _gp[0].getSchema() == H2dResolutionSchemaType.STATIONNAIRE
+ ? 1
+ : _beginTime + _gp[0].getValeurPasTemps();
+ }
+
+ public static double getMaxTime(double _beginTime, H2dTimeStepGroup[] _gp) {
+ if (_gp == null)
+ return 0;
+ if (_gp[0].getSchema() == H2dResolutionSchemaType.STATIONNAIRE)
+ return 1;
+ double r= _beginTime;
+ for (int i= _gp.length - 1; i >= 0; i--) {
+ r += _gp[i].getTimeLength();
+ }
+ return r;
+ }
+
+ public static double[] getTimeStep(double _beginTime, H2dTimeStepGroup[] _gp) {
+ if (_gp == null)
+ return null;
+ H2dTimeStepGroup t= _gp[0];
+ if (t.getSchema() == H2dResolutionSchemaType.STATIONNAIRE) {
+ return new double[] { 1 };
+ }
+ TDoubleArrayList r= new TDoubleArrayList();
+ int n= _gp.length;
+ int nbPas;
+ double vTemps;
+ double vToAdd= _beginTime;
+ for (int i= 0; i < n; i++) {
+ t= _gp[i];
+ nbPas= t.getNbPasTemps();
+ vTemps= t.getValeurPasTemps();
+ for (int j= nbPas; j > 0; j--) {
+ vToAdd += vTemps;
+ r.add(vToAdd);
+ }
+ }
+ return r.toNativeArray();
}
}
Index: h2d_en.fr_txt
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/h2d_en.fr_txt,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** h2d_en.fr_txt 12 Dec 2003 10:30:53 -0000 1.8
--- h2d_en.fr_txt 19 Dec 2003 12:10:36 -0000 1.9
***************
*** 195,199 ****
Frontières Liquides transitoire=Transient liquid boundaries
Ce fichier contient les valeurs dépendantes du temps pour les frontières liquides=This file contains the time-dependent boundary conditions
! Frontières Liquides transitoire=Transient liquid boundary conditions
L'unité du temps est traitée en tant que seconde=The time is supposed to be in second
Les valeurs du temps doivent être croissantes=The time values must be in ascending order
--- 195,199 ----
Frontières Liquides transitoire=Transient liquid boundaries
Ce fichier contient les valeurs dépendantes du temps pour les frontières liquides=This file contains the time-dependent boundary conditions
! Frontières Liquides (Télémac)=Liquid boundary conditions (Telemac)
L'unité du temps est traitée en tant que seconde=The time is supposed to be in second
Les valeurs du temps doivent être croissantes=The time values must be in ascending order
***************
*** 231,233 ****
Select Lumping banc c/d=Select Lumping bench c/u
Vide=Empty
! Courbes temporelles=Time curves
\ No newline at end of file
--- 231,234 ----
Select Lumping banc c/d=Select Lumping bench c/u
Vide=Empty
! Courbes temporelles=Time curves
! Les courbes suivantes ne contiennent pas les bornes de la simulation=The following curves don't contain the bounds of the simulation
\ No newline at end of file
--- MaillageReader.java DELETED ---
|
|
From: <de...@us...> - 2003-12-19 12:10:40
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/reflux
In directory sc8-pr-cvs1:/tmp/cvs-serv28839/h2d/reflux
Modified Files:
H2dRefluxBcManager.java H2dRefluxBoundaryCondition.java
H2dRefluxBoundaryConditionMiddleFriction.java
H2dRefluxElementProperty.java
H2dRefluxElementPropertyMngAbstract.java
H2dRefluxParameters.java H2dRefluxSourceInterface.java
Log Message:
Update for h2d model
Add support for evolution
Index: H2dRefluxBcManager.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/reflux/H2dRefluxBcManager.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** H2dRefluxBcManager.java 12 Dec 2003 10:30:54 -0000 1.4
--- H2dRefluxBcManager.java 19 Dec 2003 12:10:36 -0000 1.5
***************
*** 1218,1226 ****
return bcArray_[_idxOnThisFrontier];
}
! public void fillWithUsedEvolution(final Set _r) {
for (int i= bcArray_.length - 1; i >= 0; i--) {
bcArray_[i].fillWithUsedEvolution(_r);
}
}
public int getNbPt() {
return bcArray_.length;
--- 1218,1232 ----
return bcArray_[_idxOnThisFrontier];
}
! public void fillWithUsedEvolution(Set _r) {
for (int i= bcArray_.length - 1; i >= 0; i--) {
bcArray_[i].fillWithUsedEvolution(_r);
}
}
+
+ protected void replaceEvol(Map evolEquivEvol){
+ for (int i= bcArray_.length - 1; i >= 0; i--) {
+ bcArray_[i].replaceEvol(evolEquivEvol);
+ }
+ }
public int getNbPt() {
return bcArray_.length;
***************
*** 1233,1236 ****
--- 1239,1249 ----
return null;
}
+ }
+
+ protected void replaceEvol(Map evolEquivEvol){
+ for (int i= bcFrontier_.length - 1; i >= 0; i--) {
+ ((RefluxMiddleFrontier)bcFrontier_[i]).replaceEvol(evolEquivEvol);
+ }
+
}
public boolean isModified() {
Index: H2dRefluxBoundaryCondition.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/reflux/H2dRefluxBoundaryCondition.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** H2dRefluxBoundaryCondition.java 11 Dec 2003 12:41:27 -0000 1.3
--- H2dRefluxBoundaryCondition.java 19 Dec 2003 12:10:36 -0000 1.4
***************
*** 53,63 ****
}
}
!
! public void initUsedEvol(){
! if(uTransitoireCourbe_!=null) uTransitoireCourbe_.setUsed();
! if(vTransitoireCourbe_!=null) vTransitoireCourbe_.setUsed();
! if(hTransitoireCourbe_!=null) hTransitoireCourbe_.setUsed();
! if(qTransitoireCourbe_!=null) qTransitoireCourbe_.setUsed();
!
}
public boolean containsPnTransient() {
--- 53,91 ----
}
}
!
! protected void replaceEvol(Map evolEquivEvol) {
! if ((uTransitoireCourbe_ != null)
! && (evolEquivEvol.containsKey(uTransitoireCourbe_))) {
! uTransitoireCourbe_= (H2dEvolution)evolEquivEvol.get(uTransitoireCourbe_);
! uTransitoireCourbe_.setUsed();
! }
! if ((vTransitoireCourbe_ != null)
! && (evolEquivEvol.containsKey(vTransitoireCourbe_))) {
! vTransitoireCourbe_= (H2dEvolution)evolEquivEvol.get(vTransitoireCourbe_);
! vTransitoireCourbe_.setUsed();
! }
! if ((hTransitoireCourbe_ != null)
! && (evolEquivEvol.containsKey(hTransitoireCourbe_))) {
! hTransitoireCourbe_= (H2dEvolution)evolEquivEvol.get(hTransitoireCourbe_);
! hTransitoireCourbe_.setUsed();
! }
! if ((qTransitoireCourbe_ != null)
! && (evolEquivEvol.containsKey(qTransitoireCourbe_))) {
! qTransitoireCourbe_= (H2dEvolution)evolEquivEvol.get(qTransitoireCourbe_);
! qTransitoireCourbe_.setUsed();
! }
!
! }
!
! public void initUsedEvol() {
! if (uTransitoireCourbe_ != null)
! uTransitoireCourbe_.setUsed();
! if (vTransitoireCourbe_ != null)
! vTransitoireCourbe_.setUsed();
! if (hTransitoireCourbe_ != null)
! hTransitoireCourbe_.setUsed();
! if (qTransitoireCourbe_ != null)
! qTransitoireCourbe_.setUsed();
!
}
public boolean containsPnTransient() {
***************
*** 106,110 ****
_newBoundary.qTransitoireCourbe_.setUsed();
}
! if(_newBoundary.isMiddleWithFriction() && (_newBoundary.getMiddleFriction().getFrictionEvolution()!=null)){
_newBoundary.getMiddleFriction().getFrictionEvolution().setUsed();
}
--- 134,139 ----
_newBoundary.qTransitoireCourbe_.setUsed();
}
! if (_newBoundary.isMiddleWithFriction()
! && (_newBoundary.getMiddleFriction().getFrictionEvolution() != null)) {
_newBoundary.getMiddleFriction().getFrictionEvolution().setUsed();
}
Index: H2dRefluxBoundaryConditionMiddleFriction.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/reflux/H2dRefluxBoundaryConditionMiddleFriction.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** H2dRefluxBoundaryConditionMiddleFriction.java 11 Dec 2003 12:41:27 -0000 1.3
--- H2dRefluxBoundaryConditionMiddleFriction.java 19 Dec 2003 12:10:36 -0000 1.4
***************
*** 8,18 ****
*/
package org.fudaa.dodico.h2d.reflux;
import java.util.Set;
- import org.fudaa.dodico.h2d.H2dBoundaryCondition;
- import org.fudaa.dodico.h2d.H2dElement;
import org.fudaa.dodico.h2d.H2dEvolution;
- import org.fudaa.dodico.h2d.type.H2dBoundaryType;
import org.fudaa.dodico.h2d.type.H2dBcType;
import org.fudaa.dodico.h2d.type.H2dVariableType;
/**
--- 8,17 ----
*/
package org.fudaa.dodico.h2d.reflux;
+ import java.util.Map;
import java.util.Set;
import org.fudaa.dodico.h2d.H2dEvolution;
import org.fudaa.dodico.h2d.type.H2dBcType;
+ import org.fudaa.dodico.h2d.type.H2dBoundaryType;
import org.fudaa.dodico.h2d.type.H2dVariableType;
/**
***************
*** 210,213 ****
--- 209,221 ----
}
+ protected void replaceEvol(Map evolEquivEvol) {
+ if ((frictionEvol_ != null)
+ && (evolEquivEvol.containsKey(frictionEvol_))) {
+ frictionEvol_= (H2dEvolution)evolEquivEvol.get(frictionEvol_);
+ frictionEvol_.setUsed();
+ }
+ super.replaceEvol(evolEquivEvol);
+ }
+
/**
*
***************
*** 258,262 ****
public void initUsedEvol() {
super.initUsedEvol();
! if(frictionEvol_!=null) frictionEvol_.setUsed();
}
--- 266,271 ----
public void initUsedEvol() {
super.initUsedEvol();
! if (frictionEvol_ != null)
! frictionEvol_.setUsed();
}
Index: H2dRefluxElementProperty.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/reflux/H2dRefluxElementProperty.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** H2dRefluxElementProperty.java 11 Dec 2003 12:41:27 -0000 1.1
--- H2dRefluxElementProperty.java 19 Dec 2003 12:10:36 -0000 1.2
***************
*** 8,11 ****
--- 8,13 ----
*/
package org.fudaa.dodico.h2d.reflux;
+ import java.util.Map;
+
import gnu.trove.TIntArrayList;
import gnu.trove.TIntDoubleHashMap;
***************
*** 211,214 ****
--- 213,232 ----
}
return null;
+ }
+
+ protected void replaceEvol(Map evolEquivEvol) {
+ if(indiceTransitoireEvolution_!=null){
+ TIntObjectIterator intObject=indiceTransitoireEvolution_.iterator();
+ for (int i= indiceTransitoireEvolution_.size(); i-- > 0;) {
+ intObject.advance();
+ H2dEvolution newE=(H2dEvolution)evolEquivEvol.get(intObject.value());
+ if(newE!=null){
+ newE.setUsed();
+ indiceTransitoireEvolution_.put(intObject.key(), newE);
+ }
+ }
+
+
+ }
}
protected RefluxMemento setValueIntern(
Index: H2dRefluxElementPropertyMngAbstract.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/reflux/H2dRefluxElementPropertyMngAbstract.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** H2dRefluxElementPropertyMngAbstract.java 11 Dec 2003 12:41:27 -0000 1.1
--- H2dRefluxElementPropertyMngAbstract.java 19 Dec 2003 12:10:36 -0000 1.2
***************
*** 73,76 ****
--- 73,82 ----
}
+ protected void replaceEvol(Map evolEquivEvol) {
+ for (Iterator it= varNodalProp.values().iterator(); it.hasNext();) {
+ ((H2dRefluxElementProperty)it.next()).replaceEvol(evolEquivEvol);
+ }
+ }
+
public boolean containsPnTransient() {
for (Iterator it= varNodalProp.values().iterator(); it.hasNext();) {
Index: H2dRefluxParameters.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/reflux/H2dRefluxParameters.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** H2dRefluxParameters.java 11 Dec 2003 12:41:27 -0000 1.3
--- H2dRefluxParameters.java 19 Dec 2003 12:10:36 -0000 1.4
***************
*** 8,12 ****
--- 8,20 ----
*/
package org.fudaa.dodico.h2d.reflux;
+ import gnu.trove.TDoubleArrayList;
+
+ import java.util.ArrayList;
+ import java.util.HashMap;
import java.util.HashSet;
+ import java.util.Iterator;
+ import java.util.Map;
+ import java.util.Set;
+
import org.fudaa.dodico.commun.DodicoAnalyze;
import org.fudaa.dodico.commun.DodicoCommand;
***************
*** 26,29 ****
--- 34,38 ----
import org.fudaa.dodico.h2d.type.H2dBcType;
import org.fudaa.dodico.h2d.type.H2dProjetType;
+ import org.fudaa.dodico.h2d.type.H2dResolutionSchemaType;
import org.fudaa.dodico.reflux.io.INPFileFormat;
/**
***************
*** 51,54 ****
--- 60,64 ----
new H2dBcType[] { H2dBcType.PERMANENT, H2dBcType.TRANSITOIRE }));
H2dTimeStepGroup[] gptTemps_;
+ double beginTime_;
H2dRefluxElementPropertyMngAbstract propElem_;
private H2dProjetType projetType_;
***************
*** 58,64 ****
*
*/
! private H2dRefluxParameters(DicoParams _p,H2dProjetType _t) {
super(_p);
! projetType_=_t;
}
--- 68,74 ----
*
*/
! private H2dRefluxParameters(DicoParams _p, H2dProjetType _t) {
super(_p);
! projetType_= _t;
}
***************
*** 98,101 ****
--- 108,114 ----
if (listener_ != null)
propElem_.removeListener(listener_);
+ if(evolMng_!=null){
+ evolMng_.setDispatcher(_l);
+ }
propElem_.addListener(_l);
listener_= _l;
***************
*** 119,125 ****
--- 132,180 ----
return new H2dTimeStepGroup(gptTemps_[_i]);
}
+
public H2dTimeStepGroup[] getGroupePasTempsTab() {
return H2dTimeStepGroup.cloneTimeStep(gptTemps_);
}
+
+ public double getBeginTimeForTrans() {
+ return beginTime_;
+ }
+
+ public void setBeginTimeForTrans(double _t) {
+ if (_t != beginTime_) {
+ isModified= true;
+ fireTimeStepChanged();
+ beginTime_= _t;
+ }
+ }
+
+ public double getMinTime() {
+ return H2dTimeStepGroup.getMinTime(beginTime_, gptTemps_);
+ }
+
+ public double getMaxTime() {
+ return H2dTimeStepGroup.getMaxTime(beginTime_, gptTemps_);
+ }
+
+ public double[] getTimeStep() {
+ return H2dTimeStepGroup.getTimeStep(beginTime_, gptTemps_);
+ }
+
+ protected void guessBeginTimeForTrans() {
+ beginTime_= 0;
+ if (gptTemps_[0].getSchema() == H2dResolutionSchemaType.STATIONNAIRE) {
+ return;
+ } else {
+ HashSet evol= getUsedEvol();
+ if (evol.size() > 0) {
+ H2dEvolution e= (H2dEvolution)evol.toArray()[0];
+ beginTime_= e.getMinX() - gptTemps_[0].getValeurPasTemps();
+ if (beginTime_ < 0)
+ beginTime_= 0;
+ }
+
+ }
+ }
+
protected void fireTimeStepChanged() {
if (listener_ != null)
***************
*** 146,150 ****
isModified= true;
fireTimeStepChanged();
! }
public void redo() {
gptTemps_= newT;
--- 201,205 ----
isModified= true;
fireTimeStepChanged();
! }
public void redo() {
gptTemps_= newT;
***************
*** 170,174 ****
DodicoAnalyze.Editor _analyze) {
DicoParams params= new DicoParams(null, _ft);
! H2dRefluxParameters r= new H2dRefluxParameters(params,_type);
r.setMaillage(_inter, _prog, _analyze);
r.setClManager(H2dRefluxBcManager.init(_inter));
--- 225,229 ----
DodicoAnalyze.Editor _analyze) {
DicoParams params= new DicoParams(null, _ft);
! H2dRefluxParameters r= new H2dRefluxParameters(params, _type);
r.setMaillage(_inter, _prog, _analyze);
r.setClManager(H2dRefluxBcManager.init(_inter));
***************
*** 180,184 ****
r.gptTemps_=
new H2dTimeStepGroup[] { H2dTimeStepGroup.createDefaultStationnaire()};
! r.isModified=true;
return r;
}
--- 235,239 ----
r.gptTemps_=
new H2dTimeStepGroup[] { H2dTimeStepGroup.createDefaultStationnaire()};
! r.isModified= true;
return r;
}
***************
*** 197,201 ****
}
DicoParams params= new DicoParams(_inter.getEntiteValue(), _ft);
! H2dRefluxParameters r= new H2dRefluxParameters(params,_inter.getTypeProjet());
r.setMaillage(_inter.getMaillage(), _prog, _analyze);
if (r.getMaillage() == null) {
--- 252,257 ----
}
DicoParams params= new DicoParams(_inter.getEntiteValue(), _ft);
! H2dRefluxParameters r=
! new H2dRefluxParameters(params, _inter.getTypeProjet());
r.setMaillage(_inter.getMaillage(), _prog, _analyze);
if (r.getMaillage() == null) {
***************
*** 221,224 ****
--- 277,309 ----
_prog.setProgression(100);
}
+ HashSet s= r.getUsedEvol();
+ Map evolEquivEvol= new HashMap(s.size());
+ Set baseEvolu= new HashSet(s.size());
+ boolean foundEquiv;
+ for (Iterator it= s.iterator(); it.hasNext();) {
+ H2dEvolution eToCompare= (H2dEvolution)it.next();
+ foundEquiv= false;
+ for (Iterator itBase= baseEvolu.iterator();
+ (itBase.hasNext()) && (!foundEquiv);
+ ) {
+ H2dEvolution eBase= (H2dEvolution)itBase.next();
+ if (eToCompare.isEvolutionEquivalentTo(eBase)) {
+ foundEquiv= true;
+ evolEquivEvol.put(eToCompare, eBase);
+ }
+ }
+ if (!foundEquiv) {
+ baseEvolu.add(eToCompare);
+ }
+ }
+ if (evolEquivEvol.size() > 0) {
+ r.clMng_.replaceEvol(evolEquivEvol);
+ r.propElem_.replaceEvol(evolEquivEvol);
+ if (r.evolMng_ != null) {
+ r.evolMng_= null;
+ }
+ }
+ r.guessBeginTimeForTrans();
+
return r;
}
***************
*** 278,281 ****
--- 363,373 ----
}
}
+
+ public HashSet getUsedEvol() {
+ HashSet evol= new HashSet();
+ clMng_.fillWithUsedEvolution(evol);
+ propElem_.fillWithUsedEvolution(evol);
+ return evol;
+ }
/**
*
***************
*** 283,289 ****
public H2dEvolutionManager getEvolMng() {
if (evolMng_ == null) {
! HashSet evol= new HashSet();
! clMng_.fillWithUsedEvolution(evol);
! propElem_.fillWithUsedEvolution(evol);
evolMng_= new H2dEvolutionManager(listener_, evol);
}
--- 375,379 ----
public H2dEvolutionManager getEvolMng() {
if (evolMng_ == null) {
! HashSet evol= getUsedEvol();
evolMng_= new H2dEvolutionManager(listener_, evol);
}
Index: H2dRefluxSourceInterface.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/reflux/H2dRefluxSourceInterface.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** H2dRefluxSourceInterface.java 25 Nov 2003 10:11:36 -0000 1.7
--- H2dRefluxSourceInterface.java 19 Dec 2003 12:10:36 -0000 1.8
***************
*** 33,36 ****
--- 33,41 ----
*/
public boolean contientVent();
+
+ /**
+ * @return le temps a partir duquel les evolutions doivent commencer
+ */
+ public double getTimeBeginningForTrans();
/**
*/
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/telemac
In directory sc8-pr-cvs1:/tmp/cvs-serv28839/h2d/telemac
Modified Files:
H2dTelemacBcManager.java H2dTelemacDicoFileFormatVersion.java
H2dTelemacParameters.java
Log Message:
Update for h2d model
Add support for evolution
Index: H2dTelemacBcManager.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/telemac/H2dTelemacBcManager.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** H2dTelemacBcManager.java 12 Dec 2003 10:30:54 -0000 1.4
--- H2dTelemacBcManager.java 19 Dec 2003 12:10:36 -0000 1.5
***************
*** 37,41 ****
import org.fudaa.dodico.h2d.H2dEvolution;
import org.fudaa.dodico.h2d.H2dEvolutionFrontiereLiquide;
- import org.fudaa.dodico.h2d.H2dEvolutionListenerDispatcher;
import org.fudaa.dodico.h2d.H2dFrontier;
import org.fudaa.dodico.h2d.H2dGrid;
--- 37,40 ----
***************
*** 45,48 ****
--- 44,48 ----
import org.fudaa.dodico.h2d.type.H2dBoundaryType;
import org.fudaa.dodico.h2d.type.H2dVariableType;
+ import org.fudaa.dodico.mesure.EvolutionListenerDispatcher;
/**
* @author deniger
***************
*** 108,112 ****
H2dTelemacBoundary b= liquidBorder_[idx];
H2dEvolution evol= liq.getEvol();
! H2dEvolutionListenerDispatcher l= evol.getListener();
evol.setListener(null);
b.setVariableTransient(liq.getVariableType(), evol);
--- 108,112 ----
H2dTelemacBoundary b= liquidBorder_[idx];
H2dEvolution evol= liq.getEvol();
! EvolutionListenerDispatcher l= evol.getListener();
evol.setListener(null);
b.setVariableTransient(liq.getVariableType(), evol);
Index: H2dTelemacDicoFileFormatVersion.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/telemac/H2dTelemacDicoFileFormatVersion.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** H2dTelemacDicoFileFormatVersion.java 11 Dec 2003 12:41:27 -0000 1.5
--- H2dTelemacDicoFileFormatVersion.java 19 Dec 2003 12:10:36 -0000 1.6
***************
*** 36,39 ****
--- 36,42 ----
public abstract DicoEntite getVelocityProfils();
public abstract DicoEntite getLiquidBoundaryOption();
+ public abstract DicoEntite getNbPasTemps();
+ public abstract DicoEntite getPasTemps();
+ public abstract DicoEntite getDureeDuCalcul();
/**
* @see #getVelocityProfils()
Index: H2dTelemacParameters.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/telemac/H2dTelemacParameters.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** H2dTelemacParameters.java 11 Dec 2003 12:41:27 -0000 1.3
--- H2dTelemacParameters.java 19 Dec 2003 12:10:36 -0000 1.4
***************
*** 8,16 ****
*/
package org.fudaa.dodico.h2d.telemac;
- import java.util.List;
import org.fudaa.dodico.commun.DodicoAnalyze;
import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.commun.DodicoPermanentList;
import org.fudaa.dodico.commun.ProgressionInterface;
import org.fudaa.dodico.dico.DicoParams;
import org.fudaa.dodico.h2d.H2dBcManagerBlockInterface;
--- 8,16 ----
*/
package org.fudaa.dodico.h2d.telemac;
import org.fudaa.dodico.commun.DodicoAnalyze;
import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.commun.DodicoPermanentList;
import org.fudaa.dodico.commun.ProgressionInterface;
+ import org.fudaa.dodico.dico.DicoEntite;
import org.fudaa.dodico.dico.DicoParams;
import org.fudaa.dodico.h2d.H2dBcManagerBlockInterface;
***************
*** 50,60 ****
return BORD_LIST;
}
! public static boolean isTransientAvailable(DicoParams _p){
return _p.getDicoFileFormat().getID().equals("TELEMAC2D");
}
! public boolean isTransientAvailable(){
! return isTransientAvailable(dicoParams_);
! }
!
public H2dEvolutionManager getEvolMng() {
if (evolMng_ == null) {
--- 50,114 ----
return BORD_LIST;
}
!
! /**
! * Cherche la duree de la simulation et renvoie 0 si un mot-cle concerne est invalide.
! * @return la duree du calcul
! * return the duration of the computation
! */
! public long getComputationDuration() {
! double r= 0d;
! DicoEntite eNbPasTemps=
! getTelemacDicoParams().getTelemacDicoFileFormatVersion().getNbPasTemps();
! DicoEntite eDuree=
! getTelemacDicoParams()
! .getTelemacDicoFileFormatVersion()
! .getDureeDuCalcul();
! DicoEntite ePasDeTemp=
! getTelemacDicoParams().getTelemacDicoFileFormatVersion().getPasTemps();
! //si les mot-cles pas de temps n'existent pas, on essaie avec eDuree
! if ((eNbPasTemps == null) || (ePasDeTemp == null)) {
! //si duree existe et est valide
! if ((eDuree != null) && (dicoParams_.isValueValideFor(eDuree)))
! r= Double.parseDouble(dicoParams_.getValue(eDuree));
! }
! //les mot-clé existent et sont valides
! else if (
! dicoParams_.isValueValideFor(eNbPasTemps)
! && dicoParams_.isValueValideFor(ePasDeTemp)) {
! //mot-cle duree n'existe pas
! if (eDuree == null) {
! r=
! Double.parseDouble(dicoParams_.getValue(eNbPasTemps))
! * Double.parseDouble(dicoParams_.getValue(ePasDeTemp));
! }
! //duree existe
! else if (dicoParams_.isValueValideFor(eDuree)) {
! if (dicoParams_.isValueSetFor(eDuree)) {
! double duree= Double.parseDouble(dicoParams_.getValue(eDuree));
! //si duree et nb pas de temps existe, on prend celui qui conduit a la simulation la plus longue
! if (dicoParams_.isValueSetFor(eNbPasTemps)) {
! double duree2=
! Double.parseDouble(dicoParams_.getValue(eNbPasTemps))
! * Double.parseDouble(dicoParams_.getValue(ePasDeTemp));
! r= (duree > duree2 ? duree : duree2);
! } else
! r= duree;
! } else
! //cas simple
! r=
! Double.parseDouble(dicoParams_.getValue(eNbPasTemps))
! * Double.parseDouble(dicoParams_.getValue(ePasDeTemp));
! }
! }
! return (long)Math.ceil(r);
! }
!
! public static boolean isTransientAvailable(DicoParams _p) {
return _p.getDicoFileFormat().getID().equals("TELEMAC2D");
}
! public boolean isTransientAvailable() {
! return isTransientAvailable(dicoParams_);
! }
!
public H2dEvolutionManager getEvolMng() {
if (evolMng_ == null) {
***************
*** 116,124 ****
}
public void setEvolution(H2dEvolutionFrontiereLiquide[] _liquid) {
! if(_liquid!=null){
! H2dEvolutionManager eMng=getEvolMng();
! for(int i=_liquid.length-1;i>=0;i--){
eMng.add(_liquid[i].getEvol());
!
}
}
--- 170,178 ----
}
public void setEvolution(H2dEvolutionFrontiereLiquide[] _liquid) {
! if (_liquid != null) {
! H2dEvolutionManager eMng= getEvolMng();
! for (int i= _liquid.length - 1; i >= 0; i--) {
eMng.add(_liquid[i].getEvol());
!
}
}
|
|
From: <de...@us...> - 2003-12-19 12:10:40
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/type
In directory sc8-pr-cvs1:/tmp/cvs-serv28839/h2d/type
Modified Files:
H2dEnumType.java H2dFileFormatType.java
Log Message:
Update for h2d model
Add support for evolution
Index: H2dEnumType.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/type/H2dEnumType.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** H2dEnumType.java 25 Nov 2003 10:11:37 -0000 1.5
--- H2dEnumType.java 19 Dec 2003 12:10:36 -0000 1.6
***************
*** 8,11 ****
--- 8,12 ----
*/
package org.fudaa.dodico.h2d.type;
+ import java.util.Comparator;
import java.util.Iterator;
import java.util.List;
***************
*** 60,62 ****
--- 61,77 ----
return null;
}
+
+ public static class H2dEnumIDComparator implements Comparator{
+
+ /**
+ *
+ */
+ public int compare(Object o1, Object o2) {
+ if( (o1 instanceof H2dEnumType) && (o2 instanceof H2dEnumType)){
+ return ((H2dEnumType)o1).id_-((H2dEnumType)o2).id_;
+ }
+ throw new IllegalArgumentException("o1 and o2 must be H2dEnumType");
+ }
+
+ }
}
Index: H2dFileFormatType.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/type/H2dFileFormatType.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** H2dFileFormatType.java 25 Nov 2003 10:11:37 -0000 1.5
--- H2dFileFormatType.java 19 Dec 2003 12:10:36 -0000 1.6
***************
*** 23,28 ****
public static final H2dFileFormatType CL=
new H2dFileFormatType(2, H2dResource.getS("Conditions limites"));
! public static final H2dFileFormatType CL_LIQUIDE=
! new H2dFileFormatType(3, H2dResource.getS("Conditions limites liquides"));
public static final H2dFileFormatType COURBE_TRANSITOIRE=
new H2dFileFormatType(4, H2dResource.getS("Courbes transitoire"));
--- 23,28 ----
public static final H2dFileFormatType CL=
new H2dFileFormatType(2, H2dResource.getS("Conditions limites"));
! // public static final H2dFileFormatType CL_LIQUIDE=
! // new H2dFileFormatType(3, H2dResource.getS("Conditions limites liquides"));
public static final H2dFileFormatType COURBE_TRANSITOIRE=
new H2dFileFormatType(4, H2dResource.getS("Courbes transitoire"));
***************
*** 36,40 ****
MAILLAGE,
CL,
! CL_LIQUIDE,
COURBE_TRANSITOIRE }));
/**
--- 36,40 ----
MAILLAGE,
CL,
! // CL_LIQUIDE,
COURBE_TRANSITOIRE }));
/**
|
|
From: <de...@us...> - 2003-12-19 12:10:39
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/fortran
In directory sc8-pr-cvs1:/tmp/cvs-serv28839/fortran
Modified Files:
FortranWriter.java
Log Message:
Update for h2d model
Add support for evolution
Index: FortranWriter.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/fortran/FortranWriter.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** FortranWriter.java 12 Dec 2003 10:30:53 -0000 1.8
--- FortranWriter.java 19 Dec 2003 12:10:36 -0000 1.9
***************
*** 359,368 ****
* @param _v la valeur du champ de type int
*/
! public void intField(int _i, int _v) {
// if (fields.size() <= _i)
// fields.setSize(_i + 1);
// // fields.ensureCapacity(_i+1);
// fields.setElementAt(new Integer(_valeurChamp), _i);
! objectField(_i, getIntegerFormatField(_v));
}
/**
--- 359,368 ----
* @param _v la valeur du champ de type int
*/
! public void intField(int _index, int _value) {
// if (fields.size() <= _i)
// fields.setSize(_i + 1);
// // fields.ensureCapacity(_i+1);
// fields.setElementAt(new Integer(_valeurChamp), _i);
! objectField(_index, getIntegerFormatField(_value));
}
/**
|
|
From: <de...@us...> - 2003-12-19 12:10:39
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dico
In directory sc8-pr-cvs1:/tmp/cvs-serv28839/dico
Modified Files:
DicoParams.java
Log Message:
Update for h2d model
Add support for evolution
Index: DicoParams.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dico/DicoParams.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** DicoParams.java 12 Dec 2003 10:30:53 -0000 1.13
--- DicoParams.java 19 Dec 2003 12:10:35 -0000 1.14
***************
*** 407,410 ****
--- 407,411 ----
*/
public final String getValue(DicoEntite _ent) {
+ if(_ent==null) return null;
String r= (String)entitesValues_.get(_ent);
if (r == null)
***************
*** 434,437 ****
--- 435,439 ----
*/
public final boolean removeValue(DicoEntite _ent) {
+ if(_ent==null) return false;
if (entitesValues_.containsKey(_ent)) {
String old= getValue(_ent);
***************
*** 446,449 ****
--- 448,452 ----
final DicoEntite _ent,
final String _value) {
+ if(_ent==null) return null;
final String old= getValue(_ent);
boolean b= _setValue(_ent, _value);
***************
*** 461,464 ****
--- 464,468 ----
}
public DodicoCommand removeValueAndGenerateCommand(final DicoEntite _ent) {
+ if(_ent==null) return null;
final String old= getValue(_ent);
boolean b= removeValue(_ent);
|
|
From: <de...@us...> - 2003-12-19 12:10:39
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dunes/io
In directory sc8-pr-cvs1:/tmp/cvs-serv28839/dunes/io
Modified Files:
DunesFileFormat.java
Log Message:
Update for h2d model
Add support for evolution
Index: DunesFileFormat.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dunes/io/DunesFileFormat.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** DunesFileFormat.java 11 Dec 2003 12:41:27 -0000 1.10
--- DunesFileFormat.java 19 Dec 2003 12:10:36 -0000 1.11
***************
*** 111,115 ****
*
*/
! public FileOperationSynthese writeMaillage(
File _f,
H2dGrid _m,
--- 111,115 ----
*
*/
! public FileOperationSynthese writeGrid(
File _f,
H2dGrid _m,
|
|
From: <de...@us...> - 2003-12-19 12:06:45
|
Update of /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/tableau
In directory sc8-pr-cvs1:/tmp/cvs-serv28248/tableau
Modified Files:
EbliCellDialogEditor.java EbliPanelListEditor.java
Added Files:
EbliCellButtonEditor.java
Log Message:
Correction bogue bgraphe
Ajout support graphe ( suivi souris)
--- NEW FILE: EbliCellButtonEditor.java ---
/*
* @file TrCellDialogEditor.java
* @creation 13 mai 2003
* @modification $Date: 2003/12/19 12:06:42 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.ebli.tableau;
import java.awt.Component;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.util.EventObject;
import javax.swing.DefaultCellEditor;
import javax.swing.JButton;
import javax.swing.JOptionPane;
import javax.swing.JTable;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.event.CellEditorListener;
import javax.swing.event.ChangeEvent;
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.TableCellEditor;
import com.memoire.bu.BuButton;
import org.fudaa.ebli.dialog.EbliSimpleDialogPanel;
/**
* @author deniger
* @version $Id: EbliCellButtonEditor.java,v 1.1 2003/12/19 12:06:42 deniger Exp $
*/
public abstract class EbliCellButtonEditor
extends JButton
implements TableCellEditor, ActionListener {
private transient ChangeEvent changeEvent= null;
private EbliCellDecorator decorator_;
protected Object value_;
private boolean doubleClick_;
public EbliCellButtonEditor(
EbliCellDecorator _deco) {
setOpaque(false);
setEnabled(true);
addActionListener(this);
decorator_= _deco;
setBorder(UIManager.getBorder("Label.border"));
setFont(UIManager.getFont("Table.font"));
setHorizontalAlignment(0);
}
/**
*
*/
public Component getTableCellEditorComponent(
JTable table,
Object value,
boolean isSelected,
int row,
int column) {
value_= value;
setValue(value);
if (decorator_ != null)
decorator_.decore(this, table, value, row, column);
return this;
}
public void setValue(Object _o) {
setText(_o.toString());
}
/**
*
*/
public Object getCellEditorValue() {
return value_;
}
/**
*
*/
public boolean isCellEditable(EventObject anEvent) {
if (!doubleClick_)
return true;
if (anEvent instanceof MouseEvent) {
return ((MouseEvent)anEvent).getClickCount() >= 2;
}
return true;
}
/**
*
*/
public boolean shouldSelectCell(EventObject anEvent) {
return true;
}
/**
*
*/
public void cancelCellEditing() {
Object[] listeners= listenerList.getListenerList();
for (int i= listeners.length - 2; i >= 0; i -= 2) {
if (listeners[i] == CellEditorListener.class) {
if (changeEvent == null)
changeEvent= new ChangeEvent(this);
((CellEditorListener)listeners[i + 1]).editingCanceled(changeEvent);
}
}
}
/**
*
*/
public void addCellEditorListener(CellEditorListener l) {
listenerList.add(CellEditorListener.class, l);
}
/**
*
*/
public void removeCellEditorListener(CellEditorListener l) {
listenerList.remove(CellEditorListener.class, l);
}
public boolean stopCellEditing() {
Object[] listeners= listenerList.getListenerList();
for (int i= listeners.length - 2; i >= 0; i -= 2) {
if (listeners[i] == CellEditorListener.class) {
if (changeEvent == null)
changeEvent= new ChangeEvent(this);
((CellEditorListener)listeners[i + 1]).editingStopped(changeEvent);
}
}
return false;
}
protected abstract void doAction();
public void actionPerformed(ActionEvent _ae) {
doAction();
stopCellEditing();
}
/**
*
*/
public EbliCellDecorator getDecorator() {
return decorator_;
}
/**
*
*/
public void setDecorator(EbliCellDecorator _decorator) {
decorator_= _decorator;
}
/**
*
*/
public boolean isDoubleClick() {
return doubleClick_;
}
/**
*
*/
public void setDoubleClick(boolean _b) {
doubleClick_= _b;
}
}
Index: EbliCellDialogEditor.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/tableau/EbliCellDialogEditor.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** EbliCellDialogEditor.java 12 Dec 2003 10:52:26 -0000 1.1
--- EbliCellDialogEditor.java 19 Dec 2003 12:06:42 -0000 1.2
***************
*** 31,41 ****
*/
public class EbliCellDialogEditor
! extends JButton
! implements TableCellEditor, ActionListener {
protected EbliSimpleDialogPanel dialog_;
- private transient ChangeEvent changeEvent= null;
- private EbliCellDecorator decorator_;
- private Object value_;
- private boolean doubleClick_;
public EbliCellDialogEditor(EbliSimpleDialogPanel _dialog) {
this(_dialog, null);
--- 31,36 ----
*/
public class EbliCellDialogEditor
! extends EbliCellButtonEditor{
protected EbliSimpleDialogPanel dialog_;
public EbliCellDialogEditor(EbliSimpleDialogPanel _dialog) {
this(_dialog, null);
***************
*** 44,134 ****
EbliSimpleDialogPanel _dialog,
EbliCellDecorator _deco) {
! setOpaque(false);
! setEnabled(true);
! addActionListener(this);
! decorator_= _deco;
! setBorder(UIManager.getBorder("Label.border"));
! setFont(UIManager.getFont("Table.font"));
! setHorizontalAlignment(0);
dialog_= _dialog;
}
! /**
! *
! */
! public Component getTableCellEditorComponent(
! JTable table,
! Object value,
! boolean isSelected,
! int row,
! int column) {
! value_= value;
! setValue(value);
! if (decorator_ != null)
! decorator_.decore(this, table, value, row, column);
! return this;
! }
! public void setValue(Object _o) {
! setText(_o.toString());
! }
! /**
! *
! */
! public Object getCellEditorValue() {
! return value_;
! }
! /**
! *
! */
! public boolean isCellEditable(EventObject anEvent) {
! if (!doubleClick_)
! return true;
! if (anEvent instanceof MouseEvent) {
! return ((MouseEvent)anEvent).getClickCount() >= 2;
! }
! return true;
! }
! /**
! *
! */
! public boolean shouldSelectCell(EventObject anEvent) {
! return true;
! }
! /**
! *
! */
! public void cancelCellEditing() {
! Object[] listeners= listenerList.getListenerList();
! for (int i= listeners.length - 2; i >= 0; i -= 2) {
! if (listeners[i] == CellEditorListener.class) {
! if (changeEvent == null)
! changeEvent= new ChangeEvent(this);
! ((CellEditorListener)listeners[i + 1]).editingCanceled(changeEvent);
! }
! }
! }
! /**
! *
! */
! public void addCellEditorListener(CellEditorListener l) {
! listenerList.add(CellEditorListener.class, l);
! }
! /**
! *
! */
! public void removeCellEditorListener(CellEditorListener l) {
! listenerList.remove(CellEditorListener.class, l);
! }
! public boolean stopCellEditing() {
! Object[] listeners= listenerList.getListenerList();
! for (int i= listeners.length - 2; i >= 0; i -= 2) {
! if (listeners[i] == CellEditorListener.class) {
! if (changeEvent == null)
! changeEvent= new ChangeEvent(this);
! ((CellEditorListener)listeners[i + 1]).editingStopped(changeEvent);
! }
! }
! return false;
! }
! private void go() {
dialog_.setValue(value_);
dialog_.doLayout();
--- 39,47 ----
EbliSimpleDialogPanel _dialog,
EbliCellDecorator _deco) {
! super(_deco);
dialog_= _dialog;
}
!
! protected void doAction() {
dialog_.setValue(value_);
dialog_.doLayout();
***************
*** 137,177 ****
value_= dialog_.getValue();
setValue(value_);
! stopCellEditing();
} else
cancelCellEditing();
if (getParent() != null) {
getParent().requestFocus();
}
- // }
- }
- /**
- *
- */
- public void actionPerformed(ActionEvent _ae) {
- go();
- }
- /**
- *
- */
- public EbliCellDecorator getDecorator() {
- return decorator_;
- }
- /**
- *
- */
- public void setDecorator(EbliCellDecorator _decorator) {
- decorator_= _decorator;
- }
- /**
- *
- */
- public boolean isDoubleClick() {
- return doubleClick_;
- }
- /**
- *
- */
- public void setDoubleClick(boolean _b) {
- doubleClick_= _b;
}
}
--- 50,61 ----
value_= dialog_.getValue();
setValue(value_);
!
} else
cancelCellEditing();
+ stopCellEditing();
if (getParent() != null) {
getParent().requestFocus();
}
}
+
}
Index: EbliPanelListEditor.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/tableau/EbliPanelListEditor.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** EbliPanelListEditor.java 12 Dec 2003 10:52:26 -0000 1.1
--- EbliPanelListEditor.java 19 Dec 2003 12:06:42 -0000 1.2
***************
*** 234,238 ****
btModifier_=
buildButton(
! BuResource.BU.getIcon("modifier"),
EbliResource.getS("Modifier"),
"MODIFIER",
--- 234,238 ----
btModifier_=
buildButton(
! BuResource.BU.getIcon("editer"),
EbliResource.getS("Modifier"),
"MODIFIER",
|
|
From: <de...@us...> - 2003-12-19 12:06:45
|
Update of /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/trace
In directory sc8-pr-cvs1:/tmp/cvs-serv28248/trace
Modified Files:
TraceIcone.java
Added Files:
TraceIconeNormal.java
Log Message:
Correction bogue bgraphe
Ajout support graphe ( suivi souris)
--- NEW FILE: TraceIconeNormal.java ---
(This appears to be a binary file; contents omitted.)
Index: TraceIcone.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/trace/TraceIcone.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** TraceIcone.java 25 Nov 2003 10:06:47 -0000 1.5
--- TraceIcone.java 19 Dec 2003 12:06:42 -0000 1.6
***************
*** 29,34 ****
public final static int CERCLE= 7;
public final static int DISQUE= 8;
! private int type_;
! private int taille_;
private Color couleur_;
public TraceIcone() {
--- 29,34 ----
public final static int CERCLE= 7;
public final static int DISQUE= 8;
! protected int type_;
! protected int taille_;
private Color couleur_;
public TraceIcone() {
|
|
From: <de...@us...> - 2003-12-19 12:06:45
|
Update of /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/test
In directory sc8-pr-cvs1:/tmp/cvs-serv28248/test
Modified Files:
TestGraphe.java
Log Message:
Correction bogue bgraphe
Ajout support graphe ( suivi souris)
Index: TestGraphe.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/test/TestGraphe.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** TestGraphe.java 12 Dec 2003 10:32:09 -0000 1.6
--- TestGraphe.java 19 Dec 2003 12:06:42 -0000 1.7
***************
*** 60,63 ****
--- 60,70 ----
if ((graphe != null) && !graphe.animation)
maj();
+
+ BGraphe bgraphe =new BGraphe();
+ bgraphe.setSize(w,h);
+ bgraphe.setSize(getSize());
+ bgraphe.setGraphe(graphe);
+ bgraphe.setInteractif(true);
+ setContentPane(bgraphe);
}
public void parse() {
***************
*** 82,89 ****
graphe.dessine(g, 0, 0, w, h, temps, null);
}
! public void paint(Graphics g) {
! Insets insets=getInsets();
! g.drawImage(tampon, insets.left, insets.top, this);
! }
public void update(Graphics g) {
paint(g);
--- 89,96 ----
graphe.dessine(g, 0, 0, w, h, temps, null);
}
! // public void paint(Graphics g) {
! // if(tampon==null) return;
! // g.drawImage(tampon, 0, 0, this);
! // }
public void update(Graphics g) {
paint(g);
|
|
From: <de...@us...> - 2003-12-19 12:06:45
|
Update of /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/ressource In directory sc8-pr-cvs1:/tmp/cvs-serv28248/ressource Modified Files: ebli_en.fr_txt Log Message: Correction bogue bgraphe Ajout support graphe ( suivi souris) Index: ebli_en.fr_txt =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/ressource/ebli_en.fr_txt,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ebli_en.fr_txt 12 Dec 2003 10:52:25 -0000 1.7 --- ebli_en.fr_txt 19 Dec 2003 12:06:42 -0000 1.8 *************** *** 108,110 **** Ajouter une formuleRemove a formula Tableau=Table ! Formule=Formula \ No newline at end of file --- 108,112 ---- Ajouter une formuleRemove a formula Tableau=Table ! Formule=Formula ! Couleur du tracé=Foreground color ! Modifier la couleur de tracé des courbes sélectionnées=Modify the foreground color for the selected curves \ No newline at end of file |
|
From: <de...@us...> - 2003-12-19 12:06:44
|
Update of /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/dialog
In directory sc8-pr-cvs1:/tmp/cvs-serv28248/dialog
Modified Files:
EbliSimpleDialogPanel.java
Log Message:
Correction bogue bgraphe
Ajout support graphe ( suivi souris)
Index: EbliSimpleDialogPanel.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/dialog/EbliSimpleDialogPanel.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** EbliSimpleDialogPanel.java 12 Dec 2003 10:32:08 -0000 1.11
--- EbliSimpleDialogPanel.java 19 Dec 2003 12:06:41 -0000 1.12
***************
*** 194,198 ****
if (dialog_ != null) {
if (CtuluLib.DEBUG)
! CtuluLib.debug(
getClass().getName() + " Cet element est deja visualise");
}
--- 194,198 ----
if (dialog_ != null) {
if (CtuluLib.DEBUG)
! CtuluLib.debug(
getClass().getName() + " Cet element est deja visualise");
}
***************
*** 472,476 ****
return r;
}
! protected BuLabel addLabel(String _l) {
return addLabel(this, _l);
}
--- 472,476 ----
return r;
}
! public BuLabel addLabel(String _l) {
return addLabel(this, _l);
}
***************
*** 481,499 ****
return r;
}
! protected BuTextField addLabelDoubleText(String _label) {
return addLabelDoubleText(this, _label);
}
! protected BuTextField addLabelDoubleText(Container _c, String _label) {
addLabel(_c, _label);
return addDoubleText(_c);
}
! protected BuTextField addLabelIntegerText(String _label) {
return addLabelIntegerText(this, _label);
}
! protected BuTextField addLabelIntegerText(Container _c, String _label) {
addLabel(_c, _label);
return addIntegerText(_c);
}
! protected BuTextField addLabelStringText(String _label) {
addLabel(_label);
return addStringText();
--- 481,499 ----
return r;
}
! public BuTextField addLabelDoubleText(String _label) {
return addLabelDoubleText(this, _label);
}
! public BuTextField addLabelDoubleText(Container _c, String _label) {
addLabel(_c, _label);
return addDoubleText(_c);
}
! public BuTextField addLabelIntegerText(String _label) {
return addLabelIntegerText(this, _label);
}
! public BuTextField addLabelIntegerText(Container _c, String _label) {
addLabel(_c, _label);
return addIntegerText(_c);
}
! public BuTextField addLabelStringText(String _label) {
addLabel(_label);
return addStringText();
***************
*** 515,518 ****
--- 515,527 ----
return r;
}
+ protected BuTextField addDoubleText(String _d) {
+ return addDoubleText(this, _d);
+ }
+
+ protected BuTextField addDoubleText(Container _c, String _d) {
+ BuTextField r= addDoubleText(_c);
+ r.setText(_d);
+ return r;
+ }
protected BuTextField addStringText() {
return addStringText(this);
***************
*** 535,539 ****
return addIntegerText(this);
}
! protected BuTextField addIntegerText(Container _c) {
BuTextField r= new BuTextField(20);
r.setCharValidator(BuCharValidator.INTEGER);
--- 544,548 ----
return addIntegerText(this);
}
! public BuTextField addIntegerText(Container _c) {
BuTextField r= new BuTextField(20);
r.setCharValidator(BuCharValidator.INTEGER);
***************
*** 543,546 ****
--- 552,587 ----
return r;
}
+
+ public BuTextField addLongText(Container _c) {
+ BuTextField r= new BuTextField(20);
+ r.setCharValidator(BuCharValidator.LONG);
+ r.setStringValidator(BuStringValidator.LONG);
+ r.setValueValidator(BuValueValidator.LONG);
+ _c.add(r);
+ return r;
+ }
+
+ public BuTextField addLongText() {
+ return addLongText(this);
+ }
+
+ protected BuTextField addLongText(Container _c, String _d) {
+ BuTextField r= addLongText(_c);
+ r.setText(_d);
+ return r;
+ }
+
+ protected BuTextField addLongText(Container _c, long _d) {
+ return addLongText(_c, Long.toString(_d));
+ }
+
+ protected BuTextField addLongText(String _d) {
+ return addLongText(this, _d);
+ }
+
+ protected BuTextField addLongText(long _d) {
+ return addLongText(this, _d);
+ }
+
protected BuTextField addIntegerText(int _d) {
return addIntegerText(this, _d);
***************
*** 549,552 ****
--- 590,603 ----
BuTextField r= addIntegerText(_c);
r.setText(_d + "");
+ return r;
+ }
+
+ protected BuTextField addIntegerText(String _d) {
+ return addIntegerText(this, _d);
+ }
+
+ protected BuTextField addIntegerText(Container _c, String _d) {
+ BuTextField r= addIntegerText(_c);
+ r.setText(_d);
return r;
}
|
|
From: <de...@us...> - 2003-12-19 12:06:44
|
Update of /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/calque/action
In directory sc8-pr-cvs1:/tmp/cvs-serv28248/calque/action
Modified Files:
EbliPaletteAction.java
Log Message:
Correction bogue bgraphe
Ajout support graphe ( suivi souris)
Index: EbliPaletteAction.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/calque/action/EbliPaletteAction.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** EbliPaletteAction.java 11 Dec 2003 12:41:52 -0000 1.3
--- EbliPaletteAction.java 19 Dec 2003 12:06:41 -0000 1.4
***************
*** 23,26 ****
--- 23,28 ----
import javax.swing.JComponent;
import javax.swing.JInternalFrame;
+ import javax.swing.SwingUtilities;
+
import com.memoire.bu.BuButton;
import com.memoire.bu.BuDesktop;
***************
*** 33,37 ****
extends EbliChangeStateAction
implements VetoableChangeListener {
! private BuPalette window_;
public EbliPaletteAction(
String name,
--- 35,39 ----
extends EbliChangeStateAction
implements VetoableChangeListener {
! protected BuPalette window_;
public EbliPaletteAction(
String name,
***************
*** 46,52 ****
_c.setVisible(false);
}
! /**
! * Methode appele lorsque le bouton de cette palette change d'état (visible ou non).
! */
public void setMainButtonVisible(boolean _b) {
if (_b && isSelected())
--- 48,54 ----
_c.setVisible(false);
}
! /**
! * Methode appele lorsque le bouton de cette palette change d'état (visible ou non).
! */
public void setMainButtonVisible(boolean _b) {
if (_b && isSelected())
***************
*** 65,70 ****
}
}
!
! public JComponent getPaletteContent(){
return window_.getContent();
}
--- 67,72 ----
}
}
!
! public JComponent getPaletteContent() {
return window_.getContent();
}
***************
*** 100,107 ****
return window_.getPreferredSize();
}
!
! public void updateBeforeShow(){
!
! }
private void showWindow() {
if (loc_ == null) {
--- 102,107 ----
return window_.getPreferredSize();
}
!
! public void updateBeforeShow() {}
private void showWindow() {
if (loc_ == null) {
***************
*** 127,130 ****
--- 127,132 ----
}
private void hideWindow() {
+ if (!window_.isVisible())
+ return;
loc_= window_.getLocation();
window_.setVisible(false);
***************
*** 132,136 ****
window_.revalidate();
if (desktop_ != null)
! desktop_.removeInternalFrame(window_);
}
/**
--- 134,146 ----
window_.revalidate();
if (desktop_ != null)
! if (SwingUtilities.isEventDispatchThread())
! desktop_.removeInternalFrame(window_);
! else {
! SwingUtilities.invokeLater(new Runnable() {
! public void run() {
! desktop_.removeInternalFrame(window_);
! }
! });
! }
}
/**
|
|
From: <de...@us...> - 2003-12-19 12:00:44
|
Update of /cvsroot/fudaa/fudaa_devel/ctulu/src/org/fudaa/ctulu
In directory sc8-pr-cvs1:/tmp/cvs-serv26970a
Modified Files:
CtuluLib.java
Log Message:
General update
Index: CtuluLib.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/ctulu/src/org/fudaa/ctulu/CtuluLib.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** CtuluLib.java 12 Dec 2003 10:29:47 -0000 1.1
--- CtuluLib.java 19 Dec 2003 12:00:41 -0000 1.2
***************
*** 45,48 ****
--- 45,112 ----
}
+ public static long getDuration(
+ int _y,
+ int _m,
+ int _d,
+ int _h,
+ int _min,
+ int _s) {
+ return (long)_s
+ + (long)_min * 60l
+ + (long)_h * 3600l
+ + (long)_d * 86400
+ + (long)_m * 86400l * 30l
+ + (long)_y * 365l * 86400l;
+ }
+
+ /**
+ * initialise <code>_containter</code> avec [year,month,day,hour,minut,sec]:
+ * le tableau DOIT contenir au moins 6 rangs.
+ */
+ public static void getYearMonthDayTime(int[] _container, long _s) {
+ long d= 365 * 86400;
+ long timeRest= _s;
+ long value= timeRest / d;
+ _container[0]= (int)value;
+ if (value > 0) {
+ timeRest= timeRest - value * d;
+ }
+ d= 30 * 86400;
+ value= timeRest / d;
+ _container[1]= (int)value;
+ if (value > 0) {
+ timeRest= timeRest - value * d;
+ }
+ d= 86400;
+ value= timeRest / d;
+ _container[2]= (int)value;
+ if (value > 0) {
+ timeRest= timeRest - value * d;
+ }
+ d= 3600;
+ value= timeRest / d;
+ _container[3]= (int)value;
+ if (value > 0) {
+ timeRest= timeRest - value * d;
+ }
+ d= 60;
+ value= timeRest / d;
+ _container[4]= (int)value;
+ if (value > 0) {
+ timeRest= timeRest - value * d;
+ }
+ _container[5]= (int)timeRest;
+ }
+
+ /**
+ * @return un tableau a 6 rangee [year,month,day,hour,minut,sec] calcule a partir
+ * du temps _s
+ */
+ public static int[] getYearMonthDayTime(long _s) {
+ int[] r= new int[6];
+ getYearMonthDayTime(r, _s);
+ return r;
+ }
+
/**
*
***************
*** 105,109 ****
return getConanicalPathFile(new File(_baseDir, _path));
}
!
/**
* Renvoie le chemin canonique du fichier _f. Si une exception est levee
--- 169,173 ----
return getConanicalPathFile(new File(_baseDir, _path));
}
!
/**
* Renvoie le chemin canonique du fichier _f. Si une exception est levee
***************
*** 133,137 ****
return path;
}
!
/**
* Cherche l'index de la chaine <code>_string</code>
--- 197,201 ----
return path;
}
!
/**
* Cherche l'index de la chaine <code>_string</code>
***************
*** 153,157 ****
return -1;
}
!
/**
* Perment de déterminer le chemin relatif de _destFile par rapport a _baseDir. L'entier
--- 217,221 ----
return -1;
}
!
/**
* Perment de déterminer le chemin relatif de _destFile par rapport a _baseDir. L'entier
***************
*** 204,207 ****
--- 268,282 ----
}
+ public static void main(String[] args) {
+ int[] ymht=
+ getYearMonthDayTime(
+ 3600 * 3 + 60 * 4 + 1 + 3600 * 24 * 1 + 3600 * 24 * 30 * 18);
+ System.out.println("y=" + ymht[0]);
+ System.out.println("m=" + ymht[1]);
+ System.out.println("d=" + ymht[2]);
+ System.out.println("h=" + ymht[3]);
+ System.out.println("min=" + ymht[4]);
+ System.out.println("s=" + ymht[5]);
+ }
}
|
|
From: <jm_...@us...> - 2003-12-18 11:25:39
|
Update of /cvsroot/fudaa//fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper
In directory sc8-pr-cvs1:/tmp/cvs-serv19224/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper
Modified Files:
Hydraulique1dIHM_Profil.java
Log Message:
Correction bug trie des profils.
Index: Hydraulique1dIHM_Profil.java
===================================================================
RCS file: /cvsroot/fudaa//fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHM_Profil.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Hydraulique1dIHM_Profil.java 25 Nov 2003 10:13:47 -0000 1.4
--- Hydraulique1dIHM_Profil.java 18 Dec 2003 11:25:36 -0000 1.5
***************
*** 169,173 ****
/* Hydraulique1dTableauBaseModel model
=((Hydraulique1dTableauBaseModel)table.getModel());
!
model.restreintA(0,table.getRowCount()); */
//on sait que le profil est ajoute en premiere position
--- 169,173 ----
/* Hydraulique1dTableauBaseModel model
=((Hydraulique1dTableauBaseModel)table.getModel());
!
model.restreintA(0,table.getRowCount()); */
//on sait que le profil est ajoute en premiere position
***************
*** 185,215 ****
} else if ("TRIER".equals(cmdDL)) {
if (bief != null) {
! /* System.out.println("trie");
! IObjet select=table.getSelectedObject();
! IProfil p=null;
! if(select!=null)
! {
! p=(IProfil)select;
! }
! if(p!=null) System.out.println("p non nul");
! bief.profils(bief.profils());
! table.repaint();
! int nb=table.getRowCount();
! int n=0;
! IProfil o;
! Hydraulique1dTableauBaseModel model
! =((Hydraulique1dTableauBaseModel)table.getModel());
! for(int i=nb-1;i>=0;i--)
! {
! o=(IProfil)model.getObject(i);
! if(o.egale(p)) n=i;
! break;
! }
! JComponent parent=(JComponent)table.getParent();
! if(parent!=null)
! {
! if(JScrollPane.class.isInstance(parent.getParent()))
! ((JScrollPane)parent.getParent()).getVerticalScrollBar().setValue(n);
! } */
bief.profils(bief.profils());
table.removeRowSelectionInterval(0, table.getRowCount() - 1);
--- 185,189 ----
} else if ("TRIER".equals(cmdDL)) {
if (bief != null) {
! System.out.println("trie");
bief.profils(bief.profils());
table.removeRowSelectionInterval(0, table.getRowCount() - 1);
|
|
From: <jm_...@us...> - 2003-12-18 11:25:39
|
Update of /cvsroot/fudaa//fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d
In directory sc8-pr-cvs1:/tmp/cvs-serv19224/dodico/src/org/fudaa/dodico/hydraulique1d
Modified Files:
DBief.java
Log Message:
Correction bug trie des profils.
Index: DBief.java
===================================================================
RCS file: /cvsroot/fudaa//fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/DBief.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** DBief.java 18 Dec 2003 09:40:20 -0000 1.8
--- DBief.java 18 Dec 2003 11:25:36 -0000 1.9
***************
*** 160,170 ****
public void profils(IProfil[] s, boolean _trie) {
if (egale(profils_ , s)) {
miseAJourExtremite();
! return;
}
- profils_= s;
- if (_trie)
- trieProfils();
- CDodico.findUsine().fireObjetModifie(toString(), tie(), "profils");
}
private IExtremite extrAval_;
--- 160,173 ----
public void profils(IProfil[] s, boolean _trie) {
if (egale(profils_ , s)) {
+ if (_trie)
+ trieProfils();
miseAJourExtremite();
! } else {
! profils_= s;
! if (_trie)
! trieProfils();
! miseAJourExtremite();
! CDodico.findUsine().fireObjetModifie(toString(), tie(), "profils");
}
}
private IExtremite extrAval_;
***************
*** 748,752 ****
return;
Arrays.sort(profils_, DProfil.COMPARATOR);
- miseAJourExtremite();
}
private void miseAJourExtremite() {
--- 751,754 ----
|