Subject: Re: [ublas] indirect_array<> and resize()
From: Ralf Denzer (Ralf.Denzer_at_[hidden])
Date: 2008-09-21 08:29:52
> This is a general problem of references: They usually are invalid when
> the structure of the underlying container changes. (BTW: resize does
> not preserve the data, thus M and Mi are useless anyway.)
Ok, maybe the example was a little bit "constructed"
> but why not
> ublas::vector<ublas::indirect_array<> > vec_ia;
> // ...
> vec_ia = ublas::vector<ublas::indirect_array<> >(10);
> the constructor is not slower than resize.
Ok, why not.
> I am still not convinced because the number of dof does not change,
At the moment the number of dofs don't change, but maybe they will change in a future
implementation, if I increase the order of the polynomial shape functions for some
elements in the mesh during the simulation (p-adaptivity).
> But anyway - you can try to add resize() to indirect_array (storage.hpp)
> and see how it works. I think an additional member function will not
> hurt ...
Ok, I can give this a try ...
First I have to play a little bit more with indirect_array's to get some more experience with them.
You know, indirect_array's are still undocumented ... let's see ...
"50 erste Dates" mit Adam Sandler u. Drew Barrymore kostenlos anschauen!
Exklusiv für alle WEB.DE Nutzer. http://www.blockbuster.web.de