[petsc-dev] Picard with TS

Mark Adams mfadams at lbl.gov
Mon Jan 2 16:05:43 CST 2017


On Sun, Jan 1, 2017 at 1:00 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:

>
>    What are LandSNESFunction() and LandSNESJacobian()?
>

These are the same methods that I give to TS (IFunction and IJacobian),
 except there is no mass matrix in IJacobian. What do I do here? I do not
have a shift.

But I see that IFunction is not correct. I am solving du/dt - C(u) = 0.  My
IFunction applies C(u)*u, but LandSNESFunction should just return zero,
maybe?




>
>    Note that Picard
>
>        Solves the equation A(x) x = b(x) via the defect correction
> algorithm A(x^{n}) (x^{n+1} - x^{n}) = b(x^{n}) - A(x^{n})x^{n}
>
>    The functions you need to provide are (compute the vector) b(x)  and
> (compute the matrix) A(x).   A() is most definitely not the Jacobian of
> b(). To use Picard you have to rewrite the nonlinear equations that come
> out of the definition of the time-step in the form A(x) x = b(x).  This may
> require additions to TS, I don't know.
>
>    Barry
>
>
>
> > On Jan 1, 2017, at 8:56 AM, Mark Adams <mfadams at lbl.gov> wrote:
> >
> > I tried using Picard inside of TS, and SNES diverged. Is this supposed
> to be possible?  I tried to do do this by wrapping my operator in a SNES
> version and simply adding it like this.
> >
> > Mark
> >
> >   ierr = TSSetIFunction(ts,NULL,LandIFunction,ctx);CHKERRQ(ierr);
> >   ierr = TSSetIJacobian(ts,J,J,LandIJacobian,ctx);CHKERRQ(ierr);
> >     SNES snes;
> >     Vec vec;
> >     ierr = VecDuplicate(uu,&vec);CHKERRQ(ierr);
> >     ierr = TSGetSNES(ts,&snes);CHKERRQ(ierr);
> >     ierr = SNESSetPicard(snes, vec, LandSNESFunction, J, J,
> LandSNESJacobian, ctx);CHKERRQ(ierr);
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20170102/db84321f/attachment.html>


More information about the petsc-dev mailing list