Assign a vector using another vector
Asked by
James Maddison
I would like to assign a vector to be equal to another vector. Something like:
F1.set_
F1.apply(...)
is quite expensive compared to a simple:
F1 = F2 + F3
How do I assign a (previously created) vector F1 to be equal to the sum of F2 + F3 without using the array method? I've profiled the latter and found this to be many times slower than the direct addition of two vectors, presumably due to extra copying. Would it be possible for a method of the form:
F1.assign(F2 + F3)
to be added to vectors?
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- DOLFIN Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Johan Hake
- Solved:
- Last query:
- Last reply:
To post a message you must log in.