[petsc-users] Is it possible to use -snes_ksp_ew in the framework of KSP?

Song Gao song.gao2 at mail.mcgill.ca
Sat Mar 8 19:46:28 CST 2014


Thank you all.

Most of the difficulties come from the current structure of the program.
Its size and "age" make any radical modification a challenge. The large
uses of global variables and deprecated "goto" statements call for a
revision, which however is unlikely to occur, against our better
judgement...

That being said, the current tools provided byPETSc are sufficient, however
not necessarily convenient for our purposes. As a wishful thinking we can
say that the implementation of PETSc SNES features into existing codes
would be easier if the outer Newton-like loop could be managed by the
original code, out of the SNES context. On the other hand, we realize that
this might be in contrast with the requirements of PETSc itself.

The application of the Eistenstat-Walker method together with a Matrix-Free
approach are of key importance. Thus, as kindly suggested by Jed Brown,
implementing our own version of EW scheme might turn out to be the only
way. We would be happy to provide more details if you think that they might
be helpful for the future developments of PETSc.


On Fri, Mar 7, 2014 at 2:39 PM, Matthew Knepley <knepley at gmail.com> wrote:

> On Fri, Mar 7, 2014 at 1:21 PM, Song Gao <song.gao2 at mail.mcgill.ca> wrote:
>
>> Hello,
>>
>> We are working on a legacy codes which solves the NS equations. The codes
>> take control of newton iterations itself and use KSP to solve the linear
>> system.
>>
>> We modified the codes, used SNES to control the newton iteration and
>> changed the code to matrix free fashion. But the legacy codes did a lot of
>> other things between two newton iterations (such as output solution, update
>> variables....). I know we could use linesearchpostcheck but it is
>> difficulty to do that correctly. Therefore, we decide to go back to the KSP
>> framework but still use matrix free.
>>
>
> What makes it difficult?
>
>   Thanks,
>
>      Matt
>
>
>> When using SNES, we always use the runtime option -snes_ksp_ew, we
>> observe that for some test cases, the residual stalls without -snes_ksp_ew,
>> but converges with-snes_ksp_ew. So I'm thinking if it is possible to
>> use -snes_ksp_ew in KSP? Thanks in advance.
>>
>>
>>
>
>
> --
> 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/20140308/9383fae4/attachment.html>


More information about the petsc-users mailing list