This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Saving SparseLU object to file

Tags: None
(comma "," separated)
choishingwan
Registered Member
Posts
1
Karma
0

Saving SparseLU object to file

Mon Jul 07, 2014 4:32 am
Hi, currently we are trying to use the eigen to solve a linear equation Ax = b. Where A is a sparse symmetric matrix with dimension up to 1M x 1M. Thanks to eigen, we were able to perform this analysis using

Code: Select all
    SparseLU<SparseMatrix<double>, COLAMDOrdering<int> > solverA;
    VectorXd X = solverA.compute(A).solveB;


However, what we found is that for any programme instance, the matrix A usually remains the same. Therefore it will help to improve the performance of the programme by skipping the step of re-computing the solverA. The problem now is that although there were a lot of information as to how to serialize the matrix A, there are little to no information as to how to store this solverA.

Is there anyway to do that? Or is that impossible?

Thank you
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Saving SparseLU object to file

Mon Jul 07, 2014 11:40 am
This is currently not really possible because the internal representation of the LU factors is not a standard SparseMatrix and it is subject to evolve in the future. To this end, you would have to hack the SparseLU class itself to get access to the internal representation and add the respective save/load functions.


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]