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. > 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.
pgpXEiv8f_7N7.pgp
Description: PGP signature
