1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
<HTML>
<HEAD> <link rel="canonical" href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/KSP/KSPGetConvergedReason.html" />
<META NAME="GENERATOR" CONTENT="DOCTEXT">
<TITLE>KSPGetConvergedReason</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
<div id="version" align=right><b>petsc-3.7.5 2017-01-01</b></div>
<div id="bugreport" align=right><a href="mailto:petsc-maint@mcs.anl.gov?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: petsc-3.7.5 v3.7.5 docs/manualpages/KSP/KSPGetConvergedReason.html "><small>Report Typos and Errors</small></a></div>
<A NAME="KSPGetConvergedReason"><H1>KSPGetConvergedReason</H1></A>
Gets the reason the <A HREF="../KSP/KSP.html#KSP">KSP</A> iteration was stopped.
<H3><FONT COLOR="#CC3333">Synopsis</FONT></H3>
<PRE>
#include "petscksp.h"
PetscErrorCode KSPGetConvergedReason(KSP ksp,KSPConvergedReason *reason)
</PRE>
Not Collective
<P>
<H3><FONT COLOR="#CC3333">Input Parameter</FONT></H3>
<DT><B>ksp </B> -the <A HREF="../KSP/KSP.html#KSP">KSP</A> context
<br>
<P>
<H3><FONT COLOR="#CC3333">Output Parameter</FONT></H3>
<DT><B>reason </B> -negative value indicates diverged, positive value converged, see <A HREF="../KSP/KSPConvergedReason.html#KSPConvergedReason">KSPConvergedReason</A>
<br>
<P>
Possible values for reason: See also manual page for each reason
<pre>
<A HREF="../KSP/KSP_CONVERGED_RTOL.html#KSP_CONVERGED_RTOL">KSP_CONVERGED_RTOL</A> (residual 2-norm decreased by a factor of rtol, from 2-norm of right hand side)
</pre>
<pre>
<A HREF="../KSP/KSP_CONVERGED_ATOL.html#KSP_CONVERGED_ATOL">KSP_CONVERGED_ATOL</A> (residual 2-norm less than abstol)
</pre>
<pre>
<A HREF="../KSP/KSP_CONVERGED_ITS.html#KSP_CONVERGED_ITS">KSP_CONVERGED_ITS</A> (used by the preonly preconditioner that always uses ONE iteration, or when the <A HREF="../KSP/KSPConvergedSkip.html#KSPConvergedSkip">KSPConvergedSkip</A>() convergence test routine is set.
</pre>
<pre>
KSP_CONVERGED_CG_NEG_CURVE
</pre>
<pre>
KSP_CONVERGED_CG_CONSTRAINED
</pre>
<pre>
KSP_CONVERGED_STEP_LENGTH
</pre>
<pre>
<A HREF="../KSP/KSP_DIVERGED_ITS.html#KSP_DIVERGED_ITS">KSP_DIVERGED_ITS</A> (required more than its to reach convergence)
</pre>
<pre>
<A HREF="../KSP/KSP_DIVERGED_DTOL.html#KSP_DIVERGED_DTOL">KSP_DIVERGED_DTOL</A> (residual norm increased by a factor of divtol)
</pre>
<pre>
KSP_DIVERGED_NANORINF (residual norm became Not-a-number or Inf likely due to 0/0)
</pre>
<pre>
<A HREF="../KSP/KSP_DIVERGED_BREAKDOWN.html#KSP_DIVERGED_BREAKDOWN">KSP_DIVERGED_BREAKDOWN</A> (generic breakdown in method)
</pre>
<pre>
<A HREF="../KSP/KSP_DIVERGED_BREAKDOWN_BICG.html#KSP_DIVERGED_BREAKDOWN_BICG">KSP_DIVERGED_BREAKDOWN_BICG</A> (Initial residual is orthogonal to preconditioned initial residual. Try a different preconditioner, or a different initial Level.)
</pre>
<P>
Notes: Can only be called after the call the <A HREF="../KSP/KSPSolve.html#KSPSolve">KSPSolve</A>() is complete.
<P>
<P>
<H3><FONT COLOR="#CC3333">Keywords</FONT></H3>
<A HREF="../KSP/KSP.html#KSP">KSP</A>, nonlinear, set, convergence, test
<BR>
<P>
<H3><FONT COLOR="#CC3333">See Also</FONT></H3>
<A HREF="../KSP/KSPSetConvergenceTest.html#KSPSetConvergenceTest">KSPSetConvergenceTest</A>(), <A HREF="../KSP/KSPConvergedDefault.html#KSPConvergedDefault">KSPConvergedDefault</A>(), <A HREF="../KSP/KSPSetTolerances.html#KSPSetTolerances">KSPSetTolerances</A>(), <A HREF="../KSP/KSPConvergedReason.html#KSPConvergedReason">KSPConvergedReason</A>
<BR><P><B><P><B><FONT COLOR="#CC3333">Level:</FONT></B>intermediate
<BR><FONT COLOR="#CC3333">Location:</FONT></B><A HREF="../../../src/ksp/ksp/interface/iterativ.c.html#KSPGetConvergedReason">src/ksp/ksp/interface/iterativ.c</A>
<BR><A HREF="./index.html">Index of all KSP routines</A>
<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
<BR><A HREF="../singleindex.html">Index of all manual pages</A>
<P><H3><FONT COLOR="#CC3333">Examples</FONT></H3>
<A HREF="../../../src/ksp/pc/examples/tutorials/ex1.c.html">src/ksp/pc/examples/tutorials/ex1.c.html</A><BR>
<A HREF="../../../src/ksp/pc/examples/tutorials/ex2.c.html">src/ksp/pc/examples/tutorials/ex2.c.html</A><BR>
<A HREF="../../../src/ksp/ksp/examples/tutorials/ex10.c.html">src/ksp/ksp/examples/tutorials/ex10.c.html</A><BR>
</BODY></HTML>
|