|
From: <de...@us...> - 2004-02-12 15:37:51
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/reflux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20934/test/reflux Modified Files: TestCorEleBth.java TestDunes.java TestINP.java Log Message: Maj version 0.05 prepro Index: TestCorEleBth.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/reflux/TestCorEleBth.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** TestCorEleBth.java 11 Dec 2003 12:41:29 -0000 1.12 --- TestCorEleBth.java 12 Feb 2004 15:32:50 -0000 1.13 *************** *** 13,20 **** import org.fudaa.dodico.commun.DodicoLib; import org.fudaa.dodico.commun.ProgressionBuAdapter; import org.fudaa.dodico.fichiers.FileOperationSynthese; - import org.fudaa.dodico.h2d.H2dElement; - import org.fudaa.dodico.h2d.H2dGrid; - import org.fudaa.dodico.h2d.type.H2dElementType; import org.fudaa.dodico.reflux.io.CorEleBthFileFormat; import org.fudaa.dodico.reflux.io.CorEleBthInterface; --- 13,20 ---- import org.fudaa.dodico.commun.DodicoLib; import org.fudaa.dodico.commun.ProgressionBuAdapter; + import org.fudaa.dodico.ef.EfElement; + import org.fudaa.dodico.ef.EfGrid; + import org.fudaa.dodico.ef.EfElementType; import org.fudaa.dodico.fichiers.FileOperationSynthese; import org.fudaa.dodico.reflux.io.CorEleBthFileFormat; import org.fudaa.dodico.reflux.io.CorEleBthInterface; *************** *** 34,40 **** assertNotNull(_inter); CorEleBthInterface t= _inter; ! H2dGrid maill= t.getMaillage(); assertNotNull(maill); ! assertEquals(maill.getEltType(), H2dElementType.T6); //H2dPoint[] pts= maill.getPts(); assertEquals(maill.getPtsNb(), 1791); --- 34,40 ---- assertNotNull(_inter); CorEleBthInterface t= _inter; ! EfGrid maill= t.getGrid(); assertNotNull(maill); ! assertEquals(maill.getEltType(), EfElementType.T6); //H2dPoint[] pts= maill.getPts(); assertEquals(maill.getPtsNb(), 1791); *************** *** 60,64 **** assertEquals(d, dLu, eps_); //test sur l'element 33 ! H2dElement ele=maill.getElement(33); assertEquals(maill.getEltNb(), 792); assertEquals(maill.getElement(33).getPtNb(), 6); --- 60,64 ---- assertEquals(d, dLu, eps_); //test sur l'element 33 ! EfElement ele=maill.getElement(33); assertEquals(maill.getEltNb(), 792); assertEquals(maill.getElement(33).getPtNb(), 6); *************** *** 138,144 **** FileOperationSynthese op= reader.read(); t= (CorEleBthInterface)op.getSource(); ! DodicoAnalyze analyse= op.getAnalyze().toAnalyze(); printAnalyze("FICHIERS cor,ele,bth", analyse); ! H2dGrid mail= t.getMaillage(); if (mail != null) { DodicoLib.printFields(mail, false); --- 138,144 ---- FileOperationSynthese op= reader.read(); t= (CorEleBthInterface)op.getSource(); ! DodicoAnalyze analyse= op.getAnalyze(); printAnalyze("FICHIERS cor,ele,bth", analyse); ! EfGrid mail= t.getGrid(); if (mail != null) { DodicoLib.printFields(mail, false); *************** *** 174,178 **** w.setProgressReceiver(new ProgressionBuAdapter(null)); System.out.println("Ecriture"); ! printAnalyze("FICHIER", w.write(t).getAnalyze().toAnalyze()); } /** --- 174,178 ---- w.setProgressReceiver(new ProgressionBuAdapter(null)); System.out.println("Ecriture"); ! printAnalyze("FICHIER", w.write(t).getAnalyze()); } /** *************** *** 180,197 **** */ public void testEcriture() { CorEleBthInterface inter= getInter(fic_); File tmpFile= createTempFile(); FileOperationSynthese syntheseR= CorEleBthFileFormat.getInstance().getLastVersionImpl().write( ! tmpFile, inter, null); ! assertNull(syntheseR.getAnalyze().toAnalyze()); ! _interfaceTest(getInter(tmpFile)); } public CorEleBthInterface getInter(File _f) { FileOperationSynthese syntheseR= CorEleBthFileFormat.getInstance().getLastVersionImpl().read(_f, null); ! assertNull(syntheseR.getAnalyze().toAnalyze()); return (CorEleBthInterface)syntheseR.getSource(); } --- 180,214 ---- */ public void testEcriture() { + assertTrue(fic_.exists()); CorEleBthInterface inter= getInter(fic_); File tmpFile= createTempFile(); + assertNotNull(tmpFile); + assertTrue(tmpFile.exists()); + File tmpFileEle= createTempFile(); + assertNotNull(tmpFileEle); + File tmpFileBth= createTempFile(); + assertNotNull(tmpFileBth); FileOperationSynthese syntheseR= CorEleBthFileFormat.getInstance().getLastVersionImpl().write( ! tmpFile,tmpFileEle,tmpFileBth, inter, null); ! assertTrue(syntheseR.getAnalyze().isEmpty()); ! assertTrue(tmpFile.exists()); ! CorEleBthReader r=new CorEleBthReader(CorEleBthFileFormat.getInstance().getLastVersionImpl()); ! r.setIn(tmpFile, tmpFileEle, tmpFileBth); ! syntheseR=r.read(); ! _interfaceTest((CorEleBthInterface)syntheseR.getSource()); ! ! tmpFile.delete(); ! tmpFileEle.delete(); ! tmpFileBth.delete(); } public CorEleBthInterface getInter(File _f) { FileOperationSynthese syntheseR= CorEleBthFileFormat.getInstance().getLastVersionImpl().read(_f, null); ! if(syntheseR.getAnalyze()!=null) syntheseR.getAnalyze().printResume(); ! assertTrue(syntheseR.getAnalyze().isEmpty()); ! return (CorEleBthInterface)syntheseR.getSource(); } Index: TestDunes.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/reflux/TestDunes.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** TestDunes.java 11 Dec 2003 12:41:29 -0000 1.13 --- TestDunes.java 12 Feb 2004 15:32:50 -0000 1.14 *************** *** 16,23 **** import org.fudaa.dodico.dunes.io.DunesFileFormat; import org.fudaa.dodico.dunes.io.DunesInterface; import org.fudaa.dodico.fichiers.FileOperationSynthese; - import org.fudaa.dodico.h2d.H2dElement; - import org.fudaa.dodico.h2d.H2dGrid; - import org.fudaa.dodico.h2d.H2dPoint; import org.fudaa.dodico.olb.OLBExec; import org.fudaa.dodico.test.TestIO; --- 16,23 ---- import org.fudaa.dodico.dunes.io.DunesFileFormat; import org.fudaa.dodico.dunes.io.DunesInterface; + import org.fudaa.dodico.ef.EfElement; + import org.fudaa.dodico.ef.EfGrid; + import org.fudaa.dodico.ef.EfNode; import org.fudaa.dodico.fichiers.FileOperationSynthese; import org.fudaa.dodico.olb.OLBExec; import org.fudaa.dodico.test.TestIO; *************** *** 46,54 **** assertEquals(adapt[7], 1d, eps_); assertEquals(adapt[8], 1d, eps_); ! assertNotNull(t.getMaillage()); ! H2dGrid m= t.getMaillage(); temp= m.getPtsNb(); assertEquals(temp, 9); ! H2dPoint pt= m.getPt(0); assertEquals(pt.getX(), 0d, eps_); assertEquals(pt.getY(), 0d, eps_); --- 46,54 ---- assertEquals(adapt[7], 1d, eps_); assertEquals(adapt[8], 1d, eps_); ! assertNotNull(t.getGrid()); ! EfGrid m= t.getGrid(); temp= m.getPtsNb(); assertEquals(temp, 9); ! EfNode pt= m.getPt(0); assertEquals(pt.getX(), 0d, eps_); assertEquals(pt.getY(), 0d, eps_); *************** *** 63,69 **** assertEquals(pt.getZ(), 0.1, eps_); //H2dElement[] elems = t.getMaillage().getElts(); ! temp= t.getMaillage().getEltNb(); assertEquals(temp, 9); ! H2dElement el=t.getMaillage().getElement(1); temp= el.getPtNb(); assertEquals(temp, 3); --- 63,69 ---- assertEquals(pt.getZ(), 0.1, eps_); //H2dElement[] elems = t.getMaillage().getElts(); ! temp= t.getGrid().getEltNb(); assertEquals(temp, 9); ! EfElement el=t.getGrid().getElement(1); temp= el.getPtNb(); assertEquals(temp, 3); *************** *** 71,75 **** assertEquals(el.getPtIndex(1), 0); assertEquals(el.getPtIndex(2), 5); ! el=t.getMaillage().getElement(6); temp= el.getPtNb(); assertEquals(temp, 3); --- 71,75 ---- assertEquals(el.getPtIndex(1), 0); assertEquals(el.getPtIndex(2), 5); ! el=t.getGrid().getElement(6); temp= el.getPtNb(); assertEquals(temp, 3); *************** *** 89,93 **** inter, null); ! assertNull(syntheseR.getAnalyze().toAnalyze()); _interfaceTest(getInter(tmpFile)); } --- 89,93 ---- inter, null); ! assertTrue(syntheseR.getAnalyze().isEmpty()); _interfaceTest(getInter(tmpFile)); } *************** *** 96,102 **** DunesFileFormat.getInstance().getLastVersionImpl().read(_f, null); DunesInterface r= (DunesInterface)syntheseR.getSource(); ! assertNull(syntheseR.getAnalyze().toAnalyze()); if (syntheseR.containsMessages()) ! syntheseR.getAnalyze().toAnalyze().printResume(); return r; } --- 96,102 ---- DunesFileFormat.getInstance().getLastVersionImpl().read(_f, null); DunesInterface r= (DunesInterface)syntheseR.getSource(); ! assertTrue(syntheseR.getAnalyze().isEmpty()); if (syntheseR.containsMessages()) ! syntheseR.getAnalyze().printResume(); return r; } *************** *** 109,115 **** public void testOlb(){ ! H2dGrid f=getInter(fic_).getMaillage(); OLBExec exec=new OLBExec(); ! H2dGrid f2=exec.computeGrid(f, null,DodicoUIDefault.INSTANCE); assertNotNull(f2); } --- 109,115 ---- public void testOlb(){ ! EfGrid f=getInter(fic_).getGrid(); OLBExec exec=new OLBExec(); ! EfGrid f2=exec.computeGrid(f, null,DodicoUIDefault.INSTANCE); assertNotNull(f2); } *************** *** 133,137 **** DunesInterface inter= (DunesInterface)op.getSource(); if (op.containsMessages()) ! op.getAnalyze().toAnalyze().printResume(); fileName= (String)arg.get("-out"); if (fileName == null) { --- 133,137 ---- DunesInterface inter= (DunesInterface)op.getSource(); if (op.containsMessages()) ! op.getAnalyze().printResume(); fileName= (String)arg.get("-out"); if (fileName == null) { *************** *** 150,154 **** progress); if (opw.containsMessages()) ! opw.getAnalyze().toAnalyze().printResume(); } } --- 150,154 ---- progress); if (opw.containsMessages()) ! opw.getAnalyze().printResume(); } } Index: TestINP.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/reflux/TestINP.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** TestINP.java 11 Dec 2003 12:41:29 -0000 1.14 --- TestINP.java 12 Feb 2004 15:32:50 -0000 1.15 *************** *** 15,24 **** import org.fudaa.dodico.commun.ProgressionTestAdapter; import org.fudaa.dodico.dico.DicoEntite; import org.fudaa.dodico.fichiers.FileOperationSynthese; - import org.fudaa.dodico.h2d.H2dElement; import org.fudaa.dodico.h2d.H2dTimeStepGroup; - import org.fudaa.dodico.h2d.H2dGrid; - import org.fudaa.dodico.h2d.H2dFrontier; - import org.fudaa.dodico.h2d.H2dPoint; import org.fudaa.dodico.h2d.H2dNodalPropertyMixte; import org.fudaa.dodico.h2d.type.H2dBoundaryType; --- 15,24 ---- import org.fudaa.dodico.commun.ProgressionTestAdapter; import org.fudaa.dodico.dico.DicoEntite; + import org.fudaa.dodico.ef.EfElement; + import org.fudaa.dodico.ef.EfFrontier; + import org.fudaa.dodico.ef.EfGrid; + import org.fudaa.dodico.ef.EfNode; import org.fudaa.dodico.fichiers.FileOperationSynthese; import org.fudaa.dodico.h2d.H2dTimeStepGroup; import org.fudaa.dodico.h2d.H2dNodalPropertyMixte; import org.fudaa.dodico.h2d.type.H2dBoundaryType; *************** *** 57,63 **** assertTrue( t.getEntiteValue().containsKey(version.getDico().getEntite("ITERATION"))); ! H2dGrid m= t.getMaillage(); assertEquals(m.getPtsNb(), 1791); ! H2dPoint pt= m.getPt(1790); assertEquals(pt.getX(), 1000, eps_); assertEquals(pt.getY(), 10, eps_); --- 57,63 ---- assertTrue( t.getEntiteValue().containsKey(version.getDico().getEntite("ITERATION"))); ! EfGrid m= t.getGrid(); assertEquals(m.getPtsNb(), 1791); ! EfNode pt= m.getPt(1790); assertEquals(pt.getX(), 1000, eps_); assertEquals(pt.getY(), 10, eps_); *************** *** 97,102 **** assertEquals(H2dBcType.PERMANENT, bord.getRugositeType()); assertEquals(3d, bord.getRugosite(), eps_); ! assertEquals(t.getMaillage().getEltNb(), 792); ! H2dElement el=t.getMaillage().getElement(791); assertEquals(el.getPtIndex(0), 1788); assertEquals(el.getPtIndex(1), 1789); --- 97,102 ---- assertEquals(H2dBcType.PERMANENT, bord.getRugositeType()); assertEquals(3d, bord.getRugosite(), eps_); ! assertEquals(t.getGrid().getEltNb(), 792); ! EfElement el=t.getGrid().getElement(791); assertEquals(el.getPtIndex(0), 1788); assertEquals(el.getPtIndex(1), 1789); *************** *** 179,184 **** INPInterface r= (INPInterface)syntheseR.getSource(); if (syntheseR.containsMessages()) ! syntheseR.getAnalyze().toAnalyze().printResume(); ! assertNull(syntheseR.getAnalyze().toAnalyze()); return r; } --- 179,184 ---- INPInterface r= (INPInterface)syntheseR.getSource(); if (syntheseR.containsMessages()) ! syntheseR.getAnalyze().printResume(); ! assertTrue(syntheseR.getAnalyze().isEmpty()); return r; } *************** *** 191,195 **** public void testAnalyze() { INPInterface inter= getInter(fic_); ! DodicoAnalyze.Editor anal= new DodicoAnalyze.Editor(); H2dRefluxParameters param= H2dRefluxParameters.init( --- 191,195 ---- public void testAnalyze() { INPInterface inter= getInter(fic_); ! DodicoAnalyze anal= new DodicoAnalyze(); H2dRefluxParameters param= H2dRefluxParameters.init( *************** *** 199,204 **** anal); assertTrue(anal.isEmpty()); ! assertNull(anal.toAnalyze()); ! H2dFrontier maillageBord= param.getMaillage().getFrontiers(); int[] pointsFr= maillageBord.getArray(); int n= pointsFr.length - 1; --- 199,203 ---- anal); assertTrue(anal.isEmpty()); ! EfFrontier maillageBord= param.getMaillage().getFrontiers(); int[] pointsFr= maillageBord.getArray(); int n= pointsFr.length - 1; *************** *** 250,254 **** version.read(f, new ProgressionTestAdapter()); INPInterface inpInter= (INPInterface)syntheseR.getSource(); ! DodicoAnalyze infos= syntheseR.getAnalyze().toAnalyze(); if (infos != null) infos.printResume(); --- 249,253 ---- version.read(f, new ProgressionTestAdapter()); INPInterface inpInter= (INPInterface)syntheseR.getSource(); ! DodicoAnalyze infos= syntheseR.getAnalyze(); if (infos != null) infos.printResume(); |