How could I see the solution in the FGMREScycle()?

Barry Smith bsmith at
Tue Mar 3 15:53:46 CST 2009

    The GMRES family of solvers does not compute the solution  
explicitly during the iterations. It is only at the end that
it builds the solution from the Krylov space it has generated.   
Computing the solution at each iteration is expensive and
best avoided. You can use KSPBuildSolution() called from inside a  
monitor routine you provide with KSPMonitorSet()
to compute the solution and then display it anyway you like with  
VecView() for example.


On Mar 3, 2009, at 3:42 PM, (Rebecca) Xuefei YUAN wrote:

> Hi,
> I am going to track the updated solution, but I was not able to see  
> the solution in FGMREScycle() where linear system is solved. Any  
> other options provided to take a look at those values?
> Thanks,
> -- 
> (Rebecca) Xuefei YUAN
> Department of Applied Physics and Applied Mathematics
> Columbia University
> Tel:917-399-8032

More information about the petsc-users mailing list