-
Notifications
You must be signed in to change notification settings - Fork 3
/
ReadMe
322 lines (236 loc) · 9.69 KB
/
ReadMe
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
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
This directory contains source code for the NITSOL package, some
auxiliary software, and several example applications.
Building NITSOL
If you are the impatient type and just want to get on with it, just
type
make
to build the package and several example codes. If you want to find
out more about the make options, type
make help
NITSOL Documentation
Currently documentation for using NITSOL may be found in comments at
the beginning of each source code file. See in particular the
comments in nitsol.f. A more extensive user guide is planned.
Source code Directories:
Nitsol - source code for the NITSOL package:
nitbd.f nitbt.f nitdrv.f nitgm.f
nitjv.f nitsol.f nitstb.f nittfq.f
In addition, several header files contain global declarations and
definitions:
nitdflts.h nitinfo.h nitparam.h nitprint.h
Lapack - source code for LAPACK routines needed by NITSOL:
dlaic1.f dlamch.f
This subset of LAPACK is provided just for convenience. We recommend
that you link to a local installation of the library archive. This
may be done by modifying the Makefile in this directory to change the
definition of the LAPACK macro. Depending on the local installation,
you might be able to link with the local installation of LAPACK by
setting
LAPACK = -llapack
in the Makefile. At some installations the LAPACK library archive may
be in a directory that is not among the default search paths, or the
name of the library archive may not conform to the usual UNIX archive
naming convention. Consult your local system administrator for the
appropriate information.
Blas - source code for BLAS routines needed by NITSOL:
daxpy.f dcopy.f ddot.f dnrm2.f dscal.f dswap.f
This subset of BLAS is provided just for convenience. We recommend
that you link to a local installation of the library archive. This
may be done by modifying the Makefile in this directory to change the
definition of the BLAS macro. Depending on the local installation,
you might be able to link with the local installation of LAPACK by
setting
BLAS = -lblas
in the Makefile. At some installations the BLAS library archive may
be in a location that is not among the default search paths, or the
name of the library archive may not conform to the usual UNIX archive
naming convention. Consult your local system administrator for the
appropriate information.
If you are successful in linking to a local installation of LAPACK
and/or BLAS, remember to remove the dependencies on lapack_lib and/or
blas_lib from the Makefile to avoid unnecessary recompilations.
Application directories:
Several sample applications are provided to illustrate the use of
NITSOL and to check the installation. Each is in its own directory:
Bratu - generalized Bratu problem
Cavity - flow in driven cavity problem (OLD driver)
Pormed - flow in porous media (steady-state version)
To build: The applications each have a specific target name:
Bratu - bratu
Cavity - cavity
Pormed - pormed
To build an application, merely type "make <application>". The
Makefile will automatically check whether the NITSOL library should be
built, then compiles the files needed for the requested application.
Checking the installation:
The following output from the three sample applications is provided to
facilitate checking the installation. The output was obtained on an
SGI Indy equipped with an R4600 microprocessor. (In the following "%"
is the generic UNIX command prompt).
% bratu
Type problem parameters nx, d, lambda:
63 32. 8.
Type ikrysl, irpre (0-1), and ijacv (0-1):
-------------------------------------------------------------
ikrysl = 0 => GMRES
1 => BiCGSTAB
2 => TFQMR
irpre = 0 => no right preconditioning
1 => right preconditioning
ijacv = 0 => finite-difference J*v
1 => analytic J*v
-------------------------------------------------------------
0 1 1
Type maximum Krylov subspace dimension:
50
Choice of forcing term:
0
Type iplvl (informational printout level), and ipunit (printout unit):
iplvl = 0 => no printout,
= 1 => iteration number and F-norm,
= 2 => ... + stats, step-norm, lin model norm,
= 3 => ... + some Krylov method and backtrack info.
= 4 => ... + more Krylov method and backtrack info.
1 6
Solve generalized Bratu problem using Newton-GMRES
GMRES restart value: 50
Use Choice 1 for forcing term
Preconditioner is a fast Poisson solver
Use analytic J*v evaluations
Problem parameters:
nx: 63 n: 3969 d: 3.20E+01 lambda:8.00E+00
ftol: 1.23E-07 stptol: 1.00E-06
Initial f-norm: 1.230E-01
nitdrv: Beginning nonlinear iterations.
It. no. 0 F norm = 1.230D-01
It. no. 1 F norm = 5.187D-02
It. no. 2 F norm = 1.663D-02
It. no. 3 F norm = 2.054D-03
It. no. 4 F norm = 7.175D-08
nitdrv: Terminating nonlinear iterations.
Termination flag iterm: 0
Final f-norm: 7.175E-08
No. function evaluations: 5
No. J*v evaluations: 41
No. P(inverse)*v evaluations: 45
No. linear iterations: 41
No. nonlinear iterations: 4
No. backtracks: 0
To go, type 0; to stop, type 1:
1
% cavity
Type problem parameters nx, Re (Reynold's number):
63 1000
Type ikrysl, irpre (0-1), and ijacv (0-1):
-------------------------------------------------------------
ikrysl = 0 => GMRES
1 => BiCGSTAB
2 => TFQMR
irpre = 0 => no right preconditioning
1 => right preconditioning
-------------------------------------------------------------
0 1
Type kdmax = maximum Krylov subspace dimension:
200
Type ifdord = order of finite-difference formula:
1
Type iplvl (informational printout level), and ipunit (printout unit):
iplvl = 0 => no printout,
= 1 => iteration number and F-norm,
= 2 => ... + stats, step-norm, lin model norm,
= 3 => ... + some Krylov method and backtrack info.
= 4 => ... + more Krylov method and backtrack info.
1 6
Solve driven cavity problem using Newton-GMRES
Preconditioner is biharmonic solver with Cholesky decomposition.
Use 1-th order finite differences for Jacobian
Problem parameters:
nx: 63 n: 3969 Reynolds number: 1000.0
ftol: 1.000E-08 stptol: 1.016E-07
Initial f-norm: 1.016E+00
nitdrv: Beginning nonlinear iterations.
It. no. 0 F norm = 1.016D+00
It. no. 1 F norm = 2.935D-01
It. no. 2 F norm = 2.220D-01
It. no. 3 F norm = 1.137D-01
It. no. 4 F norm = 7.950D-02
It. no. 5 F norm = 5.423D-02
It. no. 6 F norm = 4.517D-02
It. no. 7 F norm = 3.720D-02
It. no. 8 F norm = 3.006D-02
It. no. 9 F norm = 2.633D-02
It. no. 10 F norm = 1.652D-02
It. no. 11 F norm = 9.931D-03
It. no. 12 F norm = 4.218D-03
It. no. 13 F norm = 9.233D-04
It. no. 14 F norm = 8.741D-06
It. no. 15 F norm = 7.314D-08
nitdrv: Terminating nonlinear iterations.
Termination flag iterm: 0
Final f-norm: 7.314E-08
No. function evaluations: 296
No. J*v evaluations: 277
No. P(inverse)*v evaluations: 292
No. linear iterations: 277
No. nonlinear iterations: 15
No. backtracks: 3
To go, type 0; to stop, type 1:
1
% pormed
Type problem parameters nx, d, bll, bur, src:
63 -50. 1. 0. 50.
Type ikrysl, irpre (0-1), and ijacv (0-1):
-------------------------------------------------------------
ikrysl = 0 => GMRES
1 => BiCGSTAB
2 => TFQMR
irpre = 0 => no right preconditioning
1 => right preconditioning
ijacv = 0 => finite-difference J*v
1 => analytic J*v
-------------------------------------------------------------
2 1 0
Type tol and fill for incomplete factorization:
0.0 4
Type ifdord = order of finite-difference formula:
1
Choice of forcing term:
1
Type iplvl (informational printout level), and ipunit (printout unit):
iplvl = 0 => no printout,
= 1 => iteration number and F-norm,
= 2 => ... + stats, step-norm, lin model norm,
= 3 => ... + some Krylov method and backtrack info.
= 4 => ... + more Krylov method and backtrack info.
1 6
Solve flow in porous media problem using Newton-TFQMR
Use Choice 2 for forcing term
alpha = 2.00E+00 gamma = 1.00E+00
Preconditioner is ILUT(0.00, 4)
Use 1-th order finite differences for Jacobian
Problem parameters:
nx: 63 n: 3969 d:-5.00E+01 bll:1.000E+00 bur:0.000E+00 src:5.00E+01
ftol: 4.18E-06 stptol: 1.00E-06
Initial f-norm: 4.178E+00
nitdrv: Beginning nonlinear iterations.
It. no. 0 F norm = 4.178D+00
It. no. 1 F norm = 1.118D+00
It. no. 2 F norm = 9.369D-01
It. no. 3 F norm = 4.527D-01
It. no. 4 F norm = 3.072D-01
It. no. 5 F norm = 1.981D-01
It. no. 6 F norm = 3.820D-02
It. no. 7 F norm = 1.087D-02
It. no. 8 F norm = 7.204D-04
It. no. 9 F norm = 3.335D-07
nitdrv: Terminating nonlinear iterations.
Termination flag iterm: 0
Final f-norm: 3.335E-07
No. function evaluations: 59
No. J*v evaluations: 47
No. P(inverse)*v evaluations: 38
No. linear iterations: 19
No. nonlinear iterations: 9
No. backtracks: 2
To go, type 0; to stop, type 1:
1