dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #03013
Re: [HG] Split la unit tests into separate files.
SWIG does not seem to wrap operators by default but the other things
are there.
Try doing
>>> A = uBlasDenseMatrix(10, 10)
>>> dir(A)
You should get something like
['__class__', '__del__', '__delattr__', '__dict__', '__doc__',
'__getattr__', '__getattribute__', '__hash__', '__init__',
'__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__',
'__setattr__', '__str__', '__swig_getmethods__',
'__swig_setmethods__', '__weakref__', '_s', 'add', 'apply', 'disp',
'getRow', 'ident', 'init', 'invert', 'label', 'lump', 'mult', 'name',
'number', 'nzmax', 'rename', 'set', 'size', 'solve', 'this',
'thisown', 'zero']
I don't know SWIG very well but I guess we need some further glue to
map __call__ to operator() and __repr__ to dolfin::cout << so one can
do things like
A(5, 5) = 0.5
or
print A
and get the expected results.
/Anders
On Fri, Aug 11, 2006 at 12:46:12PM +0200, Garth N. Wells wrote:
> What's the status with using linear algebra from pyDOLFIN? Is it
> possible yet to assign vectors, add vectors and so forth?
>
> Garth
>
>
> 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: 2109:3c8a068792cd2df65d3f7cd71db91c4c2405147a
> >tag: tip
> >user: "Garth N. Wells <g.n.wells@xxxxxxxxxx>"
> >date: Fri Aug 11 12:40:32 2006 +0200
> >files: src/test/la/algebraUBlas.py src/test/la/createUBlas.py
> >src/test/la/test.py
> >description:
> >Split la unit tests into separate files.
> >
> >
> >changeset: 2108:c63021b9fcbbecdd862c80422756d6f43ab3fb2d
> >user: "Garth N. Wells <g.n.wells@xxxxxxxxxx>"
> >date: Fri Aug 11 12:14:33 2006 +0200
> >files: src/test/la/test.py
> >description:
> >Add more unit tests for linear algerbra.
> >
> >
> >changeset: 2107:94411f641ff3c1fa72cda8c80538b4a0cf73e70c
> >user: "Anders Logg <logg@xxxxxxxxx>"
> >date: Thu Aug 10 15:45:30 2006 +0200
> >files: ChangeLog
> >description:
> >Update ChangeLog
> >
> >
> >-------------------------------------------------------
> >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
References