[petsc-users] SNES-norm is zero all the time

Sepideh Kavousi skavou1 at lsu.edu
Wed Feb 3 12:02:45 CST 2021


I only have one field "names vx" and this variable change in both x and y directions. I have also chosen dof in DMDACreate2d to "1".

I am not sure why I should have aF[i][j].vx. "i" defines the grids in x direction and "j" is in y-directions. In all my previous codes I define" aF[j][i].vx" and not "aF[i][j].vx", and it was working properly.
Best,
Sepideh
________________________________
From: Jed Brown <jed at jedbrown.org>
Sent: Wednesday, February 3, 2021 11:46 AM
To: Sepideh Kavousi <skavou1 at lsu.edu>; petsc-users at mcs.anl.gov <petsc-users at mcs.anl.gov>
Subject: Re: [petsc-users] SNES-norm is zero all the time

Sepideh Kavousi <skavou1 at lsu.edu> writes:

> I am not running an specific example. Attached is  my code. and when I wun with
> ./step5.out -snes_monitor -snes_fd_color -ts_monitor -snes_converged_reason -pc_type lu
>
> it seems it does not solve anything because the output is like:
>
>     0 SNES Function norm 0.000000000000e+00
>   Nonlinear solve converged due to CONVERGED_FNORM_ABS iterations 0
> 1 TS dt 0.005 time 0.005

Check your FormFunction for why af[][] is zero. I see

  aF[j][j].vx

but you'll need to set at all the grid points, i.e., aF[j][i].vx and aF[j][i].vy.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210203/60fbe854/attachment.html>


More information about the petsc-users mailing list