[petsc-users] about snes
陈乐平(Leping Chen)
chenleping at yahoo.cn
Wed May 5 10:02:52 CDT 2010
petsc teams,
When I use SNES, I find my program iterated many times but x vector and residual vector
remained unchanged, that is to say,no convergence.I used finite difference jacobian approximations,
but I cannot confirm the jacobian matrix structure is right.Whether the matrix structure will influence
the convergence of SNES or not? Why does my x vector and residual vector remained unchanged?
call FormJacobian(snes,x,J,J,flag,dummy,ierr)
call MatGetColoring(J,MATCOLORING_SL,iscoloring,ierr)
call MatFDColoringCreate(J,iscoloring,fdcoloring,ierr)
call ISColoringDestroy(iscoloring,ierr)
call MatFDColoringSetFromOptions(fdcoloring,ierr)
call MatFDColoringSetFunction(fdcoloring,FormFunction,
& PETSC_NULL_OBJECT,ierr)
call SNESSetJacobian(snes,J,J,SNESDefaultComputeJacobianColor,
& fdcoloring,ierr)
call SNESGetKSP(snes,ksp,ierr)
call KSPGetPC(ksp,pc,ierr)
call SNESSolve(snes,PETSC_NULL_OBJECT,petscu,ierr)
Thanks,
leping
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20100505/cabf27cb/attachment.htm>
More information about the petsc-users
mailing list