Registered Member
|
Hi,
First of all great work with Eigen, we began using this library in our company a few years ago, and so far have been very happy with the results. Now, we recently switched from Eigen 3.0.3 to Eigen 3.2, and noticed the DynamicSparseMatrix is now deprecated and there is a single structure SparseMatrix that can be either compressed or non compressed. Fine. The great benefit from the separate structures was to be able to control the compression phase. Now each time you operate on a non compressed sparse matrix, it will be automatically be compressed. For our needs it is a problem, because it dramatically slows down the frequent reinitialization of our matrices. Typically, we solve non linear equations, and let's say we need to frequently update a sparse matrix A. We used to do this with the old DynamicSparseMatrix format:
This was quite fast, with the new version (replacing DynamicSparse with Sparse), when you call getUpdatedA(), A becomes compressed after the first line, and the addition of the non linear contributions is really slow since we need to reallocate everything each time. Is there a way to keep a matrix uncompressed ? Thanks |
Moderator
|
You can still use DynamicSparseMatrix from <unsupported/Eigen/SparseExtra>. However, it's non supported... For a cleaner solution I need more details:
- Does the structure of A change? or is it fixed? - If it changes, is it due to the structure of A_linear? or due to the additional coefficients? or both? - Does the structure of A_linear change? |
Registered Member
|
Good to know, I will maybe stick to the DynamicSparse format, unless you come up with a better solution.
The structure of A and A_linear is fixed. We need a constant pattern for our sparse matrices, so we stamp zero terms in the sparse matrix if needed to preserve the structure. |
Registered Member
|
One more thing, the structure of A and Alinear is fixed, but A and Alinear have a different structure.
|
Registered Member
|
Any suggestions ?
|
Registered users: Baidu [Spider], Bing [Bot], Google [Bot], Yahoo [Bot]