[firedrake] initial guess

Lawrence Mitchell lawrence.mitchell at imperial.ac.uk
Mon Apr 20 10:19:57 BST 2015


> On 20 Apr 2015, at 09:55, Colin Cotter <colin.cotter at imperial.ac.uk> wrote:
> 
> Dear Firedrake list,
>    Does the Firedrake interface to PETSc use the provided solution field as an initial guess by default? By default, a PETSc KSP uses zero as the initial guess.

If you're using a variational solver, since we always solve in residual form:

Ax = b

is transformed into:

F(x) = Ax - b = 0

And any initial non-zero guess is used for the starting position of the newton iteration.

If you're using a LinearSolver object (i.e. preassembled operators).  Pass {'ksp_initial_guess_nonzero': True} to the solver_parameters and the initial guess will be used.  I'm not sure this is tested, so if you have problems please do complain.

Lawrence
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://mailman.ic.ac.uk/pipermail/firedrake/attachments/20150420/187cf6cd/attachment.sig>


More information about the firedrake mailing list