[petsc-users] Behaviour of Newton Methods with Direct Solvers.

subramanya sadasiva potaman at outlook.com
Fri Aug 30 22:18:41 CDT 2013


This is very odd as the matrix that I have is essentially the same as the matrix in ex54.C So I am pretty certain that my jacobian is correct. 

> Subject: Re: [petsc-users] Behaviour of Newton Methods with Direct Solvers.
> From: bsmith at mcs.anl.gov
> Date: Fri, 30 Aug 2013 21:43:07 -0500
> CC: petsc-users at mcs.anl.gov
> To: potaman at outlook.com
> 
> 
> \f0\fs24 \cf0 0 SNES Function norm 4.688596679512e-01\
>   Linear solve converged due to CONVERGED_ITS iterations 1\
> 
>    I don't trust this. Change it to allow several KSP iterations instead of one and use -ksp_monitor_true_residual to see if the linear is actually solved accurately.
> 
>    Also I agree with Matt's email, it is possible the Jacobian is wrong and hence even if the linear solve is accurate Newton may converge.
> 
>    Barry
> 
> 
> On Aug 30, 2013, at 9:35 PM, subramanya sadasiva <potaman at outlook.com> wrote:
> 
> > Hi Barry, 
> > I have attached output from the solver with the options that you suggested. As you can see the direct solver causes the nonlinear solver to diverge - but the code converges easily with gmres
> > Thanks, 
> > Subramanya 
> > 
> > 
> > > Subject: Re: [petsc-users] Behaviour of Newton Methods with Direct Solvers.
> > > From: bsmith at mcs.anl.gov
> > > Date: Fri, 30 Aug 2013 21:16:33 -0500
> > > CC: petsc-users at mcs.anl.gov
> > > To: potaman at outlook.com
> > > 
> > > 
> > > On Aug 30, 2013, at 9:14 PM, subramanya sadasiva <potaman at outlook.com> wrote:
> > > 
> > > > Hi Barry, 
> > > > The linear solvers converge in 1 iterations. But the SNES solver fails when I use the direct solver. 
> > > 
> > > Hmm. I don't have an explanation for this. Could you send some output when running with -snes_monitor -ksp_monitor_true_residual for both the iterative case and the direct solver case?
> > > 
> > > Barry
> > > 
> > > > Thanks,
> > > > Subramanya 
> > > > 
> > > > > Subject: Re: [petsc-users] Behaviour of Newton Methods with Direct Solvers.
> > > > > From: bsmith at mcs.anl.gov
> > > > > Date: Fri, 30 Aug 2013 21:11:36 -0500
> > > > > CC: petsc-users at mcs.anl.gov
> > > > > To: potaman at outlook.com
> > > > > 
> > > > > 
> > > > > I would not expect this. Are you sure that direct solvers are actually working well? You can run -ksp_type gmres -pc_type lu to "accelerate" the direct solver. Under normal circumstances the direct solver will converge in one iteration but if, for example, the problem is singular or nearly singular several iterations might solve the linear system but one may not.
> > > > > 
> > > > > Barry
> > > > > 
> > > > > On Aug 30, 2013, at 9:08 PM, subramanya sadasiva <potaman at outlook.com> wrote:
> > > > > 
> > > > > > Hi, 
> > > > > > Is there a reason that the convergence of the newton methods in SNES is much better with iterative solvers instead of with direct solvers? This is particularly in reference with the VI solvers. I get nearly quadratic convergence with the iterative solvers, but the code just diverges or converges linearly when i run with -ksp_type preonly .
> > > > > > Thanks, 
> > > > > > Subramanya 
> > > > >
> > > 
> > <snes_vi_with_direct_solver.rtf><snes_vi_with_gmres.txt>
> 
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130830/dbaaf63e/attachment.html>


More information about the petsc-users mailing list