← Back to team overview

dolfin team mailing list archive

Re: [HG dolfin] Add a lot of "const" to matrix classes.

 

The base class GenericMatrix didn't use const when passing by value with some pure virtual functions, but functions in the derived class uBlasMatrix<T> did. That lead to some problems. I was surprised that the compiler didn't throw up an error but SWIG did.

Garth

Anders Logg wrote:
I didn't know SWIG cared about const for variables that are passed by
value. Is this the case?

/Anders


On Mon, Dec 11, 2006 at 04:13:44PM +0100, 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:   2538:3b952cdb82aa1039f9b56423f65a416589611b95
tag:         tip
user:        "Garth N. Wells <g.n.wells@xxxxxxxxxx>"
date:        Mon Dec 11 16:13:29 2006 +0100
files:       src/kernel/la/PETScMatrix.cpp src/kernel/la/dolfin/GenericMatrix.h src/kernel/la/dolfin/PETScMatrix.h src/kernel/la/dolfin/uBlasMatrix.h
description:
Add a lot of "const" to matrix classes.

Inconsistent use of "const" is what broke the uBlas matrix unit tests.


changeset:   2537:8d1caaf557d26b61c090c91c48c40719f133c99b
user:        "Garth N. Wells <g.n.wells@xxxxxxxxxx>"
date:        Mon Dec 11 12:15:45 2006 +0100
files:       src/kernel/la/dolfin/uBlasMatrix.h src/test/la/createUBlas.py
description:
Fixes to uBlasMatrix::init(...). Unit tests should now work.


changeset:   2536:80c91ead82ecf96899d8223ea46d5ba390f7090b
user:        "Anders Logg <logg@xxxxxxxxx>"
date:        Sun Dec 10 19:14:33 2006 +0100
files:       src/kernel/fem/dolfin/dolfin_fem.h src/pydolfin/dolfin.i src/pydolfin/dolfin_fem.i src/pydolfin/dolfin_fem_post.i src/test/mesh/test.py
description:
Add classes P1tet and P1tri to Python interface and fix
unit test for MeshFunction.


----------------------------------------------------------------------
For more details, visit http://www.fenics.org/hg/dolfin
_______________________________________________
DOLFIN-dev mailing list
DOLFIN-dev@xxxxxxxxxx
http://www.fenics.org/mailman/listinfo/dolfin-dev
_______________________________________________
DOLFIN-dev mailing list
DOLFIN-dev@xxxxxxxxxx
http://www.fenics.org/mailman/listinfo/dolfin-dev





References