[petsc-users] Get Stuck in SNES

behzad baghapour behzad.baghapour at gmail.com
Thu Nov 24 05:00:38 CST 2011


On Wed, Nov 23, 2011 at 4:33 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:

> On Wed, Nov 23, 2011 at 01:06, behzad baghapour <
> behzad.baghapour at gmail.com> wrote:
>
>>     for( c=0; c<ne; c++ ) for( p=0; p<tot; p++ )
>>     FC->e[c].Q[p] = xx[c*(noe*num)+p];
>>
>
> You haven't told me about "noe" or "num". Do you mean for this to read
> xx[c*tot+p]?
>

noe is the number of equations (equal to number of flow states) and num is
the number of shape functions in element (according to the order of
accuracy)

>
>
>>
>>     ierr = VecRestoreArray( x, &xx ); CHKERRQ( ierr );
>>
>>     interiorFlux( FC->flw, FC->e );
>>     faceFlux    ( FC->flw, FC->f, FC->e );
>>
>
> The first of these should set FC->e (if you are adding into it, then you
> need to zero it first) and the second should add into it.
>

I found that my mistake is that I forgot to set upwind effect in my defined
field context. The problem was not stable, it is not related to SNES setup.

However, I can't find out the difference between "basic" and "basicnonorms"
in line search method.

In addition, Is it possible to set the number of line-search corrections or
is just decided by the solver?

Thanks a lot,
BehZad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111124/4c3bbb0c/attachment-0001.htm>


More information about the petsc-users mailing list