Page 1 of 1

Initial guess of iterative methods

PostPosted: Thu Sep 06, 2012 12:34 am
by scim
Hello,
I've adopted CULA Sparse in my project,and it's impressive.
My project is to simulate the trasient status of power system, it involves lots of linear system solving work, and mostly, the result of the former step is similar to the result of the later step.
That is to say, I can use the result of the first step as an initial guess to accelerate the later step, this proves to be a huge performance improvement in my GMRES code on CPU,the question is:
Can you provide an improved API that can take an external initial guess of the x vector instead of start from zero vector? I think it helps in a lot of applications and the coding work is not complicated.
Thank you very much, I really appreciate your excellent job!

Regards,
Cong.

Re: Initial guess of iterative methods

PostPosted: Thu Sep 06, 2012 6:38 am
by john
Hello, this is already a feature of the API. Simply put your initial guess in the X vector and set the config.useInitialResultVector value to 1.

Re: Initial guess of iterative methods

PostPosted: Thu Sep 06, 2012 11:53 pm
by scim
john wrote:Hello, this is already a feature of the API. Simply put your initial guess in the X vector and set the config.useInitialResultVector value to 1.

Wow, great job!
Thank you very much!

Re: Initial guess of iterative methods

PostPosted: Tue Aug 19, 2014 8:40 am
by opal_lp
I am setting the "config_.useInitialResultVector=1;" but it doesn't seems to work.
to test it i did multiple test on a matrix, without changing the B vector, and if i get the residual vector array, it always start from the beginning, with residual vector=1.
i am using S5, is there a reason why the settings isn't working?