Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/telemac
In directory sc8-pr-cvs1:/tmp/cvs-serv13994/h2d/telemac
Modified Files:
H2dTelemacCLManager.java H2dTelemacCLSourceInterface.java
H2dTelemacConditionLimite.java
H2dTelemacConditionLimiteMutable.java
H2dTelemacDicoFileFormatVersion.java H2dTelemacParametres.java
Added Files:
H2dTelemacBord.java H2dTelemacBordMutable.java
H2dTelemacClListener.java H2dTelemacProjectListener.java
Removed Files:
H2dTelemacListener.java
Log Message:
Ajout du pattern command pour annuler des operations
--- NEW FILE: H2dTelemacBord.java ---
/*
* @file H2dTelemacBord.java
* @creation 23 oct. 2003
* @modification $Date: 2003/10/29 11:41:27 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.h2d.telemac;
import org.fudaa.dodico.commun.DodicoCommand;
import org.fudaa.dodico.h2d.H2dBord;
import org.fudaa.dodico.h2d.type.H2dBordType;
import org.fudaa.dodico.h2d.type.H2dClType;
import org.fudaa.dodico.h2d.type.H2dVariableType;
/**
* @author deniger
* @version $Id: H2dTelemacBord.java,v 1.1 2003/10/29 11:41:27 deniger Exp $
*/
public class H2dTelemacBord extends H2dBord {
H2dClType tracerType_;
String elevation_;
String velocity_;
String flowrate_;
String tracer_;
String velocityProfil_;
String liquidOption_;
/**
*
*/
public H2dTelemacBord() {
tracerType_= H2dClType.LIBRE;
}
public H2dTelemacBord(H2dTelemacBord _init) {
super(_init);
//telemac
tracerType_= _init.tracerType_;
elevation_= _init.elevation_;
velocity_= _init.velocity_;
flowrate_= _init.flowrate_;
tracer_= _init.tracer_;
velocityProfil_= _init.velocityProfil_;
liquidOption_= _init.liquidOption_;
}
/**
*
*/
public H2dClType getTracerType() {
return tracerType_;
}
/**
*@return -1 if no intersection
* 0 if intersection partiel
* 1 if the segment [_min,_max] is strictly included in this border
* 2 if this border is included in the segment [_min,_max]
*
*/
public int isIntersectBy(int _min, int _max, int _nbPt) {
if (isUnique())
return 1;
int deb= idxDeb_;
int fin= idxFin_;
if (!getType().isLiquide()) {
deb++;
fin--;
}
if (((idxDeb_ > idxFin_) && (deb < fin))
|| ((idxDeb_ < idxFin_) && (deb > fin)))
new Throwable().printStackTrace();
return isBordIntersectBy(deb, fin, _min, _max, _nbPt);
}
/**
*
*/
protected void setTracerType(H2dClType _type) {
if (getType().isLiquide())
tracerType_= _type;
}
public boolean isTracerImposed() {
return tracerType_ == H2dClType.PERMANENT;
}
protected void setTracerTypeImposed(boolean _b) {
if (getType().isLiquide())
tracerType_= _b ? H2dClType.PERMANENT : H2dClType.LIBRE;
}
/**
*
*/
protected void setType(H2dBordType _type) {
super.setType(_type);
}
/**
*
*/
protected void setIdxDeb(int _i) {
super.setIdxDeb(_i);
}
/**
*
*/
protected void setIdxFin(int _i) {
super.setIdxFin(_i);
}
/**
*
*/
protected void setIdxmaillageFrontiere(int _i) {
super.setIdxmaillageFrontiere(_i);
}
/**
*
*/
public String getElevation() {
return elevation_;
}
/**
*
*/
public String getFlowrate() {
return flowrate_;
}
/**
*
*/
public String getLiquidOption() {
return liquidOption_;
}
/**
*
*/
public String getTracer() {
return tracer_;
}
/**
*
*/
public String getVelocity() {
return velocity_;
}
/**
*
*/
public String getVelocityProfil() {
return velocityProfil_;
}
/**
*
*/
protected boolean setElevation(String _string) {
if (_string != elevation_) {
elevation_= _string;
return true;
}
return false;
}
/**
*
*/
protected boolean setFlowrate(String _string) {
if (_string != flowrate_) {
flowrate_= _string;
return true;
}
return false;
}
/**
*
*/
protected boolean setLiquidOption(String _string) {
if (_string != liquidOption_) {
liquidOption_= _string;
return true;
}
return false;
}
/**
*
*/
protected boolean setTracer(String _string) {
if (_string != tracer_) {
tracer_= _string;
return true;
}
return false;
}
/**
*
*/
protected boolean setVelocity(String _string) {
if (_string != velocity_) {
velocity_= _string;
return true;
}
return false;
}
/**
*
*/
protected boolean setVelocityProfil(String _string) {
if (_string != velocityProfil_) {
velocityProfil_= _string;
return true;
}
return false;
}
protected boolean setValue(H2dVariableType _type, String _string) {
if (_type == H2dVariableType.VITESSE) {
return setVelocity(_string);
} else if (_type == H2dVariableType.COTE_EAU) {
return setElevation(_string);
} else if (_type == H2dVariableType.DEBIT) {
return setFlowrate(_string);
} else if (_type == H2dVariableType.TRACEUR) {
return setTracer(_string);
}
System.err.println("variable unknown for " + getClass().getName());
new Throwable().printStackTrace();
return false;
}
/**
*
*/
public boolean containsIdx(int _idx) {
if (getType().isLiquide())
return super.containsIdx(_idx);
else
return idxDeb_ == idxFin_
? true
: ((idxDeb_ < idxFin_)
? ((_idx > idxDeb_) && (_idx < idxFin_))
: ((_idx >= 0) && ((_idx < idxFin_) || (_idx > idxDeb_))));
}
}
--- NEW FILE: H2dTelemacBordMutable.java ---
/*
* @file H2dTelemacBordMutable.java
* @creation 27 oct. 2003
* @modification $Date: 2003/10/29 11:41:27 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.h2d.telemac;
import org.fudaa.dodico.h2d.type.H2dBordType;
import org.fudaa.dodico.h2d.type.H2dClType;
import org.fudaa.dodico.h2d.type.H2dVariableType;
/**
* @author deniger
* @version $Id: H2dTelemacBordMutable.java,v 1.1 2003/10/29 11:41:27 deniger Exp $
*/
public class H2dTelemacBordMutable extends H2dTelemacBord {
/**
*
*/
public H2dTelemacBordMutable() {
super();
}
/**
* @param _init
*/
public H2dTelemacBordMutable(H2dTelemacBord _init) {
super(_init);
}
/**
*
*/
public boolean setFlowrate(String _string) {
return super.setFlowrate(_string);
}
/**
*
*/
public void setIdxDeb(int _i) {
super.setIdxDeb(_i);
}
/**
*
*/
public void setIdxFin(int _i) {
super.setIdxFin(_i);
}
/**
*
*/
public void setIdxmaillageFrontiere(int _i) {
super.setIdxmaillageFrontiere(_i);
}
/**
*
*/
public boolean setLiquidOption(String _string) {
return super.setLiquidOption(_string);
}
/**
*
*/
public void setName(String _string) {
super.setName(_string);
}
/**
*
*/
public boolean setTracer(String _string) {
return super.setTracer(_string);
}
/**
*
*/
public void setTracerType(H2dClType _type) {
super.setTracerType(_type);
}
/**
*
*/
public void setTracerTypeImposed(boolean _b) {
super.setTracerTypeImposed(_b);
}
/**
*
*/
public void setType(H2dBordType _type) {
super.setType(_type);
}
/**
*
*/
public boolean setValue(H2dVariableType _type, String _string) {
return super.setValue(_type, _string);
}
/**
*
*/
public boolean setVelocity(String _string) {
return super.setVelocity(_string);
}
/**
*
*/
public boolean setVelocityProfil(String _string) {
return super.setVelocityProfil(_string);
}
}
--- NEW FILE: H2dTelemacClListener.java ---
/*
* @file H2dTelemacClListener.java
* @creation 23 oct. 2003
* @modification $Date: 2003/10/29 11:41:27 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.h2d.telemac;
import org.fudaa.dodico.h2d.H2dClListener;
/**
* @author deniger
* @version $Id: H2dTelemacClListener.java,v 1.1 2003/10/29 11:41:27 deniger Exp $
*/
public interface H2dTelemacClListener extends H2dClListener {
public void TracerImposedChanged(H2dTelemacBord _b);
public void CLFrontierStructureChange(H2dTelemacCLManager.TelemacBordParFrontiere _b);
}
--- NEW FILE: H2dTelemacProjectListener.java ---
/*
* @file H2dTelemacListener.java
* @creation 8 oct. 2003
* @modification $Date: 2003/10/29 11:41:27 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.h2d.telemac;
import org.fudaa.dodico.dico.DicoEntite;
import org.fudaa.dodico.dico.DicoEntiteFile;
import org.fudaa.dodico.dico.DicoParams;
import org.fudaa.dodico.h2d.H2dBord;
import org.fudaa.dodico.h2d.H2dProjectListener;
import org.fudaa.dodico.h2d.type.H2dBordType;
/**
* @author deniger
* @version $Id: H2dTelemacProjectListener.java,v 1.1 2003/10/29 11:41:27 deniger Exp $
*/
public interface H2dTelemacProjectListener extends H2dProjectListener,H2dTelemacClListener{
}
Index: H2dTelemacCLManager.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/telemac/H2dTelemacCLManager.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** H2dTelemacCLManager.java 13 Oct 2003 10:00:14 -0000 1.5
--- H2dTelemacCLManager.java 29 Oct 2003 11:41:27 -0000 1.6
***************
*** 12,25 ****
import java.util.Iterator;
import org.fudaa.dodico.commun.DodicoAnalyze;
import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.commun.ProgressionInterface;
- import org.fudaa.dodico.dico.DicoDataType;
import org.fudaa.dodico.dico.DicoEntite;
import org.fudaa.dodico.dico.DicoParams;
import org.fudaa.dodico.dico.DicoParamsListener;
import org.fudaa.dodico.h2d.H2dBord;
- import org.fudaa.dodico.h2d.H2dBordMutable;
[...1677 lines suppressed...]
+ .getBordContainingIdx(temp[1])
+ .getType();
+ }
+ public H2dClType getTracerType(int _i) {
+ if ((_i == bordIdx_) && (bord_ != null))
+ return bord_.getTracerType();
+ getMaillage()
+ .getPtsFrontiere()
+ .getIdxFrontierIdxPtInFrontierFromFrontier(
+ _i,
+ temp);
+ saveBord(_i);
+ return (
+ (H2dTelemacBord)getBordPerFrontier(temp[0]).getBordContainingIdx(
+ temp[1]))
+ .getTracerType();
+ }
+ };
}
}
Index: H2dTelemacCLSourceInterface.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/telemac/H2dTelemacCLSourceInterface.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** H2dTelemacCLSourceInterface.java 8 Oct 2003 12:14:47 -0000 1.1
--- H2dTelemacCLSourceInterface.java 29 Oct 2003 11:41:27 -0000 1.2
***************
*** 10,13 ****
--- 10,14 ----
import org.fudaa.dodico.h2d.type.H2dBordType;
+ import org.fudaa.dodico.h2d.type.H2dClType;
/**
***************
*** 17,21 ****
public interface H2dTelemacCLSourceInterface {
public int getNbLines();
-
/**
* Doit renvoyer les conditions limites dans l'ordre de numérotation
--- 18,21 ----
***************
*** 28,31 ****
--- 28,33 ----
*/
public H2dBordType getBordType(int _i);
+
+ public H2dClType getTracerType(int _i);
Index: H2dTelemacConditionLimite.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/telemac/H2dTelemacConditionLimite.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** H2dTelemacConditionLimite.java 8 Oct 2003 11:53:08 -0000 1.3
--- H2dTelemacConditionLimite.java 29 Oct 2003 11:41:27 -0000 1.4
***************
*** 1 ****
! /*
* @file H2dConditionLimiteTelemac.java
* @creation 25 juin 2003
* @modification $Date$
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.h2d.telemac;
import org.fudaa.dodico.h2d.H2dConditionLimite;
import org.fudaa.dodico.h2d.type.H2dBordType;
import org.fudaa.dodico.h2d.type.H2dClType;
/**
* @author deniger
* @version $Id$
*/
public class H2dTelemacConditionLimite extends H2dConditionLimite {
H2dClType traceurType_;
double traceur_;
H2dClType stricklerType_;
double strickler_;
double traceurCoefA_;
double traceurCoefB_;
// protected H2dBordType bordType_;
/**
*
*/
public H2dTelemacConditionLimite() {
super();
}
/**
*
*/
// public H2dBordType getBordType() {
// return bordType_;
// }
/**
*
*/
public double getStrickler() {
return strickler_;
}
/**
*
*/
public H2dClType getStricklerType() {
return stricklerType_;
}
/**
*
*/
public double getTraceur() {
return traceur_;
}
/**
*
*/
public double getTraceurCoefA() {
return traceurCoefA_;
}
/**
*
*/
public double getTraceurCoefB() {
return traceurCoefB_;
}
/**
*
*/
public H2dClType getTraceurType() {
return traceurType_;
}
}
\ No newline at end of file
--- 1 ----
! /*
* @file H2dConditionLimiteTelemac.java
* @creation 25 juin 2003
* @modification $Date$
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.h2d.telemac;
import org.fudaa.dodico.h2d.H2dConditionLimite;
import org.fudaa.dodico.h2d.type.H2dBordType;
import org.fudaa.dodico.h2d.type.H2dClType;
/**
* @author deniger
* @version $Id$
*/
public class H2dTelemacConditionLimite extends H2dConditionLimite {
double traceur_;
double frottementParoi_;
double traceurCoefA_;
double traceurCoefB_;
/**
*
*/
public H2dTelemacConditionLimite() {
super();
}
/**
*
*/
public double getFrottementParoi() {
return frottementParoi_;
}
/**
*
*/
public double getTraceur() {
return traceur_;
}
/**
*
*/
public double getTraceurCoefA() {
return traceurCoefA_;
}
/**
*
*/
public double getTraceurCoefB() {
return traceurCoefB_;
}
}
\ No newline at end of file
Index: H2dTelemacConditionLimiteMutable.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/telemac/H2dTelemacConditionLimiteMutable.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** H2dTelemacConditionLimiteMutable.java 8 Oct 2003 11:53:08 -0000 1.3
--- H2dTelemacConditionLimiteMutable.java 29 Oct 2003 11:41:27 -0000 1.4
***************
*** 1 ****
! /*
* @file H2dConditionLimiteTelemacMutable.java
* @creation 25 juin 2003
* @modification $Date$
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.h2d.telemac;
import org.fudaa.dodico.h2d.type.H2dBordType;
import org.fudaa.dodico.h2d.type.H2dClType;
/**
* @author deniger
* @version $Id$
*/
public class H2dTelemacConditionLimiteMutable
extends H2dTelemacConditionLimite {
/**
*
*/
public H2dTelemacConditionLimiteMutable() {
super();
}
/**
*
*/
public void setStrickler(double _s) {
strickler_= _s;
}
/**
*
*/
public void setStricklerType(H2dClType _s) {
stricklerType_= _s;
}
/**
*
*/
public void setTraceur(double _s) {
traceur_= _s;
}
/**
*
*/
public void setTraceurCoefA(double _s) {
traceurCoefA_= _s;
}
/**
*
*/
public void setTraceurCoefB(double _s) {
traceurCoefB_= _s;
}
/**
*
*/
public void setTraceurType(H2dClType _s) {
traceurType_= _s;
}
/**
*
*/
// public void setBordType(H2dBordType _s) {
// bordType_= _s;
// }
/**
*
*/
public void setH(double _s) {
h_= _s;
}
/**
*
*/
public void setHType(H2dClType _s) {
hType_= _s;
}
/**
*
*/
public void setIndexPt(int _s) {
indexPt_= _s;
}
/**
*
*/
public void setU(double _s) {
u_= _s;
}
/**
*
*/
public void setUType(H2dClType _s) {
uType_= _s;
}
/**
*
*/
public void setV(double _s) {
v_= _s;
}
/**
*
*/
public void setVType(H2dClType _s) {
vType_= _s;
}
}
\ No newline at end of file
--- 1 ----
! /*
* @file H2dConditionLimiteTelemacMutable.java
* @creation 25 juin 2003
* @modification $Date$
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.h2d.telemac;
import org.fudaa.dodico.h2d.type.H2dBordType;
import org.fudaa.dodico.h2d.type.H2dClType;
/**
* @author deniger
* @version $Id$
*/
public class H2dTelemacConditionLimiteMutable
extends H2dTelemacConditionLimite {
/**
*
*/
public H2dTelemacConditionLimiteMutable() {
super();
}
/**
*
*/
public void setStrickler(double _s) {
frottementParoi_= _s;
}
/**
*
*/
// public void setStricklerType(H2dClType _s) {
// stricklerType_= _s;
// }
/**
*
*/
public void setTraceur(double _s) {
traceur_= _s;
}
/**
*
*/
public void setTraceurCoefA(double _s) {
traceurCoefA_= _s;
}
/**
*
*/
public void setTraceurCoefB(double _s) {
traceurCoefB_= _s;
}
/**
*
*/
// public void setTraceurType(H2dClType _s) {
// traceurType_= _s;
// }
/**
*
*/
// public void setBordType(H2dBordType _s) {
// bordType_= _s;
// }
/**
*
*/
public void setH(double _s) {
h_= _s;
}
/**
*
*/
public void setHType(H2dClType _s) {
hType_= _s;
}
/**
*
*/
public void setIndexPt(int _s) {
indexPt_= _s;
}
/**
*
*/
public void setU(double _s) {
u_= _s;
}
/**
*
*/
public void setUType(H2dClType _s) {
uType_= _s;
}
/**
*
*/
public void setV(double _s) {
v_= _s;
}
/**
*
*/
public void setVType(H2dClType _s) {
vType_= _s;
}
}
\ No newline at end of file
Index: H2dTelemacDicoFileFormatVersion.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/telemac/H2dTelemacDicoFileFormatVersion.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** H2dTelemacDicoFileFormatVersion.java 10 Oct 2003 14:43:19 -0000 1.2
--- H2dTelemacDicoFileFormatVersion.java 29 Oct 2003 11:41:27 -0000 1.3
***************
*** 37,40 ****
--- 37,46 ----
public abstract DicoEntite getVelocityProfils();
public abstract DicoEntite getLiquidBoundaryOption();
+
+ /**
+ * @see #getVelocityProfils()
+ * @return true if the velocities (or flowrate) are fixed for this value of velocity profil.
+ */
+ public abstract boolean isVelocitiesFixedByVelocityProfils(String _v);
}
Index: H2dTelemacParametres.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/telemac/H2dTelemacParametres.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** H2dTelemacParametres.java 10 Oct 2003 14:43:19 -0000 1.5
--- H2dTelemacParametres.java 29 Oct 2003 11:41:27 -0000 1.6
***************
*** 1 ****
! /*
* @file H2dTelemacParametres.java
* @creation 20 août 2003
* @modification $Date$
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.h2d.telemac;
import java.util.List;
import org.fudaa.dodico.commun.DodicoAnalyze;
import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.commun.DodicoPermanentList;
import org.fudaa.dodico.commun.ProgressionInterface;
import org.fudaa.dodico.h2d.H2dCLManagerInterface;
import org.fudaa.dodico.h2d.H2dParametres;
import org.fudaa.dodico.h2d.H2dResource;
import org.fudaa.dodico.h2d.type.H2dBordType;
/**
* @author deniger
* @version $Id$
*/
public class H2dTelemacParametres extends H2dParametres {
public static final DodicoPermanentList BORD_LIST=
new DodicoPermanentList(
DodicoLib.sort(
new H2dBordType[] {
H2dBordType.SOLIDE,
H2dBordType.LIQUIDE_VITESSES_IMPOSEES,
H2dBordType.LIQUIDE_HAUTEUR_IMPOSEE,
H2dBordType.LIQUIDE_HAUTEUR_VITESSES_IMPOSEES,
H2dBordType.LIQUIDE_DEBIT_IMPOSE,
H2dBordType.LIQUIDE_ONDE_INCIDENCE }));
/**
* @param _m
*/
public H2dTelemacParametres(H2dTelemacDicoParams _p) {
super(_p);
}
public H2dTelemacDicoParams getTelemacDicoParams(){
return (H2dTelemacDicoParams)getDicoParams();
}
public DodicoPermanentList getBordList(){
return BORD_LIST;
}
public void initCL(
H2dTelemacCLSourceInterface _cls,
ProgressionInterface _inter,
DodicoAnalyze.Editor _analyze) {
if (getMaillage() == null) {
if (_analyze != null)
_analyze.addFatalError(
H2dResource.getS("Le maillage n'est pas spécifié"));
new Throwable().printStackTrace();
return;
}
H2dTelemacCLManager clMng= H2dTelemacCLManager.init(getMaillage(), _cls, _analyze, _inter);
clMng.setDicoParams(getDicoParams(), _analyze);
super.setClManager(clMng);
}
public void setNoCL(){
super.setClManager(H2dTelemacCLManager.init(getMaillage()));
}
/**
*
*/
public H2dTelemacCLManager getTelemacCLManager() {
return (H2dTelemacCLManager)getCLManager();
}
/**
*
*/
public void setClManager(H2dCLManagerInterface _clMng) {
throw new IllegalAccessError("call initCL");
}
}
\ No newline at end of file
--- 1 ----
! /*
* @file H2dTelemacParametres.java
* @creation 20 août 2003
* @modification $Date$
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.h2d.telemac;
import java.util.List;
import org.fudaa.dodico.commun.DodicoAnalyze;
import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.commun.DodicoPermanentList;
import org.fudaa.dodico.commun.ProgressionInterface;
import org.fudaa.dodico.h2d.H2dCLManagerInterface;
import org.fudaa.dodico.h2d.H2dParametres;
import org.fudaa.dodico.h2d.H2dResource;
import org.fudaa.dodico.h2d.type.H2dBordType;
/**
* @author deniger
* @version $Id$
*/
public class H2dTelemacParametres extends H2dParametres {
private H2dTelemacProjectListener listener_;
private H2dTelemacCLManager clMng_;
public static final DodicoPermanentList BORD_LIST=
new DodicoPermanentList(
DodicoLib.sort(
new H2dBordType[] {
H2dBordType.SOLIDE,
H2dBordType.LIQUIDE_VITESSES_IMPOSEES,
H2dBordType.LIQUIDE_HAUTEUR_IMPOSEE,
H2dBordType.LIQUIDE_HAUTEUR_VITESSES_IMPOSEES,
H2dBordType.LIQUIDE_DEBIT_IMPOSE,
H2dBordType.LIQUIDE_ONDE_INCIDENCE }));
/**
* @param _m
*/
public H2dTelemacParametres(H2dTelemacDicoParams _p) {
super(_p);
}
public H2dTelemacDicoParams getTelemacDicoParams(){
return (H2dTelemacDicoParams)getDicoParams();
}
public DodicoPermanentList getBordList(){
return BORD_LIST;
}
public void setProjectListener(H2dTelemacProjectListener _l) {
if(_l==listener_) return;
if (listener_ != null) {
if (clMng_ != null)
clMng_.removeClChangedListener(listener_);
if (dicoParams_ != null)
dicoParams_.removeModelListener(listener_);
}
if (_l != null) {
listener_=_l;
if (clMng_ != null)
clMng_.addClChangedListener(_l);
if (dicoParams_ != null)
dicoParams_.addModelListener(_l);
}
}
public void initCL(
H2dTelemacCLSourceInterface _cls,
ProgressionInterface _inter,
DodicoAnalyze.Editor _analyze) {
if (getMaillage() == null) {
if (_analyze != null)
_analyze.addFatalError(
H2dResource.getS("Le maillage n'est pas spécifié"));
new Throwable().printStackTrace();
return;
}
H2dTelemacCLManager clMng= H2dTelemacCLManager.init(getMaillage(), _cls, _analyze, _inter);
clMng.setDicoParams(getDicoParams(), _analyze);
setClManager(clMng);
}
public void setNoCL(){
setClManager(H2dTelemacCLManager.init(getMaillage()));
}
protected void setClManager(H2dTelemacCLManager _clMng){
if((clMng_!=_clMng) && (_clMng!=null)){
if(_clMng!=null) _clMng.removeClChangedListener(listener_);
clMng_=_clMng;
clMng_.addClChangedListener(listener_);
}
}
/**
*
*/
public H2dTelemacCLManager getTelemacCLManager() {
return clMng_;
}
/**
*
*/
public H2dCLManagerInterface getCLManager() {
return clMng_;
}
}
\ No newline at end of file
--- H2dTelemacListener.java DELETED ---
|