[petsc-users] SNESNRICHARDSON with LibMesh

Harshad Sahasrabudhe hsahasra at purdue.edu
Tue May 26 15:07:36 CDT 2015


Hi Matt,

Actually I just checked, I don't need to re-init the preconditioner LibMesh
solver.

The wrapper is interfaced to the mesh and makes it easier to assemble the
system matrices. It also keeps track of constraints. The wrapper
function PetscNonlinearSolver::solve
updates the system vectors and matrices, then calls SNESSolve. Thus, I need
to call PetscNonlinearSolver::solve instead of SNESSolve in SNESApplyNPC.

Do you mean wrap it in SNESSHELL?

Thanks,
Harshad

On Tue, May 26, 2015 at 3:25 PM, Matthew Knepley <knepley at gmail.com> wrote:

> On Tue, May 26, 2015 at 12:42 PM, Harshad Sahasrabudhe <
> hsahasra at purdue.edu> wrote:
>
>> Hi,
>>
>> I'm using LibMesh for meshing a non-linear equation. I want to use
>> NRichardson non-linear solver to solve the equation. I have a Newton trust
>> region non-linear solver as a pre-conditioner. Both these SNES are created
>> via the LibMesh NonlinearImplicitSystem and PetscNonlinearSolver wrappers.
>>
>> I need to re-init the LibMesh NonlinearImplicitSystem each time the
>> preconditioner is applied. Also, I need the preconditioner to be solved via
>> the LibMesh wrapper instead of directly through SNESSolve. How can make it
>> work this way? Any help is appreciated!
>>
>
> I think the easiest way is to have them both look like SNES objects. Then
> you can just call SNESSetNPC() or use -snes_npc_side left -npc_snes_type
> newtonls
>
> Can you explain what the LibMesh wrapper is doing that you you need? We
> could wrap that object in a SNES, but it sounds
> simpler to me to unwrap it.
>
>   Thanks,
>
>      Matt
>
>
>> Thanks,
>> Harshad
>>
>
>
>
> --
> 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/20150526/0f3c46c7/attachment.html>


More information about the petsc-users mailing list