|
From: <de...@us...> - 2003-08-23 02:40:22
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/h2d
In directory sc8-pr-cvs1:/tmp/cvs-serv5355/test/h2d
Modified Files:
TestMaillage.java
Added Files:
TestTransformationCorEleBthSerafin.java
Log Message:
Creation des dossiers h2d/reflux et h2d/telemac et deplacement des
fichiers concerne.
Gestion des cl et des bords ( a refaire ..)
Amelioration des gestions des versions de fichiers
--- NEW FILE: TestTransformationCorEleBthSerafin.java ---
(This appears to be a binary file; contents omitted.)
Index: TestMaillage.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/h2d/TestMaillage.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** TestMaillage.java 18 Aug 2003 11:05:20 -0000 1.3
--- TestMaillage.java 22 Aug 2003 15:51:13 -0000 1.4
***************
*** 19,23 ****
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;
--- 19,23 ----
import org.fudaa.dodico.h2d.H2dElement;
import org.fudaa.dodico.h2d.H2dMaillage;
! import org.fudaa.dodico.h2d.H2dMaillageFrontiere;
import org.fudaa.dodico.h2d.H2dPoint;
import org.fudaa.dodico.h2d.H2dSegment;
***************
*** 53,57 ****
}
! private void initMaillage() {
H2dPoint[] pts= new H2dPoint[9];
pts[0]= new H2dPoint(0, 0, 15);
--- 53,57 ----
}
! public static H2dMaillage createMaillage() {
H2dPoint[] pts= new H2dPoint[9];
pts[0]= new H2dPoint(0, 0, 15);
***************
*** 74,81 ****
elt[7]= new H2dElement(new int[] { 7, 8, 5 });
elt[8]= new H2dElement(new int[] { 6, 5, 8 });
! mail_= new H2dMaillage(pts, elt);
}
private void initMaillageT6() {
H2dPoint[] pts= new H2dPoint[27];
pts[0]= new H2dPoint(0, 0, 15);
--- 74,90 ----
elt[7]= new H2dElement(new int[] { 7, 8, 5 });
elt[8]= new H2dElement(new int[] { 6, 5, 8 });
! return new H2dMaillage(pts, elt);
!
}
+ private void initMaillage() {
+ mail_= createMaillage();
+ }
+
private void initMaillageT6() {
+ mail_=createMaillageT6();
+ }
+
+ public static H2dMaillage createMaillageT6() {
H2dPoint[] pts= new H2dPoint[27];
pts[0]= new H2dPoint(0, 0, 15);
***************
*** 145,150 ****
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);
!
}
--- 154,158 ----
elt[7]= new H2dElement(new int[] { 7, 24, 8, 25, 5, 22 });
elt[8]= new H2dElement(new int[] { 6, 18, 5, 25, 8, 26 });
! return new H2dMaillage(pts, elt);
}
***************
*** 211,215 ****
public void _testBordCommun() {
! H2dMaillageBord bord= mail_.getPtsFrontiere();
assertEquals(bord.getBordNb(), 2);
int[] eltContains4= mail_.getEltIdxContainsPtIdx(4);
--- 219,223 ----
public void _testBordCommun() {
! H2dMaillageFrontiere bord= mail_.getPtsFrontiere();
assertEquals(bord.getBordNb(), 2);
int[] eltContains4= mail_.getEltIdxContainsPtIdx(4);
***************
*** 235,252 ****
}
-
- public void testBordV2() {
- initMaillage();
- mail_.computeBordV2(null);
- _testBordCommun();
- }
-
- public void testBordV2T6() {
- initMaillageT6();
- mail_.computeBordV2(null);
- _testBordCommunT6();
- }
-
-
public void testBord() {
initMaillage();
--- 243,246 ----
***************
*** 262,266 ****
public void _testBordCommunT6() {
! H2dMaillageBord bord= mail_.getPtsFrontiere();
assertEquals(bord.getBordNb(), 2);
int[] eltContains4= mail_.getEltIdxContainsPtIdx(4);
--- 256,260 ----
public void _testBordCommunT6() {
! H2dMaillageFrontiere bord= mail_.getPtsFrontiere();
assertEquals(bord.getBordNb(), 2);
int[] eltContains4= mail_.getEltIdxContainsPtIdx(4);
***************
*** 360,365 ****
--- 354,361 ----
initMaillageT6();
TIntIntHashMap T6T3Corresp= new TIntIntHashMap(mail_.getPtsNb() / 2);
+ System.out.println("element type " + mail_.getEltType());
H2dMaillage temp= mail_.maillageT6enT3(progress_, T6T3Corresp);
+ assertNotNull(temp);
temp.isSame(mail_);
assertEquals(9, T6T3Corresp.size());
***************
*** 415,418 ****
--- 411,415 ----
initMaillageT6();
H2dMaillage temp= mail_.maillageT6en4T3(progress_);
+ assertNotNull(temp);
assertEquals(36, temp.getEltNb());
H2dElement t= temp.getElement(0);
***************
*** 440,443 ****
--- 437,451 ----
assertEquals(t.getPtIndex(1), 25);
assertEquals(t.getPtIndex(2), 26);
+ }
+
+ public void TestShiftElement(){
+ H2dElement el=new H2dElement(new int[]{1,2,3,4,5});
+ H2dElement n=H2dElement.ShiftLeftElementIndex(el);
+ assertEquals(n.getPtNb(), 5);
+ assertEquals(n.getPtIndex(0), 2);
+ assertEquals(n.getPtIndex(1), 3);
+ assertEquals(n.getPtIndex(2), 4);
+ assertEquals(n.getPtIndex(3), 5);
+ assertEquals(n.getPtIndex(4), 1);
}
|