You can subscribe to this list here.
| 2003 |
Jan
|
Feb
(89) |
Mar
(219) |
Apr
(82) |
May
(33) |
Jun
(11) |
Jul
(129) |
Aug
(357) |
Sep
(34) |
Oct
(37) |
Nov
(42) |
Dec
(182) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(59) |
Feb
(74) |
Mar
(196) |
Apr
(205) |
May
(109) |
Jun
(268) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/telemac
In directory sc8-pr-cvs1:/tmp/cvs-serv11020/tr/telemac
Modified Files:
TrDicoProjet.java TrTelemacImplHelper.java
TrTelemacParametres.java TrTelemacProjet.java
Log Message:
Maj tr
Index: TrDicoProjet.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/telemac/TrDicoProjet.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TrDicoProjet.java 4 Jul 2003 15:37:05 -0000 1.1
--- TrDicoProjet.java 18 Aug 2003 11:54:43 -0000 1.2
***************
*** 13,19 ****
import org.fudaa.dodico.commun.ProgressionInterface;
! import org.fudaa.dodico.dico.DicoCasFileFormat;
- import org.fudaa.fudaa.commun.FudaaCommonImplementation;
import org.fudaa.fudaa.dico.FDicoParams;
import org.fudaa.fudaa.dico.FDicoProjet;
--- 13,19 ----
import org.fudaa.dodico.commun.ProgressionInterface;
! import org.fudaa.dodico.dico.DicoCasFileFormatVersion;
! import org.fudaa.dodico.fichiers.FileFormatSoftware;
import org.fudaa.fudaa.dico.FDicoParams;
import org.fudaa.fudaa.dico.FDicoProjet;
***************
*** 44,48 ****
public static TrDicoProjet init(
File _file,
! DicoCasFileFormat _fileFormat,
ProgressionInterface _progress,TrImplementation _ui)
{
--- 44,48 ----
public static TrDicoProjet init(
File _file,
! DicoCasFileFormatVersion _fileFormat,
ProgressionInterface _progress,TrImplementation _ui)
{
***************
*** 65,69 ****
public String getID()
{
! return TrProjet.TELEMAC_DICO_ID;
}
--- 65,69 ----
public String getID()
{
! return FileFormatSoftware.DICO_IS.name;
}
Index: TrTelemacImplHelper.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacImplHelper.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TrTelemacImplHelper.java 4 Jul 2003 15:34:57 -0000 1.2
--- TrTelemacImplHelper.java 18 Aug 2003 11:54:43 -0000 1.3
***************
*** 9,22 ****
package org.fudaa.fudaa.tr.telemac;
- import java.awt.event.ActionEvent;
import java.io.File;
import javax.swing.ComboBoxModel;
- import javax.swing.DefaultComboBoxModel;
- import javax.swing.JComboBox;
- import com.memoire.bu.BuBorderLayout;
import com.memoire.bu.BuComboBox;
- import com.memoire.bu.BuDialogChoice;
import com.memoire.bu.BuGridLayout;
import com.memoire.bu.BuLabel;
--- 9,17 ----
***************
*** 24,43 ****
import com.memoire.bu.BuTaskOperation;
- import org.fudaa.dodico.commun.DodicoPreferences;
import org.fudaa.dodico.commun.ProgressionBuAdapter;
import org.fudaa.dodico.dico.DicoCasFileFormat;
import org.fudaa.dodico.dico.DicoLanguage;
import org.fudaa.dodico.dico.DicoManager;
import org.fudaa.dodico.dico.DicoModelAbstract;
import org.fudaa.dodico.telemac.TelemacDicoManager;
! import org.fudaa.dodico.telemac.io.TelemacCasFileFormat;
import org.fudaa.ebli.dialog.EbliSimpleDialogPanel;
! import org.fudaa.fudaa.commun.FudaaLib;
! import org.fudaa.fudaa.commun.exec.FudaaExecServerManager;
import org.fudaa.fudaa.ressource.FudaaResource;
import org.fudaa.fudaa.tr.TrImplHelper;
import org.fudaa.fudaa.tr.TrImplementation;
- import org.fudaa.fudaa.tr.TrPreferences;
- import org.fudaa.fudaa.tr.TrProjet;
/**
--- 19,37 ----
import com.memoire.bu.BuTaskOperation;
import org.fudaa.dodico.commun.ProgressionBuAdapter;
import org.fudaa.dodico.dico.DicoCasFileFormat;
+ import org.fudaa.dodico.dico.DicoCasFileFormatVersion;
import org.fudaa.dodico.dico.DicoLanguage;
import org.fudaa.dodico.dico.DicoManager;
import org.fudaa.dodico.dico.DicoModelAbstract;
+ import org.fudaa.dodico.fichiers.FileFormatSoftware;
import org.fudaa.dodico.telemac.TelemacDicoManager;
! import org.fudaa.dodico.telemac.io.Telemac2dFileFormat;
!
import org.fudaa.ebli.dialog.EbliSimpleDialogPanel;
!
import org.fudaa.fudaa.ressource.FudaaResource;
import org.fudaa.fudaa.tr.TrImplHelper;
import org.fudaa.fudaa.tr.TrImplementation;
/**
***************
*** 79,83 ****
TrTelemacProjet.init(
_fic,
! TelemacCasFileFormat.getInstance(),
new ProgressionBuAdapter(this),
getImpl());
--- 73,77 ----
TrTelemacProjet.init(
_fic,
! (Telemac2dFileFormat.TelemacVersion)Telemac2dFileFormat.getInstance().getLastVersionImpl(),
new ProgressionBuAdapter(this),
getImpl());
***************
*** 118,122 ****
_ouvrir(
fic,
! (DicoManager.DicoDescription) descModel.getSelectedItem(),
langModel.getSelectedLanguage());
}
--- 112,116 ----
_ouvrir(
fic,
! (DicoCasFileFormat) descModel.getSelectedItem(),
langModel.getSelectedLanguage());
}
***************
*** 128,143 ****
private void _ouvrir(
final File _fic,
! final DicoManager.DicoDescription _des,
final int _language)
{
if (_fic != null)
{
! new BuTaskOperation(impl_, "import fichier cas pour " + _des.getName())
{
public void act()
{
! DicoModelAbstract m =
! TelemacDicoManager.getINSTANCE().createDico(_des, _language);
if (m == null)
getImpl().error(
--- 122,137 ----
private void _ouvrir(
final File _fic,
! final DicoCasFileFormat _ft,
final int _language)
{
if (_fic != null)
{
! new BuTaskOperation(impl_, "import fichier cas pour " + _ft.getName())
{
public void act()
{
+ DicoCasFileFormatVersion version=_ft.getLastVersionImpl(_language);
! DicoModelAbstract m =_ft.getLastVersionImpl().getDico();
if (m == null)
getImpl().error(
***************
*** 145,149 ****
else
{
! TrDicoProjet projet = TrDicoProjet.init(_fic,new DicoCasFileFormat(m),new ProgressionBuAdapter(this), getImpl());
setProgression(90);
if (projet != null)
--- 139,143 ----
else
{
! TrDicoProjet projet = TrDicoProjet.init(_fic,version,new ProgressionBuAdapter(this), getImpl());
setProgression(90);
if (projet != null)
***************
*** 163,167 ****
public String getID()
{
! return TrProjet.TELEMAC_ID;
}
--- 157,161 ----
public String getID()
{
! return FileFormatSoftware.TELEMAC_IS.name;
}
***************
*** 172,181 ****
{
BuMenuItem r0 = new BuMenuItem("Projet dico");
! r0.setActionCommand(impl_.PREF_OUVRIR + TrProjet.TELEMAC_DICO_ID);
BuMenuItem r =
new BuMenuItem(
FudaaResource.FUDAA.getToolIcon("appli/reflux"),
"Projet Reflux");
! r.setActionCommand(impl_.PREF_OUVRIR + TrProjet.REFLUX_ID);
return new BuMenuItem[] { r0, r };
}
--- 166,175 ----
{
BuMenuItem r0 = new BuMenuItem("Projet dico");
! r0.setActionCommand(impl_.PREF_OUVRIR + FileFormatSoftware.TELEMAC_IS.name);
BuMenuItem r =
new BuMenuItem(
FudaaResource.FUDAA.getToolIcon("appli/reflux"),
"Projet Reflux");
! r.setActionCommand(impl_.PREF_OUVRIR + FileFormatSoftware.TELEMAC_IS.name);
return new BuMenuItem[] { r0, r };
}
Index: TrTelemacParametres.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacParametres.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TrTelemacParametres.java 4 Jul 2003 15:34:57 -0000 1.2
--- TrTelemacParametres.java 18 Aug 2003 11:54:43 -0000 1.3
***************
*** 9,34 ****
package org.fudaa.fudaa.tr.telemac;
import java.io.File;
import java.util.Map;
- import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.commun.ProgressionInterface;
- import org.fudaa.dodico.corba.tr.LTrCodeCalcul;
- import org.fudaa.dodico.corba.tr.STrProjetH2d;
import org.fudaa.dodico.dico.DicoCasFileFormat;
! import org.fudaa.dodico.dico.DicoModelAbstract;
! import org.fudaa.dodico.dico.DicoParamsListener;
import org.fudaa.dodico.fichiers.FileOperationSynthese;
import org.fudaa.dodico.h2d.H2dLib;
! import org.fudaa.dodico.h2d.H2dParametres;
import org.fudaa.dodico.telemac.io.SerafinInterface;
import org.fudaa.dodico.telemac.io.TelemacCLInterface;
! import org.fudaa.dodico.telemac.io.TelemacCasFileFormat;
import org.fudaa.dodico.telemac.io.TelemacLiquideInterface;
! import org.fudaa.fudaa.tr.TrLib;
import org.fudaa.fudaa.commun.FudaaUI;
- import org.fudaa.fudaa.dico.FDicoEntiteFile;
- import org.fudaa.fudaa.dico.FDicoMultiEntiteViewer;
import org.fudaa.fudaa.dico.FDicoParams;
/**
--- 9,35 ----
package org.fudaa.fudaa.tr.telemac;
+ import gnu.trove.TObjectLongHashMap;
+
import java.io.File;
import java.util.Map;
import org.fudaa.dodico.commun.ProgressionInterface;
import org.fudaa.dodico.dico.DicoCasFileFormat;
! import org.fudaa.dodico.dico.DicoCasFileFormatVersion;
! import org.fudaa.dodico.dico.DicoCasInterface;
! import org.fudaa.dodico.dico.DicoEntiteFile;
import org.fudaa.dodico.fichiers.FileOperationSynthese;
import org.fudaa.dodico.h2d.H2dLib;
! import org.fudaa.dodico.h2d.H2dMaillage;
! import org.fudaa.dodico.reflux.io.CorEleBthInterface;
! import org.fudaa.dodico.telemac.io.TelemacLib;
import org.fudaa.dodico.telemac.io.SerafinInterface;
import org.fudaa.dodico.telemac.io.TelemacCLInterface;
! import org.fudaa.dodico.telemac.io.Telemac2dFileFormat;
import org.fudaa.dodico.telemac.io.TelemacLiquideInterface;
!
import org.fudaa.fudaa.commun.FudaaUI;
import org.fudaa.fudaa.dico.FDicoParams;
+ import org.fudaa.fudaa.tr.TrLib;
/**
***************
*** 36,86 ****
* @version $Id$
*/
! public class TrTelemacParametres
! {
! FDicoParams dicoParams_;
! FudaaUI ui_;
! protected TrTelemacParametres(FDicoParams _dicoParams,FudaaUI _ui)
! {
! dicoParams_=_dicoParams;
! ui_=_ui;
}
!
public static TrTelemacParametres init(
! File _file,
! TelemacCasFileFormat _ft,
! ProgressionInterface _progress,
! FudaaUI _ui)
! {
! FDicoParams dicoParams_=FDicoParams.init(_file, _ft, _progress, _ui);
! if(dicoParams_!=null)
! {
! return new TrTelemacParametres(dicoParams_,_ui);
}
! return null;
}
!
! public boolean isValide()
! {
! return dicoParams_.isValide();
}
-
-
! public FDicoParams getDicoParams()
! {
! return dicoParams_;
}
! public TelemacCasFileFormat getTelemacFileFormat()
! {
! return (TelemacCasFileFormat)( dicoParams_.getFileFormat());
}
-
-
! public boolean loadAll(ProgressionInterface _prg)
! {
return loadGeometrie(_prg)
&& loadConditionsLimite(_prg)
--- 37,97 ----
* @version $Id$
*/
! public class TrTelemacParametres extends FDicoParams {
! H2dMaillage maillage_;
!
! protected TrTelemacParametres(
! File _file,
! DicoCasFileFormatVersion _ft,
! Map _initialSetValues,
! long _timeloaded) {
! super(_file, _ft, _initialSetValues, _timeloaded);
}
!
public static TrTelemacParametres init(
! File _file,
! Telemac2dFileFormat.TelemacVersion _ft,
! ProgressionInterface _progress,
! FudaaUI _ui) {
! FileOperationSynthese op= new FileOperationSynthese();
! DicoCasInterface inter= _ft.readCas(_file, op, _progress);
! if (_ui != null)
! _ui.manageErrorOperation(op);
! if (inter == null)
! return null;
! if ((inter.getInputs() == null) || (inter.getInputs().size() == 0)) {
! if (_ui != null)
! _ui.error(
! "Format inconnu !",
! "Ce fichier n'est pas reconnu (fichier vide)");
! return null;
}
! TrTelemacParametres r=
! new TrTelemacParametres(_file, _ft, inter.getInputs(), op.getOpTime());
! r.setUI(_ui);
! return r;
}
!
!
! public CorEleBthInterface createCorEleBthInterface(ProgressionInterface _prog) {
! CorEleBthInterface r= null;
! if (maillage_ == null)
! loadGeometrie(_prog);
! return r;
}
! public boolean isValide() {
! return dicoParams_.isValide();
}
! public FDicoParams getFDicoParams() {
! return this;
}
+ public Telemac2dFileFormat.TelemacVersion getTelemacFileFormatVersion() {
+ return (Telemac2dFileFormat.TelemacVersion) (getFileFormatVersion());
+ }
! public boolean loadAll(ProgressionInterface _prg) {
return loadGeometrie(_prg)
&& loadConditionsLimite(_prg)
***************
*** 88,97 ****
}
! public boolean loadGeometrie(ProgressionInterface _prg)
! {
! FDicoEntiteFile entFile =
! dicoParams_.getSpecialFileEntite(TelemacCasFileFormat.FICHIER_GEOMETRIE);
! if (entFile == null)
! {
ui_.error(
"Fichier de maillage",
--- 99,112 ----
}
! public boolean loadGeometrie(ProgressionInterface _prg) {
! if (maillage_ != null) {
! ui_.error(
! "Maillage deja present",
! TrLib.geti18n("Un maillage est déjà présent."));
! return false;
! }
!
! DicoEntiteFile entFile=dicoParams_.getFileEntite(getTelemacFileFormatVersion().getMaillageEntiteFile());
! if (entFile == null) {
ui_.error(
"Fichier de maillage",
***************
*** 99,106 ****
return false;
}
! FileOperationSynthese op = new FileOperationSynthese();
! SerafinInterface sInter =
! getTelemacFileFormat().getDefaultSerafinFormat().read(
! dicoParams_.getFile(entFile),
op,
_prg);
--- 114,121 ----
return false;
}
! FileOperationSynthese op= new FileOperationSynthese();
! SerafinInterface sInter=
! getTelemacFileFormatVersion().getDefaultSerafinFormat().read(
! getFile(entFile),
op,
_prg);
***************
*** 108,137 ****
if (sInter == null)
return false;
! String fond =
! getTelemacFileFormat().getDefaultSerafinFormat().getVariableFond();
! int numVariable = DodicoLib.findObject(sInter.getVariables(), fond);
! if (numVariable < 0)
! {
//pour l'instant
ui_.error("Maillage", "bathymétrie non trouvée variable FOND ou es-tu ?");
return false;
}
! int nbPasTemps = sInter.getNbPasDeTemps();
! if (nbPasTemps > 1)
! {
System.out.println("la variable à t=0 sera prise");
}
! double[] fondValues = sInter.getDonnees(0, numVariable);
! // projet_.maillage = sInter.getMaillage();
! // return H2dLib.setBathymetrie(projet_.maillage, fondValues);
! return true;
}
! public boolean loadConditionsLimite(ProgressionInterface _prg)
! {
! FDicoEntiteFile entFile =
! dicoParams_.getSpecialFileEntite(TelemacCasFileFormat.FICHIER_CL);
! if (entFile == null)
! {
ui_.error(
"Conditions limites",
--- 123,152 ----
if (sInter == null)
return false;
! String fond=
! getTelemacFileFormatVersion().getDefaultSerafinFormat().getVariableFond();
! int numVariable= TelemacLib.contientVariable(sInter, fond);
! if (numVariable < 0) {
//pour l'instant
ui_.error("Maillage", "bathymétrie non trouvée variable FOND ou es-tu ?");
return false;
}
! int nbPasTemps= sInter.getNbPasDeTemps();
! if (nbPasTemps > 1) {
System.out.println("la variable à t=0 sera prise");
}
! //DEBUG A CONTINUER
! // double[] fondValues = sInter.getDonnees(0, numVariable);
! // projet_.maillage = sInter.getMaillage();
! // return H2dLib.setBathymetrie(projet_.maillage, fondValues);
! maillage_= sInter.getMaillage();
! H2dMaillage.computeBord(maillage_, sInter.getPtsFrontiere(), _prg);
!
! return true;
}
! public boolean loadConditionsLimite(ProgressionInterface _prg) {
! DicoEntiteFile entFile=
! dicoParams_.getFileEntite(getTelemacFileFormatVersion().getCLEntiteFile());
! if (entFile == null) {
ui_.error(
"Conditions limites",
***************
*** 140,147 ****
return false;
}
! FileOperationSynthese op = new FileOperationSynthese();
! TelemacCLInterface inter =
! getTelemacFileFormat().getDefaultTelemacCLFormat().read(
! dicoParams_.getFile(entFile),
op,
_prg);
--- 155,162 ----
return false;
}
! FileOperationSynthese op= new FileOperationSynthese();
! TelemacCLInterface inter=
! getTelemacFileFormatVersion().getDefaultTelemacCLFormat().read(
! getFile(entFile),
op,
_prg);
***************
*** 149,177 ****
if (inter == null)
return false;
! // projet_.conditionsLimites = inter.getLines();
return true;
}
! public void saveCas(ProgressionInterface _progress)
! {
! dicoParams_.saveCas(_progress);
}
! public void saveAs(File _f, ProgressionInterface _prg)
! {
! dicoParams_.saveAs(_f, _prg);
}
! public void saveCopy(File _f, ProgressionInterface _prg)
! {
! dicoParams_.saveCopy(_f, _prg);
}
! public boolean loadConditionsLimiteLiquide(ProgressionInterface _prg)
! {
! FDicoEntiteFile entFile =
! dicoParams_.getSpecialFileEntite(TelemacCasFileFormat.FICHIER_CL_LIQUIDE);
! if (entFile == null)
! {
ui_.error(
"Frontières Liquides",
--- 164,187 ----
if (inter == null)
return false;
! // projet_.conditionsLimites = inter.getLines();
return true;
}
! public void saveCas(ProgressionInterface _progress) {
! super.saveCas(_progress);
}
! public void saveAs(File _f, ProgressionInterface _prg) {
! super.saveAs(_f, _prg);
}
! public void saveCopy(File _f, ProgressionInterface _prg) {
! super.saveCopy(_f, _prg);
}
! public boolean loadConditionsLimiteLiquide(ProgressionInterface _prg) {
! DicoEntiteFile entFile=
! dicoParams_.getFileEntite(getTelemacFileFormatVersion().getCLLiquideEntiteFile());
! if (entFile == null) {
ui_.error(
"Frontières Liquides",
***************
*** 180,187 ****
return false;
}
! FileOperationSynthese op = new FileOperationSynthese();
! TelemacLiquideInterface inter =
! getTelemacFileFormat().getDefaultTelemacLiquideFormat().read(
! dicoParams_.getFile(entFile),
op,
_prg);
--- 190,197 ----
return false;
}
! FileOperationSynthese op= new FileOperationSynthese();
! TelemacLiquideInterface inter=
! getTelemacFileFormatVersion().getDefaultTelemacLiquideFormat().read(
! getFile(entFile),
op,
_prg);
***************
*** 190,210 ****
return false;
//projet_.evolutionFrontieresLiquides =
! //inter.getEvolutionsFrontieresLiquides();
return true;
}
! public boolean loadFond(ProgressionInterface _prg)
! {
ui_.error("Programme", "non supporté pour l'instant");
return false;
}
!
! public File getFileCas()
! {
! return dicoParams_.getMainFile();
}
-
// public TableModel getEntiteTableModel()
// {
--- 200,216 ----
return false;
//projet_.evolutionFrontieresLiquides =
! //inter.getEvolutionsFrontieresLiquides();
return true;
}
! public boolean loadFond(ProgressionInterface _prg) {
ui_.error("Programme", "non supporté pour l'instant");
return false;
}
! public File getFileCas() {
! return getMainFile();
}
// public TableModel getEntiteTableModel()
// {
***************
*** 230,267 ****
// }
! // /**
! // *
! // */
! // public void init(
! // File _fichierPrinc,
! // DicoCasFileFormat _ft,
! // Map _initialSetValues,
! // long _timeloaded,
! // boolean _launchEvent)
! // {
! // if(_ft instanceof TelemacCasFileFormat)
! // {
! // init(_fichierPrinc, (TelemacCasFileFormat)_ft, _initialSetValues, _timeloaded, _launchEvent);
! // }
! // else
! //
! // ui_.error("Format telemac 2d uniquement");
! // }
! //
! // public void init(
! // File _fichierPrinc,
! // TelemacCasFileFormat _ft,
! // Map _initialSetValues,
! // long _timeloaded,
! // boolean _launchEvent)
! // {
! // super.init(
! // _fichierPrinc,
! // _ft,
! // _initialSetValues,
! // _timeloaded,
! // _launchEvent);
! // }
!
}
--- 236,272 ----
// }
! // /**
! // *
! // */
! // public void init(
! // File _fichierPrinc,
! // DicoCasFileFormat _ft,
! // Map _initialSetValues,
! // long _timeloaded,
! // boolean _launchEvent)
! // {
! // if(_ft instanceof TelemacCasFileFormat)
! // {
! // init(_fichierPrinc, (TelemacCasFileFormat)_ft, _initialSetValues, _timeloaded, _launchEvent);
! // }
! // else
! //
! // ui_.error("Format telemac 2d uniquement");
! // }
! //
! // public void init(
! // File _fichierPrinc,
! // TelemacCasFileFormat _ft,
! // Map _initialSetValues,
! // long _timeloaded,
! // boolean _launchEvent)
! // {
! // super.init(
! // _fichierPrinc,
! // _ft,
! // _initialSetValues,
! // _timeloaded,
! // _launchEvent);
! // }
}
Index: TrTelemacProjet.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacProjet.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TrTelemacProjet.java 4 Jul 2003 15:34:57 -0000 1.2
--- TrTelemacProjet.java 18 Aug 2003 11:54:43 -0000 1.3
***************
*** 9,51 ****
package org.fudaa.fudaa.tr.telemac;
- import java.awt.Dimension;
- import java.awt.event.ActionEvent;
- import java.awt.event.ActionListener;
import java.io.File;
- import javax.swing.BorderFactory;
- import javax.swing.JButton;
- import javax.swing.JMenuBar;
-
- import com.memoire.bu.BuBorderLayout;
- import com.memoire.bu.BuButton;
- import com.memoire.bu.BuInformationsDocument;
- import com.memoire.bu.BuInternalFrame;
- import com.memoire.bu.BuMainPanel;
- import com.memoire.bu.BuPanel;
- import com.memoire.bu.BuResource;
- import com.memoire.bu.BuScrollPane;
- import com.memoire.bu.BuTable;
- import com.memoire.bu.BuTaskOperation;
-
- import org.fudaa.dodico.calcul.CalculLauncher;
- import org.fudaa.dodico.commun.ProgressionBuAdapter;
import org.fudaa.dodico.commun.ProgressionInterface;
! import org.fudaa.dodico.dico.DicoCasFileFormat;
! import org.fudaa.dodico.dico.DicoCasInterface;
! import org.fudaa.dodico.dico.DicoParamsListener;
! import org.fudaa.dodico.fichiers.FileOperationSynthese;
! import org.fudaa.dodico.h2d.H2dParametres;
! import org.fudaa.dodico.telemac.io.TelemacCasFileFormat;
import org.fudaa.fudaa.commun.FudaaUI;
- import org.fudaa.fudaa.commun.FudaaLib;
- import org.fudaa.fudaa.commun.calcul.FudaaCalculAction;
- import org.fudaa.fudaa.dico.FDicoCalculLocal;
- import org.fudaa.fudaa.dico.FDicoComparator;
- import org.fudaa.fudaa.dico.FDicoFilleProjet;
import org.fudaa.fudaa.dico.FDicoParams;
- import org.fudaa.fudaa.dico.FDicoProjet;
import org.fudaa.fudaa.dico.FDicoProjetAbstract;
- import org.fudaa.fudaa.dico.FDicoProjetInterface;
import org.fudaa.fudaa.tr.TrImplementation;
import org.fudaa.fudaa.tr.TrProjet;
--- 9,21 ----
package org.fudaa.fudaa.tr.telemac;
import java.io.File;
import org.fudaa.dodico.commun.ProgressionInterface;
! import org.fudaa.dodico.fichiers.FileFormatSoftware;
! import org.fudaa.dodico.telemac.io.Telemac2dFileFormat;
!
import org.fudaa.fudaa.commun.FudaaUI;
import org.fudaa.fudaa.dico.FDicoParams;
import org.fudaa.fudaa.dico.FDicoProjetAbstract;
import org.fudaa.fudaa.tr.TrImplementation;
import org.fudaa.fudaa.tr.TrProjet;
***************
*** 55,100 ****
* @version $Id$
*/
! public class TrTelemacProjet
! extends FDicoProjetAbstract implements TrProjet
!
! {
TrTelemacParametres params_;
! public TrTelemacProjet(TrTelemacParametres _params,TrImplementation _impl)
! {
! super( _impl);
! params_=_params;
! if(isValide()) actions_.setEnableCalcul(true);
}
!
! public final boolean isValide()
! {
return params_.isValide();
}
! public FudaaUI getUI()
! {
return impl_;
}
!
public static TrTelemacProjet init(
File _file,
! TelemacCasFileFormat _fileFormat,
! ProgressionInterface _progress,TrImplementation _ui)
! {
//TODO: gerer si param deja present
! TrTelemacParametres params_=TrTelemacParametres.init(_file, _fileFormat, _progress, _ui);
! if(params_!=null) return new TrTelemacProjet(params_,_ui);
! else return null;
}
-
-
/**
*
*/
! public String getID()
! {
! return TrProjet.TELEMAC_ID;
}
--- 25,65 ----
* @version $Id$
*/
! public class TrTelemacProjet extends FDicoProjetAbstract implements TrProjet {
TrTelemacParametres params_;
! public TrTelemacProjet(TrTelemacParametres _params, TrImplementation _impl) {
! super(_impl);
! params_= _params;
! if (isValide())
! actions_.setEnableCalcul(true);
}
!
! public final boolean isValide() {
return params_.isValide();
}
! public FudaaUI getUI() {
return impl_;
}
!
public static TrTelemacProjet init(
File _file,
! Telemac2dFileFormat.TelemacVersion _fileFormat,
! ProgressionInterface _progress,
! TrImplementation _ui) {
//TODO: gerer si param deja present
! TrTelemacParametres params_=
! TrTelemacParametres.init(_file, _fileFormat, _progress, _ui);
! if (params_ != null)
! return new TrTelemacProjet(params_, _ui);
! else
! return null;
}
/**
*
*/
! public String getID() {
! return FileFormatSoftware.TELEMAC_IS.name;
}
***************
*** 102,108 ****
*
*/
! public FDicoParams getKeys()
! {
! return params_.getDicoParams();
}
--- 67,72 ----
*
*/
! public FDicoParams getKeys() {
! return params_.getFDicoParams();
}
|
|
From: <de...@us...> - 2003-08-18 12:00:27
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/commun/exec
In directory sc8-pr-cvs1:/tmp/cvs-serv11020/commun/exec
Modified Files:
FudaaAppliExecManager.java
Log Message:
Maj tr
Index: FudaaAppliExecManager.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/commun/exec/FudaaAppliExecManager.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** FudaaAppliExecManager.java 4 Jul 2003 15:13:47 -0000 1.1
--- FudaaAppliExecManager.java 18 Aug 2003 11:54:43 -0000 1.2
***************
*** 117,121 ****
protected void build()
{
- System.out.println("build Menu");
removeAll();
int n = actions_.size();
--- 117,120 ----
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/dico
In directory sc8-pr-cvs1:/tmp/cvs-serv11020/dico
Modified Files:
FDicoFilleProjet.java FDicoParams.java FDicoProjectPanel.java
FDicoProjetAbstract.java FDicoProjetInterface.java
Log Message:
Maj tr
Index: FDicoFilleProjet.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/dico/FDicoFilleProjet.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** FDicoFilleProjet.java 4 Jul 2003 14:44:20 -0000 1.1
--- FDicoFilleProjet.java 18 Aug 2003 11:54:43 -0000 1.2
***************
*** 40,44 ****
"Propriétés",
null,
! new FDicoEntitePanel(_proj.getKeys()),
"Les propriétés");
setContentPane(pane);
--- 40,44 ----
"Propriétés",
null,
! new FDicoEntitePanel(_proj.getKeys().getDicoParams()),
"Les propriétés");
setContentPane(pane);
Index: FDicoParams.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/dico/FDicoParams.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** FDicoParams.java 4 Jul 2003 14:44:20 -0000 1.1
--- FDicoParams.java 18 Aug 2003 11:54:43 -0000 1.2
***************
*** 10,38 ****
import java.io.File;
- import java.util.ArrayList;
- import java.util.HashMap;
- import java.util.HashSet;
- import java.util.Hashtable;
- import java.util.Iterator;
import java.util.Map;
import java.util.Set;
[...1065 lines suppressed...]
! if (_cas == dicoParams_)
! isModified_= true;
! }
!
! /**
! *
! */
! public void dicoParamsModelEntiteRemoved(DicoParams _cas, DicoEntite _ent) {
! if (_cas == dicoParams_)
! isModified_= true;
! }
!
! /**
! *
! */
! public void dicoParamsModelEntiteUpdated(DicoParams _cas, DicoEntite _ent) {
! if (_cas == dicoParams_)
! isModified_= true;
}
Index: FDicoProjectPanel.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/dico/FDicoProjectPanel.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** FDicoProjectPanel.java 4 Jul 2003 14:44:20 -0000 1.1
--- FDicoProjectPanel.java 18 Aug 2003 11:54:43 -0000 1.2
***************
*** 84,88 ****
protected void setValue(Object value)
{
! setText(((FDicoEntiteFile) value).getEntite().getNom());
}
/**
--- 84,88 ----
protected void setValue(Object value)
{
! setText(((DicoEntiteFile) value).getEntite().getNom());
}
/**
***************
*** 104,108 ****
row,
column);
! setToolTipText(model_.getAbsolutePath((FDicoEntiteFile) value));
return this;
}
--- 104,108 ----
row,
column);
! setToolTipText(model_.getAbsolutePath((DicoEntiteFile) value));
return this;
}
Index: FDicoProjetAbstract.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/dico/FDicoProjetAbstract.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** FDicoProjetAbstract.java 4 Jul 2003 14:44:20 -0000 1.1
--- FDicoProjetAbstract.java 18 Aug 2003 11:54:43 -0000 1.2
***************
*** 32,36 ****
import org.fudaa.dodico.commun.ProgressionBuAdapter;
import org.fudaa.dodico.commun.ProgressionInterface;
- import org.fudaa.dodico.dico.DicoCasFileFormat;
import org.fudaa.dodico.dico.DicoParamsListener;
--- 32,35 ----
***************
*** 249,253 ****
public void addParamModelListener(DicoParamsListener _l)
{
! getKeys().addModelListener(_l);
}
--- 248,252 ----
public void addParamModelListener(DicoParamsListener _l)
{
! getKeys().getDicoParams().addModelListener(_l);
}
Index: FDicoProjetInterface.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/dico/FDicoProjetInterface.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** FDicoProjetInterface.java 4 Jul 2003 14:44:20 -0000 1.1
--- FDicoProjetInterface.java 18 Aug 2003 11:54:43 -0000 1.2
***************
*** 11,18 ****
import java.io.File;
! import javax.swing.JPanel;
!
! import org.fudaa.dodico.dico.*;
! import org.fudaa.dodico.h2d.*;
import org.fudaa.fudaa.commun.calcul.FudaaCalculAction;
--- 11,16 ----
import java.io.File;
! import org.fudaa.dodico.dico.DicoParams;
! import org.fudaa.dodico.dico.DicoParamsListener;
import org.fudaa.fudaa.commun.calcul.FudaaCalculAction;
|
|
From: <de...@us...> - 2003-08-18 12:00:17
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/test/tr
In directory sc8-pr-cvs1:/tmp/cvs-serv11020/test/tr
Modified Files:
TestTelemacCasViewer.java TestTrMaillage.java
Log Message:
Maj tr
Index: TestTelemacCasViewer.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/test/tr/TestTelemacCasViewer.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TestTelemacCasViewer.java 4 Jul 2003 15:56:41 -0000 1.2
--- TestTelemacCasViewer.java 18 Aug 2003 11:54:43 -0000 1.3
***************
*** 18,22 ****
import org.fudaa.dodico.commun.DodicoLib;
! import org.fudaa.dodico.telemac.io.TelemacCasFileFormat;
import org.fudaa.fudaa.dico.FDicoEntitePanel;
import org.fudaa.fudaa.tr.telemac.TrTelemacProjet;
--- 18,22 ----
import org.fudaa.dodico.commun.DodicoLib;
! import org.fudaa.dodico.telemac.io.Telemac2dFileFormat;
import org.fudaa.fudaa.dico.FDicoEntitePanel;
import org.fudaa.fudaa.tr.telemac.TrTelemacProjet;
***************
*** 31,35 ****
public TestTelemacCasViewer(File _fileCas)
{
! TrTelemacProjet p=TrTelemacProjet.init(_fileCas, TelemacCasFileFormat.getInstance(), null,null);
initFrame(p);
}
--- 31,35 ----
public TestTelemacCasViewer(File _fileCas)
{
! TrTelemacProjet p=TrTelemacProjet.init(_fileCas, (Telemac2dFileFormat.TelemacVersion)Telemac2dFileFormat.getInstance().getLastVersionImpl(), null,null);
initFrame(p);
}
***************
*** 43,47 ****
if (_param != null)
{
! FDicoEntitePanel pn=new FDicoEntitePanel(_param.getKeys());
setContentPane(pn);
}
--- 43,47 ----
if (_param != null)
{
! FDicoEntitePanel pn=new FDicoEntitePanel(_param.getKeys().getDicoParams());
setContentPane(pn);
}
Index: TestTrMaillage.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/test/tr/TestTrMaillage.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TestTrMaillage.java 4 Jul 2003 16:00:32 -0000 1.1
--- TestTrMaillage.java 18 Aug 2003 11:54:43 -0000 1.2
***************
*** 16,27 ****
import javax.swing.JFrame;
- import com.memoire.bu.BuBorderLayout;
import com.memoire.bu.BuDesktop;
- import com.memoire.bu.BuPanel;
import com.memoire.bu.BuSplit2Pane;
import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.fichiers.FileOperationSynthese;
- import org.fudaa.dodico.h2d.H2dLib;
import org.fudaa.dodico.telemac.io.SerafinFileFormat;
import org.fudaa.dodico.telemac.io.SerafinInterface;
--- 16,24 ----
***************
*** 30,34 ****
import org.fudaa.ebli.calque.BGroupeCalque;
import org.fudaa.ebli.calque.BVueCalque;
- import org.fudaa.ebli.calque.EbliFilleCalques;
import org.fudaa.ebli.calque.ZCalqueLongPolygone;
import org.fudaa.ebli.calque.ZCalquePoint;
--- 27,30 ----
***************
*** 94,98 ****
FileOperationSynthese op = new FileOperationSynthese();
System.out.println("Debut Lecture");
! SerafinInterface inter = SerafinFileFormat.getInstance().read(f, op, null);
System.out.println("fin Lecture");
if (op.containsFatalError()) {
--- 90,94 ----
FileOperationSynthese op = new FileOperationSynthese();
System.out.println("Debut Lecture");
! SerafinInterface inter = SerafinFileFormat.getInstance().getLastVersionImpl().read(f, op, null);
System.out.println("fin Lecture");
if (op.containsFatalError()) {
***************
*** 109,113 ****
System.out.println(inter.getPtsFrontiere()[0]);
long t1=System.currentTimeMillis();
! inter.getMaillage().computeBordFast(null);
long t2=System.currentTimeMillis();
System.out.println("temps "+(t2-t1));
--- 105,109 ----
System.out.println(inter.getPtsFrontiere()[0]);
long t1=System.currentTimeMillis();
! inter.getMaillage().computeBordV2(null);
long t2=System.currentTimeMillis();
System.out.println("temps "+(t2-t1));
|
|
From: <de...@us...> - 2003-08-18 12:00:17
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/reflux
In directory sc8-pr-cvs1:/tmp/cvs-serv11020/tr/reflux
Modified Files:
TrRefluxImplHelper.java TrRefluxParametres.java
TrRefluxProjet.java
Log Message:
Maj tr
Index: TrRefluxImplHelper.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/reflux/TrRefluxImplHelper.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TrRefluxImplHelper.java 4 Jul 2003 15:50:54 -0000 1.1
--- TrRefluxImplHelper.java 18 Aug 2003 11:54:43 -0000 1.2
***************
*** 16,19 ****
--- 16,20 ----
import org.fudaa.dodico.commun.DodicoPreferences;
import org.fudaa.dodico.commun.ProgressionBuAdapter;
+ import org.fudaa.dodico.fichiers.FileFormatSoftware;
import org.fudaa.dodico.reflux.io.INPFileFormat;
***************
*** 31,35 ****
public class TrRefluxImplHelper extends TrImplHelper
{
! public static FudaaExecServerManager SERVEURS= new FudaaExecServerManager(TrPreferences.TR, DodicoPreferences.buildPrefKey(TrProjet.REFLUX_ID,TrPreferences.KEY_SERVEUR_PREFIXE));
public TrRefluxImplHelper(TrImplementation _impl)
--- 32,36 ----
public class TrRefluxImplHelper extends TrImplHelper
{
! public static FudaaExecServerManager SERVEURS= new FudaaExecServerManager(TrPreferences.TR, DodicoPreferences.buildPrefKey(FileFormatSoftware.REFLUX_IS.name,TrPreferences.KEY_SERVEUR_PREFIXE));
public TrRefluxImplHelper(TrImplementation _impl)
***************
*** 58,62 ****
BuMenuItem r =
new BuMenuItem(FudaaResource.FUDAA.getToolIcon("appli/telemac"), "Projet Télémac");
! r.setActionCommand(impl_.PREF_OUVRIR + TrProjet.TELEMAC_ID);
return new BuMenuItem[]{r};
}
--- 59,63 ----
BuMenuItem r =
new BuMenuItem(FudaaResource.FUDAA.getToolIcon("appli/telemac"), "Projet Télémac");
! r.setActionCommand(impl_.PREF_OUVRIR + FileFormatSoftware.TELEMAC_IS.name);
return new BuMenuItem[]{r};
}
***************
*** 73,77 ****
TrRefluxProjet.init(
_fic,
! INPFileFormat.getInstance(),
new ProgressionBuAdapter(this),
getImpl());
--- 74,78 ----
TrRefluxProjet.init(
_fic,
! INPFileFormat.getInstance().getLastINPVersionImpl(),
new ProgressionBuAdapter(this),
getImpl());
***************
*** 92,96 ****
public String getID()
{
! return TrProjet.REFLUX_ID;
}
--- 93,97 ----
public String getID()
{
! return FileFormatSoftware.REFLUX_IS.name;
}
Index: TrRefluxParametres.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/reflux/TrRefluxParametres.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TrRefluxParametres.java 4 Jul 2003 15:50:54 -0000 1.1
--- TrRefluxParametres.java 18 Aug 2003 11:54:43 -0000 1.2
***************
*** 43,47 ****
public final static TrRefluxParametres init(
File _f,
! INPFileFormat _ft,
ProgressionInterface _progress,
FudaaUI _ui)
--- 43,47 ----
public final static TrRefluxParametres init(
File _f,
! INPFileFormat.INPVersion _ft,
ProgressionInterface _progress,
FudaaUI _ui)
***************
*** 60,64 ****
r.title_ = s;
! r.dicoParam_=new DicoParams(inter.getEntiteValue(),inter.getDicoModel());
return r;
}
--- 60,64 ----
r.title_ = s;
! r.dicoParam_=new DicoParams(inter.getEntiteValue(),_ft);
return r;
}
Index: TrRefluxProjet.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/reflux/TrRefluxProjet.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TrRefluxProjet.java 4 Jul 2003 15:50:54 -0000 1.1
--- TrRefluxProjet.java 18 Aug 2003 11:54:43 -0000 1.2
***************
*** 13,21 ****
import com.memoire.bu.BuInformationsDocument;
- import com.memoire.bu.BuTaskOperation;
import org.fudaa.dodico.calcul.CalculLauncher;
- import org.fudaa.dodico.commun.ProgressionBuAdapter;
import org.fudaa.dodico.commun.ProgressionInterface;
import org.fudaa.dodico.h2d.H2dParametres;
import org.fudaa.dodico.reflux.RefluxExec;
--- 13,20 ----
import com.memoire.bu.BuInformationsDocument;
import org.fudaa.dodico.calcul.CalculLauncher;
import org.fudaa.dodico.commun.ProgressionInterface;
+ import org.fudaa.dodico.fichiers.FileFormatSoftware;
import org.fudaa.dodico.h2d.H2dParametres;
import org.fudaa.dodico.reflux.RefluxExec;
***************
*** 53,57 ****
public static TrRefluxProjet init(
File _file,
! INPFileFormat _fileFormat,
ProgressionInterface _progress,TrImplementation _ui)
{
--- 52,56 ----
public static TrRefluxProjet init(
File _file,
! INPFileFormat.INPVersion _fileFormat,
ProgressionInterface _progress,TrImplementation _ui)
{
***************
*** 189,198 ****
-
- /**
- *
- */
-
-
/**
*
--- 188,191 ----
***************
*** 200,204 ****
public String getID()
{
! return TrProjet.REFLUX_ID;
}
--- 193,197 ----
public String getID()
{
! return FileFormatSoftware.REFLUX_IS.name;
}
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr
In directory sc8-pr-cvs1:/tmp/cvs-serv11020/tr
Modified Files:
TrCodePanel.java TrImplHelper.java TrImplementation.java
TrPreferences.java TrProjet.java
Added Files:
TrFileFormatManager.java
Log Message:
Maj tr
--- NEW FILE: TrFileFormatManager.java ---
(This appears to be a binary file; contents omitted.)
Index: TrCodePanel.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/TrCodePanel.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TrCodePanel.java 4 Jul 2003 15:50:53 -0000 1.1
--- TrCodePanel.java 18 Aug 2003 11:54:43 -0000 1.2
***************
*** 16,20 ****
import javax.swing.JButton;
import javax.swing.JComboBox;
- import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
--- 16,19 ----
***************
*** 31,35 ****
--- 30,37 ----
import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.commun.DodicoPreferences;
+ import org.fudaa.dodico.fichiers.FileFormatSoftware;
+
import org.fudaa.ebli.dialog.EbliSimpleDialogPanel;
+
import org.fudaa.fudaa.commun.FudaaLib;
import org.fudaa.fudaa.commun.exec.FudaaExec;
***************
*** 43,48 ****
* @version $Id$
*/
! public class TrCodePanel extends EbliSimpleDialogPanel
! {
File fParams_;
JComboBox cbCode_;
--- 45,49 ----
* @version $Id$
*/
! public class TrCodePanel extends EbliSimpleDialogPanel {
File fParams_;
JComboBox cbCode_;
***************
*** 54,71 ****
*
*/
! public TrCodePanel(TrProjet _proj, FudaaExecServerManager _mng)
! {
super();
! mng_ = _mng;
! fParams_ = _proj.getParamsFile();
addEmptyBorder(10);
setLayout(new BuBorderLayout(5, 5));
! JPanel pn = new BuPanel();
pn.setLayout(new BuGridLayout(3, 25, 5, true, true, true, true));
addLabel(pn, "Code ");
addLabel(pn, "Options");
addLabel(pn, "Fichier");
! cbCode_ = new BuComboBox();
cbCode_.setRenderer(new FudaaExecCellRenderer());
cbCode_.setEditor(new FudaaExecComboBoxEditor(mng_));
--- 55,71 ----
*
*/
! public TrCodePanel(TrProjet _proj, FudaaExecServerManager _mng) {
super();
! mng_= _mng;
! fParams_= _proj.getParamsFile();
addEmptyBorder(10);
setLayout(new BuBorderLayout(5, 5));
! JPanel pn= new BuPanel();
pn.setLayout(new BuGridLayout(3, 25, 5, true, true, true, true));
addLabel(pn, "Code ");
addLabel(pn, "Options");
addLabel(pn, "Fichier");
! cbCode_= new BuComboBox();
cbCode_.setRenderer(new FudaaExecCellRenderer());
cbCode_.setEditor(new FudaaExecComboBoxEditor(mng_));
***************
*** 73,84 ****
cbCode_.setModel(mng_.createComboBoxModel());
pn.add(cbCode_);
! txtOption_ = addStringText(pn);
! JLabel l = addLabel(pn, fParams_.getName());
l.setToolTipText(fParams_.getAbsolutePath());
! cbLogFrame_ = new BuCheckBox("Fenêtre de log");
pn.add(cbLogFrame_);
! BuPanel pnBt = new BuPanel();
pnBt.setLayout(new BuButtonLayout(5, BuButtonLayout.LEFT));
! JButton bt = new BuButton();
bt.setText("Modifier Valeurs par défaut");
bt.setToolTipText("Modifier les valeurs par defaut");
--- 73,84 ----
cbCode_.setModel(mng_.createComboBoxModel());
pn.add(cbCode_);
! txtOption_= addStringText(pn);
! JLabel l= addLabel(pn, fParams_.getName());
l.setToolTipText(fParams_.getAbsolutePath());
! cbLogFrame_= new BuCheckBox("Fenêtre de log");
pn.add(cbLogFrame_);
! BuPanel pnBt= new BuPanel();
pnBt.setLayout(new BuButtonLayout(5, BuButtonLayout.LEFT));
! JButton bt= new BuButton();
bt.setText("Modifier Valeurs par défaut");
bt.setToolTipText("Modifier les valeurs par defaut");
***************
*** 92,101 ****
}
! private void init()
! {
cbLogFrame_.setSelected(
TrPreferences.TR.getBooleanProperty(
DodicoPreferences.buildPrefKey(
! TrProjet.TELEMAC_ID,
TrPreferences.KEY_SERVEUR_SHOW_LOG),
true));
--- 92,100 ----
}
! private void init() {
cbLogFrame_.setSelected(
TrPreferences.TR.getBooleanProperty(
DodicoPreferences.buildPrefKey(
! FileFormatSoftware.TELEMAC_IS.name,
TrPreferences.KEY_SERVEUR_SHOW_LOG),
true));
***************
*** 104,161 ****
}
! public String[] launchParams()
! {
! ArrayList l = new ArrayList(5);
if (cbCode_.getSelectedItem() == null)
return null;
! StringTokenizer tk =
new StringTokenizer(
! ((FudaaExec) cbCode_.getSelectedItem()).getExecCommand(),
" ");
! while (tk.hasMoreElements())
! {
l.add(tk.nextToken());
}
! tk = new StringTokenizer(txtOption_.getText(), " ");
! while (tk.hasMoreElements())
! {
l.add(tk.nextToken());
}
l.add(fParams_.getAbsolutePath());
! String[] r = DodicoLib.enTableau(l);
if (FudaaLib.DEBUG)
DodicoLib.printStringArray(r);
return r;
}
!
! public String getExeCmd()
! {
! return ((FudaaExec) cbCode_.getSelectedItem()).getExecCommand();
}
!
! public String getOptions()
! {
return txtOption_.getText();
}
! public boolean isLogFrame()
! {
return cbLogFrame_.isSelected();
}
-
/**
*
*/
! public void actionPerformed(ActionEvent _evt)
! {
! if (_evt.getActionCommand().equals("MODIF_DEFAULT"))
! {
! int r =
new TrTelemacCodePrefDialogPanel(mng_).afficheModale(
this,
"Valeur par defaut de telemac");
! if (EbliSimpleDialogPanel.isOkResponse(r))
! {
mng_.writePref();
cbCode_.setSelectedItem(mng_.getDefaultServeur());
--- 103,150 ----
}
! public String[] launchParams() {
! ArrayList l= new ArrayList(5);
if (cbCode_.getSelectedItem() == null)
return null;
! StringTokenizer tk=
new StringTokenizer(
! ((FudaaExec)cbCode_.getSelectedItem()).getExecCommand(),
" ");
! while (tk.hasMoreElements()) {
l.add(tk.nextToken());
}
! tk= new StringTokenizer(txtOption_.getText(), " ");
! while (tk.hasMoreElements()) {
l.add(tk.nextToken());
}
l.add(fParams_.getAbsolutePath());
! String[] r= DodicoLib.enTableau(l);
if (FudaaLib.DEBUG)
DodicoLib.printStringArray(r);
return r;
}
!
! public String getExeCmd() {
! return ((FudaaExec)cbCode_.getSelectedItem()).getExecCommand();
}
!
! public String getOptions() {
return txtOption_.getText();
}
! public boolean isLogFrame() {
return cbLogFrame_.isSelected();
}
/**
*
*/
! public void actionPerformed(ActionEvent _evt) {
! if (_evt.getActionCommand().equals("MODIF_DEFAULT")) {
! int r=
new TrTelemacCodePrefDialogPanel(mng_).afficheModale(
this,
"Valeur par defaut de telemac");
! if (EbliSimpleDialogPanel.isOkResponse(r)) {
mng_.writePref();
cbCode_.setSelectedItem(mng_.getDefaultServeur());
***************
*** 169,181 ****
*
*/
! public boolean valide()
! {
! boolean v = mng_.getFudaaExecNb() > 0;
! if (v)
! {
cancelErrorText();
! }
! else
! {
setErrorText("Pas d'éxecutable");
}
--- 158,166 ----
*
*/
! public boolean valide() {
! boolean v= mng_.getFudaaExecNb() > 0;
! if (v) {
cancelErrorText();
! } else {
setErrorText("Pas d'éxecutable");
}
Index: TrImplHelper.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/TrImplHelper.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TrImplHelper.java 4 Jul 2003 15:34:57 -0000 1.2
--- TrImplHelper.java 18 Aug 2003 11:54:43 -0000 1.3
***************
*** 9,27 ****
package org.fudaa.fudaa.tr;
- import java.awt.event.ActionEvent;
- import java.awt.event.ActionListener;
import java.io.File;
- import com.memoire.bu.BuCommonImplementation;
- import com.memoire.bu.BuDialogChoice;
- import com.memoire.bu.BuDynamicMenu;
import com.memoire.bu.BuIcon;
- import com.memoire.bu.BuMenu;
import com.memoire.bu.BuMenuItem;
! import org.fudaa.ebli.dialog.EbliSimpleDialogPanel;
import org.fudaa.fudaa.commun.FudaaLib;
- import org.fudaa.fudaa.commun.exec.FudaaExecServerManager;
- import org.fudaa.fudaa.commun.exec.FudaaExecServerManagerPanel;
import org.fudaa.fudaa.ressource.FudaaResource;
import org.fudaa.fudaa.tr.reflux.TrRefluxImplHelper;
--- 9,20 ----
package org.fudaa.fudaa.tr;
import java.io.File;
import com.memoire.bu.BuIcon;
import com.memoire.bu.BuMenuItem;
! import org.fudaa.dodico.fichiers.FileFormatSoftware;
!
import org.fudaa.fudaa.commun.FudaaLib;
import org.fudaa.fudaa.ressource.FudaaResource;
import org.fudaa.fudaa.tr.reflux.TrRefluxImplHelper;
***************
*** 32,36 ****
* @version $Id$
*/
! public abstract class TrImplHelper implements ActionListener
{
protected TrImplementation impl_;
--- 25,29 ----
* @version $Id$
*/
! public abstract class TrImplHelper
{
protected TrImplementation impl_;
***************
*** 40,43 ****
--- 33,38 ----
impl_ = _impl;
impl_.getFrame().setTitle("Superviseur " + getID());
+ impl_.getFrame().setIconImage(FudaaResource.FUDAA.getIcon("appli/" + getID()).getImage());
+
}
***************
*** 57,60 ****
--- 52,56 ----
public abstract String getID();
+
public BuMenuItem[] getMenuItemsOuvrir()
{
***************
*** 67,101 ****
}
! public BuMenu getProjetMenu()
! {
! BuMenu projet = new BuDynamicMenu("Projet", "PROJET")
! {
! private boolean built_;
! public boolean isActive()
! {
! return true;
! }
!
! public void build()
! {
! if (!built_)
! {
! BuMenuItem it = new BuMenuItem("Changer chaîne de calcul");
! it.setActionCommand("MODIFIER_CHAINE");
! add(it);
! it.addActionListener(TrImplHelper.this);
! built_ = true;
! }
! }
! };
! projet.setIcon(null);
! return projet;
! }
public static TrImplHelper getImplHelper(String _id, TrImplementation _impl)
{
if(FudaaLib.DEBUG) System.out.println("Choix impl helper");
- System.out.println("id= \""+_id+"\"");
- System.out.println("relfux= \""+TrProjet.REFLUX_ID+"\"");
if (_impl.getCurrentImplHelper() != null)
{
--- 63,71 ----
}
!
public static TrImplHelper getImplHelper(String _id, TrImplementation _impl)
{
if(FudaaLib.DEBUG) System.out.println("Choix impl helper");
if (_impl.getCurrentImplHelper() != null)
{
***************
*** 106,115 ****
}
}
! if (_id.equals(TrProjet.REFLUX_ID))
{
if(FudaaLib.DEBUG) System.out.println("impl reflux");
return new TrRefluxImplHelper(_impl);
}
! else if (_id.equals(TrProjet.TELEMAC_ID))
{
if(FudaaLib.DEBUG) System.out.println("impl telemac");
--- 76,85 ----
}
}
! if (_id.equals(FileFormatSoftware.REFLUX_IS.name))
{
if(FudaaLib.DEBUG) System.out.println("impl reflux");
return new TrRefluxImplHelper(_impl);
}
! else if (_id.equals(FileFormatSoftware.TELEMAC_IS.name))
{
if(FudaaLib.DEBUG) System.out.println("impl telemac");
***************
*** 119,155 ****
}
! /**
! *
! */
! public void actionPerformed(ActionEvent e)
! {
! String c = e.getActionCommand();
! if (FudaaLib.DEBUG)
! System.out.println(c);
! if ("MODIFIER_CHAINE".equals(c))
! {
! String[] choix = new String[] { TrProjet.REFLUX_ID, TrProjet.TELEMAC_ID };
! BuDialogChoice dialc =
! new BuDialogChoice(
! impl_,
! impl_.informationsSoftware(),
! "Configuration chaîne de calcul",
! "Veuillez sélectionner la chaîne de calcul utilisée.\n"
! + " La modification sera prise en compte au redémarrage de l'application",
! choix);
! dialc.setSize(200, 200);
! if (FudaaLib.isOkResponse(dialc.activate()))
! {
!
! String id = dialc.getValue();
! if (FudaaLib.DEBUG)
! System.out.println("choix " + id);
!
! TrPreferences.TR.putStringProperty("tr.code.id", id);
! TrPreferences.TR.writeIniFile();
! }
! }
!
! }
}
--- 89,93 ----
}
!
}
Index: TrImplementation.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/TrImplementation.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TrImplementation.java 4 Jul 2003 15:34:57 -0000 1.2
--- TrImplementation.java 18 Aug 2003 11:54:43 -0000 1.3
***************
*** 10,15 ****
--- 10,18 ----
package org.fudaa.fudaa.tr;
+ import java.awt.Component;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
+ import java.awt.event.ItemEvent;
+ import java.awt.event.ItemListener;
import java.awt.event.KeyEvent;
import java.io.File;
***************
*** 34,37 ****
--- 37,42 ----
import com.memoire.fu.FuLib;
+ import org.fudaa.dodico.fichiers.FileFormatSoftware;
+
import org.fudaa.ebli.calque.BArbreCalque;
***************
*** 50,76 ****
* @author Fred Deniger
*/
! public class TrImplementation extends FudaaCommonImplementation
! {
! public final static String PREF_OUVRIR = "OUVRIR_";
! private final static BuInformationsSoftware isRt_ =
new BuInformationsSoftware();
static {
! isRt_.name = "Tr";
! isRt_.version = "0.02";
! isRt_.date = "18-juin-2003";
! isRt_.rights = "Tous droits réservés. CETMEF (c)2003";
! isRt_.contact = "fre...@eq...";
! isRt_.license = "GPL2";
! isRt_.languages = "fr";
! isRt_.logo = null;
! isRt_.banner = null;
! isRt_.http = "http://fudaa.sourceforge.net";
! isRt_.update = "";
! isRt_.man = FudaaAidePreferencesPanel.getHelpUrl(TrPreferences.TR);
! isRt_.authors = new String[] { "Frédéric Deniger" };
! isRt_.contributors = new String[] { "Equipes Dodico, Ebli et Fudaa" };
! isRt_.documentors = new String[] { "" };
! isRt_.testers = new String[] { "Frédéric Deniger" };
! isRt_.citation = "";
// idTr_.logo = EbliResource.EBLI.getIcon("minlogo.gif");
}
--- 55,82 ----
* @author Fred Deniger
*/
! public class TrImplementation
! extends FudaaCommonImplementation
! implements ItemListener {
! public final static String PREF_OUVRIR= "OUVRIR_";
! private final static BuInformationsSoftware isRt_=
new BuInformationsSoftware();
static {
! isRt_.name= "Tr";
! isRt_.version= "0.02";
! isRt_.date= "18-juin-2003";
! isRt_.rights= "Tous droits réservés. CETMEF (c)2003";
! isRt_.contact= "fre...@eq...";
! isRt_.license= "GPL2";
! isRt_.languages= "fr";
! isRt_.logo= null;
! isRt_.banner= null;
! isRt_.http= "http://fudaa.sourceforge.net";
! isRt_.update= "";
! isRt_.man= FudaaAidePreferencesPanel.getHelpUrl(TrPreferences.TR);
! isRt_.authors= new String[] { "Frédéric Deniger" };
! isRt_.contributors= new String[] { "Equipes Dodico, Ebli et Fudaa" };
! isRt_.documentors= new String[] { "" };
! isRt_.testers= new String[] { "Frédéric Deniger" };
! isRt_.citation= "";
// idTr_.logo = EbliResource.EBLI.getIcon("minlogo.gif");
}
***************
*** 79,98 ****
private TrProjectManager projectManager_;
private TrImplHelper implHelper_;
BuTaskView taches_;
! protected void ouvrir()
! {
implHelper_.ouvrir();
}
! protected void ouvrirId(String _id)
! {
! if (_id.equals(TrProjet.TELEMAC_DICO_ID))
! {
! TrTelemacImplHelper h =
! (TrTelemacImplHelper) TrImplHelper.getImplHelper(
! TrProjet.TELEMAC_ID,
this);
if (h == null)
--- 85,133 ----
private TrProjectManager projectManager_;
private TrImplHelper implHelper_;
+ private TrFileFormatManager fileFormatMng_;
BuTaskView taches_;
! protected void ouvrir() {
implHelper_.ouvrir();
}
! public void changeChaineCalcul() {
! String[] choix=
! new String[] {
! FileFormatSoftware.REFLUX_IS.name,
! FileFormatSoftware.TELEMAC_IS.name };
! BuDialogChoice dialc=
! new BuDialogChoice(
! TrImplementation.this,
! TrImplementation.this.informationsSoftware(),
! "Configuration chaîne de calcul",
! "Veuillez sélectionner la chaîne de calcul utilisée.",
! choix);
! dialc.setSize(200, 200);
! if (FudaaLib.isOkResponse(dialc.activate())) {
! String id= dialc.getValue();
! if (!id.equals(getCurrentImplHelper().getID())) {
! if (FudaaLib.DEBUG)
! System.out.println("choix " + id);
!
! TrPreferences.TR.putStringProperty("tr.code.id", id);
! TrPreferences.TR.writeIniFile();
! initImplHelperFromPref();
! removeOuvrirAutre();
! addOuvrirAutre();
! getFrame().repaint();
! }
! }
!
! }
!
! protected void ouvrirId(String _id) {
!
! if (_id.equals(FileFormatSoftware.TELEMAC_IS.name)) {
! TrTelemacImplHelper h=
! (TrTelemacImplHelper)TrImplHelper.getImplHelper(
! FileFormatSoftware.TELEMAC_IS.name,
this);
if (h == null)
***************
*** 100,107 ****
h.ouvrirDico();
! }
! else
! {
! TrImplHelper h = TrImplHelper.getImplHelper(_id, this);
if (h == null)
error("Erreur interne", "impossible de trouver l'implantation");
--- 135,140 ----
h.ouvrirDico();
! } else {
! TrImplHelper h= TrImplHelper.getImplHelper(_id, this);
if (h == null)
error("Erreur interne", "impossible de trouver l'implantation");
***************
*** 111,127 ****
}
! protected void ouvrir(File _f)
! {
implHelper_.ouvrir(_f);
}
! public TrImplHelper getCurrentImplHelper()
! {
return implHelper_;
}
! protected void ouvrir(File _f, String _id)
! {
! TrImplHelper h = TrImplHelper.getImplHelper(_id, this);
if (h == null)
error("Erreur interne", "impossible de trouver l'implantation");
--- 144,157 ----
}
! protected void ouvrir(File _f) {
implHelper_.ouvrir(_f);
}
! public TrImplHelper getCurrentImplHelper() {
return implHelper_;
}
! protected void ouvrir(File _f, String _id) {
! TrImplHelper h= TrImplHelper.getImplHelper(_id, this);
if (h == null)
error("Erreur interne", "impossible de trouver l'implantation");
***************
*** 130,190 ****
}
! public void actionPerformed(ActionEvent _evt)
! {
! String action = _evt.getActionCommand();
if (action == null)
return;
if (FudaaLib.DEBUG)
System.err.println("ACTION=" + action);
! if ("OUVRIR".equals(action))
! {
ouvrir();
! }
! else if (action.startsWith(PREF_OUVRIR))
! {
! String id = action.substring(PREF_OUVRIR.length());
if (FudaaLib.DEBUG)
System.out.println("id= " + id);
ouvrirId(id);
! }
! else if ("ENREGISTRER".equals(action))
! {
projetCourant().save();
! }
! else if ("ENREGISTRERSOUS".equals(action))
! {
projetCourant().saveAs();
! }
! else if ("ENREGISTRERCOPIE".equals(action))
! {
projetCourant().saveCopy();
! }
! else if ("FERMER".equals(action))
! {
projetCourant().close();
! }
! else
! {
super.actionPerformed(_evt);
}
}
! protected void connecter()
! {
! System.out.println("pas de connexion");
! }
! private void creer()
! {
}
! public BuPreferences getApplicationPreferences()
! {
return TrPreferences.TR;
}
! public BuInformationsDocument getInformationsDocument()
! {
if (projetCourant() == null)
return null;
--- 160,223 ----
}
! public void actionPerformed(ActionEvent _evt) {
! String action= _evt.getActionCommand();
if (action == null)
return;
if (FudaaLib.DEBUG)
System.err.println("ACTION=" + action);
! if ("OUVRIR".equals(action)) {
ouvrir();
! } else if (action.startsWith(PREF_OUVRIR)) {
! String id= action.substring(PREF_OUVRIR.length());
if (FudaaLib.DEBUG)
System.out.println("id= " + id);
ouvrirId(id);
! } else if ("ENREGISTRER".equals(action)) {
projetCourant().save();
! } else if ("ENREGISTRERSOUS".equals(action)) {
projetCourant().saveAs();
! } else if ("ENREGISTRERCOPIE".equals(action)) {
projetCourant().saveCopy();
! } else if ("FERMER".equals(action)) {
projetCourant().close();
! } else if ("MODIFIER_CHAINE".equals(action)) {
! changeChaineCalcul();
! } else {
super.actionPerformed(_evt);
}
}
! public BuMenu buildProjetMenu() {
! BuMenu projet= new BuDynamicMenu("Projet", "PROJET") {
! private boolean built_;
! public boolean isActive() {
! return true;
! }
! public void build() {
! if (this.getMenuComponentCount() == 0) {
! BuMenuItem it= new BuMenuItem("Changer chaîne de calcul");
! it.setActionCommand("MODIFIER_CHAINE");
! add(it);
! it.addActionListener(TrImplementation.this);
! built_= true;
! }
! }
! };
! projet.setIcon(null);
! return projet;
! }
+ protected void connecter() {
+ System.out.println("pas de connexion");
}
! private void creer() {}
!
! public BuPreferences getApplicationPreferences() {
return TrPreferences.TR;
}
! public BuInformationsDocument getInformationsDocument() {
if (projetCourant() == null)
return null;
***************
*** 192,216 ****
}
! public BuInformationsSoftware getInformationsSoftware()
! {
return isRt_;
}
! public void init()
! {
super.init();
! BuMenuBar mb = getApp().getMainMenuBar();
! BuMenuItem it = new BuMenuItem("Enregister une copie");
it.setActionCommand("ENREGISTRERCOPIE");
it.addActionListener(this);
mb.getMenu("MENU_FICHIER").add(it, 6);
! BuMainPanel mp = getMainPanel();
! BuColumn lc = mp.getLeftColumn();
! BuColumn rc = mp.getRightColumn();
lc.setBorder(null);
// rc.setBorder(new EmptyBorder(0,2,0,2));
! taches_ = new BuTaskView();
! BuScrollPane sp = new BuScrollPane(taches_);
sp.setPreferredSize(new Dimension(150, 80));
rc.addToggledComponent(
--- 225,247 ----
}
! public BuInformationsSoftware getInformationsSoftware() {
return isRt_;
}
! public void init() {
super.init();
! BuMenuBar mb= getApp().getMainMenuBar();
! BuMenuItem it= new BuMenuItem("Enregister une copie");
it.setActionCommand("ENREGISTRERCOPIE");
it.addActionListener(this);
mb.getMenu("MENU_FICHIER").add(it, 6);
! BuMainPanel mp= getMainPanel();
! BuColumn lc= mp.getLeftColumn();
! BuColumn rc= mp.getRightColumn();
lc.setBorder(null);
// rc.setBorder(new EmptyBorder(0,2,0,2));
! taches_= new BuTaskView();
! BuScrollPane sp= new BuScrollPane(taches_);
sp.setPreferredSize(new Dimension(150, 80));
rc.addToggledComponent(
***************
*** 220,230 ****
this);
mp.setTaskView(taches_);
! BuExplorer explorer =
! new BuExplorer(this, false, FuFile.createFile(FuLib.getUserHome()))
! {
! protected void fireFileAction(String _action)
! {
! if (_action.equals("OUVRIR"))
! {
TrImplementation.this.ouvrir(getSelectedFile().getAbsoluteFuFile());
}
--- 251,258 ----
this);
mp.setTaskView(taches_);
! BuExplorer explorer=
! new BuExplorer(this, false, FuFile.createFile(FuLib.getUserHome())) {
! protected void fireFileAction(String _action) {
! if (_action.equals("OUVRIR")) {
TrImplementation.this.ouvrir(getSelectedFile().getAbsoluteFuFile());
}
***************
*** 242,278 ****
setEnabledForAction("CREER", false);
setEnabledForAction("OUVRIR", true);
setEnabledForAction("QUITTER", true);
setEnabledForAction("PREFERENCE", true);
setEnabledForAction("ASTUCE", false);
! projectManager_ = new TrProjectManager();
! FudaaAppliExecManager execManager =
new FudaaAppliExecManager(this.getApplicationPreferences(), this);
! JMenu menu = execManager.getMenu("Applications", "APPLICATIONS");
menu.setMnemonic(KeyEvent.VK_P);
// System.out.println("nb menu " + mb.getMenuCount());
// System.out.println("nb menu sub" + mb.getSubElements().length);
mb.add(menu, mb.getMenuCount() - 1);
mp.setProgression(0);
}
! protected TrProjet projetCourant()
! {
return projectManager_.currentProjet_;
}
! public void closeProjet(TrProjet _o)
! {
projectManager_.closeProjet(_o);
setEnabledForAction("ENREGISTRER", false);
setEnabledForAction("ENREGISTRERSOUS", false);
! setEnabledForAction("ENREGISTRERCOPIE", true);
setEnabledForAction("FERMER", false);
}
! public void addProjet(TrProjet _o)
! {
! if (projetCourant() != null)
! {
projetCourant().close();
}
--- 270,306 ----
setEnabledForAction("CREER", false);
setEnabledForAction("OUVRIR", true);
+ setEnabledForAction("EXPORTER", true);
setEnabledForAction("QUITTER", true);
setEnabledForAction("PREFERENCE", true);
+ setEnabledForAction("ENREGISTRERCOPIE", false);
setEnabledForAction("ASTUCE", false);
! projectManager_= new TrProjectManager();
! fileFormatMng_= new TrFileFormatManager();
! FudaaAppliExecManager execManager=
new FudaaAppliExecManager(this.getApplicationPreferences(), this);
! JMenu menu= execManager.getMenu("Applications", "APPLICATIONS");
menu.setMnemonic(KeyEvent.VK_P);
// System.out.println("nb menu " + mb.getMenuCount());
// System.out.println("nb menu sub" + mb.getSubElements().length);
mb.add(menu, mb.getMenuCount() - 1);
+ mb.getMenu("EXPORTER").addItemListener(this);
mp.setProgression(0);
}
! protected TrProjet projetCourant() {
return projectManager_.currentProjet_;
}
! public void closeProjet(TrProjet _o) {
projectManager_.closeProjet(_o);
setEnabledForAction("ENREGISTRER", false);
setEnabledForAction("ENREGISTRERSOUS", false);
! setEnabledForAction("ENREGISTRERCOPIE", false);
setEnabledForAction("FERMER", false);
}
! public void addProjet(TrProjet _o) {
! if (projetCourant() != null) {
projetCourant().close();
}
***************
*** 289,294 ****
* _f doit etre le fichier dernierement ouvert
*/
! public void setLastDir(File _f)
! {
FudaaLib.setLastDir(_f);
}
--- 317,321 ----
* _f doit etre le fichier dernierement ouvert
*/
! public void setLastDir(File _f) {
FudaaLib.setLastDir(_f);
}
***************
*** 314,330 ****
// }
! private void initImplHelperFromPref()
! {
! String id =
TrPreferences.TR.getStringProperty(TrPreferences.KEY_CODE_ID, null);
! if (id == null)
! {
! id = askForCode();
}
! implHelper_ = TrImplHelper.getImplHelper(id, this);
! if (implHelper_ == null)
! {
! id = askForCode();
! implHelper_ = TrImplHelper.getImplHelper(id, this);
}
if (implHelper_ == null)
--- 341,354 ----
// }
! private void initImplHelperFromPref() {
! String id=
TrPreferences.TR.getStringProperty(TrPreferences.KEY_CODE_ID, null);
! if (id == null) {
! id= askForCode();
}
! implHelper_= TrImplHelper.getImplHelper(id, this);
! if (implHelper_ == null) {
! id= askForCode();
! implHelper_= TrImplHelper.getImplHelper(id, this);
}
if (implHelper_ == null)
***************
*** 333,344 ****
}
! private String askForCode()
! {
! String id =
TrPreferences.TR.getStringProperty(
TrPreferences.KEY_CODE_ID,
! TrProjet.REFLUX_ID);
! String[] choix = new String[] { TrProjet.REFLUX_ID, TrProjet.TELEMAC_ID };
! BuDialogChoice c =
new BuDialogChoice(
this,
--- 357,370 ----
}
! private String askForCode() {
! String id=
TrPreferences.TR.getStringProperty(
TrPreferences.KEY_CODE_ID,
! FileFormatSoftware.REFLUX_IS.name);
! String[] choix=
! new String[] {
! FileFormatSoftware.REFLUX_IS.name,
! FileFormatSoftware.TELEMAC_IS.name };
! BuDialogChoice c=
new BuDialogChoice(
this,
***************
*** 349,353 ****
c.setSize(200, 200);
c.activate();
! id = c.getValue();
if (FudaaLib.DEBUG)
System.out.println("choix " + id);
--- 375,379 ----
c.setSize(200, 200);
c.activate();
! id= c.getValue();
if (FudaaLib.DEBUG)
System.out.println("choix " + id);
***************
*** 357,388 ****
}
! public void start()
! {
! super.start();
! initImplHelperFromPref();
! final BuMenuItem[] items_ = implHelper_.getMenuItemsOuvrir();
! if ((items_ != null) && (items_.length > 0))
! {
! BuMenu ouvrirAutre =
! new BuDynamicMenu("Ouvrir autre ...", "OUVRIR_AUTRE")
! {
! private boolean built_;
! public boolean isActive()
! {
return true;
}
! public void build()
! {
! if (!built_)
! {
//addMenuItem("Projet Télémac", PREF_OUVRIR + TrProjet.TELEMAC_ID);
! int n = items_.length;
! for (int i = 0; i < n; i++)
! {
add(items_[i]);
items_[i].addActionListener(TrImplementation.this);
}
- built_ = true;
}
--- 383,405 ----
}
! private void addOuvrirAutre() {
! final BuMenuItem[] items_= implHelper_.getMenuItemsOuvrir();
! if ((items_ != null) && (items_.length > 0)) {
! BuMenu ouvrirAutre=
! new BuDynamicMenu("Ouvrir autre ...", "OUVRIR_AUTRE") {
! public boolean isActive() {
return true;
}
! public void build() {
! if (this.getMenuComponentCount() == 0) {
! if (FudaaLib.DEBUG)
! System.out.println("construit menu ouv autre");
//addMenuItem("Projet Télémac", PREF_OUVRIR + TrProjet.TELEMAC_ID);
! int n= items_.length;
! for (int i= 0; i < n; i++) {
add(items_[i]);
items_[i].addActionListener(TrImplementation.this);
}
}
***************
*** 390,409 ****
};
! BuMenuBar mb = getApp().getMainMenuBar();
mb.getMenu("MENU_FICHIER").add(ouvrirAutre, 2);
- mb.add(implHelper_.getProjetMenu(), mb.getMenuCount() - 2);
}
! // arbre_ = new BArbreCalque();
! // arbre_.setRootVisible(false);
! // arbre_.setModel(null);
! // JScrollPane sp = new JScrollPane(arbre_);
! // sp.setSize(150, 150);
! // sp.setVisible(false);
! // getMainPanel().getRightColumn().addToggledComponent(EbliResource.EBLI.getString("Calques"), "CALQUE", sp, this);
}
! public static BuInformationsSoftware informationsSoftware()
! {
return isRt_;
}
--- 407,441 ----
};
! BuMenuBar mb= getApp().getMainMenuBar();
mb.getMenu("MENU_FICHIER").add(ouvrirAutre, 2);
}
+ }
! private void removeOuvrirAutre() {
! BuMenu menu= (BuMenu)getApp().getMainMenuBar().getMenu("MENU_FICHIER");
! Component c= menu.getMenuComponent(2);
! if ((c != null)
! && (c instanceof BuDynamicMenu)
! && (((BuDynamicMenu)c).getActionCommand().equals("OUVRIR_AUTRE")))
! menu.remove(c);
}
! public void start() {
! super.start();
! initImplHelperFromPref();
! addOuvrirAutre();
! BuMenuBar mb= getApp().getMainMenuBar();
! mb.add(buildProjetMenu(), mb.getMenuCount() - 2);
! }
!
! // arbre_ = new BArbreCalque();
! // arbre_.setRootVisible(false);
! // arbre_.setModel(null);
! // JScrollPane sp = new JScrollPane(arbre_);
! // sp.setSize(150, 150);
! // sp.setVisible(false);
! // getMainPanel().getRightColumn().addToggledComponent(EbliResource.EBLI.getString("Calques"), "CALQUE", sp, this);
!
! public static BuInformationsSoftware informationsSoftware() {
return isRt_;
}
***************
*** 412,421 ****
*
*/
! public void exit()
! {
super.exit();
TrPreferences.TR.writeIniFile();
FudaaFavoriteFiles.INSTANCE.saveFavorites();
FudaaPreferences.FUDAA.writeIniFile();
}
--- 444,473 ----
*
*/
! public void exit() {
super.exit();
TrPreferences.TR.writeIniFile();
FudaaFavoriteFiles.INSTANCE.saveFavorites();
FudaaPreferences.FUDAA.writeIniFile();
+ }
+
+ private void buildExporterMenu() {
+ fileFormatMng_.buildExportMenu(
+ (BuMenu)getMainMenuBar().getMenu("EXPORTER"));
+ }
+
+ /**
+ *
+ */
+ public void itemStateChanged(ItemEvent e) {
+ if (e.getStateChange() == ItemEvent.SELECTED) {
+ if (FudaaLib.DEBUG)
+ System.out.println(((BuMenu)e.getSource()).getActionCommand());
+ BuMenu menu= (BuMenu)e.getSource();
+ if(menu.getMenuComponentCount()!=0) return;
+ if (menu.getActionCommand().equals("EXPORTER")) {
+ buildExporterMenu();
+ menu.removeItemListener(this);
+ }
+ }
}
Index: TrPreferences.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/TrPreferences.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TrPreferences.java 4 Jul 2003 15:34:57 -0000 1.2
--- TrPreferences.java 18 Aug 2003 11:54:43 -0000 1.3
***************
*** 20,23 ****
--- 20,25 ----
import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.commun.DodicoPreferences;
+ import org.fudaa.dodico.fichiers.FileFormatSoftware;
+
import org.fudaa.fudaa.commun.FudaaPreferences;
***************
*** 123,142 ****
public String getCodePrefPrefixeReflux()
{
! return getCodePrefPrefixe(TrProjet.REFLUX_ID);
}
public boolean isCodeRefluxDef()
{
! return TrProjet.REFLUX_ID.equals(getStringProperty(KEY_CODE_ID, null));
}
public boolean isCodeTelemacDef()
{
! return TrProjet.TELEMAC_ID.equals(getStringProperty(KEY_CODE_ID, null));
}
public String getCodePrefPrefixeTelemac()
{
! return getCodePrefPrefixe(TrProjet.TELEMAC_ID);
}
--- 125,144 ----
public String getCodePrefPrefixeReflux()
{
! return getCodePrefPrefixe(FileFormatSoftware.REFLUX_IS.name);
}
public boolean isCodeRefluxDef()
{
! return FileFormatSoftware.REFLUX_IS.name.equals(getStringProperty(KEY_CODE_ID, null));
}
public boolean isCodeTelemacDef()
{
! return FileFormatSoftware.TELEMAC_IS.name.equals(getStringProperty(KEY_CODE_ID, null));
}
public String getCodePrefPrefixeTelemac()
{
! return getCodePrefPrefixe(FileFormatSoftware.TELEMAC_IS.name);
}
Index: TrProjet.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/TrProjet.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TrProjet.java 4 Jul 2003 15:34:57 -0000 1.2
--- TrProjet.java 18 Aug 2003 11:54:43 -0000 1.3
***************
*** 25,31 ****
{
- public static final String TELEMAC_ID="telemac2d";
- public static final String TELEMAC_DICO_ID="dico";
- public static final String REFLUX_ID="reflux";
public String getID();
--- 25,28 ----
|
|
From: <de...@us...> - 2003-08-18 11:55:07
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/type In directory sc8-pr-cvs1:/tmp/cvs-serv9615/src/org/fudaa/dodico/h2d/type Added Files: H2dFileFormatType.java Log Message: AJout de classes pour le projet tr --- NEW FILE: H2dFileFormatType.java --- (This appears to be a binary file; contents omitted.) |
|
From: <de...@us...> - 2003-08-18 11:55:07
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d In directory sc8-pr-cvs1:/tmp/cvs-serv9615/src/org/fudaa/dodico/h2d Added Files: H2dSegment.java Log Message: AJout de classes pour le projet tr --- NEW FILE: H2dSegment.java --- (This appears to be a binary file; contents omitted.) |
|
From: <de...@us...> - 2003-08-18 11:55:06
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/fichiers In directory sc8-pr-cvs1:/tmp/cvs-serv9615/src/org/fudaa/dodico/fichiers Added Files: FileFormatSoftware.java FileFormatVersion.java Log Message: AJout de classes pour le projet tr --- NEW FILE: FileFormatSoftware.java --- (This appears to be a binary file; contents omitted.) --- NEW FILE: FileFormatVersion.java --- (This appears to be a binary file; contents omitted.) |
|
From: <de...@us...> - 2003-08-18 11:55:05
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/commun In directory sc8-pr-cvs1:/tmp/cvs-serv9615/src/org/fudaa/dodico/commun Added Files: ProgressionTestAdapter.java Log Message: AJout de classes pour le projet tr --- NEW FILE: ProgressionTestAdapter.java --- (This appears to be a binary file; contents omitted.) |
|
From: <de...@us...> - 2003-08-18 11:54:57
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dico
In directory sc8-pr-cvs1:/tmp/cvs-serv9615/src/org/fudaa/dodico/dico
Added Files:
DicoCasFileFormatVersion.java DicoEntiteFile.java
Log Message:
AJout de classes pour le projet tr
--- NEW FILE: DicoCasFileFormatVersion.java ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: DicoEntiteFile.java ---
/*
* @file TrBaseEntiteFile.java
* @creation 30 avr. 2003
* @modification $Date: 2003/08/18 11:48:02 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.dico;
import org.fudaa.dodico.fichiers.FileFormat;
public class DicoEntiteFile {
private DicoEntite entite_;
//private DodicoAnalyze analyze_;
private long timeLoaded_;
private FileFormat format_;
public DicoEntiteFile(DicoEntite _entite) {
entite_= _entite;
}
public void setFileFormat(FileFormat _f) {
format_= _f;
}
/**
* @return
*/
public DicoEntite getEntite() {
return entite_;
}
/**
* @return
*/
public FileFormat getFormat() {
return format_;
}
public void setLoaded(long _t) {
if (timeLoaded_ > 0)
timeLoaded_= _t;
}
public void resetLoaded() {
timeLoaded_= 0;
}
public long getTimeLoaded() {
return timeLoaded_;
}
public boolean isLoaded() {
return timeLoaded_ > 0;
}
}
|
|
From: <de...@us...> - 2003-08-18 11:42:56
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/io In directory sc8-pr-cvs1:/tmp/cvs-serv9064/io Added Files: SerafinMaillageAdapter.java TelemacDicoFileFormat.java TelemacLib.java Log Message: Ajout de classes pour gestion fichiers dico --- NEW FILE: SerafinMaillageAdapter.java --- (This appears to be a binary file; contents omitted.) --- NEW FILE: TelemacDicoFileFormat.java --- (This appears to be a binary file; contents omitted.) --- NEW FILE: TelemacLib.java --- /* * @file SerafinExtract.java * @creation 20 mars 2003 * @modification $Date: 2003/08/18 11:42:26 $ * @license GNU General Public License 2 * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne * @mail de...@fu... */ package org.fudaa.dodico.telemac.io; import com.memoire.bu.BuInformationsSoftware; import org.fudaa.dodico.h2d.H2dMaillage; /** * * @author deniger * @version $Id: TelemacLib.java,v 1.1 2003/08/18 11:42:26 deniger Exp $ */ public class TelemacLib { public final static int contientVariable( SerafinInterface _inter, String _var) { int n= _inter.getNbv1(); for (int i= 0; i < n; i++) { if (_inter.getVariable(i).equals(_var)) return i; } return -1; } public void setBathy( H2dMaillage _maill, SerafinInterface _inter, int _varIdx, int _tIdx) { int nb= _maill.getPtsNb() - 1; for (int i= nb; i >= 0; i--) { _maill.setZFor(i, _inter.getDonnees(_tIdx, _varIdx, i)); } } } |
|
From: <de...@us...> - 2003-08-18 11:30:44
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/h2d
In directory sc8-pr-cvs1:/tmp/cvs-serv3430/test/h2d
Modified Files:
TestMaillage.java
Log Message:
Maj des projets hydraulique 2d
Index: TestMaillage.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/h2d/TestMaillage.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TestMaillage.java 7 Aug 2003 08:01:41 -0000 1.2
--- TestMaillage.java 18 Aug 2003 11:05:20 -0000 1.3
***************
*** 9,20 ****
--- 9,25 ----
package org.fudaa.dodico.test.h2d;
+ import gnu.trove.TIntIntHashMap;
+ import gnu.trove.TObjectIntHashMap;
+
import java.util.Arrays;
import junit.framework.TestCase;
+ import org.fudaa.dodico.commun.ProgressionTestAdapter;
import org.fudaa.dodico.h2d.H2dElement;
import org.fudaa.dodico.h2d.H2dMaillage;
import org.fudaa.dodico.h2d.H2dMaillageBord;
import org.fudaa.dodico.h2d.H2dPoint;
+ import org.fudaa.dodico.h2d.H2dSegment;
/**
***************
*** 38,45 ****
--- 43,52 ----
H2dMaillage mail_;
double eps_;
+ ProgressionTestAdapter progress_;
/**
*
*/
public TestMaillage() {
+ progress_= new ProgressionTestAdapter();
eps_= 1E-15;
***************
*** 59,70 ****
H2dElement[] elt= new H2dElement[9];
elt[0]= new H2dElement(new int[] { 0, 2, 1 });
! elt[1]= new H2dElement(new int[] { 1, 3, 2 });
elt[2]= new H2dElement(new int[] { 0, 4, 2 });
elt[3]= new H2dElement(new int[] { 4, 5, 2 });
! elt[4]= new H2dElement(new int[] { 5, 3, 6 });
! elt[5]= new H2dElement(new int[] { 5, 7, 4 });
elt[6]= new H2dElement(new int[] { 1, 3, 6 });
elt[7]= new H2dElement(new int[] { 7, 8, 5 });
! elt[8]= new H2dElement(new int[] { 6, 8, 5 });
mail_= new H2dMaillage(pts, elt);
}
--- 66,77 ----
H2dElement[] elt= new H2dElement[9];
elt[0]= new H2dElement(new int[] { 0, 2, 1 });
! elt[1]= new H2dElement(new int[] { 1, 2, 3 });
elt[2]= new H2dElement(new int[] { 0, 4, 2 });
elt[3]= new H2dElement(new int[] { 4, 5, 2 });
! elt[4]= new H2dElement(new int[] { 5, 6, 3 });
! elt[5]= new H2dElement(new int[] { 5, 4, 7 });
elt[6]= new H2dElement(new int[] { 1, 3, 6 });
elt[7]= new H2dElement(new int[] { 7, 8, 5 });
! elt[8]= new H2dElement(new int[] { 6, 5, 8 });
mail_= new H2dMaillage(pts, elt);
}
***************
*** 88,93 ****
//elt 1
! pts[12]= H2dPoint.createMilieu(pts[1], pts[3]);
! pts[13]= H2dPoint.createMilieu(pts[2], pts[3]);
//pts10
--- 95,101 ----
//elt 1
! pts[12]= H2dPoint.createMilieu(pts[2], pts[3]);
! pts[13]= H2dPoint.createMilieu(pts[1], pts[3]);
!
//pts10
***************
*** 103,113 ****
// elt 4
! pts[18]= H2dPoint.createMilieu(pts[5], pts[3]);
pts[19]= H2dPoint.createMilieu(pts[3], pts[6]);
! pts[20]= H2dPoint.createMilieu(pts[5], pts[6]);
// elt 5
! pts[21]= H2dPoint.createMilieu(pts[5], pts[7]);
! pts[22]= H2dPoint.createMilieu(pts[4], pts[7]);
//pts 16
--- 111,121 ----
// elt 4
! pts[18]= H2dPoint.createMilieu(pts[5], pts[6]);
pts[19]= H2dPoint.createMilieu(pts[3], pts[6]);
! pts[20]= H2dPoint.createMilieu(pts[5], pts[3]);
// elt 5
! pts[21]= H2dPoint.createMilieu(pts[4], pts[7]);
! pts[22]= H2dPoint.createMilieu(pts[5], pts[7]);
//pts 16
***************
*** 129,140 ****
H2dElement[] elt= new H2dElement[9];
elt[0]= new H2dElement(new int[] { 0, 9, 2, 10, 1, 11 });
! elt[1]= new H2dElement(new int[] { 1, 12, 3, 13, 2, 10 });
elt[2]= new H2dElement(new int[] { 0, 14, 4, 15, 2, 9 });
elt[3]= new H2dElement(new int[] { 4, 16, 5, 17, 2, 15 });
! elt[4]= new H2dElement(new int[] { 5, 18, 3, 19, 6, 20 });
! elt[5]= new H2dElement(new int[] { 5, 21, 7, 22, 4, 16 });
! elt[6]= new H2dElement(new int[] { 1, 12, 3, 19, 6, 23 });
! elt[7]= new H2dElement(new int[] { 7, 24, 8, 25, 5, 21 });
! elt[8]= new H2dElement(new int[] { 6, 26, 8, 25, 5, 20 });
mail_= new H2dMaillage(pts, elt);
--- 137,148 ----
H2dElement[] elt= new H2dElement[9];
elt[0]= new H2dElement(new int[] { 0, 9, 2, 10, 1, 11 });
! elt[1]= new H2dElement(new int[] { 1, 10, 2, 12, 3, 13 });
elt[2]= new H2dElement(new int[] { 0, 14, 4, 15, 2, 9 });
elt[3]= new H2dElement(new int[] { 4, 16, 5, 17, 2, 15 });
! elt[4]= new H2dElement(new int[] { 5, 18, 6, 19, 3, 20 });
! elt[5]= new H2dElement(new int[] { 5, 16, 4, 21, 7, 22 });
! elt[6]= new H2dElement(new int[] { 1, 13, 3, 19, 6, 23 });
! elt[7]= new H2dElement(new int[] { 7, 24, 8, 25, 5, 22 });
! elt[8]= new H2dElement(new int[] { 6, 18, 5, 25, 8, 26 });
mail_= new H2dMaillage(pts, elt);
***************
*** 149,160 ****
el= mail_.getElement(1);
assertEquals(el.getPtIndex()[0], 1);
! assertEquals(el.getPtIndex()[1], 3);
! assertEquals(el.getPtIndex()[2], 2);
assertEquals(mail_.isElementTrigoOriente(0), -1);
! assertEquals(mail_.isElementTrigoOriente(1), 1);
! assertEquals(el.isSegmentInEltOrient(1, 3), 1);
! assertEquals(el.isSegmentInEltOrient(3, 2), 1);
! assertEquals(el.isSegmentInEltOrient(2, 1), 1);
! assertEquals(el.isSegmentInEltOrient(2, 3), -1);
assertEquals(el.isSegmentInEltOrient(2, 2), 0);
}
--- 157,168 ----
el= mail_.getElement(1);
assertEquals(el.getPtIndex()[0], 1);
! assertEquals(el.getPtIndex()[1], 2);
! assertEquals(el.getPtIndex()[2], 3);
assertEquals(mail_.isElementTrigoOriente(0), -1);
! assertEquals(mail_.isElementTrigoOriente(1), -1);
! assertEquals(el.isSegmentInEltOrient(1, 3), -1);
! assertEquals(el.isSegmentInEltOrient(3, 2), -1);
! assertEquals(el.isSegmentInEltOrient(2, 1), -1);
! assertEquals(el.isSegmentInEltOrient(2, 3), 1);
assertEquals(el.isSegmentInEltOrient(2, 2), 0);
}
***************
*** 166,171 ****
assertEquals(el.getPtIndex()[1], 9);
assertEquals(el.getPtIndex()[2], 2);
! assertEquals(mail_.isElementTrigoOriente(0), -1);
! assertEquals(mail_.isElementTrigoOriente(1), 1);
assertEquals(el.isSegmentInEltOrient(0, 9), 1);
assertEquals(el.isSegmentInEltOrient(9, 2), 1);
--- 174,181 ----
assertEquals(el.getPtIndex()[1], 9);
assertEquals(el.getPtIndex()[2], 2);
! for (int i= 0; i < 9; i++) {
! assertEquals(mail_.isElementTrigoOriente(i), -1);
! }
!
assertEquals(el.isSegmentInEltOrient(0, 9), 1);
assertEquals(el.isSegmentInEltOrient(9, 2), 1);
***************
*** 225,240 ****
}
! public void testBordFast() {
initMaillage();
! mail_.computeBordFast(null);
_testBordCommun();
}
! public void testBordFastT6() {
initMaillageT6();
! mail_.computeBordFast(null);
_testBordCommunT6();
}
public void testBord() {
initMaillage();
--- 235,252 ----
}
!
! public void testBordV2() {
initMaillage();
! mail_.computeBordV2(null);
_testBordCommun();
}
! public void testBordV2T6() {
initMaillageT6();
! mail_.computeBordV2(null);
_testBordCommunT6();
}
+
public void testBord() {
initMaillage();
***************
*** 269,273 ****
assertEquals(24, bord.getPtIdxForBord(0, 7));
assertEquals(7, bord.getPtIdxForBord(0, 8));
! assertEquals(22, bord.getPtIdxForBord(0, 9));
assertEquals(4, bord.getPtIdxForBord(0, 10));
assertEquals(14, bord.getPtIdxForBord(0, 11));
--- 281,285 ----
assertEquals(24, bord.getPtIdxForBord(0, 7));
assertEquals(7, bord.getPtIdxForBord(0, 8));
! assertEquals(21, bord.getPtIdxForBord(0, 9));
assertEquals(4, bord.getPtIdxForBord(0, 10));
assertEquals(14, bord.getPtIdxForBord(0, 11));
***************
*** 277,284 ****
assertEquals(17, bord.getPtIdxForBord(1, 1));
assertEquals(5, bord.getPtIdxForBord(1, 2));
! assertEquals(18, bord.getPtIdxForBord(1, 3));
assertEquals(3, bord.getPtIdxForBord(1, 4));
! assertEquals(13, bord.getPtIdxForBord(1, 5));
}
--- 289,443 ----
assertEquals(17, bord.getPtIdxForBord(1, 1));
assertEquals(5, bord.getPtIdxForBord(1, 2));
! assertEquals(20, bord.getPtIdxForBord(1, 3));
assertEquals(3, bord.getPtIdxForBord(1, 4));
! assertEquals(12, bord.getPtIdxForBord(1, 5));
! }
+ public void testT3T6() {
+ initMaillage();
+ TObjectIntHashMap segmentPtIdx= new TObjectIntHashMap(mail_.getEltNb() * 3);
+ H2dMaillage temp= mail_.maillageT3enT6(progress_, segmentPtIdx);
+ assertEquals(temp.getEltNb(), 9);
+ assertEquals(27, temp.getPtsNb());
+ initMaillageT6();
+ for (int i= 0; i < mail_.getPtsNb(); i++) {
+ assertTrue(temp.getPt(i).isSame(mail_.getPt(i)));
+ }
+ H2dSegment s= new H2dSegment(0, 1);
+ assertEquals(11, segmentPtIdx.get(s));
+ s.setPt1Idx(1);
+ s.setPt2Idx(2);
+ assertEquals(10, segmentPtIdx.get(s));
+ s.setPt1Idx(3);
+ s.setPt2Idx(2);
+ assertEquals(12, segmentPtIdx.get(s));
+ s.setPt1Idx(1);
+ s.setPt2Idx(3);
+ assertEquals(13, segmentPtIdx.get(s));
+ s.setPt1Idx(0);
+ s.setPt2Idx(4);
+ assertEquals(14, segmentPtIdx.get(s));
+ s.setPt1Idx(4);
+ s.setPt2Idx(2);
+ assertEquals(15, segmentPtIdx.get(s));
+ s.setPt1Idx(4);
+ s.setPt2Idx(5);
+ assertEquals(16, segmentPtIdx.get(s));
+ s.setPt1Idx(5);
+ s.setPt2Idx(2);
+ assertEquals(17, segmentPtIdx.get(s));
+ s.setPt1Idx(5);
+ s.setPt2Idx(6);
+ assertEquals(18, segmentPtIdx.get(s));
+ s.setPt1Idx(3);
+ s.setPt2Idx(6);
+ assertEquals(19, segmentPtIdx.get(s));
+ s.setPt1Idx(5);
+ s.setPt2Idx(3);
+ assertEquals(20, segmentPtIdx.get(s));
+ s.setPt1Idx(4);
+ s.setPt2Idx(7);
+ assertEquals(21, segmentPtIdx.get(s));
+ s.setPt1Idx(7);
+ s.setPt2Idx(5);
+ assertEquals(22, segmentPtIdx.get(s));
+ s.setPt1Idx(1);
+ s.setPt2Idx(6);
+ assertEquals(23, segmentPtIdx.get(s));
+ s.setPt1Idx(7);
+ s.setPt2Idx(8);
+ assertEquals(24, segmentPtIdx.get(s));
+ s.setPt1Idx(8);
+ s.setPt2Idx(5);
+ assertEquals(25, segmentPtIdx.get(s));
+ s.setPt1Idx(8);
+ s.setPt2Idx(6);
+ assertEquals(26, segmentPtIdx.get(s));
+ assertTrue(temp.isSame(mail_));
+ }
+
+ public void testT61T3() {
+ initMaillageT6();
+ TIntIntHashMap T6T3Corresp= new TIntIntHashMap(mail_.getPtsNb() / 2);
+
+ H2dMaillage temp= mail_.maillageT6enT3(progress_, T6T3Corresp);
+ temp.isSame(mail_);
+ assertEquals(9, T6T3Corresp.size());
+ for (int i= 0; i < 9; i++) {
+ assertEquals(i, T6T3Corresp.get(i));
+ }
+ //Autre essai
+ H2dPoint[] pts= new H2dPoint[15];
+ pts[0]= new H2dPoint(0, 0, 0);
+ pts[1]= new H2dPoint(1, 1, 0);
+ pts[2]= new H2dPoint(2, 2, 0);
+ pts[3]= new H2dPoint(3, 3, 0);
+ pts[4]= new H2dPoint(4, 4, 0);
+ pts[5]= new H2dPoint(5, 3, 0);
+ pts[6]= new H2dPoint(6, 2, 0);
+ pts[7]= new H2dPoint(7, 1, 0);
+ pts[8]= new H2dPoint(8, 0, 0);
+ pts[9]= new H2dPoint(6, 0, 0);
+ pts[10]= new H2dPoint(4, 0, 0);
+ pts[11]= new H2dPoint(2, 0, 0);
+ pts[12]= new H2dPoint(3, 1, 0);
+ pts[13]= new H2dPoint(4, 2, 0);
+ pts[14]= new H2dPoint(5, 1, 0);
+ H2dElement[] elt= new H2dElement[4];
+ elt[0]= new H2dElement(new int[] { 0, 1, 2, 12, 10, 11 });
+ elt[1]= new H2dElement(new int[] { 2, 3, 4, 5, 6, 13 });
+ elt[2]= new H2dElement(new int[] { 6, 7, 8, 9, 10, 14 });
+ elt[3]= new H2dElement(new int[] { 10, 12, 2, 13, 6, 14 });
+ //Attention a bien initialiser la table de correspondance.
+ T6T3Corresp.clear();
+ H2dMaillage t3calc=
+ new H2dMaillage(pts, elt).maillageT6enT3(null, T6T3Corresp);
+ pts= new H2dPoint[6];
+ pts[0]= new H2dPoint(0, 0, 0);
+ pts[1]= new H2dPoint(2, 2, 0);
+ pts[2]= new H2dPoint(4, 4, 0);
+ pts[3]= new H2dPoint(6, 2, 0);
+ pts[4]= new H2dPoint(8, 0, 0);
+ pts[5]= new H2dPoint(4, 0, 0);
+ elt= new H2dElement[4];
+ elt[0]= new H2dElement(new int[] { 0, 1, 5 });
+ elt[1]= new H2dElement(new int[] { 1, 2, 3 });
+ elt[2]= new H2dElement(new int[] { 3, 4, 5 });
+ elt[3]= new H2dElement(new int[] { 5, 1, 3 });
+ H2dMaillage t3final= new H2dMaillage(pts, elt);
+ assertTrue(t3calc.isSame(t3final));
+ for (int i= 0; i < pts.length; i++) {
+ assertEquals(i, T6T3Corresp.get(2 * i));
+ }
+ }
+
+ public void testT6en4T3() {
+ initMaillageT6();
+ H2dMaillage temp= mail_.maillageT6en4T3(progress_);
+ assertEquals(36, temp.getEltNb());
+ H2dElement t= temp.getElement(0);
+ assertEquals(t.getPtIndex(0), 0);
+ assertEquals(t.getPtIndex(1), 9);
+ assertEquals(t.getPtIndex(2), 11);
+ t= temp.getElement(12);
+ assertEquals(t.getPtIndex(0), 4);
+ assertEquals(t.getPtIndex(1), 16);
+ assertEquals(t.getPtIndex(2), 15);
+ t= temp.getElement(13);
+ assertEquals(t.getPtIndex(0), 16);
+ assertEquals(t.getPtIndex(1), 5);
+ assertEquals(t.getPtIndex(2), 17);
+ t= temp.getElement(14);
+ assertEquals(t.getPtIndex(0), 17);
+ assertEquals(t.getPtIndex(1), 2);
+ assertEquals(t.getPtIndex(2), 15);
+ t= temp.getElement(15);
+ assertEquals(t.getPtIndex(0), 16);
+ assertEquals(t.getPtIndex(1), 17);
+ assertEquals(t.getPtIndex(2), 15);
+ t= temp.getElement(35);
+ assertEquals(t.getPtIndex(0), 18);
+ assertEquals(t.getPtIndex(1), 25);
+ assertEquals(t.getPtIndex(2), 26);
}
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/telemac
In directory sc8-pr-cvs1:/tmp/cvs-serv3430/test/telemac
Modified Files:
SerafinArchConvertGUI.java TestCL.java TestCas.java
TestLiquide.java TestSerafin.java TestSerafinArchConvert.java
Log Message:
Maj des projets hydraulique 2d
Index: SerafinArchConvertGUI.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/telemac/SerafinArchConvertGUI.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** SerafinArchConvertGUI.java 4 Jul 2003 14:22:41 -0000 1.2
--- SerafinArchConvertGUI.java 18 Aug 2003 11:05:20 -0000 1.3
***************
*** 231,235 ****
try
{
! SerafinWriter w = new SerafinWriter(SerafinFileFormat.getInstance());
if (isInSparc_)
w.setMachineID(FortranBinaryInputStream.X86);
--- 231,235 ----
try
{
! SerafinWriter w = new SerafinWriter(SerafinFileFormat.getInstance().getLastVersionImpl());
if (isInSparc_)
w.setMachineID(FortranBinaryInputStream.X86);
***************
*** 283,287 ****
try
{
! final SerafinReader reader = new SerafinReader(SerafinFileFormat.getInstance());
reader.setFile(new FileInputStream(_f));
reader.setProgressReceiver(progression_);
--- 283,287 ----
try
{
! final SerafinReader reader = new SerafinReader(SerafinFileFormat.getInstance().getLastVersionImpl());
reader.setFile(new FileInputStream(_f));
reader.setProgressReceiver(progression_);
Index: TestCL.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/telemac/TestCL.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** TestCL.java 4 Jul 2003 14:22:41 -0000 1.5
--- TestCL.java 18 Aug 2003 11:05:20 -0000 1.6
***************
*** 207,211 ****
TelemacCLInterface inter=getInter(fic_);
File tmpFile=createTempFile();
! FileOperationSynthese syntheseR=TelemacCLFileFormat.getInstance().write(tmpFile, inter, null);
assertNull(syntheseR.getAnalyze());
_interfaceTest(getInter(tmpFile));
--- 207,211 ----
TelemacCLInterface inter=getInter(fic_);
File tmpFile=createTempFile();
! FileOperationSynthese syntheseR=TelemacCLFileFormat.getInstance().getLastVersionImpl().write(tmpFile, inter, null);
assertNull(syntheseR.getAnalyze());
_interfaceTest(getInter(tmpFile));
***************
*** 216,220 ****
{
FileOperationSynthese syntheseR= new FileOperationSynthese();
! TelemacCLInterface r=TelemacCLFileFormat.getInstance().read(_f, syntheseR, null);
assertNull(syntheseR.getAnalyze());
return r;
--- 216,220 ----
{
FileOperationSynthese syntheseR= new FileOperationSynthese();
! TelemacCLInterface r=TelemacCLFileFormat.getInstance().getLastVersionImpl().read(_f, syntheseR, null);
assertNull(syntheseR.getAnalyze());
return r;
Index: TestCas.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/telemac/TestCas.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TestCas.java 4 Jul 2003 14:22:41 -0000 1.2
--- TestCas.java 18 Aug 2003 11:05:20 -0000 1.3
***************
*** 20,24 ****
import org.fudaa.dodico.dico.DicoCasWriter;
import org.fudaa.dodico.fichiers.FileOperationSynthese;
! import org.fudaa.dodico.telemac.io.TelemacCasFileFormat;
import org.fudaa.dodico.test.TestIO;
--- 20,24 ----
import org.fudaa.dodico.dico.DicoCasWriter;
import org.fudaa.dodico.fichiers.FileOperationSynthese;
! import org.fudaa.dodico.telemac.io.Telemac2dFileFormat;
import org.fudaa.dodico.test.TestIO;
***************
*** 42,46 ****
DicoCasInterface inter = _r;
assertEquals(inter.getNbInput(), 28);
! DicoModelAbstract dico = TelemacCasFileFormat.getInstance().getDico();
DicoEntite ent = dico.getEntite("CONDITIONS INITIALES");
String t = inter.getValue(ent);
--- 42,46 ----
DicoCasInterface inter = _r;
assertEquals(inter.getNbInput(), 28);
! DicoModelAbstract dico = Telemac2dFileFormat.getInstance().getLastVersionImpl().getDico();
DicoEntite ent = dico.getEntite("CONDITIONS INITIALES");
String t = inter.getValue(ent);
***************
*** 64,68 ****
DicoCasInterface inter=getInter(fic_);
File tmpFile=createTempFile();
! FileOperationSynthese syntheseR=TelemacCasFileFormat.getInstance().write(tmpFile, inter, null);
assertNull(syntheseR.getAnalyze());
_interfaceTest(getInter(tmpFile));
--- 64,68 ----
DicoCasInterface inter=getInter(fic_);
File tmpFile=createTempFile();
! FileOperationSynthese syntheseR=Telemac2dFileFormat.getInstance().getLastVersionImpl().writeCas(tmpFile, inter, null);
assertNull(syntheseR.getAnalyze());
_interfaceTest(getInter(tmpFile));
***************
*** 73,77 ****
{
FileOperationSynthese syntheseR= new FileOperationSynthese();
! DicoCasInterface r=TelemacCasFileFormat.getInstance().read(_f, syntheseR, null);
assertNull(syntheseR.getAnalyze());
return r;
--- 73,77 ----
{
FileOperationSynthese syntheseR= new FileOperationSynthese();
! DicoCasInterface r=Telemac2dFileFormat.getInstance().getLastVersionImpl().readCas(_f, syntheseR, null);
assertNull(syntheseR.getAnalyze());
return r;
Index: TestLiquide.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/telemac/TestLiquide.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** TestLiquide.java 6 Aug 2003 08:36:31 -0000 1.4
--- TestLiquide.java 18 Aug 2003 11:05:20 -0000 1.5
***************
*** 76,80 ****
TelemacLiquideInterface inter=getInter(fic_);
File tmpFile=createTempFile();
! FileOperationSynthese syntheseR=TelemacLiquideFileFormat.getInstance().write(tmpFile, inter, null);
assertNull(syntheseR.getAnalyze());
_interfaceTest(getInter(tmpFile));
--- 76,80 ----
TelemacLiquideInterface inter=getInter(fic_);
File tmpFile=createTempFile();
! FileOperationSynthese syntheseR=TelemacLiquideFileFormat.getInstance().getLastVersionImpl().write(tmpFile, inter, null);
assertNull(syntheseR.getAnalyze());
_interfaceTest(getInter(tmpFile));
***************
*** 85,89 ****
{
FileOperationSynthese syntheseR= new FileOperationSynthese();
! TelemacLiquideInterface r=TelemacLiquideFileFormat.getInstance().read(_f, syntheseR, null);
assertNull(syntheseR.getAnalyze());
return r;
--- 85,89 ----
{
FileOperationSynthese syntheseR= new FileOperationSynthese();
! TelemacLiquideInterface r=TelemacLiquideFileFormat.getInstance().getLastVersionImpl().read(_f, syntheseR, null);
assertNull(syntheseR.getAnalyze());
return r;
Index: TestSerafin.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/telemac/TestSerafin.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** TestSerafin.java 6 Aug 2003 08:36:31 -0000 1.9
--- TestSerafin.java 18 Aug 2003 11:05:20 -0000 1.10
***************
*** 10,14 ****
--- 10,18 ----
import java.io.File;
+ import org.apache.tools.ant.taskdefs.TempFile;
+
import org.fudaa.dodico.commun.DodicoLib;
+ import org.fudaa.dodico.fichiers.FileFormat;
+ import org.fudaa.dodico.fichiers.FileFormatVersion;
import org.fudaa.dodico.fichiers.FileOperationSynthese;
import org.fudaa.dodico.h2d.H2dElement;
***************
*** 21,24 ****
--- 25,29 ----
import org.fudaa.dodico.telemac.io.SerafinInterface;
import org.fudaa.dodico.telemac.io.SerafinMNTAdapter;
+ import org.fudaa.dodico.telemac.io.SerafinWriter;
import org.fudaa.dodico.test.TestIO;
/**
***************
*** 27,44 ****
*/
! public class TestSerafin extends TestIO
! {
SerafinInterface inter_;
-
/** */
! public TestSerafin()
! {
super("exemple.res");
! inter_=getInter(fic_);
}
! public void _interfaceTest(SerafinInterface _t)
! {
assertNotNull(_t);
//TITRE
--- 32,45 ----
*/
! public class TestSerafin extends TestIO {
SerafinInterface inter_;
/** */
! public TestSerafin() {
super("exemple.res");
! inter_= getInter(fic_);
}
! public void _interfaceTest(SerafinInterface _t) {
assertNotNull(_t);
//TITRE
***************
*** 49,60 ****
assertEquals(_t.getNbv1(), 6);
//TEXT
! String temp = _t.getVariable(0);
assertEquals(temp, "VITESSE U");
! temp = _t.getVariable(5);
assertEquals(temp, "VITESSE SCALAIRE");
//LUNIT
! temp = _t.getUnite(1);
assertEquals(temp, "M/S");
! temp = _t.getUnite(4);
assertEquals(temp, "M");
//IPARAM
--- 50,61 ----
assertEquals(_t.getNbv1(), 6);
//TEXT
! String temp= _t.getVariable(0);
assertEquals(temp, "VITESSE U");
! temp= _t.getVariable(5);
assertEquals(temp, "VITESSE SCALAIRE");
//LUNIT
! temp= _t.getUnite(1);
assertEquals(temp, "M/S");
! temp= _t.getUnite(4);
assertEquals(temp, "M");
//IPARAM
***************
*** 63,67 ****
assertEquals(_t.getIdate(), 0);
//NELEM
! H2dMaillage maillage = _t.getMaillage();
assertEquals(maillage.getEltNb(), 3087);
//NPOIN1
--- 64,68 ----
assertEquals(_t.getIdate(), 0);
//NELEM
! H2dMaillage maillage= _t.getMaillage();
assertEquals(maillage.getEltNb(), 3087);
//NPOIN1
***************
*** 70,76 ****
assertEquals(maillage.getEltType(), H2dElement.T3);
//IKLE1
! assertEquals(maillage.getElts()[0].getPtIndex()[1], 1545);
assertEquals(
! maillage.getElts()[maillage.getEltNb() - 1].getPtIndex()[0],
219);
//IPOBO1
--- 71,77 ----
assertEquals(maillage.getEltType(), H2dElement.T3);
//IKLE1
! assertEquals(maillage.getElement(0).getPtIndex()[1], 1545);
assertEquals(
! maillage.getElement(maillage.getEltNb() - 1).getPtIndex()[0],
219);
//IPOBO1
***************
*** 80,100 ****
assertEquals(
maillage.getPt(9).getX(),
! (double) Float.intBitsToFloat(1160462115),
eps_);
//Y1
assertEquals(
maillage.getPt(11).getY(),
! (double) Float.intBitsToFloat(1140111573),
eps_);
//Nombre de pas temps
! int tempInt = _t.getNbPasDeTemps();
assertEquals(tempInt, 2);
! double tempDouble = _t.getPasDeTemps()[1];
! assertEquals(tempDouble, (double) Float.intBitsToFloat(1153138688), eps_);
//pas de temps 1, variable 3
//premiere variable
assertEquals(
_t.getDonnees(0, 2, 0),
! (double) Float.intBitsToFloat(1076258406),
eps_);
//pas de temps 2, variable 4
--- 81,101 ----
assertEquals(
maillage.getPt(9).getX(),
! (double)Float.intBitsToFloat(1160462115),
eps_);
//Y1
assertEquals(
maillage.getPt(11).getY(),
! (double)Float.intBitsToFloat(1140111573),
eps_);
//Nombre de pas temps
! int tempInt= _t.getNbPasDeTemps();
assertEquals(tempInt, 2);
! double tempDouble= _t.getPasDeTemps(1);
! assertEquals(tempDouble, (double)Float.intBitsToFloat(1153138688), eps_);
//pas de temps 1, variable 3
//premiere variable
assertEquals(
_t.getDonnees(0, 2, 0),
! (double)Float.intBitsToFloat(1076258406),
eps_);
//pas de temps 2, variable 4
***************
*** 102,145 ****
assertEquals(
_t.getDonnees(1, 3, maillage.getPtsNb() - 1),
! (double) Float.intBitsToFloat(1093124747),
eps_);
}
! public void testMntAdapter()
! {
! SerafinInterface t = inter_;
assertNotNull(t);
! int id = SerafinMNTAdapter.getIndex(t, "HAUTEUR D'EAU");
assertEquals(id, 2);
! SerafinMNTAdapter a = new SerafinMNTAdapter(t, id, 0);
! try
! {
! String[] r = a.read();
if (r != null)
DodicoLib.printStringArray(r);
assertNull(r);
! MNTZone[] zones = a.getMNTZones();
assertNotNull(zones);
assertNotNull(zones[0]);
! MNTSemis semis = zones[0].getSemis();
assertNotNull(semis);
//X1
assertEquals(
semis.getX(9),
! (double) Float.intBitsToFloat(1160462115),
eps_);
//Y1
assertEquals(
semis.getY(11),
! (double) Float.intBitsToFloat(1140111573),
eps_);
assertEquals(
semis.getZ(0),
! (double) Float.intBitsToFloat(1076258406),
eps_);
! }
! catch (Exception _e)
! {
_e.printStackTrace();
}
--- 103,142 ----
assertEquals(
_t.getDonnees(1, 3, maillage.getPtsNb() - 1),
! (double)Float.intBitsToFloat(1093124747),
eps_);
}
! public void testMntAdapter() {
! SerafinInterface t= inter_;
assertNotNull(t);
! int id= SerafinMNTAdapter.getIndex(t, "HAUTEUR D'EAU");
assertEquals(id, 2);
! SerafinMNTAdapter a= new SerafinMNTAdapter(t, id, 0);
! try {
! String[] r= a.read();
if (r != null)
DodicoLib.printStringArray(r);
assertNull(r);
! MNTZone[] zones= a.getMNTZones();
assertNotNull(zones);
assertNotNull(zones[0]);
! MNTSemis semis= zones[0].getSemis();
assertNotNull(semis);
//X1
assertEquals(
semis.getX(9),
! (double)Float.intBitsToFloat(1160462115),
eps_);
//Y1
assertEquals(
semis.getY(11),
! (double)Float.intBitsToFloat(1140111573),
eps_);
assertEquals(
semis.getZ(0),
! (double)Float.intBitsToFloat(1076258406),
eps_);
! } catch (Exception _e) {
_e.printStackTrace();
}
***************
*** 150,159 ****
*
*/
! public void testEcriture()
! {
! SerafinInterface inter = inter_;
! File tmpFile = createTempFile();
! FileOperationSynthese syntheseR =
! SerafinFileFormat.getInstance().write(tmpFile, inter, null);
if (syntheseR.getAnalyze() != null)
assertFalse(syntheseR.getAnalyze().containsErrors());
--- 147,157 ----
*
*/
! public void testEcriture() {
! SerafinInterface inter= inter_;
! File tmpFile= createTempFile();
! SerafinWriter w= SerafinFileFormat.getInstance().getLastVersionImpl().createSerafinWriter();
! w.setMachineSPARC();
! FileOperationSynthese syntheseR= FileFormatVersion.initOperation(w, null, tmpFile);
! w.write(inter, syntheseR);
if (syntheseR.getAnalyze() != null)
assertFalse(syntheseR.getAnalyze().containsErrors());
***************
*** 162,196 ****
}
! public SerafinInterface getInter(File _f)
! {
! FileOperationSynthese syntheseR = new FileOperationSynthese();
! SerafinInterface r =
! SerafinFileFormat.getInstance().read(_f, syntheseR, null);
if (syntheseR.getAnalyze() != null)
assertFalse(syntheseR.getAnalyze().containsErrors());
return r;
}
!
!
! public void testRechercheFrontiereWithIpobo()
! {
! SerafinInterface inter=inter_;
! H2dLib.computeBord(inter.getMaillage(), inter.getPtsFrontiere(), null);
! H2dMaillageBord b=inter.getMaillage().getPtsFrontiere();
assertEquals(b.getBordInternNb(), 1);
}
!
! public void testRechercheFrontiereinterne()
! {
! SerafinInterface inter=inter_;
! inter.getMaillage().computeBord(null);
! assertTrue(inter.getMaillage().getPtsFrontiere().isSame(inter.getPtsFrontiere()));
! }
/**
*
*/
! public void testLecture()
! {
_interfaceTest(inter_);
--- 160,190 ----
}
! public SerafinInterface getInter(File _f) {
! FileOperationSynthese syntheseR= new FileOperationSynthese();
! SerafinInterface r=
! SerafinFileFormat.getInstance().getLastVersionImpl().read(_f, syntheseR, null);
if (syntheseR.getAnalyze() != null)
assertFalse(syntheseR.getAnalyze().containsErrors());
return r;
}
!
! public void testRechercheFrontiereWithIpobo() {
! SerafinInterface inter= inter_;
! H2dMaillage.computeBord(inter.getMaillage(), inter.getPtsFrontiere(), null);
! H2dMaillageBord b= inter.getMaillage().getPtsFrontiere();
assertEquals(b.getBordInternNb(), 1);
}
!
! public void testRechercheFrontiereinterne() {
! SerafinInterface inter= inter_;
! inter.getMaillage().computeBordV2(null);
! assertTrue(
! inter.getMaillage().getPtsFrontiere().isSame(inter.getPtsFrontiere()));
! }
/**
*
*/
! public void testLecture() {
_interfaceTest(inter_);
Index: TestSerafinArchConvert.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/telemac/TestSerafinArchConvert.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TestSerafinArchConvert.java 4 Jul 2003 14:22:41 -0000 1.2
--- TestSerafinArchConvert.java 18 Aug 2003 11:05:20 -0000 1.3
***************
*** 39,43 ****
public static void main(String[] args)
{
! SerafinFileFormat format=SerafinFileFormat.getInstance();
if(args.length<2)
{
--- 39,43 ----
public static void main(String[] args)
{
! SerafinFileFormat.SerafinVersion format=SerafinFileFormat.getInstance().getLastVersionImpl();
if(args.length<2)
{
|
|
From: <de...@us...> - 2003-08-18 11:30:26
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/reflux
In directory sc8-pr-cvs1:/tmp/cvs-serv3430/test/reflux
Modified Files:
TestCorEleBth.java TestDunes.java TestINP.java
Log Message:
Maj des projets hydraulique 2d
Index: TestCorEleBth.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/reflux/TestCorEleBth.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** TestCorEleBth.java 7 Aug 2003 08:01:42 -0000 1.6
--- TestCorEleBth.java 18 Aug 2003 11:05:20 -0000 1.7
***************
*** 29,43 ****
* @version $Id$
*/
! public class TestCorEleBth extends TestIO
! {
! public TestCorEleBth()
! {
super("corelebth.cor");
}
! public void _interfaceTest(
! CorEleBthInterface _inter)
! {
assertNotNull(_inter);
CorEleBthInterface t= _inter;
--- 29,39 ----
* @version $Id$
*/
! public class TestCorEleBth extends TestIO {
! public TestCorEleBth() {
super("corelebth.cor");
}
! public void _interfaceTest(CorEleBthInterface _inter) {
assertNotNull(_inter);
CorEleBthInterface t= _inter;
***************
*** 68,72 ****
assertEquals(d, dLu, eps_);
//test sur l'element 33
! int[] elems= maill.getElts()[33].getPtIndex();
assertEquals(maill.getEltNb(), 792);
assertEquals(elems.length, 6);
--- 64,68 ----
assertEquals(d, dLu, eps_);
//test sur l'element 33
! int[] elems= maill.getElement(33).getPtIndex();
assertEquals(maill.getEltNb(), 792);
assertEquals(elems.length, 6);
***************
*** 91,98 ****
}
! public static void printAnalyze(String _titre, DodicoAnalyze _analyze)
! {
! if (!_analyze.isEmpty())
! {
System.out.println(_titre);
_analyze.printResume();
--- 87,92 ----
}
! public static void printAnalyze(String _titre, DodicoAnalyze _analyze) {
! if (!_analyze.isEmpty()) {
System.out.println(_titre);
_analyze.printResume();
***************
*** 100,117 ****
}
! public static void main(String[] args)
! {
HashMap arg= DodicoLib.parseArgs(args);
! String fileName= (String) arg.get("-f");
! if (fileName == null)
! fileName= (String) arg.get("-file");
if (fileName == null)
! {
System.err.println("Usage: -file=monFichier.mail -out=monFichierReecrit");
return;
}
File f= new File(fileName);
! if (!f.exists())
! {
System.err.println("Fichier inexistant " + f.getAbsolutePath());
return;
--- 94,108 ----
}
! public static void main(String[] args) {
HashMap arg= DodicoLib.parseArgs(args);
! String fileName= (String)arg.get("-f");
if (fileName == null)
! fileName= (String)arg.get("-file");
! if (fileName == null) {
System.err.println("Usage: -file=monFichier.mail -out=monFichierReecrit");
return;
}
File f= new File(fileName);
! if (!f.exists()) {
System.err.println("Fichier inexistant " + f.getAbsolutePath());
return;
***************
*** 119,124 ****
String base= f.getAbsolutePath();
int temp= base.lastIndexOf('.');
! if (temp < 0)
! {
System.err.println("Erreur.Le fichier ne possede pas d'extension");
return;
--- 110,114 ----
String base= f.getAbsolutePath();
int temp= base.lastIndexOf('.');
! if (temp < 0) {
System.err.println("Erreur.Le fichier ne possede pas d'extension");
return;
***************
*** 126,131 ****
base= base.substring(0, temp);
File cor= new File(base + ".cor");
! if (!cor.exists())
! {
System.err.println(
"Le fichier " + cor.getAbsolutePath() + " n'existe pas");
--- 116,120 ----
base= base.substring(0, temp);
File cor= new File(base + ".cor");
! if (!cor.exists()) {
System.err.println(
"Le fichier " + cor.getAbsolutePath() + " n'existe pas");
***************
*** 133,138 ****
}
File ele= new File(base + ".ele");
! if (!cor.exists())
! {
System.err.println(
"Le fichier " + ele.getAbsolutePath() + " n'existe pas");
--- 122,126 ----
}
File ele= new File(base + ".ele");
! if (!cor.exists()) {
System.err.println(
"Le fichier " + ele.getAbsolutePath() + " n'existe pas");
***************
*** 140,145 ****
}
File bth= new File(base + ".bth");
! if (!cor.exists())
! {
System.err.println(
"Le fichier " + bth.getAbsolutePath() + " n'existe pas");
--- 128,132 ----
}
File bth= new File(base + ".bth");
! if (!cor.exists()) {
System.err.println(
"Le fichier " + bth.getAbsolutePath() + " n'existe pas");
***************
*** 148,152 ****
CorEleBthReader reader= null;
CorEleBthInterface t= null;
! reader= new CorEleBthReader(CorEleBthFileFormat.getInstance());
reader.setIn(cor, ele, bth);
reader.setProgressReceiver(new ProgressionBuAdapter(null));
--- 135,140 ----
CorEleBthReader reader= null;
CorEleBthInterface t= null;
! reader=
! CorEleBthFileFormat.getInstance().getLastVersionImpl().createReader();
reader.setIn(cor, ele, bth);
reader.setProgressReceiver(new ProgressionBuAdapter(null));
***************
*** 156,190 ****
printAnalyze("FICHIERS cor,ele,bth", analyse);
H2dMaillage mail= t.getMaillage();
! if (mail != null)
! {
DodicoLib.printFields(mail, false);
}
! if (t == null)
! {
System.out.println("probl de lecture");
}
! String out= (String) arg.get("-out");
if (out == null)
return;
File corOut= new File(out + ".cor");
! if (corOut.exists())
! {
System.out.println("Le fichier existe deja " + corOut.getAbsolutePath());
return;
}
File eleOut= new File(out + ".ele");
! if (eleOut.exists())
! {
System.out.println("Le fichier existe deja " + eleOut.getAbsolutePath());
return;
}
File bthOut= new File(out + ".bth");
! if (bthOut.exists())
! {
System.out.println("Le fichier existe deja " + bthOut.getAbsolutePath());
return;
}
CorEleBthWriter w= null;
! w= new CorEleBthWriter(CorEleBthFileFormat.getInstance());
w.setFile(corOut, eleOut, bthOut);
w.setProgressReceiver(new ProgressionBuAdapter(null));
--- 144,173 ----
printAnalyze("FICHIERS cor,ele,bth", analyse);
H2dMaillage mail= t.getMaillage();
! if (mail != null) {
DodicoLib.printFields(mail, false);
}
! if (t == null) {
System.out.println("probl de lecture");
}
! String out= (String)arg.get("-out");
if (out == null)
return;
File corOut= new File(out + ".cor");
! if (corOut.exists()) {
System.out.println("Le fichier existe deja " + corOut.getAbsolutePath());
return;
}
File eleOut= new File(out + ".ele");
! if (eleOut.exists()) {
System.out.println("Le fichier existe deja " + eleOut.getAbsolutePath());
return;
}
File bthOut= new File(out + ".bth");
! if (bthOut.exists()) {
System.out.println("Le fichier existe deja " + bthOut.getAbsolutePath());
return;
}
CorEleBthWriter w= null;
! w= CorEleBthFileFormat.getInstance().getLastVersionImpl().createWriter();
w.setFile(corOut, eleOut, bthOut);
w.setProgressReceiver(new ProgressionBuAdapter(null));
***************
*** 199,216 ****
*
*/
! public void testEcriture()
! {
! CorEleBthInterface inter=getInter(fic_);
! File tmpFile=createTempFile();
! FileOperationSynthese syntheseR=CorEleBthFileFormat.getInstance().write(tmpFile, inter, null);
assertNull(syntheseR.getAnalyze());
_interfaceTest(getInter(tmpFile));
-
- }
! public CorEleBthInterface getInter(File _f)
! {
FileOperationSynthese syntheseR= new FileOperationSynthese();
! CorEleBthInterface r=CorEleBthFileFormat.getInstance().read(_f, syntheseR, null);
assertNull(syntheseR.getAnalyze());
return r;
--- 182,202 ----
*
*/
! public void testEcriture() {
! CorEleBthInterface inter= getInter(fic_);
! File tmpFile= createTempFile();
! FileOperationSynthese syntheseR=
! CorEleBthFileFormat.getInstance().getLastVersionImpl().write(
! tmpFile,
! inter,
! null);
assertNull(syntheseR.getAnalyze());
_interfaceTest(getInter(tmpFile));
! }
!
! public CorEleBthInterface getInter(File _f) {
FileOperationSynthese syntheseR= new FileOperationSynthese();
! CorEleBthInterface r=
! CorEleBthFileFormat.getInstance().getLastVersionImpl().read(_f, syntheseR, null);
assertNull(syntheseR.getAnalyze());
return r;
***************
*** 220,225 ****
*
*/
! public void testLecture()
! {
_interfaceTest(getInter(fic_));
--- 206,210 ----
*
*/
! public void testLecture() {
_interfaceTest(getInter(fic_));
Index: TestDunes.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/reflux/TestDunes.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** TestDunes.java 7 Aug 2003 08:01:42 -0000 1.7
--- TestDunes.java 18 Aug 2003 11:05:20 -0000 1.8
***************
*** 69,76 ****
assertEquals(pt.getY(), 1d, eps_);
assertEquals(pt.getZ(), 0.1, eps_);
! H2dElement[] elems = t.getMaillage().getElts();
! temp = elems.length;
assertEquals(temp, 9);
! int[] indices = elems[1].getPtIndex();
temp = indices.length;
assertEquals(temp, 3);
--- 69,76 ----
assertEquals(pt.getY(), 1d, eps_);
assertEquals(pt.getZ(), 0.1, eps_);
! //H2dElement[] elems = t.getMaillage().getElts();
! temp = t.getMaillage().getEltNb();
assertEquals(temp, 9);
! int[] indices = t.getMaillage().getElement(1).getPtIndex();
temp = indices.length;
assertEquals(temp, 3);
***************
*** 78,82 ****
assertEquals(indices[1], 0);
assertEquals(indices[2], 5);
! indices = elems[6].getPtIndex();
temp = indices.length;
assertEquals(temp, 3);
--- 78,82 ----
assertEquals(indices[1], 0);
assertEquals(indices[2], 5);
! indices = t.getMaillage().getElement(6).getPtIndex();
temp = indices.length;
assertEquals(temp, 3);
***************
*** 93,97 ****
DunesInterface inter=getInter(fic_);
File tmpFile=createTempFile();
! FileOperationSynthese syntheseR=DunesFileFormat.getInstance().write(tmpFile, inter, null);
assertNull(syntheseR.getAnalyze());
_interfaceTest(getInter(tmpFile));
--- 93,97 ----
DunesInterface inter=getInter(fic_);
File tmpFile=createTempFile();
! FileOperationSynthese syntheseR=DunesFileFormat.getInstance().getLastVersionImpl().write(tmpFile, inter, null);
assertNull(syntheseR.getAnalyze());
_interfaceTest(getInter(tmpFile));
***************
*** 102,106 ****
{
FileOperationSynthese syntheseR= new FileOperationSynthese();
! DunesInterface r=DunesFileFormat.getInstance().read(_f, syntheseR, null);
assertNull(syntheseR.getAnalyze());
if(syntheseR.containsMessages())
--- 102,106 ----
{
FileOperationSynthese syntheseR= new FileOperationSynthese();
! DunesInterface r=DunesFileFormat.getInstance().getLastVersionImpl().read(_f, syntheseR, null);
assertNull(syntheseR.getAnalyze());
if(syntheseR.containsMessages())
***************
*** 140,144 ****
ProgressionBuAdapter progress = new ProgressionBuAdapter(new BuTask());
FileOperationSynthese op=new FileOperationSynthese();
! DunesInterface inter = DunesFileFormat.getInstance().read(f, op, progress);
if(op.containsMessages()) op.getAnalyze().printResume();
fileName = (String) arg.get("-out");
--- 140,144 ----
ProgressionBuAdapter progress = new ProgressionBuAdapter(new BuTask());
FileOperationSynthese op=new FileOperationSynthese();
! DunesInterface inter = DunesFileFormat.getInstance().getLastVersionImpl().read(f, op, progress);
if(op.containsMessages()) op.getAnalyze().printResume();
fileName = (String) arg.get("-out");
***************
*** 154,158 ****
return;
}
! FileOperationSynthese opw=DunesFileFormat.getInstance().write(out, inter, progress);
if(opw.containsMessages()) opw.getAnalyze().printResume();
--- 154,158 ----
return;
}
! FileOperationSynthese opw=DunesFileFormat.getInstance().getLastVersionImpl().write(out, inter, progress);
if(opw.containsMessages()) opw.getAnalyze().printResume();
Index: TestINP.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/reflux/TestINP.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** TestINP.java 6 Aug 2003 08:36:31 -0000 1.5
--- TestINP.java 18 Aug 2003 11:05:20 -0000 1.6
***************
*** 52,60 ****
public void _interfaceTest(INPInterface _t)
{
INPInterface t=_t;
assertTrue("5.0".equals(t.getVersion()));
assertEquals(t.getTypeProjet(), H2dProjetType.COURANTOLOGIE_2D);
assertNotNull(t.getEntiteValue());
! assertTrue(t.getEntiteValue().containsKey(t.getDicoModel().getEntite("ITERATION")));
H2dMaillage m=t.getMaillage();
assertEquals(m.getPtsNb(), 1791);
--- 52,61 ----
public void _interfaceTest(INPInterface _t)
{
+ INPFileFormat.INPVersion version=INPFileFormat.getInstance().getLastINPVersionImpl();
INPInterface t=_t;
assertTrue("5.0".equals(t.getVersion()));
assertEquals(t.getTypeProjet(), H2dProjetType.COURANTOLOGIE_2D);
assertNotNull(t.getEntiteValue());
! assertTrue(t.getEntiteValue().containsKey(version.getDico().getEntite("ITERATION")));
H2dMaillage m=t.getMaillage();
assertEquals(m.getPtsNb(), 1791);
***************
*** 67,71 ****
assertEquals(pt.getY(), 7.5,eps_);
assertEquals(pt.getZ(), 12.030303,eps_);
! int[] itemp=t.getMaillage().getPtsExtremitesElement();
assertNotNull("Les points frontiere ne sont pas nuls",itemp);
assertEquals(itemp[5], 18);
--- 68,72 ----
assertEquals(pt.getY(), 7.5,eps_);
assertEquals(pt.getZ(), 12.030303,eps_);
! int[] itemp=t.getPtsExtremitesElement();
assertNotNull("Les points frontiere ne sont pas nuls",itemp);
assertEquals(itemp[5], 18);
***************
*** 103,109 ****
! H2dElement[] elems=t.getMaillage().getElts();
! assertEquals(elems.length, 792);
! itemp=elems[791].getPtIndex();
assertEquals(itemp[0], 1788);
assertEquals(itemp[1], 1789);
--- 104,110 ----
! //H2dElement[] elems=t.getMaillage().getElts();
! assertEquals(t.getMaillage().getEltNb(), 792);
! itemp=t.getMaillage().getElement(791).getPtIndex();
assertEquals(itemp[0], 1788);
assertEquals(itemp[1], 1789);
***************
*** 171,178 ****
Map dtemp=t.getEntiteValue();
assertNotNull(dtemp);
- H2dRefluxDicoModel model=t.getDicoModel();
for(int i=8;i>=0;i--)
{
! DicoEntite ent=model.getCoefContribution(i);
assertNotNull(ent);
assertEquals(Double.parseDouble((String)dtemp.get(ent)) , i,eps_);
--- 172,178 ----
Map dtemp=t.getEntiteValue();
assertNotNull(dtemp);
for(int i=8;i>=0;i--)
{
! DicoEntite ent=version.getCoefContribution(i);
assertNotNull(ent);
assertEquals(Double.parseDouble((String)dtemp.get(ent)) , i,eps_);
***************
*** 206,210 ****
{
FileOperationSynthese syntheseR= new FileOperationSynthese();
! INPInterface r=INPFileFormat.getInstance().read(_f, syntheseR, null);
if(syntheseR.getAnalyze()!=null)
System.out.println( syntheseR.getAnalyze().getResume());
--- 206,210 ----
{
FileOperationSynthese syntheseR= new FileOperationSynthese();
! INPInterface r=INPFileFormat.getInstance().getLastINPVersionImpl().read(_f, syntheseR, null);
if(syntheseR.getAnalyze()!=null)
System.out.println( syntheseR.getAnalyze().getResume());
***************
*** 246,250 ****
FileOperationSynthese syntheseR= new FileOperationSynthese();
! INPInterface inpInter=INPFileFormat.getInstance().read(f, syntheseR, null);
DodicoAnalyze infos = syntheseR.getAnalyze();
if (infos != null)
--- 246,250 ----
FileOperationSynthese syntheseR= new FileOperationSynthese();
! INPInterface inpInter=INPFileFormat.getInstance().getLastINPVersionImpl().read(f, syntheseR, null);
DodicoAnalyze infos = syntheseR.getAnalyze();
if (infos != null)
|
|
From: <de...@us...> - 2003-08-18 11:21:41
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test In directory sc8-pr-cvs1:/tmp/cvs-serv3430/test Removed Files: TestStructure.java Log Message: Maj des projets hydraulique 2d --- TestStructure.java DELETED --- |
|
From: <de...@us...> - 2003-08-18 11:21:41
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/telemac
In directory sc8-pr-cvs1:/tmp/cvs-serv3430/telemac
Modified Files:
TelemacDicoManager.java
Log Message:
Maj des projets hydraulique 2d
Index: TelemacDicoManager.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/TelemacDicoManager.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** TelemacDicoManager.java 6 Aug 2003 15:55:51 -0000 1.5
--- TelemacDicoManager.java 18 Aug 2003 11:05:20 -0000 1.6
***************
*** 9,15 ****
--- 9,22 ----
package org.fudaa.dodico.telemac;
+ import java.util.HashMap;
+
+ import org.fudaa.dodico.commun.DodicoLib;
+ import org.fudaa.dodico.dico.DicoCasFileFormat;
+ import org.fudaa.dodico.dico.DicoCasFileFormatVersion;
import org.fudaa.dodico.dico.DicoLanguage;
import org.fudaa.dodico.dico.DicoManager;
import org.fudaa.dodico.dico.DicoModelAbstract;
+ import org.fudaa.dodico.telemac.io.Telemac2dFileFormat;
+ import org.fudaa.dodico.telemac.io.TelemacDicoFileFormat;
/**
***************
*** 17,71 ****
* @version $Id$
*/
! public class TelemacDicoManager extends DicoManager
! {
!
! private final static TelemacDicoManager INSTANCE = new TelemacDicoManager();
! // private final static DicoModelAbstract Telemac2dv5p3=new DicoTelemac2dv5p3();
! public final static TelemacDicoManager getINSTANCE()
! {
! return INSTANCE;
! }
!
!
- protected TelemacDicoManager()
- {
- super(
- new DicoManager.DicoDescription[] {
- new DicoManager.DicoDescription("artemis","v5p3"),
- new DicoManager.DicoDescription("estel","2dv5p3"),
- new DicoManager.DicoDescription("estel","3dv5p3"),
- new DicoManager.DicoDescription("postel3d","v5p3"),
- new DicoManager.DicoDescription("sisyphe","v5p3"),
- new DicoManager.DicoDescription("stbtel","v5p3"),
- new DicoManager.DicoDescription("subief2d","v5p3"),
- new DicoManager.DicoDescription("telemac2d","v5p3"),
- new DicoManager.DicoDescription("telemac3d","v5p3"),
- new DicoManager.DicoDescription("tomawac","v5p3"),
- },
- "org.fudaa.dodico.telemac.dico.");
}
! public static void main(String[] args)
! {
! System.out.println(TelemacDicoManager.INSTANCE.getLastVersion("telemac2d"));
! System.out.println(TelemacDicoManager.INSTANCE.getLastVersion("telemac2d",DicoLanguage.ENGLISH_ID));
}
! /**
! *
! */
! public DicoModelAbstract createDico(DicoDescription _desc, int _language)
! {
! // if( (_desc.getName().equals(Telemac2dv5p3.getCodeName()))
! // && (_desc.getVersion().equals(Telemac2dv5p3.getVersion()))
! // && (_language==Telemac2dv5p3.getLanguageIndex()))
! // {
! // return Telemac2dv5p3;
! // }
! //
! return super.createDico(_desc, _language);
}
--- 24,55 ----
* @version $Id$
*/
! public class TelemacDicoManager extends DicoManager {
! public final static TelemacDicoManager INSTANCE= new TelemacDicoManager();
! static {
! HashMap map= new HashMap(11);
! map.put(new TelemacDicoFileFormat("artemis"), new String[] { "v5p3" });
! map.put(new TelemacDicoFileFormat("estel2d"), new String[] { "v5p3" });
! map.put(new TelemacDicoFileFormat("estel3d"), new String[] { "v5p3" });
! map.put(new TelemacDicoFileFormat("postel3d"), new String[] { "v5p3" });
! map.put(new TelemacDicoFileFormat("sisyphe"), new String[] { "v5p3" });
! map.put(new TelemacDicoFileFormat("stbtel"), new String[] { "v5p3" });
! map.put(new TelemacDicoFileFormat("subief2d"), new String[] { "v5p3" });
! map.put(Telemac2dFileFormat.getInstance(), new String[] { "v5p3" });
! map.put(new TelemacDicoFileFormat("telemac3d"), new String[] { "v5p3" });
! map.put(new TelemacDicoFileFormat("tomawac"), new String[] { "v5p3" });
! INSTANCE.init(map);
}
+ //pour eviter d'instancier ce format a chaque fois.
+ private DicoCasFileFormatVersion telemac2dv5p3_;
! public final static TelemacDicoManager getINSTANCE() {
! return INSTANCE;
}
! protected TelemacDicoManager() {
! super("org.fudaa.dodico.telemac.dico.");
}
***************
*** 73,87 ****
*
*/
! public DicoModelAbstract createDico(DicoDescription _desc)
! {
! // if( (_desc.getName().equals(Telemac2dv5p3.getCodeName()))
! // && (_desc.getVersion().equals(Telemac2dv5p3.getVersion()))
! // && (DicoLanguage.getCurrentID()==Telemac2dv5p3.getLanguageIndex()))
! // {
! // return Telemac2dv5p3;
! // }
!
! return super.createDico(_desc);
}
}
--- 57,80 ----
*
*/
! public DicoCasFileFormat createFormat(String _s) {
! return new TelemacDicoFileFormat(_s);
}
+ public DicoCasFileFormatVersion createVersionImpl(
+ DicoCasFileFormat _ft,
+ String _v,
+ int _language) {
+ if (("telemac2d".equals(_ft.getName()))
+ && ("v5p3".equals(_v))
+ && (DicoLanguage.getCurrentID() == _language)) {
+ if (DodicoLib.DEBUG)
+ System.out.println("recupere instance telemac 2d");
+ if (telemac2dv5p3_ == null)
+ telemac2dv5p3_=
+ createVersionImpl(getFileFormat("telemac2d"), "v5p3", _language);
+ return telemac2dv5p3_;
+ }
+ return super.createVersionImpl(_ft, _v, _language);
+
+ }
}
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d
In directory sc8-pr-cvs1:/tmp/cvs-serv3430/h2d
Modified Files:
H2dBord.java H2dElement.java H2dLib.java H2dMaillage.java
H2dMaillageBord.java H2dMaillageMutable.java
H2dParametresCalculReflux.java H2dPoint.java
H2dRefluxDicoModel.java
Removed Files:
H2dIndexData.java H2dIndexDouble.java H2dIndexString.java
H2dTempsValeur.java
Log Message:
Maj des projets hydraulique 2d
Index: H2dBord.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/H2dBord.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** H2dBord.java 4 Jul 2003 13:07:25 -0000 1.1
--- H2dBord.java 18 Aug 2003 11:05:19 -0000 1.2
***************
*** 12,15 ****
--- 12,16 ----
/**
+ * TODO : Les bords contiennent des conditions limites !
* @author deniger
* @version $Id$
Index: H2dElement.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/H2dElement.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** H2dElement.java 4 Jul 2003 13:07:25 -0000 1.1
--- H2dElement.java 18 Aug 2003 11:05:19 -0000 1.2
***************
*** 18,23 ****
/**
! * En element. La notion de segment correspond a 2 indices consecutifs
! * de l'element
* @author deniger
* @version $Id$
--- 18,22 ----
/**
! * Les elements d'un maillage.
* @author deniger
* @version $Id$
***************
*** 140,151 ****
/**
! * Renvoie true si cet element contient le segment compose des index _s1,_s2 ( ordre quelconque).
*/
public boolean containsSegment(int _ptIdx1, int _ptIdx2) {
int n= ptIndex_.length - 1;
int rs1, rs2;
for (int i= n - 1; i >= 0; i--) {
! rs1= ptIndex_[i + 1];
! rs2= ptIndex_[i];
if (((rs1 == _ptIdx1) && (rs2 == _ptIdx2))
|| ((rs1 == _ptIdx2) && (rs2 == _ptIdx1)))
--- 139,164 ----
/**
! * Renvoie true si cet element contient l arete (_ptIdx1,_ptIdx2) dans le sens donne
*/
public boolean containsSegment(int _ptIdx1, int _ptIdx2) {
int n= ptIndex_.length - 1;
+ for (int i= n - 1; i >= 0; i--) {
+ if ((ptIndex_[i] == _ptIdx1) && (ptIndex_[i + 1] == _ptIdx2))
+ return true;
+ }
+ if ((ptIndex_[n] == _ptIdx1) && (ptIndex_[0] == _ptIdx2))
+ return true;
+ return false;
+ }
+
+ /**
+ * Recherche si cet element contient l'arete dans n'importe quel sens.
+ */
+ public boolean containsSegmentSensIndifferent(int _ptIdx1, int _ptIdx2) {
+ int n= ptIndex_.length - 1;
int rs1, rs2;
for (int i= n - 1; i >= 0; i--) {
! rs1= ptIndex_[i];
! rs2= ptIndex_[i + 1];
if (((rs1 == _ptIdx1) && (rs2 == _ptIdx2))
|| ((rs1 == _ptIdx2) && (rs2 == _ptIdx1)))
***************
*** 205,208 ****
--- 218,223 ----
for (int i= n; i >= 0; i--) {
contenu= false;
+ //Dans un maillage tous les elements sont dans le meme sens. Donc il suffit de
+ //tester les segment (i,i-1) uniquement
s1= (i != 0 ? ptIndex_[i - 1] : ptIndex_[n]);
s2= ptIndex_[i];
***************
*** 210,214 ****
for (int j= nElem;((j >= 0) && (!contenu)); j--) {
if (j != _indexThis) {
! if (_m.getElement(j).containsSegment(s1, s2)) {
contenu= true;
}
--- 225,229 ----
for (int j= nElem;((j >= 0) && (!contenu)); j--) {
if (j != _indexThis) {
! if (_m.getElement(j).containsSegment(s2, s1)) {
contenu= true;
}
***************
*** 243,246 ****
--- 258,264 ----
for (int i= n; i >= 0; i--) {
contenu= false;
+ //ATTENTION Optimisation : tous les segments sont dans le
+ //meme sens donc il suffit de tester la presence d'un doublon dans
+ //le sens oppose
s1= (i != 0 ? ptIndex_[i - 1] : ptIndex_[n]);
s2= ptIndex_[i];
***************
*** 302,319 ****
for (int i= n; i >= 0; i--) {
contenu= false;
s1= (i != 0 ? ptIndex_[i - 1] : ptIndex_[n]);
s2= ptIndex_[i];
- //Optimisation de 30 % mais prend de la place memoire.
- // int[] s1Element = (int[]) indexPointElement.get(s1);
- // if (s1Element == null) {
- // s1Element = (int[]) indexPointElement.get(s2);
- // }
- // if (s1Element == null) {
- // s1Element = getIndexElementContainsId(_m.elts_, s1);
- // indexPointElement.put(s1, s1Element);
- // }
for (int j= nElem; j >= 0; j--) {
if (j != _indexThis) {
! if (_m.elts_[j].containsSegment(s1, s2)) {
contenu= true;
break;
--- 320,331 ----
for (int i= n; i >= 0; i--) {
contenu= false;
+ //ATTENTION Optimisation : tous les segments sont dans le
+ //meme sens donc il suffit de tester la presence d'un doublon dans
+ //le sens oppose
s1= (i != 0 ? ptIndex_[i - 1] : ptIndex_[n]);
s2= ptIndex_[i];
for (int j= nElem; j >= 0; j--) {
if (j != _indexThis) {
! if (_m.elts_[j].containsSegment(s2, s1)) {
contenu= true;
break;
***************
*** 321,332 ****
}
}
- // nTemp = s1Element.length - 1;
- // for (int j = nTemp; j >= 0; j--) {
- // n2=s1Element[j];
- // if ( (_indexThis!=n2) && (_m.elts_[n2].containsSegment(s1, s2)) ) {
- // contenu = true;
- // break;
- // }
- // }
if (!contenu) {
--- 333,336 ----
***************
*** 355,359 ****
/**
* Renvoie true, si un des elements <code>_elems</code> contient le segment
! * <code>[_s1,_s2]</code>.
*/
public static boolean containsSegment(
--- 359,364 ----
/**
* Renvoie true, si un des elements <code>_elems</code> contient le segment
! * <code>[_s1,_s2]</code> dans le sens donne.
! * @see H2dElement#containsSegment(int, int).
*/
public static boolean containsSegment(
***************
*** 370,373 ****
--- 375,418 ----
/**
+ * Renvoie l'index du segment contenant l'arete [s1,s2] dans l'ordre donne.
+ * @return -1 si non trouve
+ */
+ public static int getIdxSegmentContains(
+ H2dElement[] _elems,
+ int _s1,
+ int _s2) {
+ int n= _elems.length - 1;
+ for (int i= n; i >= 0; i--) {
+ if (_elems[i].containsSegment(_s1, _s2))
+ return i;
+ }
+ return -1;
+ }
+
+ /**
+ * Renvoie true, si un des elements <code>_elems</code> contient le segment
+ * <code>[_s1,_s2]</code> sans tenir compte du sens.
+ * @see H2dElement#containsSegmentSensIndifferent(int, int)
+ */
+ public static boolean containsSegmentSensIndif(
+ H2dElement[] _elems,
+ int _s1,
+ int _s2) {
+ int n= _elems.length - 1;
+ for (int i= n; i >= 0; i--) {
+ if (_elems[i].containsSegmentSensIndifferent(_s1, _s2))
+ return true;
+ }
+ return false;
+ }
+
+ public static boolean containsSegmentSensIndif(
+ H2dMaillage _mail,
+ int _s1,
+ int _s2) {
+ return containsSegmentSensIndif(_mail.elts_, _s1, _s2);
+ }
+
+ /**
* Renvoie les indices des points pour cet element ( NE PAS MODIFIER LE TABLEAU).
*/
***************
*** 380,383 ****
--- 425,435 ----
}
+ /**
+ * Renvoie l'indice a la ieme position de cet element ( pas de verification).
+ */
+ public int getPtIndex(int _i) {
+ return ptIndex_[_i];
+ }
+
public static int getCommunType(H2dElement[] _elts) {
int n= _elts.length - 2;
***************
*** 418,421 ****
--- 470,479 ----
}
+ public boolean isSame(H2dElement _ele) {
+ if (ptIndex_.length != _ele.ptIndex_.length)
+ return false;
+ return Arrays.equals(ptIndex_, _ele.ptIndex_);
+ }
+
public static int getDefaultType(int _nbPoint) {
switch (_nbPoint) {
***************
*** 434,438 ****
public static void main(String[] args) {
H2dElement e= new H2dElement(new int[] { 1, 43, 5 });
! System.out.println(e.containsSegment(1, 5));
}
--- 492,496 ----
public static void main(String[] args) {
H2dElement e= new H2dElement(new int[] { 1, 43, 5 });
! System.out.println(e.containsSegment(5, 1));
}
Index: H2dLib.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/H2dLib.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** H2dLib.java 4 Jul 2003 13:07:25 -0000 1.2
--- H2dLib.java 18 Aug 2003 11:05:19 -0000 1.3
***************
*** 9,23 ****
package org.fudaa.dodico.h2d;
! import gnu.trove.TIntArrayList;
!
! import java.util.ArrayList;
!
! import org.fudaa.dodico.corba.geometrie.SMaillageIndex;
! import org.fudaa.dodico.corba.geometrie.SPoint;
!
! import org.fudaa.dodico.commun.ProgressionInterface;
!
!
!
/**
--- 9,13 ----
package org.fudaa.dodico.h2d;
! import com.memoire.bu.BuInformationsSoftware;
/**
***************
*** 26,40 ****
* @version $Id$
*/
! public class H2dLib
! {
!
/**
* Appel la methode getStep(nbIteration,5)
*/
! public final static int getStep(int nbIteration)
! {
! return getStep(nbIteration,5);
}
!
/**
* Methode utilisée pour mettre a jour l'avancement.
--- 16,28 ----
* @version $Id$
*/
! public class H2dLib {
!
/**
* Appel la methode getStep(nbIteration,5)
*/
! public final static int getStep(int nbIteration) {
! return getStep(nbIteration, 5);
}
!
/**
* Methode utilisée pour mettre a jour l'avancement.
***************
*** 47,123 ****
* But : eviter
*/
! public final static int getStep(int nbIteration,int _nbStep)
! {
! return (((int)(nbIteration / _nbStep))< 20)?2:_nbStep;
! }
!
! public static boolean setBathymetrie(SMaillageIndex _m,double[] _fondValues)
! {
! SPoint[] pts=_m.points;
! int nbPoints=pts.length;
! if(nbPoints!=_fondValues.length) return false;
! for(int i=nbPoints-1;i>=0;i--)
! {
! pts[i].z=_fondValues[i];
! }
! return true;
! }
!
! /**
! * Permet de cree un maillage a partir des points, elements et
! * des indices des points frontiere arrangé selon l'ordre télémac : numerotation partant
! * du point x+y min et x min et dans le sens horaire pour la frontiere externe et anti-horaire
! * pour les frontieres internes.Il est suppose que le tableau _ipobo soit correct.
! */
! public static void computeBord(
! H2dMaillage _mail,
! int[] _ipobo,
! ProgressionInterface _pr)
! {
! if (_pr != null)
! {
! _pr.setDesc("Recherche des frontières");
! _pr.setProgression(0);
! }
! //Le vecteur stockant les bords.
! ArrayList l = new ArrayList(5);
! int n = _ipobo.length;
! TIntArrayList bordEncours = new TIntArrayList(n);
! int s1, s2 = -1;
! int pourc = 0;
! int step = H2dLib.getStep(n);
! int pas = (int) (n / step);
! int pMax = pas;
! int pourcStep = (int) (90 / step);
! for (int i = 1; i < n; i++)
! {
! s1 = _ipobo[i - 1];
! s2 = _ipobo[i];
! bordEncours.add(s1);
! if (!H2dElement.containsSegment(_mail.elts_, s1, s2))
! {
! l.add(bordEncours.toNativeArray());
! bordEncours.clear();
! }
! if ((_pr != null) && (i > pMax))
! {
! pourc += pourcStep;
! _pr.setProgression(pourc);
! pMax += pas;
! }
! }
! //finition
! if (s2 >= 0)
! bordEncours.add(s2);
! l.add(bordEncours.toNativeArray());
! if (_pr != null)
! _pr.setProgression(90);
! _mail.ptsFrontiere_=new H2dMaillageBord(l);
}
-
-
-
-
-
}
--- 35,41 ----
* But : eviter
*/
! public final static int getStep(int nbIteration, int _nbStep) {
! return (((int) (nbIteration / _nbStep)) < 20) ? 2 : _nbStep;
}
}
Index: H2dMaillage.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/H2dMaillage.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** H2dMaillage.java 4 Jul 2003 16:11:51 -0000 1.2
--- H2dMaillage.java 18 Aug 2003 11:05:19 -0000 1.3
***************
*** 9,17 ****
package org.fudaa.dodico.h2d;
- import java.util.ArrayList;
-
-
import gnu.trove.TIntArrayList;
! import gnu.trove.TIntObjectHashMap;
import org.fudaa.dodico.commun.DodicoLib;
--- 9,20 ----
[...988 lines suppressed...]
+ l.add(bordEncours.toNativeArray());
+ bordEncours.clear();
+ }
+ if ((_pr != null) && (i > pMax))
+ {
+ pourc += pourcStep;
+ _pr.setProgression(pourc);
+ pMax += pas;
+ }
+ }
+ //finition
+ if (s2 >= 0)
+ bordEncours.add(s2);
+ l.add(bordEncours.toNativeArray());
+ if (_pr != null)
+ _pr.setProgression(90);
+ _mail.ptsFrontiere_=new H2dMaillageBord(l);
+ }
}
Index: H2dMaillageBord.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/H2dMaillageBord.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** H2dMaillageBord.java 4 Jul 2003 13:07:25 -0000 1.1
--- H2dMaillageBord.java 18 Aug 2003 11:05:19 -0000 1.2
***************
*** 9,12 ****
--- 9,14 ----
package org.fudaa.dodico.h2d;
+ import gnu.trove.TIntArrayList;
+
import java.util.List;
***************
*** 37,41 ****
}
}
!
/**
* Permet de verifier si les indices de bords
--- 39,43 ----
}
}
!
/**
* Permet de verifier si les indices de bords
***************
*** 43,82 ****
* par _ipobo.
*/
! public boolean isSame(int[] _ipobo)
! {
! if(_ipobo==null) return false;
! int n=bordPrinc_.length;
! int nIpobo=_ipobo.length;
! if(nIpobo<n) return false;
! for(int i=0;i<n;i++)
! {
! if(_ipobo[i]!=bordPrinc_[i]){
! System.out.println("echec externe");
return false;
}
}
! if(bordInter_==null)
! {
//il n'y a pas de bord interne
! if(nIpobo==n) return true;
! else return false;
}
! int nBI=bordInter_.length;
! int indexIpobo=n;
int nbFI;
! for(int i=0;i<nBI;i++)
! {
! nbFI=bordInter_[i].length;
! for(int j=0;j<nbFI;j++)
! {
! if(_ipobo[indexIpobo+j]!=bordInter_[i][j])
! {
System.out.println("echec interne");
return false;
}
}
! indexIpobo+=nbFI;
}
return true;
}
--- 45,102 ----
* par _ipobo.
*/
! public boolean isSame(int[] _ipobo) {
! if (_ipobo == null)
return false;
+ int n= bordPrinc_.length;
+ int nIpobo= _ipobo.length;
+ if (nIpobo < n)
+ return false;
+ for (int i= 0; i < n; i++) {
+ if (_ipobo[i] != bordPrinc_[i]) {
+ System.out.println("echec externe");
+ return false;
}
}
! if (bordInter_ == null) {
//il n'y a pas de bord interne
! if (nIpobo == n)
! return true;
! else
! return false;
}
! int nBI= bordInter_.length;
! int indexIpobo= n;
int nbFI;
! for (int i= 0; i < nBI; i++) {
! nbFI= bordInter_[i].length;
! for (int j= 0; j < nbFI; j++) {
! if (_ipobo[indexIpobo + j] != bordInter_[i][j]) {
System.out.println("echec interne");
return false;
}
}
! indexIpobo += nbFI;
}
return true;
+ }
+
+ /**
+ * Renvoie les bords sous forme d'un tableau ( conforme tableau ipobo
+ * de telemac/serafin).
+ */
+ public int[] getArray() {
+ TIntArrayList list= new TIntArrayList(bordPrinc_);
+ if (bordInter_ != null) {
+ int nb= bordInter_.length;
+ list.ensureCapacity(bordPrinc_.length + nb * (bordPrinc_.length / 2));
+ int nbParBord;
+ for (int i= 0; i < nb; i++) {
+ nbParBord= bordInter_[i].length;
+ for (int j= 0; j < nbParBord; j++) {
+ list.add(bordInter_[i][j]);
+ }
+ }
+ }
+ return list.toNativeArray();
}
Index: H2dMaillageMutable.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/H2dMaillageMutable.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** H2dMaillageMutable.java 4 Jul 2003 13:07:25 -0000 1.1
--- H2dMaillageMutable.java 18 Aug 2003 11:05:19 -0000 1.2
***************
*** 9,18 ****
package org.fudaa.dodico.h2d;
! import gnu.trove.TDoubleArrayList;
! import gnu.trove.TIntArrayList;
!
! import java.util.ArrayList;
!
! import org.fudaa.dodico.commun.ProgressionInterface;
/**
--- 9,13 ----
package org.fudaa.dodico.h2d;
! import org.fudaa.dodico.telemac.io.SerafinInterface;
/**
***************
*** 20,31 ****
* @version $Id$
*/
! public class H2dMaillageMutable extends H2dMaillage
! {
/**
*
*/
! public H2dMaillageMutable(H2dPoint[] _pts, H2dElement[] _elts)
! {
super(_pts, _elts);
}
--- 15,24 ----
* @version $Id$
*/
! public class H2dMaillageMutable extends H2dMaillage {
/**
*
*/
! public H2dMaillageMutable(H2dPoint[] _pts, H2dElement[] _elts) {
super(_pts, _elts);
}
***************
*** 34,49 ****
*
*/
! public void setElts(H2dElement[] _elements)
! {
! elts_ = _elements;
}
-
/**
*
*/
! public void setPts(H2dPoint[] _points)
! {
! pts_ = _points;
}
--- 27,39 ----
*
*/
! public void setElts(H2dElement[] _elements) {
! elts_= _elements;
}
/**
*
*/
! public void setPts(H2dPoint[] _points) {
! pts_= _points;
}
***************
*** 51,57 ****
*
*/
! public void setPtsExtremitesElement(int[] _is)
! {
! ptsExtremitesElement_ = _is;
}
--- 41,46 ----
*
*/
! public void setPtsFrontiere(H2dMaillageBord _is) {
! ptsFrontiere_= _is;
}
***************
*** 59,74 ****
*
*/
! public void setPtsFrontiere(H2dMaillageBord _is)
! {
! ptsFrontiere_ = _is;
}
- /**
- *
- */
- public void setTypeElt(int _i)
- {
- typeElt_ = _i;
- }
}
--- 48,55 ----
*
*/
! public void setTypeElt(int _i) {
! typeElt_= _i;
}
}
Index: H2dParametresCalculReflux.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/H2dParametresCalculReflux.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** H2dParametresCalculReflux.java 4 Jul 2003 13:07:25 -0000 1.1
--- H2dParametresCalculReflux.java 18 Aug 2003 11:05:19 -0000 1.2
***************
*** 9,20 ****
package org.fudaa.dodico.h2d;
- import gnu.trove.TObjectDoubleHashMap;
-
- import java.util.HashMap;
- import java.util.HashSet;
- import java.util.Set;
-
- import org.fudaa.dodico.dico.DicoParams;
- import org.fudaa.dodico.h2d.type.H2dRefluxImpressionType;
/**
--- 9,12 ----
Index: H2dPoint.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/H2dPoint.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** H2dPoint.java 4 Jul 2003 13:07:25 -0000 1.1
--- H2dPoint.java 18 Aug 2003 11:05:19 -0000 1.2
***************
*** 26,29 ****
--- 26,35 ----
z_= _z;
}
+
+ public H2dPoint(H2dPoint _p) {
+ x_= _p.x_;
+ y_= _p.y_;
+ z_= _p.z_;
+ }
/**
***************
*** 50,53 ****
--- 56,69 ----
protected void setZ(double _z) {
z_= _z;
+ }
+
+ /**
+ * Compare des doubles avec = voir si Double.doubleToLongBits
+ * ne conviendrait pas.
+ */
+ public boolean isSame(H2dPoint _p)
+ {
+ return (x_==_p.x_) && (y_==_p.y_) && (z_==_p.z_);
+
}
Index: H2dRefluxDicoModel.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/H2dRefluxDicoModel.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** H2dRefluxDicoModel.java 4 Jul 2003 13:07:25 -0000 1.1
--- H2dRefluxDicoModel.java 18 Aug 2003 11:05:19 -0000 1.2
***************
*** 31,36 ****
{
- DicoEntite[] entiteContrib_;
-
/**
*
--- 31,34 ----
***************
*** 46,77 ****
}
! public DicoEntite getCoefContribution(int _index)
! {
! String rubrique = "Coefficients contribution";
! DicoEntiteList entites = getEntites();
! if (entiteContrib_ == null)
! {
! List l = new ArrayList(18);
! DicoEntite ent;
! for (Iterator it = entites.iterator(); it.hasNext();)
! {
! ent = (DicoEntite) it.next();
! if (rubrique.equals(ent.getRubrique()))
! {
! l.add(ent);
! }
! }
! Collections.sort(l, DicoEntiteGenerate.getComparatorIndex());
! entiteContrib_ = new DicoEntite[l.size()];
! l.toArray(entiteContrib_);
! }
! if (_index < 0 || _index >= entiteContrib_.length)
! {
! System.out.println(
! "index doit etre compris entre 0 et " + entiteContrib_.length);
! return null;
! }
! return entiteContrib_[_index];
! }
public DicoEntite[] createEntites()
--- 44,48 ----
}
!
public DicoEntite[] createEntites()
--- H2dIndexData.java DELETED ---
--- H2dIndexDouble.java DELETED ---
--- H2dIndexString.java DELETED ---
--- H2dTempsValeur.java DELETED ---
|
|
From: <de...@us...> - 2003-08-18 11:21:41
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/fichiers
In directory sc8-pr-cvs1:/tmp/cvs-serv3430/fichiers
Modified Files:
FileFormat.java FileOperationInterface.java
FileOperationSynthese.java
Log Message:
Maj des projets hydraulique 2d
Index: FileFormat.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/fichiers/FileFormat.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** FileFormat.java 4 Jul 2003 12:41:19 -0000 1.1
--- FileFormat.java 18 Aug 2003 11:05:19 -0000 1.2
***************
*** 14,18 ****
import org.fudaa.dodico.commun.DodicoLib;
- import org.fudaa.dodico.commun.ProgressionInterface;
/**
--- 14,17 ----
***************
*** 21,29 ****
* @version $Id$
*/
! public abstract class FileFormat
! {
!
! public static final int MODE_ASCII = 0;
! public static final int MODE_BINAIRE = 1;
//Le nombre de fichiers demandé par ce format.
private int nbFile_;
--- 20,26 ----
* @version $Id$
*/
! public abstract class FileFormat {
! public static final int MODE_ASCII= 0;
! public static final int MODE_BINAIRE= 1;
//Le nombre de fichiers demandé par ce format.
private int nbFile_;
***************
*** 31,57 ****
protected String nom_;
protected String ID_;
- protected String version_;
protected String description_;
protected int mode_;
protected BuInformationsSoftware software_;
! public FileFormat(int _nbFile)
! {
if (_nbFile < 1)
throw new IllegalArgumentException("Nombre de fichier strictement positif");
! nbFile_ = _nbFile;
}
/**
* Returns the description.
* @return String
*/
! public String getDescription()
! {
return description_;
}
! public String getID()
! {
return ID_;
}
--- 28,62 ----
protected String nom_;
protected String ID_;
protected String description_;
protected int mode_;
+ //le type du fichier projet,maillage,autre,...
+ protected int type_;
protected BuInformationsSoftware software_;
! public FileFormat(int _nbFile) {
if (_nbFile < 1)
throw new IllegalArgumentException("Nombre de fichier strictement positif");
! nbFile_= _nbFile;
! }
!
! public int getVersionNb(){
! return 1;
! }
!
! public String[] getVersions() {
! return new String[]{getLastVersion()};
}
+ public abstract String getLastVersion();
+
/**
* Returns the description.
* @return String
*/
! public String getDescription() {
return description_;
}
! public String getID() {
return ID_;
}
***************
*** 61,66 ****
* @return String[]
*/
! public String[] getExtensions()
! {
return extensions_;
}
--- 66,70 ----
* @return String[]
*/
! public String[] getExtensions() {
return extensions_;
}
***************
*** 70,84 ****
* @return int
*/
! public int getMode()
! {
return mode_;
}
/**
* Returns the nbFile.
* @return int
*/
! public final int getNbFile()
! {
return nbFile_;
}
--- 74,90 ----
* @return int
*/
! public int getMode() {
return mode_;
}
+ public int getType() {
+ return type_;
+ }
+
/**
* Returns the nbFile.
* @return int
*/
! public final int getNbFile() {
return nbFile_;
}
***************
*** 88,93 ****
* @return String
*/
! public String getName()
! {
return nom_;
}
--- 94,98 ----
* @return String
*/
! public String getName() {
return nom_;
}
***************
*** 97,102 ****
* @return BuInformationsSoftware
*/
! public BuInformationsSoftware getSoftware()
! {
return software_;
}
--- 102,106 ----
* @return BuInformationsSoftware
*/
! public BuInformationsSoftware getSoftware() {
return software_;
}
***************
*** 109,253 ****
* et correspondant aux extensions.
*/
! public final File[] getFile(File _fInit)
! {
! File[] r = new File[nbFile_];
if (_fInit == null)
return r;
if (nbFile_ == 1)
return new File[] { _fInit };
! String base = DodicoLib.getSansExtension(_fInit.getAbsolutePath());
! for (int i = 0; i < nbFile_; i++)
! {
! r[i] = new File(base + "." + extensions_[i]);
}
return r;
}
-
- public static void initOperation(
- FileOperationSynthese _synt,
- FileOperationInterface _op,
- ProgressionInterface _progress,
- File _f)
- {
- _op.setProgressReceiver(_progress);
- _op.setFile(_f);
- _synt.setMainFile(_f);
- }
-
- public static FileOperationSynthese initOperation(
- FileOperationInterface _op,
- ProgressionInterface _progress,
- File _f)
- {
- FileOperationSynthese r = new FileOperationSynthese();
- initOperation(r,_op,_progress,_f);
- return r;
- }
-
- /**
- * Methode generale permettant de lire le fichier _f et renvoie une structure
- * donnant la synthese (resultat, erreur) de la lecture.
- * @param _progress l'etat d'avancement de la lecture.
- */
- // public final FileOperationSynthese read(File _f, ProgressionInterface _progress)
- // {
- // FileReaderInterface r = createReader();
- // IOException[] exs = read(_f, r, _progress);
- // return new FileOperationSynthese(_f, r, exs);
- // }
-
- /**
- * Permet de le lire le fichier <code>_f</code>.
- * @return les exceptions levees lors de la fermeture du flux.
- */
- // public final IOException[] read(File _f, FileReaderInterface _r, ProgressionInterface _progress)
- // {
- // if (getNbFile() == 1)
- // {
- // _r.setFile(_f);
- // _r.setProgressReceiver(_progress);
- // _r.read();
- // return _r.close();
- // }
- // else
- // return read(getFile(_f), _r, _progress);
- // }
- //
- // public static final IOException[] readFile(File _f, FileReaderInterface _reader, ProgressionInterface _progress)
- // {
- // _reader.setFile(_f);
- // _reader.setProgressReceiver(_progress);
- // _reader.read();
- // return _reader.close();
- // }
- //
- // public static final IOException[] readFile(File[] _f, FileReaderInterface _reader, ProgressionInterface _progress)
- // {
- // _reader.setFile(_f);
- // _reader.setProgressReceiver(_progress);
- // _reader.read();
- // return _reader.close();
- // }
- //
- // public final FileOperationSynthese read(File[] _f)
- // {
- // return read(_f, null);
- // }
- //
- // public final IOException[] read(File[] _f, FileReaderInterface _r, ProgressionInterface _progress)
- // {
- // int l = _f.length;
- // if (l != getNbFile())
- // throw new IllegalArgumentException("Le nombre de fichier donne " + l + DodicoLib.LINE_SEP + "Nb Fichier attendu " + getNbFile());
- // _r.setFile(_f);
- // _r.setProgressReceiver(_progress);
- // _r.read();
- // return _r.close();
- //
- // }
- //
- //
- // public final FileOperationSynthese read(File[] _f, ProgressionInterface _progress)
- // {
- // FileReaderInterface r = createReader();
- // IOException[] exs = read(_f, r, _progress);
- // return new FileOperationSynthese(_f, r, exs);
- // }
- //
- // public final FileOperationSynthese write(File _f, Object _interface, ProgressionInterface _progress)
- // {
- // if (getNbFile() == 1)
- // {
- // FileWriterInterface r = createWriter();
- // r.setFile(_f);
- // r.setInterface(_interface);
- // r.setProgressReceiver(_progress);
- // r.write();
- // IOException[] exs = r.close();
- // return new FileOperationSynthese(_f, r, exs);
- // }
- // else
- // return write(getFile(_f), _interface, _progress);
- // }
- //
- // public final FileOperationSynthese write(File[] _f, Object _interface)
- // {
- // return write(_f, _interface, null);
- // }
- //
- // public final FileOperationSynthese write(File[] _f, Object _interface, ProgressionInterface _progress)
- // {
- // int l = _f.length;
- // if (l != getNbFile())
- // throw new IllegalArgumentException("Le nombre de fichier donne " + l + DodicoLib.LINE_SEP + "Nb Fichier attendu " + getNbFile());
- // FileWriterInterface r = createWriter();
- // r.setFile(_f);
- // r.setProgressReceiver(_progress);
- // r.setInterface(_interface);
- // r.write();
- // IOException[] exs = r.close();
- // return new FileOperationSynthese(_f, r, exs);
- // }
- //
}
--- 113,128 ----
* et correspondant aux extensions.
*/
! public final File[] getFile(File _fInit) {
! File[] r= new File[nbFile_];
if (_fInit == null)
return r;
if (nbFile_ == 1)
return new File[] { _fInit };
! String base= DodicoLib.getSansExtension(_fInit.getAbsolutePath());
! for (int i= 0; i < nbFile_; i++) {
! r[i]= new File(base + "." + extensions_[i]);
}
return r;
}
}
Index: FileOperationInterface.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/fichiers/FileOperationInterface.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** FileOperationInterface.java 4 Jul 2003 12:41:19 -0000 1.1
--- FileOperationInterface.java 18 Aug 2003 11:05:19 -0000 1.2
***************
*** 23,27 ****
public void setProgressReceiver(ProgressionInterface progressReceiver);
public void setFile(File _f);
! public FileFormat getFileFormat();
}
--- 23,27 ----
public void setProgressReceiver(ProgressionInterface progressReceiver);
public void setFile(File _f);
! //public FileFormat getFileFormat();
}
Index: FileOperationSynthese.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/fichiers/FileOperationSynthese.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** FileOperationSynthese.java 4 Jul 2003 12:41:19 -0000 1.1
--- FileOperationSynthese.java 18 Aug 2003 11:05:19 -0000 1.2
***************
*** 30,33 ****
--- 30,38 ----
+ public void printAnalyze(){
+ if(analyze_!=null) analyze_.printResume();
+ else System.out.println("Pas d'erreur");
+ }
+
/**
*
|
|
From: <de...@us...> - 2003-08-18 11:21:31
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/type
In directory sc8-pr-cvs1:/tmp/cvs-serv3430/h2d/type
Modified Files:
H2dBordType.java H2dEnumType.java
Log Message:
Maj des projets hydraulique 2d
Index: H2dBordType.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/type/H2dBordType.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** H2dBordType.java 4 Jul 2003 13:13:45 -0000 1.1
--- H2dBordType.java 18 Aug 2003 11:05:19 -0000 1.2
***************
*** 46,53 ****
}
- public boolean equalsBord(H2dBordType _t)
- {
- return id_==_t.id_;
- }
-
}
--- 46,48 ----
Index: H2dEnumType.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/type/H2dEnumType.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** H2dEnumType.java 4 Jul 2003 13:13:45 -0000 1.1
--- H2dEnumType.java 18 Aug 2003 11:05:19 -0000 1.2
***************
*** 9,18 ****
package org.fudaa.dodico.h2d.type;
/**
* @author deniger
* @version $Id$
*/
! public class H2dEnumType implements Comparable
! {
int id_;
String nom_;
--- 9,20 ----
package org.fudaa.dodico.h2d.type;
+ import java.util.Iterator;
+ import java.util.List;
+
/**
* @author deniger
* @version $Id$
*/
! public class H2dEnumType implements Comparable {
int id_;
String nom_;
***************
*** 21,65 ****
*
*/
! H2dEnumType(int _id,String _nom)
! {
! id_=_id;
! nom_=_nom;
}
!
! public String getNom()
! {
return nom_;
}
!
! public String toString()
! {
! return nom_+" ("+id_+")";
}
! public boolean equals(Object _o)
! {
if (_o == this)
return true;
! if (!(_o instanceof H2dEnumType))
! {
return false;
}
! return id_ == ((H2dEnumType) _o).id_;
}
-
/**
! *
*/
! public int compareTo(Object o)
! {
if (o == this)
return 0;
! if (o instanceof H2dEnumType)
! {
! return nom_.compareTo(((H2dEnumType) o).nom_);
! }
! else
throw new IllegalArgumentException("compareTo " + getClass().getName());
}
--- 23,71 ----
*
*/
! H2dEnumType(int _id, String _nom) {
! id_= _id;
! nom_= _nom;
}
!
! public String getNom() {
return nom_;
}
!
! public String toString() {
! return nom_ + " (" + id_ + ")";
}
! public int getId() {
! return id_;
! }
!
! public boolean equals(Object _o) {
if (_o == this)
return true;
! if (!(getClass().isInstance(_o))) {
return false;
}
! return id_ == ((H2dEnumType)_o).id_;
}
/**
! * Compare selon le nom de le nom de l'enumeration
*/
! public int compareTo(Object o) {
if (o == this)
return 0;
! if (o instanceof H2dEnumType) {
! return nom_.compareTo(((H2dEnumType)o).nom_);
! } else
throw new IllegalArgumentException("compareTo " + getClass().getName());
+ }
+
+ public static H2dEnumType getIdInList(List _l, int _id) {
+ for (Iterator it= _l.iterator(); it.hasNext();) {
+ H2dEnumType e= (H2dEnumType)it.next();
+ if (e.id_ == _id)
+ return e;
+ }
+ return null;
}
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dunes/io
In directory sc8-pr-cvs1:/tmp/cvs-serv3430/dunes/io
Modified Files:
DunesFileFormat.java DunesReader.java DunesWriter.java
Removed Files:
DunesKeyWord.java
Log Message:
Maj des projets hydraulique 2d
Index: DunesFileFormat.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dunes/io/DunesFileFormat.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** DunesFileFormat.java 4 Jul 2003 12:22:19 -0000 1.4
--- DunesFileFormat.java 18 Aug 2003 11:05:19 -0000 1.5
***************
*** 13,17 ****
--- 13,21 ----
import org.fudaa.dodico.commun.ProgressionInterface;
import org.fudaa.dodico.fichiers.FileFormat;
+ import org.fudaa.dodico.fichiers.FileFormatSoftware;
+ import org.fudaa.dodico.fichiers.FileFormatVersion;
import org.fudaa.dodico.fichiers.FileOperationSynthese;
+ import org.fudaa.dodico.h2d.H2dLib;
+ import org.fudaa.dodico.h2d.type.H2dFileFormatType;
/**
***************
*** 20,83 ****
* @version $Id$
*/
! public class DunesFileFormat extends FileFormat
! {
! public final static int NB_FILE = 1;
! private static final DunesFileFormat INSTANCE = new DunesFileFormat();
! public static final DunesFileFormat getInstance()
! {
return INSTANCE;
}
! private DunesFileFormat()
! {
super(NB_FILE);
! extensions_ = new String[] { "mail" };
! ID_ = "DUNES";
! nom_ = "Dunes";
! description_ = "utilisé par le mailleur Dunes (logiciel Oasis)";
! mode_ = MODE_ASCII;
! software_ = null;
}
!
! public DunesKeyWord getKeyWords()
! {
! return new DunesKeyWord();
}
-
! public DunesKeyWord getKeywords()
! {
! return new DunesKeyWord();
! }
!
! public DunesReader createReader()
! {
! return new DunesReader(this);
! }
!
! public DunesWriter createWriter()
! {
! return new DunesWriter(this);
! }
!
! public FileOperationSynthese write(File _f, DunesInterface _inter, ProgressionInterface _prog)
! {
! DunesWriter w = createWriter();
! FileOperationSynthese synt = FileFormat.initOperation(w, _prog, _f);
! w.write(_inter, synt);
! return synt;
}
! public DunesInterface read(File _f, FileOperationSynthese _synt,ProgressionInterface _prog)
! {
! DunesReader r = createReader();
! FileFormat.initOperation(_synt, r, _prog, _f);
! return r.read(_synt);
! }
}
--- 24,122 ----
* @version $Id$
*/
! public class DunesFileFormat extends FileFormat {
! public final static int NB_FILE= 1;
! private static final DunesFileFormat INSTANCE= new DunesFileFormat();
! public static final DunesFileFormat getInstance() {
return INSTANCE;
}
! private DunesFileFormat() {
super(NB_FILE);
! extensions_= new String[] { "mail" };
! ID_= "DUNES";
! nom_= "Dunes";
! description_= "utilisé par le mailleur Dunes (logiciel Oasis)";
! mode_= MODE_ASCII;
! software_= FileFormatSoftware.REFLUX_IS;
! type_= H2dFileFormatType.MAILLAGE.getId();
}
! public String getLastVersion() {
! return "1.0";
}
! public DunesVersion getLastVersionImpl() {
! return new DunesVersion(getLastVersion());
}
! public class DunesVersion extends FileFormatVersion {
!
! /**
! * Returns the aDAPTATIF.
! * @return int
! */
! public int getAdaptatifCode() {
! return 2;
! }
!
! /**
! * Returns the eLEMENT_ID.
! * @return String
! */
! public String getElementCode() {
! return "ELEMENT";
! }
!
! /**
! * Returns the nOEUD_ID.
! * @return String
! */
! public String getNoeudCode() {
! return "NOEUD";
! }
!
! /**
! * Returns the nON_ADAPTATIF.
! * @return int
! */
! public int getNonAdaptatifCode() {
! return 1;
! }
+ protected DunesVersion(String _v) {
+ super(getInstance(), _v);
+ }
+
+ public DunesReader createReader() {
+ return new DunesReader(this);
+ }
+
+ public DunesWriter createWriter() {
+ return new DunesWriter(this);
+ }
+
+ public FileOperationSynthese write(
+ File _f,
+ DunesInterface _inter,
+ ProgressionInterface _prog) {
+ DunesWriter w= createWriter();
+ FileOperationSynthese synt= FileFormatVersion.initOperation(w, _prog, _f);
+ w.write(_inter, synt);
+ return synt;
+ }
+
+ public DunesInterface read(
+ File _f,
+ FileOperationSynthese _synt,
+ ProgressionInterface _prog) {
+ DunesReader r= createReader();
+ FileFormatVersion.initOperation(_synt, r, _prog, _f);
+ return r.read(_synt);
+ }
+
+ }
}
Index: DunesReader.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dunes/io/DunesReader.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** DunesReader.java 4 Jul 2003 12:22:19 -0000 1.5
--- DunesReader.java 18 Aug 2003 11:05:19 -0000 1.6
***************
*** 33,38 ****
{
! DunesKeyWord kw_;
! DunesFileFormat fileFormat_;
/**
--- 33,37 ----
{
! DunesFileFormat.DunesVersion version_;
/**
***************
*** 41,51 ****
public DunesReader()
{
! this(null);
}
! public DunesReader(DunesFileFormat _f)
{
! fileFormat_ = (_f == null) ? DunesFileFormat.getInstance() : _f;
! kw_ = fileFormat_.getKeyWords();
}
--- 40,49 ----
public DunesReader()
{
! this(DunesFileFormat.getInstance().getLastVersionImpl());
}
! public DunesReader(DunesFileFormat.DunesVersion _f)
{
! version_ = _f;
}
***************
*** 73,79 ****
//Lecture de l'identifiant NOEUD
in_.readFields();
! if ((in_.getNumberOfFields() != 1) && (!kw_.getNoeudCode().equals(in_.stringField(0))))
{
! _analyze.addError(DodicoLib.geti18n("L'identifiant") + " " + kw_.getNoeudCode() + " " + DodicoLib.geti18n("est attendu"), in_);
return null;
}
--- 71,77 ----
//Lecture de l'identifiant NOEUD
in_.readFields();
! if ((in_.getNumberOfFields() != 1) && (!version_.getNoeudCode().equals(in_.stringField(0))))
{
! _analyze.addError(DodicoLib.geti18n("L'identifiant") + " " + version_.getNoeudCode() + " " + DodicoLib.geti18n("est attendu"), in_);
return null;
}
***************
*** 95,99 ****
int typeMaillage = in_.intField(1);
//Si adaptatif, on initialise le tableau stockant les valeurs.
! if (typeMaillage == kw_.getAdaptatifCode())
{
adaptatifs = new double[nbNoeuds];
--- 93,97 ----
int typeMaillage = in_.intField(1);
//Si adaptatif, on initialise le tableau stockant les valeurs.
! if (typeMaillage == version_.getAdaptatifCode())
{
adaptatifs = new double[nbNoeuds];
***************
*** 151,157 ****
//Lecture du mot cle ELEMENT
in_.readFields();
! if ((in_.getNumberOfFields() != 1) && (!kw_.getElementCode().equals(in_.stringField(0))))
{
! _analyze.addError(DodicoLib.geti18n("L'identifiant") + " " + kw_.getElementCode() + " " + DodicoLib.geti18n("est attendu"), in_);
return null;
}
--- 149,155 ----
//Lecture du mot cle ELEMENT
in_.readFields();
! if ((in_.getNumberOfFields() != 1) && (!version_.getElementCode().equals(in_.stringField(0))))
{
! _analyze.addError(DodicoLib.geti18n("L'identifiant") + " " + version_.getElementCode() + " " + DodicoLib.geti18n("est attendu"), in_);
return null;
}
***************
*** 264,268 ****
public DunesFileFormat getDunesFileFormat()
{
! return fileFormat_;
}
--- 262,266 ----
public DunesFileFormat getDunesFileFormat()
{
! return (DunesFileFormat)version_.getFileFormat();
}
Index: DunesWriter.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dunes/io/DunesWriter.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** DunesWriter.java 4 Jul 2003 12:22:19 -0000 1.5
--- DunesWriter.java 18 Aug 2003 11:05:19 -0000 1.6
***************
*** 31,54 ****
{
! DunesKeyWord format_;
! DunesFileFormat fileFormat_;
public DunesWriter()
{
! this(null);
}
! public DunesWriter(DunesFileFormat _f)
{
! fileFormat_= _f;
! if (_f == null)
! format_= DunesFileFormat.getInstance().getKeyWords();
! else
! format_= _f.getKeyWords();
}
public FileFormat getFileFormat()
{
! return fileFormat_;
}
--- 31,49 ----
{
! DunesFileFormat.DunesVersion version_;
public DunesWriter()
{
! this(DunesFileFormat.getInstance().getLastVersionImpl());
}
! public DunesWriter(DunesFileFormat.DunesVersion _f)
{
! version_= _f;
}
public FileFormat getFileFormat()
{
! return version_.getFileFormat();
}
***************
*** 98,108 ****
return;
}
! H2dElement[] elems= maillage.getElts();
! if (elems == null)
! {
! analyze_.addFatalError("Le maillage ne contient pas d'éléments !");
! return;
! }
! int nElems= elems.length;
if (nElems == 0)
{
--- 93,103 ----
return;
}
! //H2dElement[] elems= maillage.getElts();
! // if (elems == null)
! // {
! // analyze_.addFatalError("Le maillage ne contient pas d'éléments !");
! // return;
! // }
! int nElems= maillage.getEltNb();
if (nElems == 0)
{
***************
*** 112,116 ****
StringBuffer b= new StringBuffer(600);
! b.append(format_.getNoeudCode());
b.append(' ');
b.append(lineSep_);
--- 107,111 ----
StringBuffer b= new StringBuffer(600);
! b.append(version_.getNoeudCode());
b.append(' ');
b.append(lineSep_);
***************
*** 121,130 ****
{
b.append(' ');
! b.append(format_.getAdaptatifCode());
printAdaptatifV= true;
}
else
{
! b.append(format_.getNonAdaptatifCode());
}
b.append(lineSep_);
--- 116,125 ----
{
b.append(' ');
! b.append(version_.getAdaptatifCode());
printAdaptatifV= true;
}
else
{
! b.append(version_.getNonAdaptatifCode());
}
b.append(lineSep_);
***************
*** 172,176 ****
b.append(lineSep_);
//L'identifiant element
! b.append(format_.getElementCode());
b.append(lineSep_);
//le nb d'éléments
--- 167,171 ----
b.append(lineSep_);
//L'identifiant element
! b.append(version_.getElementCode());
b.append(lineSep_);
//le nb d'éléments
***************
*** 189,193 ****
for (int i= 0; i < nElems; i++)
{
! ppel= elems[i];
nppel= ppel.getPtNb();
//le num d'elements
--- 184,188 ----
for (int i= 0; i < nElems; i++)
{
! ppel= maillage.getElement(i);
nppel= ppel.getPtNb();
//le num d'elements
--- DunesKeyWord.java DELETED ---
|
|
From: <de...@us...> - 2003-08-18 11:07:03
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/commun
In directory sc8-pr-cvs1:/tmp/cvs-serv3430/commun
Modified Files:
DodicoLib.java
Log Message:
Maj des projets hydraulique 2d
Index: DodicoLib.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/commun/DodicoLib.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** DodicoLib.java 4 Jul 2003 08:11:42 -0000 1.9
--- DodicoLib.java 18 Aug 2003 11:05:19 -0000 1.10
***************
*** 34,37 ****
--- 34,38 ----
import java.util.Collection;
import java.util.HashMap;
+ import java.util.HashSet;
import java.util.Locale;
import java.util.StringTokenizer;
***************
*** 589,596 ****
}
}
!
public static void invert(int[] _t) {
int n= _t.length - 1;
! int n2=n/2;
int temp;
for (int i= n; i > n2; i--) {
--- 590,597 ----
}
}
!
public static void invert(int[] _t) {
int n= _t.length - 1;
! int n2= n / 2;
int temp;
for (int i= n; i > n2; i--) {
***************
*** 599,608 ****
_t[n - i]= temp;
}
! }
! public static void invert(int[] _t,int _firstIndex) {
int n= _t.length - 1;
! int nOffset=n+_firstIndex;
! int n2=(nOffset)/2;
int temp;
for (int i= n; i > n2; i--) {
--- 600,612 ----
_t[n - i]= temp;
}
! }
! /**
! * Permute les donnees du tableau a partir de l'index donne.
! */
! public static void invert(int[] _t, int _firstIndex) {
int n= _t.length - 1;
! int nOffset= n + _firstIndex;
! int n2= (nOffset) / 2;
int temp;
for (int i= n; i > n2; i--) {
***************
*** 613,626 ****
}
! public static void main(String[] args) {
! int[] d=new int[]{1,2,3,4,5,6,7
! };
! invert(d);
! DodicoLib.printObject(d, true);
! d=new int[]{1,2,3,4,5,6
! };
! invert(d,7);
! DodicoLib.printObject(d, true);
}
}
--- 617,655 ----
}
! /**
! * Rassemble dans le meme tableau les chaine du tableau <code>_init1</code>
! * et de la collection. Le tableau est ensuite range.
! */
! public static String[] mergeAndSort(String[] _init1, Collection _init2) {
! HashSet r= null;
! String[] rf= null;
! if ((_init2 != null) && (_init2.size() > 0))
! r= new HashSet(_init2);
! else if (_init1 != null) {
! r= new HashSet(_init1.length);
! } else
! return null;
! if (_init1 != null) {
! int n= _init1.length - 1;
! for (int i= n; i >= 0; i--) {
! r.add(_init1[i]);
! }
}
+ rf= new String[r.size()];
+ r.toArray(rf);
+ Arrays.sort(rf);
+ return rf;
+ }
+
+ public static void main(String[] args) {
+ String[] i= new String[] { "v1", "v4" };
+ ArrayList l= new ArrayList(5);
+ l.add("v1");
+ l.add("v5");
+ l.add("v3");
+ l.add("v2");
+ DodicoLib.printObject(mergeAndSort(i, l), true);
}
+
+ }
|
|
From: <jm_...@us...> - 2003-08-11 11:57:55
|
Update of /cvsroot/fudaa//fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor
In directory sc8-pr-cvs1:/tmp/cvs-serv10691
Modified Files:
Hydraulique1dSeuilAvecLoiEditor.java
Log Message:
Correction bug mise à jour du label cote de rupture
Index: Hydraulique1dSeuilAvecLoiEditor.java
===================================================================
RCS file: /cvsroot/fudaa//fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/editor/Hydraulique1dSeuilAvecLoiEditor.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Hydraulique1dSeuilAvecLoiEditor.java 4 Aug 2003 17:50:07 -0000 1.4
--- Hydraulique1dSeuilAvecLoiEditor.java 11 Aug 2003 11:57:51 -0000 1.5
***************
*** 178,181 ****
--- 178,184 ----
lbZRupture_.setText("Cote de crête");
}
+ else {
+ lbZRupture_.setText("Cote de Rupture");
+ }
}
else if ( _o instanceof IBief) bief_ = (IBief)_o;
***************
*** 280,286 ****
--- 283,291 ----
if (seuil_ instanceof ISeuilDenoye) {
tfZRupture_.setValue(new Double(((ISeuilDenoye)seuil_).coteCrete()));
+ lbZRupture_.setText("Cote de crête");
}
else {
tfZRupture_.setValue(new Double(seuil_.coteRupture()));
+ lbZRupture_.setText("Cote de Rupture");
}
initListeLoi();
|
|
From: <de...@us...> - 2003-08-07 09:34:31
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/junit In directory sc8-pr-cvs1:/tmp/cvs-serv1359 Added Files: DodicoJUnitLauncher.java Log Message: mode |
|
From: <de...@us...> - 2003-08-07 09:32:54
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/junit In directory sc8-pr-cvs1:/tmp/cvs-serv1109 Removed Files: DodicoJUnitLauncher.java Log Message: maj --- DodicoJUnitLauncher.java DELETED --- |