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

Zero NNZ for matrix structure: analyzePattern().

Tags: None
(comma "," separated)
andrecaldas
Registered Member
Posts
1
Karma
0
I am taking a look at the sparse solver concept. Sparse solvers divide the computational process in two: analyzePattern() and factorize().

The "analyzePattern" fase does not depend (in most cases), on the values inside the matrix. It usually deppends only on the NNZ structure.

Now, I would like to set up a sparse linear solver for which I shall keep changing the matrix values without (mostly) changing the non-zero structure. Except that eventually, a non-zero value might be equal to zero. Now, I would like to know if it is okay if I do:
Code: Select all
  matrix.insert(7,9) = 0.0;
  solver.analyzePattern(matrix);
  matrix.coeffRef(7,9) = 1.0;
  solver.factorize(matrix);
  x = solver.solve(b);

Also, "makeCompressed()" shall not destruct the NNZ structure, right? Even if the value is actually zero.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], kesang, Yahoo [Bot]