|
From: <de...@us...> - 2015-10-09 11:59:13
|
Revision: 9182
http://sourceforge.net/p/fudaa/svn/9182
Author: deniger
Date: 2015-10-09 11:59:10 +0000 (Fri, 09 Oct 2015)
Log Message:
-----------
nouveau dico pour Fudaa-Prepro
Modified Paths:
--------------
trunk/soft/fudaa-prepro/ui/nbactions-release.xml
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrLauncherDefault.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/telemac/TrTelemacCommunParametres.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/telemac/TrTelemacSerafinHelper.java
Modified: trunk/soft/fudaa-prepro/ui/nbactions-release.xml
===================================================================
--- trunk/soft/fudaa-prepro/ui/nbactions-release.xml 2015-10-09 11:59:01 UTC (rev 9181)
+++ trunk/soft/fudaa-prepro/ui/nbactions-release.xml 2015-10-09 11:59:10 UTC (rev 9182)
@@ -1,2 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
-<actions />
+<actions>
+ <action>
+ <actionName>run</actionName>
+ <packagings>
+ <packaging>jar</packaging>
+ </packagings>
+ <goals>
+ <goal>process-classes</goal>
+ <goal>org.codehaus.mojo:exec-maven-plugin:1.2.1:exec</goal>
+ </goals>
+ <properties>
+ <exec.args>-classpath %classpath org.fudaa.fudaa.tr.Tr --no_log</exec.args>
+ <exec.executable>java</exec.executable>
+ </properties>
+ </action>
+ <action>
+ <actionName>debug</actionName>
+ <packagings>
+ <packaging>jar</packaging>
+ </packagings>
+ <goals>
+ <goal>process-classes</goal>
+ <goal>org.codehaus.mojo:exec-maven-plugin:1.2.1:exec</goal>
+ </goals>
+ <properties>
+ <exec.args>-Xdebug -Xrunjdwp:transport=dt_socket,server=n,address=${jpda.address} -classpath %classpath org.fudaa.fudaa.tr.Tr --no_log</exec.args>
+ <exec.executable>java</exec.executable>
+ <jpda.listen>true</jpda.listen>
+ </properties>
+ </action>
+ <action>
+ <actionName>profile</actionName>
+ <packagings>
+ <packaging>jar</packaging>
+ </packagings>
+ <goals>
+ <goal>process-classes</goal>
+ <goal>org.codehaus.mojo:exec-maven-plugin:1.2.1:exec</goal>
+ </goals>
+ <properties>
+ <exec.args>-classpath %classpath org.fudaa.fudaa.tr.Tr --no_log</exec.args>
+ <exec.executable>java</exec.executable>
+ </properties>
+ </action>
+ </actions>
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrLauncherDefault.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrLauncherDefault.java 2015-10-09 11:59:01 UTC (rev 9181)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrLauncherDefault.java 2015-10-09 11:59:10 UTC (rev 9182)
@@ -72,8 +72,8 @@
infoSoft = new BuInformationsSoftware();
infoSoft.name = "prepro";
- infoSoft.version = "1.3.0-RC9";
- infoSoft.date = "2015-08-24";
+ infoSoft.version = "1.3.0-RC10";
+ infoSoft.date = "2015-10-07";
infoSoft.rights = TrResource.getS("Tous droits r\xE9serv\xE9s") + ". CETMEF (c)2003-2009";
infoSoft.contact = "fre...@fu...";
infoSoft.license = "GPL2";
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/telemac/TrTelemacCommunParametres.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/telemac/TrTelemacCommunParametres.java 2015-10-09 11:59:01 UTC (rev 9181)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/telemac/TrTelemacCommunParametres.java 2015-10-09 11:59:10 UTC (rev 9182)
@@ -105,9 +105,8 @@
* TrTelemacParamsSavedData() {} public TrTelemacParamsSavedData(final boolean _isGeomFileSaved, final boolean
* _isRepriseFileSaved) { super(); isGeomFileSaved_ = _isGeomFileSaved; isRepriseFileSaved_ = _isRepriseFileSaved; } }
*/
-
TrTelemacCommunParametres(final TrImplementationEditorAbstract _ui, final H2dTelemacDicoParams _dicoParams, final File _f, final File _gridFile,
- final TrTelemacCommunProjectListener _listener) {
+ final TrTelemacCommunProjectListener _listener) {
super(_ui, _f, _dicoParams);
params_ = new H2dTelemacParameters((H2dTelemacDicoParams) getDicoParams(), _listener);
if (_gridFile != null) {
@@ -116,13 +115,15 @@
}
// TrTelemacSerafinBuilder serafinBuilder_;
-
TrTelemacSiActivator siActivator_;
private synchronized boolean internloadGeometrie(final boolean _newProject, final boolean _useOlb, final int[] _ipobo,
- final ProgressionInterface _prg) {
+ final ProgressionInterface _prg) {
final DicoEntite entFile = getDicoFileFormatVersion().getMaillageEntiteFile();
if (entFile == null) {
+ if (!getDicoFileFormatVersion().isGridRequired()) {
+ return false;
+ }
getUI().error(MvResource.getS("Fichier de maillage"), TrResource.getS("D\xE9finition du fichier g\xE9om\xE9trie non trouv\xE9e"), false);
return false;
}
@@ -219,7 +220,7 @@
CtuluLibMessage.info("save Cl file in " + _f);
}
final CtuluIOOperationSynthese op = getDicoFileFormatVersion().getDefaultTelemacCLFormat(getDicoFileFormatVersion().getCodeName()).write(_f,
- getTelemacParametres().getTelemacCLManager().createCLSourceInterface(), _prog);
+ getTelemacParametres().getTelemacCLManager().createCLSourceInterface(), _prog);
return !ui_.manageErrorOperationAndIsFatal(op);
}
@@ -366,8 +367,8 @@
}
/**
- * @return le repertoire contenant le maillage. Si impossible, renvoie le repertoire du projet / the folder containing
- * the mesh. If impossible, send the project folder
+ * @return le repertoire contenant le maillage. Si impossible, renvoie le repertoire du projet / the folder containing the mesh. If impossible, send
+ * the project folder
*/
public File getGridBaseDir() {
final DicoEntite entFile = getDicoFileFormatVersion().getMaillageEntiteFile();
@@ -386,9 +387,8 @@
}
/**
- * Renvoie le maillage. Si nul, il est necessaire de charger le maillage Send the meshing. If nought, it is necessary
- * to modify the meshing
- *
+ * Renvoie le maillage. Si nul, il est necessaire de charger le maillage Send the meshing. If nought, it is necessary to modify the meshing
+ *
* @return le maillage / the mesh
*/
public EfGridInterface getMaillage() {
@@ -425,8 +425,7 @@
}
/**
- * @return true si un fichier de condition limite est utilise par ce logiciel / true if a file of boundary condition
- * is used by this software
+ * @return true si un fichier de condition limite est utilise par ce logiciel / true if a file of boundary condition is used by this software
*/
public boolean isClSupported() {
return getDicoFileFormatVersion().getCLEntiteFile() != null;
@@ -435,7 +434,7 @@
@Override
public boolean isGeometrieLoaded() {
return getState().isLoaded(getDicoFileFormatVersion().getMaillageEntiteFile())
- || getState().isLoaded(getDicoFileFormatVersion().getRepriseFileKeyword());
+ || getState().isLoaded(getDicoFileFormatVersion().getRepriseFileKeyword());
}
public boolean isRepriseActivatedByUser() {
@@ -608,7 +607,8 @@
getState().setLoaded(entFile, f, modified);
if (modified) {
getImpl().message(entFile.getNom(),
- TrResource.getS("Certaines courbes temporelles ne sont pas assez \xE9tendues dans le temps" + "( cela sera automatiquement corrig\xE9)"), false);
+ TrResource.getS("Certaines courbes temporelles ne sont pas assez \xE9tendues dans le temps" + "( cela sera automatiquement corrig\xE9)"),
+ false);
}
// on verifie l'utilite de ce fichier
// we check the useful of this list
@@ -635,4 +635,4 @@
return getTelemacParametres().isTransientAvailable() && getTelemacParametres().getTelemacCLManager().isEvolutionUsed();
}
-}
\ No newline at end of file
+}
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/telemac/TrTelemacSerafinHelper.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/telemac/TrTelemacSerafinHelper.java 2015-10-09 11:59:01 UTC (rev 9181)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/telemac/TrTelemacSerafinHelper.java 2015-10-09 11:59:10 UTC (rev 9182)
@@ -51,6 +51,7 @@
* @version $Id: TrTelemacSerafinHelper.java,v 1.16 2007-06-11 13:08:22 deniger Exp $
*/
public class TrTelemacSerafinHelper extends TelemacVariableMapper {
+
private final TrTelemacCommunParametres params_;
/**
@@ -76,15 +77,17 @@
return null;
}
final CtuluIOOperationSynthese op = ((SerafinFileFormat) params_.getTelemacParametres().getTelemacVersion()
- .getDefaultSerafinFormat()).readLast(_file, _prg);
+ .getDefaultSerafinFormat()).readLast(_file, _prg);
final SerafinInterface serafinResults = (SerafinInterface) op.getSource();
- if (getUI().manageErrorOperationAndIsFatal(op)) { return null; }
+ if (getUI().manageErrorOperationAndIsFatal(op)) {
+ return null;
+ }
// le maillage n'est pas conforme
if (serafinResults != null) {
final String diff = EfLib.isDiffQuick(serafinResults.getGrid(), params_.getMaillage());
if (diff != null) {
getUI().error(getRepriseTitle(),
- TrResource.getS("Le fichier de reprise n'est pas compatible") + CtuluLibString.LINE_SEP + diff, false);
+ TrResource.getS("Le fichier de reprise n'est pas compatible") + CtuluLibString.LINE_SEP + diff, false);
return null;
}
}
@@ -113,7 +116,9 @@
* @return si le fichier a ete simplifie
*/
public RepriseResults loadRepriseData(final ProgressionInterface _prg, final File _file, final Map _m) {
- if (_m == null) { throw new IllegalArgumentException("map must not be null"); }
+ if (_m == null) {
+ throw new IllegalArgumentException("map must not be null");
+ }
final SerafinInterface serafinResults = readRepriseFile(_prg, _file);
// le maillage n'a pas pu etre lu ou le maillage ne correspond pas
if (serafinResults == null) {
@@ -137,9 +142,9 @@
}
// determineBathyForCI(t, messageBody);
// les variables non support\xE9es
- final H2dVariableType[] varsToRemove = new H2dVariableType[] { H2dVariableType.VITESSE, H2dVariableType.DEBIT,
- H2dVariableType.DEBIT_NORMAL, H2dVariableType.DEBIT_TANGENTIEL, H2dVariableType.DEBIT_X,
- H2dVariableType.DEBIT_Y };
+ final H2dVariableType[] varsToRemove = new H2dVariableType[]{H2dVariableType.VITESSE, H2dVariableType.DEBIT,
+ H2dVariableType.DEBIT_NORMAL, H2dVariableType.DEBIT_TANGENTIEL, H2dVariableType.DEBIT_X,
+ H2dVariableType.DEBIT_Y};
for (int i = varsToRemove.length - 1; i >= 0; i--) {
if (t.containsKey(varsToRemove[i])) {
isVarRemoved = true;
@@ -149,7 +154,7 @@
String msg = null;
final RepriseResults r = new RepriseResults();
- r.initialDate=serafinResults.getIdate();
+ r.initialDate = serafinResults.getIdate();
r.timeStep_ = serafinResults.getTimeStep(timeStep);
// simplification du fichier de reprise
if (isVarRemoved || isLastTimeKept) {
@@ -160,12 +165,12 @@
}
if (isVarRemoved) {
msg += CtuluLibString.LINE_SEP + " -"
- + TrResource.getS("les variables vitesses scalaires, d\xE9bit ont \xE9t\xE9 supprim\xE9es");
+ + TrResource.getS("les variables vitesses scalaires, d\xE9bit ont \xE9t\xE9 supprim\xE9es");
}
msg += CtuluLibString.LINE_SEP
- + TrResource.getS("Si vous modifiez et sauvegardez les conditions initiales, "
- + "ce nouveau fichier de reprise remplacera l'ancien.");
+ + TrResource.getS("Si vous modifiez et sauvegardez les conditions initiales, "
+ + "ce nouveau fichier de reprise remplacera l'ancien.");
}
// on charge les donn\xE9es
// si.load(t, si.getRepriseFile(_dirBase), serafinResults.getTimeStep(timeStep));
@@ -227,12 +232,12 @@
public boolean isRepriseFileSetAndValid() {
return params_.getDicoParams().isValueSetFor(getRepriseFileKw())
- && params_.getDicoParams().isValueValideFor(getRepriseFileKw());
+ && params_.getDicoParams().isValueValideFor(getRepriseFileKw());
}
public boolean isRepriseActivated() {
return getRepriseBooleanKw() != null && params_.getDicoParams().isValueSetFor(getRepriseBooleanKw())
- && DicoDataType.Binaire.getValue(params_.getDicoParams().getValue(getRepriseBooleanKw()));
+ && DicoDataType.Binaire.getValue(params_.getDicoParams().getValue(getRepriseBooleanKw()));
}
/**
@@ -301,7 +306,7 @@
_varDouble.put(H2dVariableType.COTE_EAU, new double[params_.getTelemacParametres().getMaillage().getPtsNb()]);
} else {
msgs
- .add(TrResource.getS("La surface libre ne peut pas \xEAtre r\xE9cup\xE9r\xE9e. Elle est initialis\xE9e \xE0 partir du fond."));
+ .add(TrResource.getS("La surface libre ne peut pas \xEAtre r\xE9cup\xE9r\xE9e. Elle est initialis\xE9e \xE0 partir du fond."));
_varDouble.put(H2dVariableType.COTE_EAU, new CtuluArrayDouble(bathy));
// on initialise avec cote=0;
}
@@ -347,7 +352,9 @@
getUI().setMainMessage(MvResource.getS("Lecture maillage"));
final File f = _f;
if (f == null) {
- getUI().error(getGridTitle(), TrResource.getS("Le mot-cl\xE9 n'est pas renseign\xE9"), false);
+ if (getParams().getDicoFileFormatVersion().isGridRequired()) {
+ getUI().error(getGridTitle(), TrResource.getS("Le mot-cl\xE9 n'est pas renseign\xE9"), false);
+ }
return null;
}
if (!f.exists()) {
@@ -355,8 +362,10 @@
return null;
}
final CtuluIOOperationSynthese op = params_.getTelemacParametres().getTelemacVersion().getDefaultSerafinFormat()
- .read(f, _prg);
- if (getUI().manageErrorOperationAndIsFatal(op)) { return null; }
+ .read(f, _prg);
+ if (getUI().manageErrorOperationAndIsFatal(op)) {
+ return null;
+ }
final SerafinInterface r = (SerafinInterface) op.getSource();
if (r.getGrid().getEltType() == EfElementType.T6) {
getUI().error(getGridTitle(), TrResource.getS("Les maillages 3D ne sont pas support\xE9s"), false);
@@ -443,7 +452,9 @@
public double getV(final Object _value, final int _ptIdx) {
final int valueIdx = nameIdx_.get(_value);
- if (valueIdx == oldVarIdx_) { return cache_[_ptIdx]; }
+ if (valueIdx == oldVarIdx_) {
+ return cache_[_ptIdx];
+ }
oldVarIdx_ = valueIdx;
try {
cache_ = ser_.getReadingInfo().getDouble(valueIdx, timeStep_);
@@ -457,14 +468,16 @@
}
public Map buildVariables(final SerafinInterface _serafin, final int _timeStep, final EfGridInterface _new,
- final ProgressionInterface _prog) {
- if (_new == null) { return buildVariables(_serafin, _timeStep, null); }
+ final ProgressionInterface _prog) {
+ if (_new == null) {
+ return buildVariables(_serafin, _timeStep, null);
+ }
final Map nodalVal = new HashMap();
final int nb = _serafin.getValueNb();
final GridInterpolAdapter src = new GridInterpolAdapter(_serafin, _timeStep);
final CtuluPermanentList allValues = src.getAllValues();
final InterpolationParameters params = new InterpolationParameters(allValues, new EfInterpolationTargetGridAdapter(
- _new, false), src);
+ _new, false), src);
params.setProg(_prog);
params.createDefaultResults();
final InterpolationResultsHolderI res = params.getResults();
@@ -490,4 +503,4 @@
public TrTelemacCommunParametres getParams() {
return params_;
}
-}
\ No newline at end of file
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|