dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #01274
Re: io interface for MatrixMarket
I have changed the output of info and warnings to dolfin "standard"
I included the functions of mmio.cpp and mmio.h into the MTXFile.cpp and MTXFile.h.
- dolfin src/kernel/io/mmio.cpp
+ dolfin src/kernel/io/MTXFile.cpp
dolfin src/kernel/io/File.cpp
dolfin src/kernel/io/Makefile.am
dolfin src/kernel/io/Makefile.in
- dolfin src/kernel/io/dolfin/mmio.h
+ dolfin src/kernel/io/dolfin/MTXFile.h
dolfin src/kernel/io/dolfin/File.h
dolfin src/kernel/io/dolfin/Makefile.am
dolfin src/kernel/io/dolfin/Makefile.in
/Haiko
Discussion of DOLFIN development <dolfin-dev@xxxxxxxxxx> schrieb am 24.10.05 01:27:29:
>
> I have added the matrix market format, but it would be good if you
> could take the functionality that you actually use from mmio.cpp and
> implement as private (and possibly static) members of MTXFile, and
> make sure to use dolfin_info() instead of printf() and dolfin_error()
> instead of printf()/exit().
>
> /Anders
>
> On Tue, Oct 18, 2005 at 01:01:06PM +0200, hetzel.devel@xxxxxx wrote:
> >
> > Hi Andres,
> > I attached a tar file for a first matrixmarket interface. It uses the files mmio.c (renamed to mmio.cpp) and mmio.h which you can get from the MatrixMarket homepage.
> > It was neccessary to make some small adjustments to these files.
> > File.cpp and File.h needed to be updated to incorporate the extentions ".mtx" and ".mat"
> > MTXFile.cpp and MTXFile.h include the in and out routine for "normal" matrices and vectors.
> > I tested the line with some simple files.
> > The mail with the files will be send directly to you, to avoid sending them through the mailing list.
> >
> > /Haiko
> >
> > Discussion of DOLFIN development <dolfin-dev@xxxxxxxxxx> schrieb am 17.10.05 17:03:02:
> > >
> > > On Mon, Oct 17, 2005 at 04:47:13PM +0200, hetzel.devel@xxxxxx wrote:
> > > >
> > > > Hi, I'm currently implementing some stuff with dolfin and so I
> > > > rewrote the C-interface to read and write my MatrixMarket
> > > > matrices(http://math.nist.gov/MatrixMarket/) for dolfin. The
> > > > interface is quite simple and does not support the whole
> > > > functionality of the MatrixMarket syntax, but I think this would be
> > > > a good think to incorporate to dolfin. So my question is: How can I
> > > > help? Who is responsible for the io-stuff?
> > > >
> > > > /Haiko
> > >
> > > It would be good with support for the MatrixMarket format in DOLFIN.
> > >
> > > I suggest you look at the files in the directory src/kernel/io. You
> > > need to write a new class MTXFile as a subclass of GenericFile and
> > > modify the class File so that files with extension .mtx or .mtx.gz are
> > > coupled to the MTX format. Then matrices (and vectors?) can be written
> > > to file in MatrixMarket format as follows:
> > >
> > > Matrix A;
> > > ...
> > > File file("matrix.mtx");
> > > file << A;
> > >
> > > and read from file as follows:
> > >
> > > Matrix A;
> > > File file("matrix.mtx");
> > > file >> A;
> > >
> > > We could add a new constructor to Matrix that allows us to do
> > >
> > > Matrix A("matrix.mtx");
> > >
> > > and the implementation would just be
> > >
> > > File file(filename);
> > > file >> *this;
> > >
> > > You will probably need to make MTXFile a friend of Matrix so you can
> > > modify the matrix from within MTXFile at read.
> > >
> > > /Anders
> > >
> > > _______________________________________________
> > > DOLFIN-dev mailing list
> > > DOLFIN-dev@xxxxxxxxxx
> > > http://www.fenics.org/cgi-bin/mailman/listinfo/dolfin-dev
> >
> >
> > ______________________________________________________________
> > Verschicken Sie romantische, coole und witzige Bilder per SMS!
> > Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193
> >
> >
> > _______________________________________________
> > DOLFIN-dev mailing list
> > DOLFIN-dev@xxxxxxxxxx
> > http://www.fenics.org/cgi-bin/mailman/listinfo/dolfin-dev
> >
>
> --
> Anders Logg
> Research Assistant Professor
> Toyota Technological Institute at Chicago
> http://www.tti-c.org/logg/
>
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/cgi-bin/mailman/listinfo/dolfin-dev
______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193
Attachment:
MatrixMarket_io.tar.gz
Description: GNU Zip compressed data
Follow ups