[petsc-users] Get Stuck in SNES

Jed Brown jedbrown at mcs.anl.gov
Wed Nov 23 07:03:18 CST 2011


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]?


>
>     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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111123/e21877e8/attachment.htm>


More information about the petsc-users mailing list