File: KSPSolve.html

package info (click to toggle)
petsc 2.2.0-4
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 64,404 kB
  • ctags: 284,528
  • sloc: ansic: 223,999; python: 11,758; makefile: 7,707; fortran: 6,327; cpp: 4,104; sh: 3,387; csh: 41; asm: 6
file content (81 lines) | stat: -rw-r--r-- 5,387 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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="DOCTEXT">
<TITLE>KSPSolve</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
<A NAME="KSPSolve"><H1>KSPSolve</H1></A>
Solves linear system. 
<H3><FONT COLOR="#CC3333">Synopsis</FONT></H3>
<PRE>
#include "petscksp.h" 
int KSPSolve(KSP ksp) 
</PRE>
Collective on <A HREF="../KSP/KSP.html#KSP">KSP</A>
<P>
<H3><FONT COLOR="#CC3333">Parameter</FONT></H3>
<DT><B>ksp </B> -iterative context obtained from <A HREF="../KSP/KSPCreate.html#KSPCreate">KSPCreate</A>()
<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_compute_eigenvalues </B></TD><TD>- compute preconditioned operators eigenvalues
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-ksp_plot_eigenvalues </B></TD><TD>- plot the computed eigenvalues in an X-window
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-ksp_compute_eigenvalues_explicitly </B></TD><TD>- compute the eigenvalues by forming the 
dense operator and useing LAPACK
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-ksp_plot_eigenvalues_explicitly </B></TD><TD>- plot the explicitly computing eigenvalues
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-ksp_view_binary </B></TD><TD>- save matrix and right hand side that define linear system to the 
default binary viewer (can be
read later with src/ksp/examples/tutorials/ex10.c for testing solvers)
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-ksp_view </B></TD><TD>- print the ksp data structure at the end of the system solution
</TD></TR></TABLE>
<P>
<H3><FONT COLOR="#CC3333">Notes</FONT></H3>
<P>
The input and output are set with <A HREF="../KSP/KSPSetRhs.html#KSPSetRhs">KSPSetRhs</A>() and <A HREF="../KSP/KSPSetSolution.html#KSPSetSolution">KSPSetSolution</A>().
The operator is specified with <A HREF="../PC/PCSetOperators.html#PCSetOperators">PCSetOperators</A>().
<P>
Call <A HREF="../KSP/KSPGetConvergedReason.html#KSPGetConvergedReason">KSPGetConvergedReason</A>() to determine if the solver converged or failed and
why. The number of iterations can be obtained from <A HREF="../KSP/KSPGetIterationNumber.html#KSPGetIterationNumber">KSPGetIterationNumber</A>().
<P>
If using a direct method (e.g., via the <A HREF="../KSP/KSP.html#KSP">KSP</A> solver
KSPPREONLY and a preconditioner such as <A HREF="../PC/PCLU.html#PCLU">PCLU</A>/<A HREF="../PC/PCILU.html#PCILU">PCILU</A>),
then its=1.  See <A HREF="../KSP/KSPSetTolerances.html#KSPSetTolerances">KSPSetTolerances</A>() and <A HREF="../KSP/KSPDefaultConverged.html#KSPDefaultConverged">KSPDefaultConverged</A>()
for more details.
<P>
<H3><FONT COLOR="#CC3333">Understanding Convergence</FONT></H3>
The routines <A HREF="../KSP/KSPSetMonitor.html#KSPSetMonitor">KSPSetMonitor</A>(), <A HREF="../KSP/KSPComputeEigenvalues.html#KSPComputeEigenvalues">KSPComputeEigenvalues</A>(), and
<A HREF="../KSP/KSPComputeEigenvaluesExplicitly.html#KSPComputeEigenvaluesExplicitly">KSPComputeEigenvaluesExplicitly</A>() provide information on additional
options to monitor convergence and print eigenvalue information.
<P>

<P>
<H3><FONT COLOR="#CC3333">Keywords</FONT></H3>
 <A HREF="../KSP/KSP.html#KSP">KSP</A>, solve, linear system
<BR>
<P>
<H3><FONT COLOR="#CC3333">See Also</FONT></H3>
 <A HREF="../KSP/KSPCreate.html#KSPCreate">KSPCreate</A>(), <A HREF="../KSP/KSPSetUp.html#KSPSetUp">KSPSetUp</A>(), <A HREF="../KSP/KSPDestroy.html#KSPDestroy">KSPDestroy</A>(), <A HREF="../KSP/KSPSetTolerances.html#KSPSetTolerances">KSPSetTolerances</A>(), <A HREF="../KSP/KSPDefaultConverged.html#KSPDefaultConverged">KSPDefaultConverged</A>(),
<BR><A HREF="../KSP/KSPSolveTranspose.html#KSPSolveTranspose">KSPSolveTranspose</A>(), <A HREF="../KSP/KSPGetIterationNumber.html#KSPGetIterationNumber">KSPGetIterationNumber</A>()
<P><B><P><B><FONT COLOR="#CC3333">Level:</FONT></B>beginner
<BR><FONT COLOR="#CC3333">Location:</FONT></B><A HREF="../../../src/ksp/ksp/interface/itfunc.c.html#KSPSolve">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>
<A HREF="../../../src/mat/examples/tutorials/ex3.c.html">src/mat/examples/tutorials/ex3.c.html</A><BR>
<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/examples/tutorials/ex1.c.html">src/ksp/examples/tutorials/ex1.c.html</A><BR>
<A HREF="../../../src/ksp/examples/tutorials/ex2.c.html">src/ksp/examples/tutorials/ex2.c.html</A><BR>
<A HREF="../../../src/ksp/examples/tutorials/ex3.c.html">src/ksp/examples/tutorials/ex3.c.html</A><BR>
<A HREF="../../../src/ksp/examples/tutorials/ex4.c.html">src/ksp/examples/tutorials/ex4.c.html</A><BR>
<A HREF="../../../src/ksp/examples/tutorials/ex5.c.html">src/ksp/examples/tutorials/ex5.c.html</A><BR>
<A HREF="../../../src/ksp/examples/tutorials/ex7.c.html">src/ksp/examples/tutorials/ex7.c.html</A><BR>
<A HREF="../../../src/ksp/examples/tutorials/ex8.c.html">src/ksp/examples/tutorials/ex8.c.html</A><BR>
</BODY></HTML>