Skip to content
Snippets Groups Projects
Commit 1df77bef authored by Steffen Müthing's avatar Steffen Müthing
Browse files

[Bugfix][BCRSMatrix] Use number of rows from source matrix as iteration bound in copy constructor

After the recent changes to BCRSMatrix, row and column sizes are now only
set by allocate() because several places assume a correlation between
the set number and rows and the allocation state. Thus the copy
constructor and the assignment operator don't directly copy those values
over, but initialize them to 0. The correct values are then set by
allocate. The row-wise build mode is a special case that requires
iterating over the source matrix rows before allocating memory.
Unfortunately, the copy constructor tried to use the (0-initialized) row
count of itself as iteration bound instead of the source matrix's one.

Fixed by doing the same thing as the assignment operator: Just use the
number from the source matrix.

Fixes FS #1394.
parent 7b56ab3a
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment