← Back to team overview

dolfin team mailing list archive

Vector assignment / parallel layout

 

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?

Garth


Follow ups