← Back to team overview

dolfin team mailing list archive

Re: [HG] Add -pedantic compiler flags, and add -Wno-long-long to avoid long long errors.

 

On Tue, Apr 04, 2006 at 11:47:45PM +0200, Garth N. Wells wrote:
> On Tue, 2006-04-04 at 16:39 -0500, Anders Logg wrote:
> > Oh, and we should also add
> > 
> >     void DenseMatrix::disp() const;
> >     void DenseVector::disp() const;
> > 
> > These should print out all values, while the << functions only print
> > out a summary, something like
> > 
> >     [ Dense (ublas) vector of size 10 ]
> > 
> 
> OK. I'm viewing the matrices and vectors at the moment using some uBlas
> functionality and std::cout (see src/test/main.cpp).

Yes, I saw it. That's why I suggested implementing dolfin::cout :-)

> If everyone is happy using uBlas, it would be worthwhile wrapping some
> basic operations to provide a uniform interface for dense and sparse
> matrices/vectors.

I'm happy! Looks very good.

Should we make a list of operations we need for a SparseMatrix and a
DenseMatrix and see which ones are candidates for a common interface
and which ones we need to think about?

I think it's perfectly fine if some of the operations return a
run-time error ("not implemented for sparse matrices") in a few cases.

Before we do that, maybe we should also test how large the overhead is
for the extra wrapping?

If you still have your previous benchmarks, maybe you could try
adding an extra layer on top of DenseMatrix (like inheriting from
GenericMatrix and a pointer to GenericMatrix in a class Matrix) and
see how much the overhead is for accessing individual elements. I
suspect it will not be very large, but it would be unfortunate
to discover later.

/Anders


> Garth
> 
>  
> 
> > /Anders
> > 
> > 
> > On Tue, Apr 04, 2006 at 04:34:57PM -0500, Anders Logg wrote:
> > > Works fine for me and the new classes look very simple. Excellent!
> > > 
> > > One thing we should add to DenseMatrix and DenseVector is support for
> > > output through the DOLFIN log system:
> > > 
> > >     friend LogStream& operator<< (LogStream& stream, const DenseMatrix& A);
> > >     friend LogStream& operator<< (LogStream& stream, const DenseVector& x);
> > > 
> > > Same as for Matrix and Vector.
> > > 
> > > /Anders
> > > 
> > > 
> > > On Tue, Apr 04, 2006 at 09:40:42PM +0200, Garth N. Wells wrote:
> > > > I've added a basic DenseMatrix and DenseVector class which is based on
> > > > Boost. I've put some simple checks in configure.ac for Boost, so check
> > > > that it compiles OK. For Debian-like systems run
> > > >   apt-get install libboost-dev
> > > > 
> > > > I also added the flags -pedantic -Wno-long-long when debug is enabled.
> > > > This causes some errors in the demos which need to be fixed.
> > > > 
> > > > Garth
> > > > 
> > > > On Tue, 2006-04-04 at 21:37 +0200, DOLFIN wrote:
> > > > > One or more new changesets pushed to the primary DOLFIN repository.
> > > > > A short summary of the last three changesets is included below.
> > > > > 
> > > > > changeset:   1839:5e0cf34a8dcff399279b48c866f93f3af5734852
> > > > > tag:         tip
> > > > > parent:      1837:050eb40f5e3b7853e28da903c844d106fc3e842f
> > > > > parent:      1838:65ed3c40da2f93f0a1298db33ed1fd0a8b1912f9
> > > > > user:        "Garth N. Wells <g.n.wells@xxxxxxxxxx>"
> > > > > date:        Tue Apr  4 21:36:47 2006 +0200
> > > > > files:       configure configure.ac
> > > > > description:
> > > > > Add -pedantic compiler flags, and add -Wno-long-long to avoid long long errors.
> > > > > 
> > > > > 
> > > > > changeset:   1838:65ed3c40da2f93f0a1298db33ed1fd0a8b1912f9
> > > > > parent:      1836:ed5966ccccc50e127fcdd2494a2a671b172e0504
> > > > > user:        "Garth N. Wells <g.n.wells@xxxxxxxxxx>"
> > > > > date:        Tue Apr  4 21:09:54 2006 +0200
> > > > > files:       configure configure.ac src/kernel/la/DenseMatrix.cpp src/kernel/la/DenseVector.cpp src/kernel/la/Makefile.am src/kernel/la/Makefile.in src/kernel/la/dolfin/DenseMatrix.h src/kernel/la/dolfin/DenseVector.h src/kernel/la/dolfin/Makefile.am src/kernel/la/dolfin/Makefile.in src/kernel/la/dolfin/dolfin_la.h src/kernel/main/dolfin.h src/test/main.cpp
> > > > > description:
> > > > > Basic implementation of dense matrices and vectors using uBlas.
> > > > > 
> > > > > 
> > > > > changeset:   1837:050eb40f5e3b7853e28da903c844d106fc3e842f
> > > > > user:        "Anders Logg <logg@xxxxxxxxx>"
> > > > > date:        Mon Apr  3 23:35:11 2006 -0500
> > > > > files:       configure configure.ac
> > > > > description:
> > > > > Remove default debug flags (use --enable-debug)
> > > > > 
> > > > > 
> > > > > -------------------------------------------------------
> > > > > For more details, visit http://www.fenics.org/hg/dolfin
> > > > > 
> > > > > _______________________________________________
> > > > > DOLFIN-dev mailing list
> > > > > DOLFIN-dev@xxxxxxxxxx
> > > > > http://www.fenics.org/cgi-bin/mailman/listinfo/dolfin-dev
> > > > 
> > > > 
> > > > _______________________________________________
> > > > DOLFIN-dev mailing list
> > > > DOLFIN-dev@xxxxxxxxxx
> > > > http://www.fenics.org/cgi-bin/mailman/listinfo/dolfin-dev
> > > > 
> > > 
> 
> 
> 
> _______________________________________________
> 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/



References