Function::operator= does not handle the case where "this" is a subfunction.
Bug #1259022 reported by
Ennio Barbaro
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
DOLFIN |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Consider the code:
Function F,U; //Assume F and U are initialized properly
F[0] = U;
The result of this function is:
F[0]._vector != F._vector.
F[0]._function_
No error of any kind are prompted.
operator=(const Function & v) should behave as:
1) Make the assignment illegal if "this" is a subfunction and this->_
2) Overwrite only the relevant entries of this->_vector
At the moment is quite counter-intuitive and also very hard to debug, since if you plot F[0] you obtain the function you just assigned, while F is something completely unrelated.
To post a comment you must log in.
FEniCS no longer uses Launchpad for bug reports. Please consult the documentation on the FEniCS web page for where and how to (re)post your bug report: http:// fenicsproject. org/support/