[petsc-users] SNES and ghosted vector of unknowns

Matthew Knepley knepley at gmail.com
Fri Apr 20 09:08:27 CDT 2012


On Fri, Apr 20, 2012 at 9:53 AM, Dominik Szczerba <dominik at itis.ethz.ch>wrote:

> I am using SNES to solve a simple nonlinear system.
> My vector of unknowns (x) is ghosted, and before (i.e. with my own
> home brewed nonlinear solver) I had to always update the ghosted
> values after a linear solve with ksp. How can I now force the update,
> if I am not calling ksp myself?
>

You can use


http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/SNES/SNESSetUpdate.html

Also, you could investigate using DM, where this should be automatic, but
that is probably
a bigger change to your code.

   Matt


> Thanks for any hints,
>
> Dominik
>



-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120420/6b441931/attachment.htm>


More information about the petsc-users mailing list