On Thursday January 13 2011 15:06:10 Garth N. Wells wrote: > On 13/01/11 22:10, Johan Hake wrote: > > On Thursday January 13 2011 13:35:05 Garth N. Wells wrote: > >> On 13/01/11 21:30, Johan Hake wrote: > >>> Do you have plans to create a shared_ptr version of all methods > >>> receiving and returning a GenericFoo? > >> > >> Not just yet. I'm starting with BlockFoo because it's more explicit that > >> BlockFoo usually represent views. > >> > >> I had a go at fixing thins in SWIG, but the uBLAS matrix objects are > >> giving me trouble. Could you take a look? > > > > The point is that none of the matrices or vectors in DOLFIN is stored > > using shared_ptr. Do we want that? Then we need to add shared_ptr > > versions of all methods? > > Do we have many? I don't see a presssing need to change other linear > algebra objects.
Ok, but I couldn't get all the stuff in directors working for shared_ptr stored LA structures. > > I have tried to do this but unfortunately there are places we need to > > update to get this going. > > BlockFoo is different from the other matrix and vector objects because > it's really just a holder of other objects. I can't see how we could > have a robust BlockFoo implementation without using shared pointers. I see this, and I think the change is logical, but to be able to access a shared_ptr<GenericMatrix> argument in Python we need to store _all_ our GenericTensors as shared_ptr in Python. When we do not provide an interface for the rest of the C++ library things can happen. It mostly goes well as SWIG provides a dereference typemap for most arguments, but again, I stumbled over a problem with directors. Johan > Garth > > > It looked like the director implementation of for > > example NonLinearProblem broke. > > > > I think we shoudl wait with this... > > > > Should > > > >> Garth > >> > >>> Johan > >>> > >>> On Thursday January 13 2011 13:22:28 [email protected] wrote: > >>>> ------------------------------------------------------------ > >>>> revno: 5498 > >>>> committer: Garth N. Wells <[email protected]> > >>>> branch nick: dolfin-all > >>>> timestamp: Thu 2011-01-13 21:19:51 +0000 > >>>> > >>>> message: > >>>> More work on shared pointers in linear algebra. > >>>> > >>>> modified: > >>>> demo/undocumented/block-matrix/cpp/main.cpp > >>>> dolfin/la/BlockMatrix.cpp > >>>> dolfin/la/BlockMatrix.h > >>>> dolfin/la/BlockVector.cpp > >>>> dolfin/la/BlockVector.h > >>>> dolfin/swig/la_post.i > >>>> dolfin/swig/la_pre.i > >>>> > >>>> -- > >>>> lp:dolfin > >>>> https://code.launchpad.net/~dolfin-core/dolfin/main > >>>> > >>>> Your team DOLFIN Core Team is subscribed to branch lp:dolfin. > >>>> To unsubscribe from this branch go to > >>>> https://code.launchpad.net/~dolfin-core/dolfin/main/+edit-subscription > >>> > >>> _______________________________________________ > >>> Mailing list: https://launchpad.net/~dolfin > >>> Post to : [email protected] > >>> Unsubscribe : https://launchpad.net/~dolfin > >>> More help : https://help.launchpad.net/ListHelp > >> > >> _______________________________________________ > >> Mailing list: https://launchpad.net/~dolfin > >> Post to : [email protected] > >> Unsubscribe : https://launchpad.net/~dolfin > >> More help : https://help.launchpad.net/ListHelp _______________________________________________ Mailing list: https://launchpad.net/~dolfin Post to : [email protected] Unsubscribe : https://launchpad.net/~dolfin More help : https://help.launchpad.net/ListHelp

