[petsc-users] SNES-norm is zero all the time
Matthew Knepley
knepley at gmail.com
Wed Feb 3 12:14:09 CST 2021
On Wed, Feb 3, 2021 at 1:03 PM Sepideh Kavousi <skavou1 at lsu.edu> wrote:
> 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.
>
To me, it looks like you have "jj"
Matt
> 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.
>
--
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
https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210203/7c4eeafc/attachment.html>
More information about the petsc-users
mailing list