[petsc-users] SNES-norm is zero all the time
Sepideh Kavousi
skavou1 at lsu.edu
Wed Feb 3 12:28:03 CST 2021
Oh my god, it was a bad one. Thanks for helping.
Sepideh
________________________________
From: Matthew Knepley <knepley at gmail.com>
Sent: Wednesday, February 3, 2021 12:14 PM
To: Sepideh Kavousi <skavou1 at lsu.edu>
Cc: Jed Brown <jed at jedbrown.org>; petsc-users at mcs.anl.gov <petsc-users at mcs.anl.gov>
Subject: Re: [petsc-users] SNES-norm is zero all the time
On Wed, Feb 3, 2021 at 1:03 PM Sepideh Kavousi <skavou1 at lsu.edu<mailto: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<mailto:jed at jedbrown.org>>
Sent: Wednesday, February 3, 2021 11:46 AM
To: Sepideh Kavousi <skavou1 at lsu.edu<mailto:skavou1 at lsu.edu>>; petsc-users at mcs.anl.gov<mailto:petsc-users at mcs.anl.gov> <petsc-users at mcs.anl.gov<mailto:petsc-users at mcs.anl.gov>>
Subject: Re: [petsc-users] SNES-norm is zero all the time
Sepideh Kavousi <skavou1 at lsu.edu<mailto: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/<https://nam04.safelinks.protection.outlook.com/?url=http:%2F%2Fwww.cse.buffalo.edu%2F~knepley%2F&data=04%7C01%7Cskavou1%40lsu.edu%7C9aa72ef56f15478b6e0e08d8c86f8841%7C2d4dad3f50ae47d983a09ae2b1f466f8%7C0%7C0%7C637479728645895019%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=CcQ%2BasyQnfdLmGdPbqBospHzu6DPt6sXte4x%2BHp8e%2F8%3D&reserved=0>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210203/ffce3432/attachment-0001.html>
More information about the petsc-users
mailing list