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

How to use a given Matrix as a Preconditioner ?

Tags: None
(comma "," separated)
cglwdm
Registered Member
Posts
18
Karma
0
Dear experts,
When using IterativeLinearSolvers , how to use a given Matrix as a Preconditioner ?

Many thanks!!!
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
You have to write a little wrapper class storing your matrix and exposing a compatible API, look at this files for some examples: https://bitbucket.org/eigen/eigen/src/e ... at=default

In your case, you only have to bother about the solve() method, the others will be noop. Then you can use solver.preconditioner() to get access to your preconditioner to set your matrix.


Bookmarks



Who is online

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