File: KSPSetTolerances.html

package info (click to toggle)
petsc 2.3.2-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 77,732 kB
  • ctags: 314,526
  • sloc: ansic: 254,277; python: 26,350; cpp: 18,257; fortran: 15,694; makefile: 11,000; sh: 3,638; xml: 620; csh: 211
file content (77 lines) | stat: -rw-r--r-- 4,886 bytes parent folder | download | duplicates (2)
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="DOCTEXT">
<TITLE>KSPSetTolerances</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
<A NAME="KSPSetTolerances"><H1>KSPSetTolerances</H1></A>
Sets the relative, absolute, divergence, and maximum iteration tolerances used by the default <A HREF="../KSP/KSP.html#KSP">KSP</A> convergence testers.  
<H3><FONT COLOR="#CC3333">Synopsis</FONT></H3>
<PRE>
#include "petscksp.h" 
PetscErrorCode PETSCKSP_DLLEXPORT KSPSetTolerances(KSP ksp,PetscReal rtol,PetscReal abstol,PetscReal dtol,PetscInt maxits)
</PRE>
Collective on <A HREF="../KSP/KSP.html#KSP">KSP</A>
<P>
<H3><FONT COLOR="#CC3333">Input Parameters</FONT></H3>
<TABLE border="0" cellpadding="0" cellspacing="0">
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ksp </B></TD><TD>- the Krylov subspace context
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>rtol </B></TD><TD>- the relative convergence tolerance
(relative decrease in the residual norm)
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>abstol </B></TD><TD>- the absolute convergence tolerance 
(absolute <A HREF="../Sys/size.html#size">size</A> of the residual norm)
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>dtol </B></TD><TD>- the divergence tolerance
(amount residual can increase before <A HREF="../KSP/KSPDefaultConverged.html#KSPDefaultConverged">KSPDefaultConverged</A>()
concludes that the method is diverging)
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>maxits </B></TD><TD>- maximum number of iterations to use
</TD></TR></TABLE>
<P>
<H3><FONT COLOR="#CC3333">Options Database Keys</FONT></H3>
<TABLE border="0" cellpadding="0" cellspacing="0">
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-ksp_atol &lt;abstol&gt; </B></TD><TD>- Sets abstol
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-ksp_rtol &lt;rtol&gt; </B></TD><TD>- Sets rtol
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-ksp_divtol &lt;dtol&gt; </B></TD><TD>- Sets dtol
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-ksp_max_it &lt;maxits&gt; </B></TD><TD>- Sets maxits
</TD></TR></TABLE>
<P>
<H3><FONT COLOR="#CC3333">Notes</FONT></H3>
Use <A HREF="../Sys/PETSC_DEFAULT.html#PETSC_DEFAULT">PETSC_DEFAULT</A> to retain the default value of any of the tolerances.
<P>
See <A HREF="../KSP/KSPDefaultConverged.html#KSPDefaultConverged">KSPDefaultConverged</A>() for details on the use of these parameters
in the default convergence test.  See also <A HREF="../KSP/KSPSetConvergenceTest.html#KSPSetConvergenceTest">KSPSetConvergenceTest</A>()
for setting user-defined stopping criteria.
<P>

<P>
<H3><FONT COLOR="#CC3333">Keywords</FONT></H3>
 <A HREF="../KSP/KSP.html#KSP">KSP</A>, set, tolerance, absolute, relative, divergence, 
<BR>convergence, maximum, iterations
<P>
<H3><FONT COLOR="#CC3333">See Also</FONT></H3>
 <A HREF="../KSP/KSPGetTolerances.html#KSPGetTolerances">KSPGetTolerances</A>(), <A HREF="../KSP/KSPDefaultConverged.html#KSPDefaultConverged">KSPDefaultConverged</A>(), <A HREF="../KSP/KSPSetConvergenceTest.html#KSPSetConvergenceTest">KSPSetConvergenceTest</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/itfunc.c.html#KSPSetTolerances">src/ksp/ksp/interface/itfunc.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/ksp/examples/tutorials/ex1.c.html">src/ksp/ksp/examples/tutorials/ex1.c.html</A><BR>
<A HREF="../../../src/ksp/ksp/examples/tutorials/ex2.c.html">src/ksp/ksp/examples/tutorials/ex2.c.html</A><BR>
<A HREF="../../../src/ksp/ksp/examples/tutorials/ex7.c.html">src/ksp/ksp/examples/tutorials/ex7.c.html</A><BR>
<A HREF="../../../src/ksp/ksp/examples/tutorials/ex8.c.html">src/ksp/ksp/examples/tutorials/ex8.c.html</A><BR>
<A HREF="../../../src/ksp/ksp/examples/tutorials/ex15.c.html">src/ksp/ksp/examples/tutorials/ex15.c.html</A><BR>
<A HREF="../../../src/ksp/ksp/examples/tutorials/ex23.c.html">src/ksp/ksp/examples/tutorials/ex23.c.html</A><BR>
<A HREF="../../../src/ksp/ksp/examples/tutorials/ex1f.F.html">src/ksp/ksp/examples/tutorials/ex1f.F.html</A><BR>
<A HREF="../../../src/ksp/ksp/examples/tutorials/ex2f.F.html">src/ksp/ksp/examples/tutorials/ex2f.F.html</A><BR>
<A HREF="../../../src/ksp/ksp/examples/tutorials/ex15f.F.html">src/ksp/ksp/examples/tutorials/ex15f.F.html</A><BR>
<A HREF="../../../src/ksp/ksp/examples/tutorials/ex21f.F.html">src/ksp/ksp/examples/tutorials/ex21f.F.html</A><BR>
<A HREF="../../../src/snes/examples/tutorials/ex1.c.html">src/snes/examples/tutorials/ex1.c.html</A><BR>
</BODY></HTML>