[petsc-users] Functions for judging the properties of the matrix

Satish Balay balay at mcs.anl.gov
Tue Aug 7 10:05:19 CDT 2012


For eg: -ksp_gmres_restart 1000 -ksp_max_it 1000 [default] avoids restarts

But if your code doesn't converge before 1000 iterations - perhaps use:

-ksp_gmres_restart 2000 -ksp_max_it 2000

Satish

On Tue, 7 Aug 2012, w_ang_temp wrote:

> Hello,
>     I am sorry that I cannot understand "Make sure to avoid restarts". In the FAQ, it says that using the restarted
> GMRES method to get approximations to the condition number. So why saying "avoid restarts" in the next following?
>     Besides, there are two questions about GMRES:
>     (1) Is the "iterations count" of GMRES with restarted parameters which is outputted by PETSc meaningless?
>     (2) Is there only restarted GMRES in PETSc?
>     Thanks.
>                                                 Jim
> 
> 
> 
> 
> >>在 2012-08-07 21:59:05,"Matthew Knepley" <knepley at gmail.com> 写道:
> >>On Tue, Aug 7, 2012 at 8:56 AM, w_ang_temp <w_ang_temp at 163.com> wrote:
> 
> 
> >>Hello, Jed
> >>    I am a little puzzled about the "How can I determine the condition number of a matrix?" in the
> >>FAQ. The details are as follows:
>  
> >>    "...For larger matrices, you can run with -pc_type none -ksp_type gmres -ksp_monitor_singular_value
> >>-ksp_gmres_restart 1000 to get approximations to the condition number of the operator. This will
> >>generally be accurate for the largest singular values, but may overestimate the smallest singular
> >>value unless the method has converged. Make sure to avoid restarts...".
>    
> >>    Since the command "-pc_type none -ksp_type gmres -ksp_monitor_singular_value
> >>-ksp_gmres_restart 1000" using restart parameter, so, what does "Make sure to avoid restarts" mean?
> 
> 
> >Do not believe the answer after the restart.
>  
> >>Besides, is the parameter "1000" a reference value which will be changed in specific project in order
> >>to be converged? Or must use 1000 to get the condition number?
> 
> 
> >The former.
> 
> 
>   >  Matt
>  
>    >> Thanks.
>  >>                                                      Jim


More information about the petsc-users mailing list