On 21/11/2013 2:09 PM, Jed Brown wrote:
TAY wee-beng <[email protected]> writes:

Hi,

Due to a special case, I need modify RHS values of the system of eqns at
each iteration.

Hence, what I can do is to solve the eqn using KSPSolve, limit the
maxits in KSPSetTolerances to 1, modify the RHS, and then run KSPSolve
again.

It will loop until it reaches the convergences I specify.

My question is if that's the only way,
There is almost certainly a better way to formulate your problem.

Hi, in that case, do you want any suggestion? Is it possible to apply the preconditioner only once at the start, and not at every intermediate step?

Thank you!

and will it suffer a large drop in speed?
That algorithm (without RHS modification) reduces to Richardson
preconditioned by one step of your chosen preconditioned iterative
method.  This likely converges much worse than a Krylov method.

Note that in the form you describe, the preconditioner will be applied
twice and the operator once.

Reply via email to