dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #25248
Re: Vector assignment / parallel layout
On Nov 23, 2011, at 16:05, Anders Logg <logg@xxxxxxxxx> wrote:
> On Wed, Nov 23, 2011 at 11:13:52PM +0000, Garth N. Wells wrote:
>> It looks like it will be easy to fix the problem that we have with
>> vector assignment in parallel. The solution is
>>
>> 1. Permit assignment via operator= of equal-length vectors only. It
>> will just copy values. I've tested this equal-length restriction, and
>> it doesn't affect any DOLFIN tests or demos.
>>
>> 2. If a user attempts to perform assignment of vectors that have
>> different lengths, print an error that recommend using the copy
>> constructor, e.g.
>>
>> y = Vector(x)
>>
>> This change will also improve performance, since at present we always
>> destroy and re-create PETSc vectors when assigning, even when the
>> lengths are equal.
>>
>> Any objections to this going into the 1.0 branch?
>
> Sounds good to me.
++
Johan
> --
> Anders
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dolfin
> Post to : dolfin@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dolfin
> More help : https://help.launchpad.net/ListHelp
References