On Wed, Feb 3, 2021 at 1:03 PM Sepideh Kavousi <[email protected]> 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 <[email protected]>
> *Sent:* Wednesday, February 3, 2021 11:46 AM
> *To:* Sepideh Kavousi <[email protected]>; [email protected] <
> [email protected]>
> *Subject:* Re: [petsc-users] SNES-norm is zero all the time
>
> Sepideh Kavousi <[email protected]> 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/>

Reply via email to