On Wed, Mar 11, 2009 at 11:03 PM, Anders Logg <[email protected]> wrote:
> On Mon, Mar 09, 2009 at 11:38:38PM +0100, Martin Sandve Alnæs wrote:
>> This doesn't work:
>>
>> Function u(V);
>> ...
>> Vector v(u.vector());
>>
>> since Vector doesn't have any constructor taking a GenericVector.
>
> Should it?
>
> It would require either down-casting or working through the
> GenericVector interface. Should we add a copy constructor in
> GenericVector which uses get/set to assign the values? One could then
> initialize any vector with any vector.

Will it be any slower? An additional copy?
I guess the problem is in parallell.

Downcasting + fallback using get/set would be nice.

Martin
_______________________________________________
DOLFIN-dev mailing list
[email protected]
http://www.fenics.org/mailman/listinfo/dolfin-dev

Reply via email to