Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d
In directory sc8-pr-cvs1:/tmp/cvs-serv28839/h2d
Modified Files:
H2dEvolution.java H2dEvolutionFrontiereLiquide.java
H2dEvolutionListener.java H2dEvolutionListenerDispatcher.java
H2dEvolutionManager.java H2dFileFormatMaillageVersion.java
H2dTimeStepGroup.java h2d_en.fr_txt
Added Files:
H2dCSVFileFormat.java
H2dEvolutionListenerDispatcherDefault.java
H2dFileFormatEvolutionVersion.java
Removed Files:
MaillageReader.java
Log Message:
Update for h2d model
Add support for evolution
--- NEW FILE: H2dCSVFileFormat.java ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: H2dEvolutionListenerDispatcherDefault.java ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: H2dFileFormatEvolutionVersion.java ---
(This appears to be a binary file; contents omitted.)
Index: H2dEvolution.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/H2dEvolution.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** H2dEvolution.java 12 Dec 2003 10:30:53 -0000 1.6
--- H2dEvolution.java 19 Dec 2003 12:10:36 -0000 1.7
***************
*** 8,23 ****
*/
package org.fudaa.dodico.h2d;
! import org.fudaa.ctulu.CtuluLib;
!
! import org.fudaa.dodico.commun.DodicoDoubleDoubleSortedList;
/**
* @author deniger
* @version $Id$
*/
! public class H2dEvolution implements Comparable{
! String nom_;
! String unite_;
! DodicoDoubleDoubleSortedList list_;
! private H2dEvolutionListenerDispatcher listener_;
int used_;
/**
--- 8,19 ----
*/
package org.fudaa.dodico.h2d;
! import org.fudaa.dodico.mesure.EvolutionListenerDispatcher;
! import org.fudaa.dodico.mesure.EvolutionReguliere;
/**
* @author deniger
* @version $Id$
*/
! public class H2dEvolution extends EvolutionReguliere {
!
int used_;
/**
***************
*** 26,90 ****
public H2dEvolution() {
used_= 0;
- list_= new DodicoDoubleDoubleSortedList();
}
public H2dEvolution(int _n) {
! list_= new DodicoDoubleDoubleSortedList(_n);
}
public H2dEvolution(H2dEvolution _evol) {
initFrom(_evol);
}
!
! public boolean isUsed(){
! return used_>0;
}
private final void initFrom(H2dEvolution _init) {
! nom_=_init.nom_;
! unite_=_init.unite_;
! listener_=_init.listener_;
! used_=_init.used_;
! list_=new DodicoDoubleDoubleSortedList(_init.list_);
}
public H2dEvolution(String _nom) {
this();
! nom_= _nom;
}
public int getUsed() {
return used_;
}
!
! protected void fireEvolutionUsedChanged(int _old){
! if(listener_!=null)
! listener_.evolutionUsedChanged(this, _old, used_);
}
public void setUsed() {
! int old=used_;
used_++;
fireEvolutionUsedChanged(old);
}
public void setUnUsed() {
! int old=used_;
used_--;
fireEvolutionUsedChanged(old);
}
!
! public double getMaxY() {
! return list_.getMaxY();
! }
!
! public double getMaxX() {
! return list_.getMaxX();
! }
! public double getMinY() {
! return list_.getMinY();
! }
! public double getMinX() {
! return list_.getMinX();
! }
! /**
! *
! */
! public H2dEvolutionListenerDispatcher getListener() {
! return listener_;
! }
/**
*
--- 22,71 ----
public H2dEvolution() {
used_= 0;
}
public H2dEvolution(int _n) {
! super(_n);
}
public H2dEvolution(H2dEvolution _evol) {
initFrom(_evol);
}
!
! public H2dEvolution(EvolutionReguliere _evolReg) {
! initFromEvolutionReguliere(_evolReg);
! }
!
! public boolean isUsed() {
! return used_ > 0;
}
private final void initFrom(H2dEvolution _init) {
! initFromEvolutionReguliere(_init);
! listener_= _init.listener_;
! used_= _init.used_;
}
public H2dEvolution(String _nom) {
this();
! setNom(_nom);
}
public int getUsed() {
return used_;
}
!
! protected void fireEvolutionUsedChanged(int _old) {
! if (listener_ != null)
! ((H2dEvolutionListenerDispatcher)listener_).evolutionUsedChanged(
! this,
! _old,
! used_);
}
public void setUsed() {
! int old= used_;
used_++;
fireEvolutionUsedChanged(old);
}
public void setUnUsed() {
! int old= used_;
used_--;
fireEvolutionUsedChanged(old);
}
!
/**
*
***************
*** 93,177 ****
listener_= _listener;
}
protected void add(double t_, double _value) {
! list_.put(t_, _value);
}
public int getPasTempNb() {
! return list_.size();
}
public double getPasDeTemps(int _index) {
! return list_.getKeyAtIndex(_index);
}
public double getQuickPasDeTemps(int _index) {
! return list_.getQuickKeyAtIndex(_index);
}
public double getValue(int _index) {
! return list_.getValueAtIndex(_index);
}
public double getQuickValue(int _index) {
! return list_.getQuickValueAtIndex(_index);
! }
! protected void ensureCapacity(int _c) {
! list_.ensureCapacity(_c);
! }
!
!
! /**
! *
! */
! public String getNom() {
! return nom_;
! }
! /**
! *
! */
! public String getUnite() {
! return unite_;
}
! /**
! *
! */
! public void setNom(String _string) {
! nom_= _string;
}
/**
*
*/
! public void setUnite(String _string) {
! unite_= _string;
}
/**
*
*/
! public String toString() {
! return nom_;
! }
! public String getDescriptionTotale() {
! StringBuffer b= new StringBuffer();
! b.append(toString()).append(CtuluLib.LINE_SEP);
! StringBuffer t= new StringBuffer();
! StringBuffer v= new StringBuffer();
! for (int i= 0; i < list_.size(); i++) {
! if (i > 0) {
! t.append(",");
! v.append(",");
! }
! t.append(list_.getQuickKeyAtIndex(i));
! v.append(list_.getQuickValueAtIndex(i));
! }
! b.append("time steps=[").append(t.toString()).append("]").append(
! CtuluLib.LINE_SEP);
! b.append("values=[").append(v.toString()).append("]").append(
! CtuluLib.LINE_SEP);
! return b.toString();
}
/**
*
*/
! public int compareTo(Object o) {
! if(o instanceof H2dEvolution){
! return nom_.compareTo(((H2dEvolution)o).getNom());
! }
! else throw new IllegalAccessError();
}
}
--- 74,129 ----
listener_= _listener;
}
+
protected void add(double t_, double _value) {
! put(t_, _value);
}
public int getPasTempNb() {
! return size();
}
public double getPasDeTemps(int _index) {
! return getKeyAtIndex(_index);
}
public double getQuickPasDeTemps(int _index) {
! return getQuickKeyAtIndex(_index);
}
public double getValue(int _index) {
! return getValueAtIndex(_index);
}
public double getQuickValue(int _index) {
! return getQuickValueAtIndex(_index);
}
!
! public boolean isTimeInclude(double _t) {
! return isInclude(_t);
}
+
/**
*
*/
! public H2dEvolution createH2dEvolutionFromInterpolation(double[] _newT) {
! H2dEvolution r= new H2dEvolution(createEvolutionFromInterpolation(_newT));
! r.setNom(getNom());
! r.setUnite(getUnite());
! return r;
}
+
/**
*
*/
! public boolean isEvolutionEquivalentTo(H2dEvolution _e) {
! return super.isEquivalentTo(_e);
}
+
/**
*
*/
! public void setListener(EvolutionListenerDispatcher _listener) {
! if(_listener==null) setListener(null);
! else if (_listener instanceof H2dEvolutionListenerDispatcher) {
! super.setListener(_listener);
! } else
! new Throwable().printStackTrace();
}
+
}
Index: H2dEvolutionFrontiereLiquide.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/H2dEvolutionFrontiereLiquide.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** H2dEvolutionFrontiereLiquide.java 11 Dec 2003 12:41:27 -0000 1.6
--- H2dEvolutionFrontiereLiquide.java 19 Dec 2003 12:10:36 -0000 1.7
***************
*** 9,12 ****
--- 9,13 ----
package org.fudaa.dodico.h2d;
import org.fudaa.dodico.h2d.type.H2dVariableType;
+ import org.fudaa.dodico.mesure.*;
/**
* @author deniger
***************
*** 28,31 ****
--- 29,36 ----
}
+ public void setEvolution(H2dEvolution _evol){
+ evol_=_evol;
+ }
+
public int getPasTempNb(){
return evol_.getPasTempNb();
***************
*** 72,76 ****
*
*/
! public H2dEvolutionListenerDispatcher getListener() {
return evol_.getListener();
}
--- 77,81 ----
*
*/
! public EvolutionListenerDispatcher getListener() {
return evol_.getListener();
}
Index: H2dEvolutionListener.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/H2dEvolutionListener.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** H2dEvolutionListener.java 11 Dec 2003 12:41:27 -0000 1.1
--- H2dEvolutionListener.java 19 Dec 2003 12:10:36 -0000 1.2
***************
*** 9,19 ****
package org.fudaa.dodico.h2d;
/**
* @author deniger
* @version $Id$
*/
! public interface H2dEvolutionListener {
! public void evolutionChanged(H2dEvolution _e);
public void evolutionUsedChanged(H2dEvolution _e,int _old,int _new);
-
}
--- 9,19 ----
package org.fudaa.dodico.h2d;
+ import org.fudaa.dodico.mesure.EvolutionListener;
+
/**
* @author deniger
* @version $Id$
*/
! public interface H2dEvolutionListener extends EvolutionListener{
public void evolutionUsedChanged(H2dEvolution _e,int _old,int _new);
}
Index: H2dEvolutionListenerDispatcher.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/H2dEvolutionListenerDispatcher.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** H2dEvolutionListenerDispatcher.java 11 Dec 2003 12:41:27 -0000 1.1
--- H2dEvolutionListenerDispatcher.java 19 Dec 2003 12:10:36 -0000 1.2
***************
*** 1,5 ****
/*
* @file H2dEvolutionListenerDispatcher.java
! * @creation 2 déc. 2003
* @modification $Date$
* @license GNU General Public License 2
--- 1,5 ----
/*
* @file H2dEvolutionListenerDispatcher.java
! * @creation 16 déc. 2003
* @modification $Date$
* @license GNU General Public License 2
***************
*** 9,23 ****
package org.fudaa.dodico.h2d;
/**
* @author deniger
* @version $Id$
*/
! public interface H2dEvolutionListenerDispatcher extends H2dEvolutionListener {
!
! public void addEvolutionListener(H2dEvolutionListener _l);
! public void removeEvolutionListener(H2dEvolutionListener _l);
! public boolean containsEvolutionListener(H2dEvolutionListener _l);
!
!
!
! }
--- 9,18 ----
package org.fudaa.dodico.h2d;
+ import org.fudaa.dodico.mesure.EvolutionListenerDispatcher;
+
/**
* @author deniger
* @version $Id$
*/
! public interface H2dEvolutionListenerDispatcher
! extends EvolutionListenerDispatcher,H2dEvolutionListener {}
Index: H2dEvolutionManager.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/H2dEvolutionManager.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** H2dEvolutionManager.java 12 Dec 2003 10:30:53 -0000 1.4
--- H2dEvolutionManager.java 19 Dec 2003 12:10:36 -0000 1.5
***************
*** 9,36 ****
package org.fudaa.dodico.h2d;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
- import java.util.TreeSet;
import java.util.Vector;
! import javax.swing.AbstractListModel;
import javax.swing.ComboBoxModel;
import javax.swing.DefaultComboBoxModel;
- import javax.swing.event.ListDataListener;
! import org.fudaa.dodico.h2d.reflux.H2dRefluxParameters;
/**
* @author deniger
* @version $Id$
*/
! public class H2dEvolutionManager implements H2dEvolutionListener {
! TreeSet evols_;
! H2dEvolutionListenerDispatcher listener_;
/**
*
*/
public H2dEvolutionManager(H2dEvolutionListenerDispatcher _listener) {
! evols_= new TreeSet();
! listener_= _listener;
}
--- 9,37 ----
package org.fudaa.dodico.h2d;
import java.util.ArrayList;
+ import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import java.util.Vector;
!
import javax.swing.ComboBoxModel;
import javax.swing.DefaultComboBoxModel;
! import org.fudaa.ctulu.CtuluLib;
!
! import org.fudaa.dodico.commun.DodicoResource;
! import org.fudaa.dodico.mesure.EvolutionListener;
! import org.fudaa.dodico.mesure.EvolutionManager;
! import org.fudaa.dodico.mesure.EvolutionReguliere;
/**
* @author deniger
* @version $Id$
*/
! public class H2dEvolutionManager extends EvolutionManager {
/**
*
*/
public H2dEvolutionManager(H2dEvolutionListenerDispatcher _listener) {
! super(_listener);
}
***************
*** 38,86 ****
H2dEvolutionListenerDispatcher _listener,
Set _s) {
! listener_= _listener;
! evols_= new TreeSet(_s);
for (Iterator it= evols_.iterator(); it.hasNext();) {
((H2dEvolution)it.next()).setListener(listener_);
}
}
! public static double[] getXMinMaxYMinMax(List _l) {
! if (_l == null)
! return null;
! double[] r= new double[4];
! if (_l.size() == 0)
! return r;
!
! int n= _l.size() - 1;
! H2dEvolution e= (H2dEvolution)_l.get(n);
! r[0]= e.getMinX();
! r[1]= e.getMaxX();
! r[2]= e.getMinY();
! r[3]= e.getMaxY();
! double temp;
! for (int i= n - 1; i >= 0; i--) {
! e= (H2dEvolution)_l.get(i);
! temp= e.getMinX();
! if (temp < r[0])
! r[0]= temp;
! temp= e.getMinY();
! if (temp < r[2])
! r[2]= temp;
! temp= e.getMaxX();
! if (temp > r[1])
! r[1]= temp;
! temp= e.getMaxY();
! if (temp > r[3])
! r[3]= temp;
! }
! return r;
! }
! public final void add(H2dEvolution[] _l) {
! if (_l != null) {
! for (int i= _l.length - 1; i >= 0; i--) {
! evols_.add(_l[i]);
! _l[i].setListener(listener_);
}
}
}
--- 39,75 ----
H2dEvolutionListenerDispatcher _listener,
Set _s) {
! super(_listener);
! evols_= new ArrayList(_s);
for (Iterator it= evols_.iterator(); it.hasNext();) {
((H2dEvolution)it.next()).setListener(listener_);
}
+ Collections.sort(evols_);
}
! public boolean isUsedCurveNotEnoughWidth(double _min, double _max) {
! H2dEvolution e;
! for (Iterator it= evols_.iterator(); it.hasNext();) {
! e= (H2dEvolution)it.next();
! if (e.isUsed()) {
! if ((e.getMinX() > _min) || (e.getMaxX() < _max))
! return true;
}
}
+ return false;
+ }
+
+ public void setDispatcher(H2dEvolutionListenerDispatcher _l) {
+ listener_= _l;
+ }
+
+ public synchronized final void add(H2dEvolution[] _l) {
+ super.add(_l);
+ }
+
+ public synchronized final void add(EvolutionReguliere[] _l) {
+ if (_l instanceof H2dEvolution[]) {
+ super.add(_l);
+ } else
+ new Throwable().printStackTrace();
}
***************
*** 96,129 ****
listener_.addEvolutionListener(_l);
}
- public void removeListener(H2dEvolutionListener _l) {
- listener_.removeEvolutionListener(_l);
- }
- public boolean containsListener(H2dEvolutionListener _l) {
- return listener_.containsEvolutionListener(_l);
- }
- public final void add(H2dEvolution _l) {
- if (_l != null) {
- evols_.add(_l);
- _l.setListener(listener_);
- }
- }
- public int getNbEvol() {
- return evols_.size();
- }
- public List createList() {
- return new ArrayList(evols_);
- }
- public Vector createVector() {
- return new Vector(evols_);
- }
- public ComboBoxModel createComboBoxModel() {
- return new DefaultComboBoxModel(createVector());
- }
! public ComboBoxModel createComboBoxModelWithEmpty(H2dEvolution _empty) {
! Vector v= new Vector(getNbEvol() + 1);
! v.add(_empty);
! v.addAll(evols_);
! return new DefaultComboBoxModel(v);
}
--- 85,94 ----
listener_.addEvolutionListener(_l);
}
! public void addListener(EvolutionListener _l) {
! if (_l instanceof H2dEvolutionListener)
! listener_.addEvolutionListener(_l);
! else
! new Throwable().printStackTrace();
}
***************
*** 131,139 ****
*
*/
! public void evolutionChanged(H2dEvolution _e) {}
! /**
! *
! */
! public void evolutionUsedChanged(H2dEvolution _e, int _old, int _new) {}
}
--- 96,109 ----
*
*/
! public synchronized void add(EvolutionReguliere _l) {
! if (_l instanceof H2dEvolution)
! super.add(_l);
! else
! new Throwable().printStackTrace();
! }
!
! public synchronized final void add(H2dEvolution _l) {
! super.add(_l);
! }
}
Index: H2dFileFormatMaillageVersion.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/H2dFileFormatMaillageVersion.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** H2dFileFormatMaillageVersion.java 11 Dec 2003 12:41:27 -0000 1.5
--- H2dFileFormatMaillageVersion.java 19 Dec 2003 12:10:36 -0000 1.6
***************
*** 20,27 ****
public FileFormat getFileFormat();
public boolean canWriteOnlyGrid();
! public FileOperationSynthese writeMaillage(
File _f,
H2dGrid _m,
ProgressionInterface _prog);
public FileOperationSynthese readGrid(File _f, ProgressionInterface _prog);
! }
--- 20,27 ----
public FileFormat getFileFormat();
public boolean canWriteOnlyGrid();
! public FileOperationSynthese writeGrid(
File _f,
H2dGrid _m,
ProgressionInterface _prog);
public FileOperationSynthese readGrid(File _f, ProgressionInterface _prog);
! }
Index: H2dTimeStepGroup.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/H2dTimeStepGroup.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** H2dTimeStepGroup.java 11 Dec 2003 12:41:27 -0000 1.3
--- H2dTimeStepGroup.java 19 Dec 2003 12:10:36 -0000 1.4
***************
*** 8,17 ****
*/
package org.fudaa.dodico.h2d;
! import java.util.TreeMap;
!
! import org.fudaa.dodico.corba.simulation.typeAffichage;
import gnu.trove.TObjectDoubleHashMap;
import gnu.trove.TObjectDoubleProcedure;
- import gnu.trove.TObjectProcedure;
import org.fudaa.dodico.commun.DodicoLib;
--- 8,14 ----
*/
package org.fudaa.dodico.h2d;
! import gnu.trove.TDoubleArrayList;
import gnu.trove.TObjectDoubleHashMap;
import gnu.trove.TObjectDoubleProcedure;
import org.fudaa.dodico.commun.DodicoLib;
***************
*** 55,60 ****
*
*/
! public H2dTimeStepGroup() {
! }
public H2dTimeStepGroup(H2dTimeStepGroup _init) {
initFrom(_init);
--- 52,56 ----
*
*/
! public H2dTimeStepGroup() {}
public H2dTimeStepGroup(H2dTimeStepGroup _init) {
initFrom(_init);
***************
*** 79,92 ****
return false;
}
!
! public static H2dTimeStepGroup createDefaultStationnaire(){
! H2dTimeStepGroup r=new H2dTimeStepGroup();
r.setSchema(H2dResolutionSchemaType.STATIONNAIRE);
r.setMethode(H2dResolutionMethodType.LINEAIRE);
return r;
}
!
! public static H2dTimeStepGroup createDefaultTransient(){
! H2dTimeStepGroup r=new H2dTimeStepGroup();
r.setSchema(H2dResolutionSchemaType.EULER);
r.setMethode(H2dResolutionMethodType.LINEAIRE);
--- 75,88 ----
return false;
}
!
! public static H2dTimeStepGroup createDefaultStationnaire() {
! H2dTimeStepGroup r= new H2dTimeStepGroup();
r.setSchema(H2dResolutionSchemaType.STATIONNAIRE);
r.setMethode(H2dResolutionMethodType.LINEAIRE);
return r;
}
!
! public static H2dTimeStepGroup createDefaultTransient() {
! H2dTimeStepGroup r= new H2dTimeStepGroup();
r.setSchema(H2dResolutionSchemaType.EULER);
r.setMethode(H2dResolutionMethodType.LINEAIRE);
***************
*** 96,101 ****
return r;
}
!
!
public static Double isViscosityTransitUsed(H2dTimeStepGroup[] _step) {
for (int i= 0; i < _step.length; i++) {
--- 92,96 ----
return r;
}
!
public static Double isViscosityTransitUsed(H2dTimeStepGroup[] _step) {
for (int i= 0; i < _step.length; i++) {
***************
*** 106,116 ****
return null;
}
!
! public double getTimeLength(){
! if(schema_.isUsed(H2dVariableType.NB_TIME_STEP_SCHEMA))
! return getValeurPasTemps()*getNbPasTemps();
return 0d;
}
!
public final void initFrom(H2dTimeStepGroup _init) {
varValueMethode_=
--- 101,111 ----
return null;
}
!
! public double getTimeLength() {
! if (schema_.isUsed(H2dVariableType.NB_TIME_STEP_SCHEMA))
! return getValeurPasTemps() * getNbPasTemps();
return 0d;
}
!
public final void initFrom(H2dTimeStepGroup _init) {
varValueMethode_=
***************
*** 255,260 ****
if ((varValueMethode_ != null) && (varValueMethode_.contains(_t))) {
return varValueMethode_.get(_t);
! } else{
! return getDefaultValue(_t);
}
--- 250,255 ----
if ((varValueMethode_ != null) && (varValueMethode_.contains(_t))) {
return varValueMethode_.get(_t);
! } else {
! return getDefaultValue(_t);
}
***************
*** 265,274 ****
}
return getDefaultValue(_t);
! // new Throwable().printStackTrace();
! // return 0;
}
public void setSchemaValue(H2dVariableType _t, double _v) {
! if (schema_.isUsed(_t)){
! if(varValueSchema_==null) varValueSchema_=new TObjectDoubleHashMap();
varValueSchema_.put(_t, _v);
}
--- 260,270 ----
}
return getDefaultValue(_t);
! // new Throwable().printStackTrace();
! // return 0;
}
public void setSchemaValue(H2dVariableType _t, double _v) {
! if (schema_.isUsed(_t)) {
! if (varValueSchema_ == null)
! varValueSchema_= new TObjectDoubleHashMap();
varValueSchema_.put(_t, _v);
}
***************
*** 276,281 ****
}
public void setMethodeValue(H2dVariableType _t, double _v) {
! if (methode_.isUsed(_t)){
! if(varValueMethode_==null) varValueMethode_=new TObjectDoubleHashMap();
varValueMethode_.put(_t, _v);
}
--- 272,278 ----
}
public void setMethodeValue(H2dVariableType _t, double _v) {
! if (methode_.isUsed(_t)) {
! if (varValueMethode_ == null)
! varValueMethode_= new TObjectDoubleHashMap();
varValueMethode_.put(_t, _v);
}
***************
*** 332,335 ****
--- 329,376 ----
+ (varValueMethode_ == null ? 0 : varValueMethode_.hashCode())
+ (varValueSchema_ == null ? 0 : varValueSchema_.hashCode());
+ }
+
+ public static double getMinTime(double _beginTime, H2dTimeStepGroup[] _gp) {
+ if (_gp == null)
+ return 0;
+ return _gp[0].getSchema() == H2dResolutionSchemaType.STATIONNAIRE
+ ? 1
+ : _beginTime + _gp[0].getValeurPasTemps();
+ }
+
+ public static double getMaxTime(double _beginTime, H2dTimeStepGroup[] _gp) {
+ if (_gp == null)
+ return 0;
+ if (_gp[0].getSchema() == H2dResolutionSchemaType.STATIONNAIRE)
+ return 1;
+ double r= _beginTime;
+ for (int i= _gp.length - 1; i >= 0; i--) {
+ r += _gp[i].getTimeLength();
+ }
+ return r;
+ }
+
+ public static double[] getTimeStep(double _beginTime, H2dTimeStepGroup[] _gp) {
+ if (_gp == null)
+ return null;
+ H2dTimeStepGroup t= _gp[0];
+ if (t.getSchema() == H2dResolutionSchemaType.STATIONNAIRE) {
+ return new double[] { 1 };
+ }
+ TDoubleArrayList r= new TDoubleArrayList();
+ int n= _gp.length;
+ int nbPas;
+ double vTemps;
+ double vToAdd= _beginTime;
+ for (int i= 0; i < n; i++) {
+ t= _gp[i];
+ nbPas= t.getNbPasTemps();
+ vTemps= t.getValeurPasTemps();
+ for (int j= nbPas; j > 0; j--) {
+ vToAdd += vTemps;
+ r.add(vToAdd);
+ }
+ }
+ return r.toNativeArray();
}
}
Index: h2d_en.fr_txt
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/h2d_en.fr_txt,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** h2d_en.fr_txt 12 Dec 2003 10:30:53 -0000 1.8
--- h2d_en.fr_txt 19 Dec 2003 12:10:36 -0000 1.9
***************
*** 195,199 ****
Frontières Liquides transitoire=Transient liquid boundaries
Ce fichier contient les valeurs dépendantes du temps pour les frontières liquides=This file contains the time-dependent boundary conditions
! Frontières Liquides transitoire=Transient liquid boundary conditions
L'unité du temps est traitée en tant que seconde=The time is supposed to be in second
Les valeurs du temps doivent être croissantes=The time values must be in ascending order
--- 195,199 ----
Frontières Liquides transitoire=Transient liquid boundaries
Ce fichier contient les valeurs dépendantes du temps pour les frontières liquides=This file contains the time-dependent boundary conditions
! Frontières Liquides (Télémac)=Liquid boundary conditions (Telemac)
L'unité du temps est traitée en tant que seconde=The time is supposed to be in second
Les valeurs du temps doivent être croissantes=The time values must be in ascending order
***************
*** 231,233 ****
Select Lumping banc c/d=Select Lumping bench c/u
Vide=Empty
! Courbes temporelles=Time curves
\ No newline at end of file
--- 231,234 ----
Select Lumping banc c/d=Select Lumping bench c/u
Vide=Empty
! Courbes temporelles=Time curves
! Les courbes suivantes ne contiennent pas les bornes de la simulation=The following curves don't contain the bounds of the simulation
\ No newline at end of file
--- MaillageReader.java DELETED ---
|