Boost logo

Ublas :

Subject: Re: [ublas] bug on compressed_matrix ?
From: Thomas Klimpel (Thomas.Klimpel_at_[hidden])
Date: 2013-01-16 14:00:42


Hoang Giang Bui wrote:
> Yes, I need the correct csr format as standard since we rely on ublas
> for computing element stiffness matrix and global stiffness matrix stem
> from structural problem. Furthermore, I need to take the transpose of
> ublas matrix to feed in a subroutine to compute the restriction operator
> in our multilevel solver. This subroutine uses the compressed data for
> speed purpose. This behaviour causes segmentation false error in my code
> since it read a negative number of entries in the last row.

Can you try calling the "complete_index1_data()" member function and see whether it fixes your problem? (You still have to take care that "index2_data()" and "value_data()" return references to arrays whose actual size is "meaningless".)

Regards,
Thomas