Anders Logg wrote: > On Sun, Jan 03, 2010 at 03:38:19PM +0100, Garth N. Wells wrote: >> It would be useful to have an efficient and simple data structure for >> small and large dense matrices with lots of functionality. We have >> uBLAS, but I'm not convinced of its efficiency for small matrices, and >> it doesn't interface to LAPACK, which is why LAPACKMatrix was added. >> >> There are a few libraries around that provide expression templates (for >> nice syntax) and LAPACK/ATLAS interfaces, see for example >> >> http://arma.sourceforge.net/ >> >> I think that wrapping such a library would be very useful and could be >> better that having LAPACKMatrix, etc. >> >> Garth > > Agree. I was thinking of wrapping a suitable library before adding > LAPACKMatrix, but it was too much effort at the time. >
Even less effort for your solvers would be to use Armadillo directly. It's available as a package through apt-get. > Incidentally, I also looked at Armadillo as the main candidate for > wrapping. > I converted the fenics-plasticity solve from uBLASDenseMatrix to Armadillo yesterday, and got a total solve time speed up of 100%. This includes assembly, etc, so I expect the code that uses dense matrices is an order of magnitude faster. From some simple tests, matrix inversion in Armadillo was about 35 times faster that uBLASDenseMatrix, and the syntax is nicer than uBLAS. Addition, etc, was also much faster with Armadillo. Garth > I have added a blueprint: > > https://blueprints.launchpad.net/dolfin/+spec/wrap-armadillo > > -- > Anders _______________________________________________ Mailing list: https://launchpad.net/~dolfin Post to : dolfin@lists.launchpad.net Unsubscribe : https://launchpad.net/~dolfin More help : https://help.launchpad.net/ListHelp