projectchrono/chrono-flex

Need to create a single left-hand side matrix.

melanz opened this issue · 1 comments

There should be a single left-hand side matrix (mass and sensitivity of internal forces combined) to make full use out of Spike::GPU.

The problem is that cusp::multiply requires the matrix being passed to it to be sorted by row. Sorting the left-hand side matrix causes the elements from phiq' to be mixed in with the mass and stiffness blocks. This makes it difficult to update the stiffness matrix (which changes at every Krylov iteration).

The solution (thanks to Radu) is to have a single matrix for the left-hand side matrix with two views - one to the mass and stiffness block and one to the phiq/phiq' block. This single matrix can be passed to Spike::GPU's update() function and the SpMV can be performed using the separate blocks (only the phiq/phiq' view has to be sorted).