Registered Member
|
Hey guys,
I have some sparse problems with various sizes in my project and plan to solve them with a single iterative solver. In order to achieve the best runtime I'm planning on using the diagonal preconditioner with few steps and the incomplete LU for larger ones.
So my question is ultimately: How can I change the preconditioner of BiCGSTAB during runtime? My guess is that I did not understand the member method preconditioner() correctly. Greeting and thanks in advance |
Moderator
|
You cannot, you have to create a new BiCGSTAB<> object with appropriate preconditioner.
|
Registered Member
|
Thank you very much for the answer.
Is there a kind of virtual baseclass for this kind of thing? Otherwise I think I'm going to build an Object which contains both solvers. |
Moderator
|
No virtual base class but you can easily write such a base class and two derived classes wrapping these two preconditioners.
|
Registered users: Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]