File: ksp.html

package info (click to toggle)
petsc 3.4.2.dfsg1-8.1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 129,104 kB
  • ctags: 516,422
  • sloc: ansic: 395,939; cpp: 47,201; python: 34,788; makefile: 17,193; fortran: 16,251; f90: 1,592; objc: 954; sh: 822; xml: 621; java: 381; lisp: 293; csh: 241
file content (288 lines) | stat: -rw-r--r-- 15,652 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
<html>
<title>KSP</title><body bgcolor="FFFFFF">
   <div id="version" align=right><b>petsc-3.4.2 2013-07-02</b></div>
<h2>KSP</h2>
<menu>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex1.c.html"><CONCEPT>solving a system of linear equations</CONCEPT></A>
<menu>
Solves a tridiagonal linear system with KSP.<BR></menu>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex12.c.html"><CONCEPT>solving a system of linear equations</CONCEPT></A>
<menu>
Solves a linear system in parallel with KSP.<BR>Input parameters include:<BR>
  -m &lt;mesh_x&gt;       : number of mesh points in x-direction<BR>
  -n &lt;mesh_n&gt;       : number of mesh points in y-direction<BR>
</menu>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex1f.F.html"><CONCEPT>solving a system of linear equations</CONCEPT></A>
<menu>
<BR>
   Description: Solves a tridiagonal linear system with KSP.<BR>
<BR>
</menu>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex29.c.html"><CONCEPT>solving a system of linear equations</CONCEPT></A>
<menu>
Solves 2D inhomogeneous Laplacian using multigrid.<BR></menu>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex31.c.html"><CONCEPT>solving a system of linear equations</CONCEPT></A>
<menu>
Solves 2D compressible Euler using multigrid.<BR></menu>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex32.c.html"><CONCEPT>solving a system of linear equations</CONCEPT></A>
<menu>
Solves 2D inhomogeneous Laplacian using multigrid.<BR></menu>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex34.c.html"><CONCEPT>solving a system of linear equations</CONCEPT></A>
<menu>
Solves 3D Laplacian using multigrid.<BR></menu>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex54f.F.html"><CONCEPT>solving a system of linear equations</CONCEPT></A>
<menu>
<BR>
   Description: Solve Ax=b.  A comes from an anisotropic 2D thermal problem with Q1 FEM on domain (-1,1)^2.<BR>
       Material conductivity given by tensor:<BR>
<BR>
       D = | 1 0       |<BR>
           | 0 epsilon |<BR>
<BR>
    rotated by angle 'theta' (-theta &lt;90&gt; in degrees) with anisotropic parameter 'epsilon' (-epsilon &lt;0.0&gt;).<BR>
    Blob right hand side centered at C (-blob_center C(1),C(2) &lt;0,0&gt;)<BR>
    Dirichlet BCs on y=-1 face.<BR>
<BR>
    -out_matlab will generate binary files for A,x,b and a ex54f.m file that reads them and plots them in matlab.<BR>
<BR>
    User can change anisotropic shape with function ex54_psi().  Negative theta will switch to a circular anisotropy.<BR>
<BR>
</menu>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex58.c.html"><CONCEPT>solving a system of linear equations</CONCEPT></A>
<menu>
Solves a tridiagonal linear system with KSP.<BR></menu>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex18.c.html"><CONCEPT>basic parallel example;</CONCEPT></A>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex2.c.html"><CONCEPT>basic parallel example;</CONCEPT></A>
<menu>
Solves a linear system in parallel with KSP.<BR>Input parameters include:<BR>
  -random_exact_sol : use a random exact solution vector<BR>
  -view_exact_sol   : write exact solution vector to stdout<BR>
  -m &lt;mesh_x&gt;       : number of mesh points in x-direction<BR>
  -n &lt;mesh_n&gt;       : number of mesh points in y-direction<BR>
</menu>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex23.c.html"><CONCEPT>basic parallel example;</CONCEPT></A>
<menu>
Solves a tridiagonal linear system.<BR></menu>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex46.c.html"><CONCEPT>basic parallel example;</CONCEPT></A>
<menu>
Solves a linear system in parallel with KSP and DM.<BR>Compare this to ex2 which solves the same problem without a DM.<BR>
</menu>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex12.c.html"><CONCEPT>Laplacian, 2d</CONCEPT></A>
<menu>
Solves a linear system in parallel with KSP.<BR>Input parameters include:<BR>
  -m &lt;mesh_x&gt;       : number of mesh points in x-direction<BR>
  -n &lt;mesh_n&gt;       : number of mesh points in y-direction<BR>
</menu>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex13.c.html"><CONCEPT>Laplacian, 2d</CONCEPT></A>
<menu>
Solves a variable Poisson problem with KSP.<BR></menu>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex13f90.F.html"><CONCEPT>Laplacian, 2d</CONCEPT></A>
<menu>
<BR>
<BR>
</menu>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex16.c.html"><CONCEPT>Laplacian, 2d</CONCEPT></A>
<menu>
Solves a sequence of linear systems with different right-hand-side vectors.<BR>Input parameters include:<BR>
  -ntimes &lt;ntimes&gt;  : number of linear systems to solve<BR>
  -view_exact_sol   : write exact solution vector to stdout<BR>
  -m &lt;mesh_x&gt;       : number of mesh points in x-direction<BR>
  -n &lt;mesh_n&gt;       : number of mesh points in y-direction<BR>
</menu>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex18.c.html"><CONCEPT>Laplacian, 2d</CONCEPT></A>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex2.c.html"><CONCEPT>Laplacian, 2d</CONCEPT></A>
<menu>
Solves a linear system in parallel with KSP.<BR>Input parameters include:<BR>
  -random_exact_sol : use a random exact solution vector<BR>
  -view_exact_sol   : write exact solution vector to stdout<BR>
  -m &lt;mesh_x&gt;       : number of mesh points in x-direction<BR>
  -n &lt;mesh_n&gt;       : number of mesh points in y-direction<BR>
</menu>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex29.c.html"><CONCEPT>Laplacian, 2d</CONCEPT></A>
<menu>
Solves 2D inhomogeneous Laplacian using multigrid.<BR></menu>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex32.c.html"><CONCEPT>Laplacian, 2d</CONCEPT></A>
<menu>
Solves 2D inhomogeneous Laplacian using multigrid.<BR></menu>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex46.c.html"><CONCEPT>Laplacian, 2d</CONCEPT></A>
<menu>
Solves a linear system in parallel with KSP and DM.<BR>Compare this to ex2 which solves the same problem without a DM.<BR>
</menu>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex15.c.html"><CONCEPT>basic parallel example</CONCEPT></A>
<menu>
Solves a linear system in parallel with KSP.  Also<BR>illustrates setting a user-defined shell preconditioner and using the<BR>
macro __FUNCT__ to define routine names for use in error handling.<BR>
Input parameters include:<BR>
  -user_defined_pc : Activate a user-defined preconditioner<BR>
</menu>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex15f.F.html"><CONCEPT>basic parallel example</CONCEPT></A>
<menu>
<BR>
   Solves a linear system in parallel with KSP.  Also indicates<BR>
   use of a user-provided preconditioner.  Input parameters include:<BR>
      -user_defined_pc : Activate a user-defined preconditioner<BR>
<BR>
<BR>
</menu>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex21f.F.html"><CONCEPT>basic parallel example</CONCEPT></A>
<menu>
<BR>
   Solves a linear system in parallel with KSP.  Also indicates<BR>
   use of a user-provided preconditioner.  Input parameters include:<BR>
<BR>
<BR>
</menu>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex2f.F.html"><CONCEPT>basic parallel example</CONCEPT></A>
<menu>
<BR>
  Description: Solves a linear system in parallel with KSP (Fortran code).<BR>
               Also shows how to set a user-defined monitoring routine.<BR>
<BR>
<BR>
</menu>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex3.c.html"><CONCEPT>basic parallel example</CONCEPT></A>
<menu>
Bilinear elements on the unit square for Laplacian.  To test the parallel<BR>matrix assembly, the matrix is intentionally laid out across processors<BR>
differently from the way it is assembled.  Input arguments are:<BR>
  -m &lt;size&gt; : problem size<BR>
</menu>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex16.c.html"><CONCEPT>repeatedly solving linear systems;</CONCEPT></A>
<menu>
Solves a sequence of linear systems with different right-hand-side vectors.<BR>Input parameters include:<BR>
  -ntimes &lt;ntimes&gt;  : number of linear systems to solve<BR>
  -view_exact_sol   : write exact solution vector to stdout<BR>
  -m &lt;mesh_x&gt;       : number of mesh points in x-direction<BR>
  -n &lt;mesh_n&gt;       : number of mesh points in y-direction<BR>
</menu>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex5.c.html"><CONCEPT>repeatedly solving linear systems;</CONCEPT></A>
<menu>
Solves two linear systems in parallel with KSP.  The code<BR>illustrates repeated solution of linear systems with the same preconditioner<BR>
method but different matrices (having the same nonzero structure).  The code<BR>
also uses multiple profiling stages.  Input arguments are<BR>
  -m &lt;size&gt; : problem size<BR>
  -mat_nonsym : use nonsymmetric matrix (default is symmetric)<BR>
</menu>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex6f.F.html"><CONCEPT>repeatedly solving linear systems;</CONCEPT></A>
<menu>
<BR>
  Description: This example demonstrates repeated linear solves as<BR>
  well as the use of different preconditioner and linear system<BR>
  matrices.  This example also illustrates how to save PETSc objects<BR>
  in common blocks.<BR>
<BR>
</menu>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex9.c.html"><CONCEPT>repeatedly solving linear systems;</CONCEPT></A>
<menu>
The solution of 2 different linear systems with different linear solvers.<BR>Also, this example illustrates the repeated<BR>
solution of linear systems, while reusing matrix, vector, and solver data<BR>
structures throughout the process.  Note the various stages of event logging.<BR>
</menu>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex7.c.html"><CONCEPT>customizing the block Jacobi preconditioner</CONCEPT></A>
<menu>
Block Jacobi preconditioner for solving a linear system in parallel with KSP.<BR>The code indicates the<BR>
procedures for setting the particular block sizes and for using different<BR>
linear solvers on the individual blocks.<BR>
</menu>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex8.c.html"><CONCEPT>Additive Schwarz Method (ASM) with user-defined subdomains</CONCEPT></A>
<menu>
Illustrates use of the preconditioner ASM.<BR>The Additive Schwarz Method for solving a linear system in parallel with KSP.  The<BR>
code indicates the procedure for setting user-defined subdomains.  Input<BR>
parameters include:<BR>
  -user_set_subdomain_solvers:  User explicitly sets subdomain solvers<BR>
  -user_set_subdomains:  Activate user-defined subdomains<BR>
</menu>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex8g.c.html"><CONCEPT>Additive Schwarz Method (GASM) with user-defined subdomains</CONCEPT></A>
<menu>
Illustrates use of the preconditioner GASM.<BR>The Additive Schwarz Method for solving a linear system in parallel with KSP.  The<BR>
code indicates the procedure for setting user-defined subdomains.  Input<BR>
parameters include:<BR>
  -M:                           Number of mesh points in the x direction<BR>
  -N:                           Number of mesh points in the y direction<BR>
  -user_set_subdomain_solvers:  User explicitly sets subdomain solvers<BR>
  -user_set_subdomains:         Use the user-provided subdomain partitioning routine<BR>
With -user_set_subdomains on, the following options are meaningful:<BR>
  -Mdomains:                    Number of subdomains in the x direction <BR>
  -Ndomains:                    Number of subdomains in the y direction <BR>
  -overlap:                     Size of domain overlap in terms of the number of mesh lines in x and y<BR>
General useful options:<BR>
  -pc_gasm_print_subdomains:    Print the index sets defining the subdomains<BR>
<BR>
</menu>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex10.c.html"><CONCEPT>solving a linear system</CONCEPT></A>
<menu>
Reads a PETSc matrix and vector from a file and solves a linear system.<BR>This version first preloads and solves a small system, then loads <BR>
another (larger) system and solves it as well.  This example illustrates<BR>
preloading of instructions with the smaller system so that more accurate<BR>
performance monitoring can be done with the larger one (that actually<BR>
is the system of interest).  See the 'Performance Hints' chapter of the<BR>
users manual for a discussion of preloading.  Input parameters include<BR>
  -f0 &lt;input_file&gt; : first file to load (small system)<BR>
  -f1 &lt;input_file&gt; : second file to load (larger system)<BR>
  -trans  : solve transpose system instead<BR>
</menu>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex27.c.html"><CONCEPT>solving a linear system</CONCEPT></A>
<menu>
Reads a PETSc matrix and vector from a file and solves the normal equations.<BR></menu>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex41.c.html"><CONCEPT>solving a linear system</CONCEPT></A>
<menu>
Reads a PETSc matrix and vector from a socket connection,  solves a linear system and sends the result back.<BR></menu>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex11.c.html"><CONCEPT>solving a Helmholtz equation</CONCEPT></A>
<menu>
Solves a linear system in parallel with KSP.<BR></menu>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex11f.F.html"><CONCEPT>solving a Helmholtz equation</CONCEPT></A>
<menu>
<BR>
  Description: Solves a complex linear system in parallel with KSP (Fortran code).<BR>
<BR>
</menu>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex13.c.html"><CONCEPT>basic sequential example</CONCEPT></A>
<menu>
Solves a variable Poisson problem with KSP.<BR></menu>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex13f90.F.html"><CONCEPT>basic sequential example</CONCEPT></A>
<menu>
<BR>
<BR>
</menu>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex31.c.html"><CONCEPT>semi-implicit</CONCEPT></A>
<menu>
Solves 2D compressible Euler using multigrid.<BR></menu>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex34.c.html"><CONCEPT>Laplacian, 3d</CONCEPT></A>
<menu>
Solves 3D Laplacian using multigrid.<BR></menu>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex2f.F.html"><CONCEPT>setting a user-defined monitoring routine</CONCEPT></A>
<menu>
<BR>
  Description: Solves a linear system in parallel with KSP (Fortran code).<BR>
               Also shows how to set a user-defined monitoring routine.<BR>
<BR>
<BR>
</menu>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex6f.F.html"><CONCEPT>different matrices for linear system and preconditioner;</CONCEPT></A>
<menu>
<BR>
  Description: This example demonstrates repeated linear solves as<BR>
  well as the use of different preconditioner and linear system<BR>
  matrices.  This example also illustrates how to save PETSc objects<BR>
  in common blocks.<BR>
<BR>
</menu>
<LI><A HREF="../../../src/ksp/ksp/examples/tutorials/ex14f.F.html"><CONCEPT>writing a user-defined nonlinear solver</CONCEPT></A>
<menu>
<BR>
<BR>
  Solves a nonlinear system in parallel with a user-defined<BR>
  Newton method that uses KSP to solve the linearized Newton sytems.  This solver<BR>
  is a very simplistic inexact Newton method.  The intent of this code is to<BR>
  demonstrate the repeated solution of linear sytems with the same nonzero pattern.<BR>
<BR>
  This is NOT the recommended approach for solving nonlinear problems with PETSc!<BR>
  We urge users to employ the SNES component for solving nonlinear problems whenever<BR>
  possible, as it offers many advantages over coding nonlinear solvers independently.<BR>
<BR>
  We solve the  Bratu (SFI - solid fuel ignition) problem in a 2D rectangular<BR>
  domain, using distributed arrays (DMDAs) to partition the parallel grid.<BR>
<BR>
</menu>
</menu>
</body>
</html>