File: KSPSetFromOptions.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 (100 lines) | stat: -rw-r--r-- 6,055 bytes parent folder | download
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="DOCTEXT">
<TITLE>KSPSetFromOptions</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
<A NAME="KSPSetFromOptions"><H1>KSPSetFromOptions</H1></A>
Sets <A HREF="../KSP/KSP.html#KSP">KSP</A> options from the options database. This routine must be called before <A HREF="../KSP/KSPSetUp.html#KSPSetUp">KSPSetUp</A>() if the user is to be  allowed to set the Krylov type.  
<H3><FONT COLOR="#CC3333">Synopsis</FONT></H3>
<PRE>
#include "petscksp.h" 
PetscErrorCode PETSCKSP_DLLEXPORT KSPSetFromOptions(KSP ksp)
</PRE>
Collective on <A HREF="../KSP/KSP.html#KSP">KSP</A>
<P>
<H3><FONT COLOR="#CC3333">Input Parameters</FONT></H3>
<DT><B>ksp </B> -the Krylov space context
<br>
<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_max_it </B></TD><TD>- maximum number of linear iterations
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-ksp_rtol rtol </B></TD><TD>- relative tolerance used in default determination of convergence, i.e.
if residual norm decreases by this factor than convergence is declared
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-ksp_atol abstol </B></TD><TD>- absolute tolerance used in default convergence test, i.e. if residual 
norm is less than this then convergence is declared
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-ksp_divtol tol </B></TD><TD>- if residual norm increases by this factor than divergence is declared
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-ksp_converged_use_initial_residual_norm </B></TD><TD>- see <A HREF="../KSP/KSPDefaultConvergedSetUIRNorm.html#KSPDefaultConvergedSetUIRNorm">KSPDefaultConvergedSetUIRNorm</A>()
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-ksp_converged_use_min_initial_residual_norm </B></TD><TD>- see <A HREF="../KSP/KSPDefaultConvergedSetUMIRNorm.html#KSPDefaultConvergedSetUMIRNorm">KSPDefaultConvergedSetUMIRNorm</A>()
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-ksp_norm_type </B></TD><TD>- none - skip norms used in convergence tests (useful only when not using 
</TD></TR>
<pre>
                      convergence test (say you always want to run with 5 iterations) to 
</pre>
<pre>
                      save on communication overhead
</pre>
<pre>
                   preconditioned - default for left preconditioning 
</pre>
<pre>
                   unpreconditioned - see <A HREF="../KSP/KSPSetNormType.html#KSPSetNormType">KSPSetNormType</A>()
</pre>
<pre>
                   natural - see <A HREF="../KSP/KSPSetNormType.html#KSPSetNormType">KSPSetNormType</A>()
</pre>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-ksp_constant_null_space </B></TD><TD>- assume the operator (matrix) has the constant vector in its null space
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-ksp_test_null_space </B></TD><TD>- tests the null space set with <A HREF="../KSP/KSPSetNullSpace.html#KSPSetNullSpace">KSPSetNullSpace</A>() to see if it truly is a null space
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-ksp_knoll </B></TD><TD>- compute initial guess by applying the preconditioner to the right hand side
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-ksp_cancelmonitors </B></TD><TD>- cancel all previous convergene monitor routines set
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-ksp_monitor &lt;optional filename&gt; </B></TD><TD>- print residual norm at each iteration
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-ksp_xmonitor </B></TD><TD>- plot residual norm at each iteration
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-ksp_vecmonitor </B></TD><TD>- plot solution at each iteration
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-ksp_singmonitor </B></TD><TD>- monitor extremem singular values at each iteration
</TD></TR></TABLE>
<P>
<H3><FONT COLOR="#CC3333">Notes</FONT></H3>
To see all options, run your program with the -help option
or consult the users manual.
<P>

<P>
<H3><FONT COLOR="#CC3333">Keywords</FONT></H3>
 <A HREF="../KSP/KSP.html#KSP">KSP</A>, set, from, options, database
<BR>
<P>
<H3><FONT COLOR="#CC3333">See Also</FONT></H3>
 
<BR><P><B><P><B><FONT COLOR="#CC3333">Level:</FONT></B>beginner
<BR><FONT COLOR="#CC3333">Location:</FONT></B><A HREF="../../../src/ksp/ksp/interface/itcl.c.html#KSPSetFromOptions">src/ksp/ksp/interface/itcl.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/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/ex3.c.html">src/ksp/ksp/examples/tutorials/ex3.c.html</A><BR>
<A HREF="../../../src/ksp/ksp/examples/tutorials/ex4.c.html">src/ksp/ksp/examples/tutorials/ex4.c.html</A><BR>
<A HREF="../../../src/ksp/ksp/examples/tutorials/ex5.c.html">src/ksp/ksp/examples/tutorials/ex5.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/ex9.c.html">src/ksp/ksp/examples/tutorials/ex9.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>