|
From: <de...@us...> - 2003-12-11 12:42:00
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dunes/io In directory sc8-pr-cvs1:/tmp/cvs-serv23146/dunes/io Modified Files: DunesFileFormat.java DunesReader.java DunesWriter.java Log Message: Ajout de fonctionnalites au modele h2d Index: DunesFileFormat.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dunes/io/DunesFileFormat.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** DunesFileFormat.java 25 Nov 2003 10:11:32 -0000 1.9 --- DunesFileFormat.java 11 Dec 2003 12:41:27 -0000 1.10 *************** *** 9,12 **** --- 9,13 ---- package org.fudaa.dodico.dunes.io; import java.io.File; + import org.fudaa.dodico.commun.ProgressionInterface; import org.fudaa.dodico.fichiers.FileFormat; *************** *** 27,31 **** public class DunesFileFormat extends FileFormat { public final static int NB_FILE= 1; ! private static final DunesFileFormat INSTANCE= new DunesFileFormat(); public static final DunesFileFormat getInstance() { return INSTANCE; --- 28,33 ---- public class DunesFileFormat extends FileFormat { public final static int NB_FILE= 1; ! public static final DunesFileFormat INSTANCE= new DunesFileFormat(); ! private DunesFileFormat.DunesVersion LAST_VERSION; public static final DunesFileFormat getInstance() { return INSTANCE; *************** *** 33,37 **** private DunesFileFormat() { super(NB_FILE); ! extensions_= new String[] { "mail" }; ID_= "DUNES"; nom_= "Dunes"; --- 35,39 ---- private DunesFileFormat() { super(NB_FILE); ! extensions_= new String[] { "mail","geo" }; ID_= "DUNES"; nom_= "Dunes"; *************** *** 45,49 **** } public DunesVersion getLastVersionImpl() { ! return new DunesVersion(getLastVersion()); } public class DunesVersion --- 47,61 ---- } public DunesVersion getLastVersionImpl() { ! if (LAST_VERSION == null) ! LAST_VERSION= new DunesVersion(getLastVersion()); ! return LAST_VERSION; ! } ! ! public FileFormatVersion getLastVersionInstance(){ ! return getLastVersionImpl(); ! } ! ! public boolean containsGrid() { ! return true; } public class DunesVersion *************** *** 107,110 **** --- 119,142 ---- return write(_f, inter, _prog); } + /** + * + */ + public FileOperationSynthese readGrid( + File _f, + ProgressionInterface _prog) { + FileOperationSynthese f= read(_f, _prog); + DunesInterface interf= (DunesInterface)f.getSource(); + if (interf != null) + f.setSource(interf.getMaillage()); + return f; + } + + /** + * + */ + public boolean canWriteOnlyGrid() { + return true; + } + } } Index: DunesReader.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dunes/io/DunesReader.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** DunesReader.java 25 Nov 2003 10:11:32 -0000 1.10 --- DunesReader.java 11 Dec 2003 12:41:27 -0000 1.11 *************** *** 235,239 **** } catch (EOFException e) { if (DodicoLib.DEBUG) ! System.out.println("Read end"); } catch (NumberFormatException fe) { DodicoAnalyze.manageException(fe, analyze_, in_); --- 235,239 ---- } catch (EOFException e) { if (DodicoLib.DEBUG) ! DodicoLib.debug("Dunes Read end"); } catch (NumberFormatException fe) { DodicoAnalyze.manageException(fe, analyze_, in_); Index: DunesWriter.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dunes/io/DunesWriter.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** DunesWriter.java 25 Nov 2003 10:11:32 -0000 1.10 --- DunesWriter.java 11 Dec 2003 12:41:27 -0000 1.11 *************** *** 84,89 **** boolean printAdaptatifV= false; double[] adValeur= dunes_.getAdaptatifValeur(); if (adValeur != null) { - b.append(' '); b.append(version_.getAdaptatifCode()); printAdaptatifV= true; --- 84,89 ---- boolean printAdaptatifV= false; double[] adValeur= dunes_.getAdaptatifValeur(); + b.append(' '); if (adValeur != null) { b.append(version_.getAdaptatifCode()); printAdaptatifV= true; *************** *** 146,150 **** //le nombre de points par elements. int nppel; - int[] index; for (int i= 0; i < nElems; i++) { ppel= maillage.getElement(i); --- 146,149 ---- *************** *** 156,164 **** b.append(nppel); //les indices des points pour l'element i - index= ppel.getPtIndex(); for (int j= 0; j < nppel; j++) { b.append(' '); //Les indices sont stockés a partir de 0. ! b.append(index[j] + 1); } writeln(b); --- 155,162 ---- b.append(nppel); //les indices des points pour l'element i for (int j= 0; j < nppel; j++) { b.append(' '); //Les indices sont stockés a partir de 0. ! b.append(ppel.getPtIndex(j) + 1); } writeln(b); |