Anders Logg wrote: > Shouldn't this be templated? This could be used also for passing uint > arrays to and from Python. >
It probably should be, but it may make things more complicated on the SWIG side. Perhaps Johan H. could comment - not on whether it's possible (I'm sure for Johan that it is), but on whether or not it's easy. Templating it would be better on the C++ side, not just for double, int, etc, but to handle const pointers correctly. > I imagine we can typedef > > DoubleArray > UintArray > This is a bit ugly. Might as well just use Array<double>, Array<uint>, etc. Garth > or similar and then define typemaps for those. > > -- > Anders > > > ------------------------------------------------------------------------ > > Subject: > [Branch ~dolfin-core/dolfin/main] Rev 4333: Add outline of a new Array > class. > From: > [email protected] > Date: > Sun, 06 Dec 2009 12:03:12 -0000 > To: > Anders Logg <[email protected]> > > To: > Anders Logg <[email protected]> > > > ------------------------------------------------------------ > revno: 4333 > committer: Garth N. Wells <[email protected]> > branch nick: dolfin-all > timestamp: Sun 2009-12-06 12:00:23 +0000 > message: > Add outline of a new Array class. > added: > dolfin/common/Array.cpp > dolfin/common/Array.h > modified: > demo/mesh/intersection/3D/python/demo.py > dolfin/common/dolfin_common.h > dolfin/swig/docstrings.i > dolfin/swig/kernel_modules.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

