|
From: <de...@us...> - 2003-09-02 08:37:34
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/reflux
In directory sc8-pr-cvs1:/tmp/cvs-serv8494/reflux
Modified Files:
H2dRefluxBordIndexGeneral.java H2dRefluxBordManager.java
H2dRefluxConditionLimite.java
H2dRefluxConditionLimiteMutable.java H2dRefluxParametres.java
H2dRefluxSourceInterface.java
Removed Files:
H2dRefluxParametresCalcul.java
Log Message:
Nouvelle version de support pour le metier Hydraulique 2d
Index: H2dRefluxBordIndexGeneral.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/reflux/H2dRefluxBordIndexGeneral.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** H2dRefluxBordIndexGeneral.java 22 Aug 2003 15:51:12 -0000 1.1
--- H2dRefluxBordIndexGeneral.java 2 Sep 2003 08:37:23 -0000 1.2
***************
*** 9,15 ****
--- 9,21 ----
package org.fudaa.dodico.h2d.reflux;
+ import org.fudaa.dodico.commun.DodicoLib;
+ import org.fudaa.dodico.h2d.H2dEvolution;
import org.fudaa.dodico.h2d.type.H2dBordType;
+ import org.fudaa.dodico.h2d.type.H2dClType;
/**
+ * Une classe pour definir un bord pour les fichiers e-s de reflux (inp).
+ * Classe mal foutu ( contient des données de bord avec frottement
+ * pour tous les types de bords).
* @author deniger
* @version $Id$
***************
*** 17,22 ****
public class H2dRefluxBordIndexGeneral {
private int[] index_;
! private H2dBordType bord_;
/**
--- 23,60 ----
public class H2dRefluxBordIndexGeneral {
+ /**
+ * Renvoie un bord contenant l'indice _i1 en partant de la fin du tableau.
+ * @return null si aucun bord.
+ */
+ public static H2dRefluxBordIndexGeneral findBordWithIndex(
+ int _i1,
+ H2dRefluxBordIndexGeneral[] _bords) {
+ int n= _bords.length - 1;
+ for (int i= n; i >= 0; i--) {
+ H2dRefluxBordIndexGeneral general= _bords[i];
+ if (general.containsIndex(_i1))
+ return general;
+ }
+ return null;
+ }
+
+ public static H2dRefluxBordIndexGeneral findBordWithIndex(
+ int _i1,
+ int _i2,
+ H2dRefluxBordIndexGeneral[] _bords) {
+ int n= _bords.length - 1;
+ for (int i= n; i >= 0; i--) {
+ H2dRefluxBordIndexGeneral general= _bords[i];
+ if (general.containsIndex(_i1) && general.containsIndex(_i2))
+ return general;
+ }
+ return null;
+ }
+ H2dBordType bord_;
+
private int[] index_;
! double rugosite_;
! H2dEvolution rugositeTransitoireCourbe_;
! H2dClType rugositeType_;
/**
***************
*** 27,30 ****
--- 65,81 ----
}
+ public H2dRefluxBordIndexGeneral(H2dBordType _b) {
+ bord_= (_b == null ? H2dBordType.SOLIDE : _b);
+ }
+
+ public boolean containsIndex(int _i) {
+ int n= index_.length - 1;
+ for (int i= n; i >= 0; i--) {
+ if (index_[i] == _i)
+ return true;
+ }
+ return false;
+ }
+
/**
*
***************
*** 44,49 ****
--- 95,125 ----
*
*/
+ public double getRugosite() {
+ return rugosite_;
+ }
+
+ /**
+ *
+ */
+ public H2dEvolution getRugositeTransitoireCourbe() {
+ return rugositeTransitoireCourbe_;
+ }
+
+ /**
+ *
+ */
+ public H2dClType getRugositeType() {
+ return rugositeType_;
+ }
+
+ /**
+ *
+ */
public void setBord(H2dBordType _type) {
bord_= _type;
+ if (bord_ != H2dBordType.SOLIDE_FROTTEMENT) {
+ rugositeTransitoireCourbe_= null;
+ rugositeType_= null;
+ }
}
***************
*** 55,95 ****
}
! public boolean containsIndex(int _i) {
! int n= index_.length - 1;
! for (int i= n; i >= 0; i--) {
! if (index_[i] == _i)
! return true;
! }
! return false;
}
! public static H2dRefluxBordIndexGeneral findBordWithIndex(
! int _i1,
! int _i2,
! H2dRefluxBordIndexGeneral[] _bords) {
! int n= _bords.length - 1;
! for (int i= n; i >= 0; i--) {
! H2dRefluxBordIndexGeneral general= _bords[i];
! if (general.containsIndex(_i1) && general.containsIndex(_i2))
! return general;
! }
! return null;
}
!
/**
! * Renvoie un bord contenant l'indice _i1 en partant de la fin du tableau.
! * @return null si aucun bord.
*/
! public static H2dRefluxBordIndexGeneral findBordWithIndex(
! int _i1,
! H2dRefluxBordIndexGeneral[] _bords) {
! int n= _bords.length - 1;
! for (int i= n; i >= 0; i--) {
! H2dRefluxBordIndexGeneral general= _bords[i];
! if (general.containsIndex(_i1))
! return general;
}
- return null;
}
!
}
--- 131,185 ----
}
! public String toString() {
!
! String r=
! "bord " + bord_ + DodicoLib.ESPACE + DodicoLib._printObject(index_, true);
! if (bord_ == H2dBordType.SOLIDE_FROTTEMENT)
! r += DodicoLib.ESPACE
! + "rugosite ( "
! + rugositeType_
! + ", "
! + rugosite_
! + ", "
! + rugositeTransitoireCourbe_
! + ")";
! return r;
!
}
! /**
! * Ne met a jour que si le bord est de type SOLIDE_FROTTEMENT et
! * que la condition est H2dClType.PERMANENT
! */
! public void setRugosite(double _d) {
! if ((bord_ == H2dBordType.SOLIDE_FROTTEMENT)
! && (rugositeType_ == H2dClType.PERMANENT))
! rugosite_= _d;
}
!
/**
! * Ne met a jour que si le bord est de type SOLIDE_FROTTEMENT
*/
! public void setRugositeTransitoireCourbe(H2dEvolution _evolution) {
! if (bord_ == H2dBordType.SOLIDE_FROTTEMENT)
! rugositeTransitoireCourbe_= _evolution;
! }
!
! /**
! * Affecte la valeur type_ et met a jour les autres donnees
! * (valeur rugosite, evolution transitoire...).
! */
! public void setRugositeType(H2dClType _type) {
! if (bord_ == H2dBordType.SOLIDE_FROTTEMENT) {
! rugositeType_= _type;
! if (rugositeType_ == H2dClType.LIBRE) {
! rugosite_= 0d;
! rugositeTransitoireCourbe_= null;
! } else if (rugositeType_ == H2dClType.PERMANENT) {
! rugositeTransitoireCourbe_= null;
! } else if (rugositeType_ == H2dClType.TRANSITOIRE) {
! rugosite_= 0;
}
}
! }
}
Index: H2dRefluxBordManager.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/reflux/H2dRefluxBordManager.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** H2dRefluxBordManager.java 22 Aug 2003 15:51:12 -0000 1.1
--- H2dRefluxBordManager.java 2 Sep 2003 08:37:23 -0000 1.2
***************
*** 9,13 ****
--- 9,18 ----
package org.fudaa.dodico.h2d.reflux;
+ import gnu.trove.TIntIterator;
+ import gnu.trove.TIntObjectHashMap;
+ import gnu.trove.TIntObjectIterator;
+
import java.util.ArrayList;
+ import java.util.List;
import org.fudaa.dodico.commun.DodicoAnalyze;
***************
*** 15,20 ****
--- 20,27 ----
import org.fudaa.dodico.h2d.H2dBord;
import org.fudaa.dodico.h2d.H2dBordMutable;
+ import org.fudaa.dodico.h2d.H2dEvolution;
import org.fudaa.dodico.h2d.H2dMaillageFrontiere;
import org.fudaa.dodico.h2d.type.H2dBordType;
+ import org.fudaa.dodico.h2d.type.H2dClType;
/**
***************
*** 32,43 ****
protected H2dRefluxBordManager() {}
! public int getFrontiereBordNb() {
return bordByFrontiere_.length;
}
! public BordParFrontiere getFrontiereBord(int _i) {
return bordByFrontiere_[_i];
}
public static H2dRefluxBordManager init(
H2dMaillageFrontiere _maillageBord,
--- 39,93 ----
protected H2dRefluxBordManager() {}
! public int getFrontiereNb() {
return bordByFrontiere_.length;
}
! public BordParFrontiere getFrontiereBords(int _i) {
return bordByFrontiere_[_i];
}
+ /**
+ * Renvoie le nombre de bord elementaire contenu par ce manager.
+ */
+ public int getTotalBordElementNb() {
+ int r= 0;
+ for (int i= bordByFrontiere_.length - 1; i >= 0; i--) {
+ r += bordByFrontiere_[i].getBordNb();
+ }
+ return r;
+ }
+
+ public H2dRefluxBordIndexGeneral[] getRefluxBord() {
+ int n= bordByFrontiere_.length;
+ ArrayList r= new ArrayList();
+ for (int i= 0; i < n; i++) {
+ r.addAll(bordByFrontiere_[i].getRefluxIndexGeneralBords());
+ }
+ n= r.size();
+ System.out.println("taille des bords reflux "+n);
+ if (n > 0) {
+ H2dRefluxBordIndexGeneral[] rfinal= new H2dRefluxBordIndexGeneral[n];
+ r.toArray(rfinal);
+ return rfinal;
+ }
+ return null;
+ }
+
+ /**
+ * Renvoie le bord en prenant dans l'indice general.
+ */
+ public H2dBord getBordFromGeneralIdx(int _generalIdx) {
+ int n= bordByFrontiere_.length;
+ int shiftL= 0;
+ for (int i= 0; i < n; i++) {
+ if (_generalIdx < (shiftL + bordByFrontiere_[i].getBordNb())) {
+ return bordByFrontiere_[i].getBord(_generalIdx - shiftL);
+ } else {
+ shiftL += bordByFrontiere_[i].getBordNb();
+ }
+ }
+ return null;
+ }
+
public static H2dRefluxBordManager init(
H2dMaillageFrontiere _maillageBord,
***************
*** 46,79 ****
H2dRefluxBordManager r= new H2dRefluxBordManager();
r.maillageBord_= _maillageBord;
!
int ptId;
H2dBordMutable bordEnCours= null;
H2dBordMutable firstBord= null;
r.bordByFrontiere_= new BordParFrontiere[_maillageBord.getBordNb()];
int n= _maillageBord.getBordNb();
! for (int i= 0; i < n; i++) {
! ArrayList bords= new ArrayList();
! bordEnCours= null;
! firstBord= null;
! int nbPt= _maillageBord.getPtNbForBord(i);
! //On prend que les points milieux.
! for (int j= 1; j < nbPt; j += 2) {
! ptId= _maillageBord.getPtIdxForBord(i, j);
! H2dRefluxBordIndexGeneral bord=
! H2dRefluxBordIndexGeneral.findBordWithIndex(ptId, _bordInit);
! H2dBordType bordType=
! bord == null ? H2dBordType.SOLIDE : bord.getBord();
! if (bordEnCours == null) {
! bordEnCours= new H2dBordMutable();
! bordEnCours.setIdxmaillageFrontiere(i);
! bordEnCours.setIdxDeb(j - 1);
! bordEnCours.setIdxFin(j + 1);
! bordEnCours.setType(bordType);
! firstBord= bordEnCours;
! bords.add(bordEnCours);
! } else {
! if (bordType == bordEnCours.getType()) {
! bordEnCours.setIdxFin(j + 1);
! } else {
bordEnCours= new H2dBordMutable();
bordEnCours.setIdxmaillageFrontiere(i);
--- 96,131 ----
H2dRefluxBordManager r= new H2dRefluxBordManager();
r.maillageBord_= _maillageBord;
!
int ptId;
H2dBordMutable bordEnCours= null;
H2dBordMutable firstBord= null;
r.bordByFrontiere_= new BordParFrontiere[_maillageBord.getBordNb()];
+ //le nb de frontiere
int n= _maillageBord.getBordNb();
! //Si des bords sont specifie on traite le tout. Sinon que des bords uniques
! if (_bordInit != null) {
! for (int i= 0; i < n; i++) {
! ArrayList bords= new ArrayList();
! TIntObjectHashMap indexPtMilieuRugosite= new TIntObjectHashMap();
! bordEnCours= null;
! firstBord= null;
! int nbPt= _maillageBord.getPtNbForBord(i);
! //On prend que les points milieux.
! for (int j= 1; j < nbPt; j += 2) {
! ptId= _maillageBord.getPtIdxForBord(i, j);
! H2dRefluxBordIndexGeneral bord=
! H2dRefluxBordIndexGeneral.findBordWithIndex(ptId, _bordInit);
! H2dBordType bordType=
! bord == null ? H2dBordType.SOLIDE : bord.getBord();
! if (bordType == H2dBordType.SOLIDE_FROTTEMENT) {
! System.out.println("bord frottement trouve");
! indexPtMilieuRugosite.put(
! j,
! new BordRugositeValeurs(
! bord.getRugositeType(),
! bord.getRugosite(),
! bord.getRugositeTransitoireCourbe()));
! }
! if (bordEnCours == null) {
bordEnCours= new H2dBordMutable();
bordEnCours.setIdxmaillageFrontiere(i);
***************
*** 81,120 ****
bordEnCours.setIdxFin(j + 1);
bordEnCours.setType(bordType);
bords.add(bordEnCours);
}
}
! }
! if (bordEnCours.getIdxFin() != nbPt) {
! if (_analyze != null) {
! _analyze.addFatalError(
! DodicoLib.geti18n(
! "Détermination des bords impossible :erreur dans les indexs"));
}
! new Throwable().printStackTrace();
! return null;
! } else {
! bordEnCours.setIdxFin(0);
}
! if ((bordEnCours != firstBord)
! && (bordEnCours.getType() == firstBord.getType())) {
! firstBord.setIdxDeb(bordEnCours.getIdxDeb());
! bords.remove(bordEnCours);
}
- r.bordByFrontiere_[i]= r.createFrontiereBord(bords, i);
}
return r;
}
! private BordParFrontiere createFrontiereBord(ArrayList _bords, int _fIdx) {
! return new BordParFrontiere(_bords, _fIdx);
}
public class BordParFrontiere {
! ArrayList bords_;
! int maillageBordIdx_;
! protected BordParFrontiere(ArrayList _bords, int _maillageindex) {
bords_= _bords;
maillageBordIdx_= _maillageindex;
}
--- 133,279 ----
bordEnCours.setIdxFin(j + 1);
bordEnCours.setType(bordType);
+ firstBord= bordEnCours;
bords.add(bordEnCours);
+ } else {
+ if (bordType == bordEnCours.getType()) {
+ bordEnCours.setIdxFin(j + 1);
+ } else {
+ bordEnCours= new H2dBordMutable();
+ bordEnCours.setIdxmaillageFrontiere(i);
+ bordEnCours.setIdxDeb(j - 1);
+ bordEnCours.setIdxFin(j + 1);
+ bordEnCours.setType(bordType);
+ bords.add(bordEnCours);
+ }
}
}
! if (bordEnCours.getIdxFin() != nbPt) {
! if (_analyze != null) {
! _analyze.addFatalError(
! DodicoLib.geti18n(
! "Détermination des bords impossible :erreur dans les indexs"));
! }
! new Throwable().printStackTrace();
! return null;
! } else {
! bordEnCours.setIdxFin(0);
}
! if ((bordEnCours != firstBord)
! && (bordEnCours.getType() == firstBord.getType())) {
! firstBord.setIdxDeb(bordEnCours.getIdxDeb());
! bords.remove(bordEnCours);
! }
! r.bordByFrontiere_[i]=
! r.createFrontiereBord(bords, i, indexPtMilieuRugosite);
}
! //bord unique
! } else {
! for (int i= 0; i < n; i++) {
! r.bordByFrontiere_[i]=
! r.createFrontiereBord(createBordDefautUniqueBord(), i);
}
}
return r;
}
! private static H2dBordMutable createBordDefautUniqueBord() {
! H2dBordMutable r= new H2dBordMutable();
! r.setIdxDeb(0);
! r.setIdxFin(0);
! r.setType(H2dBordType.SOLIDE);
! return r;
! }
!
! private BordParFrontiere createFrontiereBord(
! ArrayList _bords,
! int _fIdx,
! TIntObjectHashMap _indexPtMilieuRugosite) {
! return new BordParFrontiere(_bords, _fIdx, _indexPtMilieuRugosite);
! }
!
! private BordParFrontiere createFrontiereBord(
! H2dBordMutable _bord,
! int _fIdx) {
! return new BordParFrontiere(_bord, _fIdx);
}
public class BordParFrontiere {
! private ArrayList bords_;
! private int maillageBordIdx_;
! private TIntObjectHashMap indexMilieuRugosite_;
! protected BordParFrontiere(
! ArrayList _bords,
! int _maillageindex,
! TIntObjectHashMap _indexPtMilieuRugosite) {
bords_= _bords;
maillageBordIdx_= _maillageindex;
+ if ((_indexPtMilieuRugosite != null)
+ && (_indexPtMilieuRugosite.size() > 0)) {
+ indexMilieuRugosite_= _indexPtMilieuRugosite;
+ }
+ }
+
+ protected BordParFrontiere(H2dBordMutable _m, int _maillageindex) {
+ bords_= new ArrayList(10);
+ bords_.add(_m);
+ maillageBordIdx_= _maillageindex;
+ }
+
+ public List getRefluxIndexGeneralBords() {
+ ArrayList l= new ArrayList();
+ int n= bords_.size();
+ H2dRefluxBordIndexGeneral bidxGene;
+ int[] idx;
+ for (int i= 0; i < n; i++) {
+ H2dBord b= getBord(i);
+ H2dBordType bType= b.getType();
+ if (bType != H2dBordType.SOLIDE) {
+ //cas bord simple
+ if (bType != H2dBordType.SOLIDE_FROTTEMENT) {
+ int deb= b.getIdxDeb();
+ int fin= b.getIdxFin();
+ for (int j= deb; j < fin; j += 2) {
+ bidxGene= new H2dRefluxBordIndexGeneral(bType);
+ idx= new int[3];
+ idx[0]= maillageBord_.getPtIdxForBord(maillageBordIdx_, j);
+ idx[1]= maillageBord_.getPtIdxForBord(maillageBordIdx_, j + 1);
+ idx[2]= maillageBord_.getPtIdxForBord(maillageBordIdx_, j + 2);
+ bidxGene.setIndex(idx);
+ l.add(bidxGene);
+ }
+ //bord avec rugosite
+ } else {
+ int deb= b.getIdxDeb() + 1;
+ int fin= b.getIdxFin();
+ for (int j= deb; j < fin; j += 2) {
+ bidxGene= new H2dRefluxBordIndexGeneral(bType);
+ BordRugositeValeurs v=
+ (BordRugositeValeurs)indexMilieuRugosite_.get(j);
+ if (v == null) {
+ //a voir
+ System.out.println("probleme rugosite non trouve");
+ bidxGene.setRugositeType(H2dClType.PERMANENT);
+ bidxGene.setRugosite(0);
+ } else {
+ bidxGene.setRugositeType(v.getType());
+ bidxGene.setRugosite(v.getValue());
+ bidxGene.setRugositeTransitoireCourbe(v.getEvolution());
+ }
+ idx= new int[3];
+ idx[0]= maillageBord_.getPtIdxForBord(maillageBordIdx_, j - 1);
+ idx[1]= maillageBord_.getPtIdxForBord(maillageBordIdx_, j);
+ idx[2]= maillageBord_.getPtIdxForBord(maillageBordIdx_, j + 1);
+ bidxGene.setIndex(idx);
+ l.add(bidxGene);
+ }
+ }
+ }
+ }
+ return l;
+ }
+
+ public BordRugositeValeurs getRugositeValeurs(int _j) {
+ return (BordRugositeValeurs)indexMilieuRugosite_.get(_j);
}
***************
*** 127,129 ****
}
}
! }
\ No newline at end of file
--- 286,351 ----
}
}
!
! public static class BordRugositeValeurs {
! double value_;
! H2dClType type_;
! H2dEvolution evolution_;
!
! public BordRugositeValeurs(
! H2dClType _t,
! double _value,
! H2dEvolution _evol) {
! setType(_t);
! setValue(_value);
! setEvolution(_evol);
! }
!
! /**
! *
! */
! public H2dEvolution getEvolution() {
! return evolution_;
! }
!
! /**
! *
! */
! public H2dClType getType() {
! return type_;
! }
!
! /**
! *
! */
! public double getValue() {
! return value_;
! }
!
! /**
! *
! */
! protected final void setEvolution(H2dEvolution _evolution) {
! if (type_ == H2dClType.TRANSITOIRE)
! evolution_= _evolution;
! }
!
! /**
! *
! */
! protected final void setType(H2dClType _type) {
! type_= _type;
! if ((type_ == H2dClType.PERMANENT) || (type_ == H2dClType.LIBRE)) {
! evolution_= null;
! }
! }
!
! /**
! *
! */
! protected final void setValue(double _d) {
! if (type_ == H2dClType.PERMANENT)
! value_= _d;
! }
!
! }
! }
Index: H2dRefluxConditionLimite.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/reflux/H2dRefluxConditionLimite.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** H2dRefluxConditionLimite.java 22 Aug 2003 15:51:12 -0000 1.1
--- H2dRefluxConditionLimite.java 2 Sep 2003 08:37:23 -0000 1.2
***************
*** 12,15 ****
--- 12,16 ----
import org.fudaa.dodico.h2d.H2dEvolution;
import org.fudaa.dodico.h2d.type.H2dClType;
+ import org.fudaa.dodico.h2d.type.H2dVariableType;
/**
***************
*** 26,32 ****
H2dEvolution qTransitoireCourbe_;
double q_;
- double rugosite_;
- H2dClType rugositeType_;
- H2dEvolution rugositeTransitoireCourbe_;
/**
--- 27,30 ----
***************
*** 41,44 ****
--- 39,54 ----
}
+ public H2dEvolution getEvolution(H2dVariableType _v) {
+ if (_v == H2dVariableType.VITESSE_U)
+ return uTransitoireCourbe_;
+ else if (_v == H2dVariableType.VITESSE_V)
+ return vTransitoireCourbe_;
+ else if (_v == H2dVariableType.COTE_EAU)
+ return hTransitoireCourbe_;
+ else if (_v == H2dVariableType.DEBIT)
+ return qTransitoireCourbe_;
+ return null;
+ }
+
/**
*
***************
*** 88,112 ****
public H2dEvolution getQTransitoireCourbe() {
return qTransitoireCourbe_;
- }
-
- /**
- * 1/Strickler
- */
- public double getRugosite() {
- return rugosite_;
- }
-
- /**
- *
- */
- public H2dEvolution getRugositeTransitoireCourbe() {
- return rugositeTransitoireCourbe_;
- }
-
- /**
- *
- */
- public H2dClType getRugositeType() {
- return rugositeType_;
}
--- 98,101 ----
Index: H2dRefluxConditionLimiteMutable.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/reflux/H2dRefluxConditionLimiteMutable.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** H2dRefluxConditionLimiteMutable.java 22 Aug 2003 15:51:12 -0000 1.1
--- H2dRefluxConditionLimiteMutable.java 2 Sep 2003 08:37:23 -0000 1.2
***************
*** 144,172 ****
}
- /**
- *
- */
- public void setRugosite(double _d)
- {
- rugosite_ = _d;
- }
-
- /**
- *
- */
- public void setRugositeTransitoireCourbe(H2dEvolution _evolution)
- {
- rugositeTransitoireCourbe_ = _evolution;
- }
-
- /**
- *
- */
- public void setRugositeType(H2dClType _type)
- {
- rugositeType_ = _type;
- }
-
-
-
}
--- 144,146 ----
Index: H2dRefluxParametres.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/reflux/H2dRefluxParametres.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** H2dRefluxParametres.java 22 Aug 2003 15:51:12 -0000 1.1
--- H2dRefluxParametres.java 2 Sep 2003 08:37:23 -0000 1.2
***************
*** 19,30 ****
--- 19,36 ----
import org.fudaa.dodico.h2d.H2dBordMutable;
import org.fudaa.dodico.h2d.H2dConditionLimite;
+ import org.fudaa.dodico.h2d.H2dGroupePasTemps;
import org.fudaa.dodico.h2d.H2dLib;
import org.fudaa.dodico.h2d.H2dMaillage;
import org.fudaa.dodico.h2d.H2dMaillageFrontiere;
import org.fudaa.dodico.h2d.H2dParametres;
+ import org.fudaa.dodico.h2d.H2dProprieteElementaire;
import org.fudaa.dodico.reflux.io.INPFileFormat;
import org.fudaa.dodico.reflux.io.INPInterface;
/**
+ * Classe contenant les parametres de base.
+ * Notation:
+ * cl: condition limite
+ * pn: propriete nodale.
* @author deniger
* @version $Id$
***************
*** 33,36 ****
--- 39,44 ----
H2dRefluxConditionLimite[] cls_;
+ H2dGroupePasTemps[] gptTemps_;
+ H2dProprieteElementaire[] propEls_;
DicoParams dicoParams_;
H2dRefluxBordManager bords_;
***************
*** 46,53 ****
--- 54,111 ----
return dicoParams_;
}
+
+ public INPFileFormat.INPVersion getVersion(){
+ return (INPFileFormat.INPVersion)dicoParams_.getDicoFileFormatVersion();
+ }
public H2dRefluxConditionLimite getRefluxCL(int _bordIdx) {
return cls_[_bordIdx];
}
+
+ public H2dRefluxConditionLimite[] getRefluxClTableau(){
+ H2dRefluxConditionLimite[] r=new H2dRefluxConditionLimite[cls_.length];
+ System.arraycopy(cls_, 0, r, 0, cls_.length);
+ return r;
+ }
+
+ public int getProprietesElementairesNb(){
+ return propEls_.length;
+ }
+
+ public H2dProprieteElementaire getProprieteElementaire(int _i){
+ return propEls_[_i];
+ }
+
+ public H2dProprieteElementaire[] getProprieteElementaireTab(){
+ H2dProprieteElementaire[] r=new H2dProprieteElementaire[propEls_.length];
+ System.arraycopy(propEls_, 0, r, 0, propEls_.length);
+ return r;
+ }
+
+
+ public int getGroupePasTempsNb(){
+ return gptTemps_.length;
+ }
+
+ public H2dGroupePasTemps getGroupePasTemps(int _i){
+ return gptTemps_[_i];
+ }
+
+ public H2dGroupePasTemps[] getGroupePasTempsTab(){
+ H2dGroupePasTemps[] r=new H2dGroupePasTemps[gptTemps_.length];
+ System.arraycopy(gptTemps_, 0, r, 0, gptTemps_.length);
+ return r;
+ }
+
+
+ //DEBUG A Continuer
+ public boolean contientPnTransitoire(){
+ return false;
+ }
+
+ //DEBUG A Continuer
+ public boolean contientClTransitoire(){
+ return false;
+ }
public static H2dRefluxParametres init(
***************
*** 63,71 ****
H2dRefluxParametres r= new H2dRefluxParametres(_inter.getMaillage());
r.dicoParams_= new DicoParams(_inter.getEntiteValue(), _ft);
H2dRefluxConditionLimite[] initCl= _inter.getConditionLimite();
if (_prog != null) {
_prog.setProgression(20);
}
! Arrays.sort(initCl, new H2dConditionLimite.ComparatorIdxPt());
int[] ptFrontiereIdx= r.maillage_.getPtsFrontiere().getArray();
if (ptFrontiereIdx.length != initCl.length) {
--- 121,135 ----
H2dRefluxParametres r= new H2dRefluxParametres(_inter.getMaillage());
r.dicoParams_= new DicoParams(_inter.getEntiteValue(), _ft);
+
+ //Classement de cl
H2dRefluxConditionLimite[] initCl= _inter.getConditionLimite();
if (_prog != null) {
_prog.setProgression(20);
}
! if (initCl == null) {
! _analyze.addFatalError(DodicoLib.geti18n("Conditions limites nulles"));
! return null;
! }
!
int[] ptFrontiereIdx= r.maillage_.getPtsFrontiere().getArray();
if (ptFrontiereIdx.length != initCl.length) {
***************
*** 94,97 ****
--- 158,163 ----
_prog.setProgression(60);
}
+
+ //Classement de bord
r.bords_=
H2dRefluxBordManager.init(
***************
*** 99,102 ****
--- 165,176 ----
_inter.getBords(),
_analyze);
+
+ //sauv des prop elementaires
+ r.propEls_=_inter.getPropElementaires();
+
+ //sauv groupe pas de temps
+ r.gptTemps_=_inter.getGroupePasTemps();
+
+
if (_prog != null) {
_prog.setProgression(100);
Index: H2dRefluxSourceInterface.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d/reflux/H2dRefluxSourceInterface.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** H2dRefluxSourceInterface.java 22 Aug 2003 15:51:12 -0000 1.1
--- H2dRefluxSourceInterface.java 2 Sep 2003 08:37:23 -0000 1.2
***************
*** 47,56 ****
/**
*/
! public int getNbCLTransitoires();
/**
* @return
*/
! public int getNbPNTransitoires();
/**
*
--- 47,56 ----
/**
*/
! // public int getNbCLTransitoires();
/**
* @return
*/
! //public int getNbPNTransitoires();
/**
*
***************
*** 76,80 ****
/**
! *
*/
public H2dRefluxConditionLimite[] getConditionLimite();
--- 76,80 ----
/**
! * Renvoie les conditions limites rangees dans l'ordre des indices.
*/
public H2dRefluxConditionLimite[] getConditionLimite();
--- H2dRefluxParametresCalcul.java DELETED ---
|