[petsc-users] Convergence Criteria?

Alan Wei zhenglun.wei at gmail.com
Wed Sep 21 11:16:20 CDT 2011


However, why signs for v[] in ComputeMatrix, which contains the values of a
row of the matrix. They all have a negative signs. Therefore, I got confused
which equation does this program solve for:
1)  u[j][i] = (u[j+1][i] + u[j-1][i] + u[j][i+1] + u[j][i-1] - rhs *
dx*dy)/4
or
2)  4u[j][i] - u[j+1][i] - u[j-1][i] - u[j][i+1] - u[j][i-1] + rhs * dx*dy =
0

thanks,
Alan


On Wed, Sep 21, 2011 at 8:22 AM, Barry Smith <bsmith at mcs.anl.gov> wrote:

>
> On Sep 20, 2011, at 10:47 PM, Alan Wei wrote:
>
> > Dear Dr. Smith,
> >     I figure out this problem. Actually, I made my own RHS, but I did not
> multiply them by the volume (dx*dy).
> >     However, I met another problem. All values calculated from this
> example are exactly opposite to values from my own code. I wonder if the RHS
> I input by ComputeRHS are the really RHS or -1.*RHS?
>
>    We do not change the sign of the right hand side.
>
>   Barry
>
> >
> > thanks in advance,
> > Alan
> >
> > On Mon, Sep 19, 2011 at 8:43 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
> >
> > On Sep 19, 2011, at 6:25 PM, Alan Wei wrote:
> >
> > > Dear folks,
> > >     I hope you guys are having a nice day.
> > >     I'm reading the /src/ksp/ksp/examples/tutorials/ex29.c.html and
> wonder how to set up the convergence criteria?
> >
> >   -ksp_rtol 1.e-10 for example
> >
> >   Run with -ksp_monitor_true_residual -ksp_converged_reason
> >
> >
> > > Currently I use it as a poisson solver to solve a Poisson Equation with
> three direction Neumann BC's and one direction Diriechlet BC's. It seems
> very bad on it.
> >
> >    Hmm, multigrid should likely converge well. Are you sure you've set
> the BC's correctly?
> >
> >   Barry
> >
> > >
> > > thanks in advance,
> > > Alan
> >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110921/13ca2b8b/attachment.htm>


More information about the petsc-users mailing list