Mercurial > octave-nkf
comparison liboctave/SparseCmplxLU.cc @ 5893:d73ffe42f2c8
[project @ 2006-07-16 07:48:19 by jwe]
author | jwe |
---|---|
date | Sun, 16 Jul 2006 07:49:03 +0000 |
parents | 8d7162924bd3 |
children | 93c65f2a5668 |
comparison
equal
deleted
inserted
replaced
5892:13aa80fc7839 | 5893:d73ffe42f2c8 |
---|---|
50 // Setup the control parameters | 50 // Setup the control parameters |
51 Matrix Control (UMFPACK_CONTROL, 1); | 51 Matrix Control (UMFPACK_CONTROL, 1); |
52 double *control = Control.fortran_vec (); | 52 double *control = Control.fortran_vec (); |
53 UMFPACK_ZNAME (defaults) (control); | 53 UMFPACK_ZNAME (defaults) (control); |
54 | 54 |
55 double tmp = Voctave_sparse_controls.get_key ("spumoni"); | 55 double tmp = octave_sparse_params::get_key ("spumoni"); |
56 if (!xisnan (tmp)) | 56 if (!xisnan (tmp)) |
57 Control (UMFPACK_PRL) = tmp; | 57 Control (UMFPACK_PRL) = tmp; |
58 if (piv_thres >= 0.) | 58 if (piv_thres >= 0.) |
59 { | 59 { |
60 piv_thres = (piv_thres > 1. ? 1. : piv_thres); | 60 piv_thres = (piv_thres > 1. ? 1. : piv_thres); |
61 Control (UMFPACK_SYM_PIVOT_TOLERANCE) = piv_thres; | 61 Control (UMFPACK_SYM_PIVOT_TOLERANCE) = piv_thres; |
62 Control (UMFPACK_PIVOT_TOLERANCE) = piv_thres; | 62 Control (UMFPACK_PIVOT_TOLERANCE) = piv_thres; |
63 } | 63 } |
64 else | 64 else |
65 { | 65 { |
66 tmp = Voctave_sparse_controls.get_key ("piv_tol"); | 66 tmp = octave_sparse_params::get_key ("piv_tol"); |
67 if (!xisnan (tmp)) | 67 if (!xisnan (tmp)) |
68 { | 68 { |
69 Control (UMFPACK_SYM_PIVOT_TOLERANCE) = tmp; | 69 Control (UMFPACK_SYM_PIVOT_TOLERANCE) = tmp; |
70 Control (UMFPACK_PIVOT_TOLERANCE) = tmp; | 70 Control (UMFPACK_PIVOT_TOLERANCE) = tmp; |
71 } | 71 } |
72 } | 72 } |
73 | 73 |
74 // Set whether we are allowed to modify Q or not | 74 // Set whether we are allowed to modify Q or not |
75 tmp = Voctave_sparse_controls.get_key ("autoamd"); | 75 tmp = octave_sparse_params::get_key ("autoamd"); |
76 if (!xisnan (tmp)) | 76 if (!xisnan (tmp)) |
77 Control (UMFPACK_FIXQ) = tmp; | 77 Control (UMFPACK_FIXQ) = tmp; |
78 | 78 |
79 // Turn-off UMFPACK scaling for LU | 79 // Turn-off UMFPACK scaling for LU |
80 Control (UMFPACK_SCALE) = UMFPACK_SCALE_NONE; | 80 Control (UMFPACK_SCALE) = UMFPACK_SCALE_NONE; |
238 // Setup the control parameters | 238 // Setup the control parameters |
239 Matrix Control (UMFPACK_CONTROL, 1); | 239 Matrix Control (UMFPACK_CONTROL, 1); |
240 double *control = Control.fortran_vec (); | 240 double *control = Control.fortran_vec (); |
241 UMFPACK_ZNAME (defaults) (control); | 241 UMFPACK_ZNAME (defaults) (control); |
242 | 242 |
243 double tmp = Voctave_sparse_controls.get_key ("spumoni"); | 243 double tmp = octave_sparse_params::get_key ("spumoni"); |
244 if (!xisnan (tmp)) | 244 if (!xisnan (tmp)) |
245 Control (UMFPACK_PRL) = tmp; | 245 Control (UMFPACK_PRL) = tmp; |
246 if (piv_thres >= 0.) | 246 if (piv_thres >= 0.) |
247 { | 247 { |
248 piv_thres = (piv_thres > 1. ? 1. : piv_thres); | 248 piv_thres = (piv_thres > 1. ? 1. : piv_thres); |
249 Control (UMFPACK_SYM_PIVOT_TOLERANCE) = piv_thres; | 249 Control (UMFPACK_SYM_PIVOT_TOLERANCE) = piv_thres; |
250 Control (UMFPACK_PIVOT_TOLERANCE) = piv_thres; | 250 Control (UMFPACK_PIVOT_TOLERANCE) = piv_thres; |
251 } | 251 } |
252 else | 252 else |
253 { | 253 { |
254 tmp = Voctave_sparse_controls.get_key ("piv_tol"); | 254 tmp = octave_sparse_params::get_key ("piv_tol"); |
255 if (!xisnan (tmp)) | 255 if (!xisnan (tmp)) |
256 { | 256 { |
257 Control (UMFPACK_SYM_PIVOT_TOLERANCE) = tmp; | 257 Control (UMFPACK_SYM_PIVOT_TOLERANCE) = tmp; |
258 Control (UMFPACK_PIVOT_TOLERANCE) = tmp; | 258 Control (UMFPACK_PIVOT_TOLERANCE) = tmp; |
259 } | 259 } |
265 // Set whether we are allowed to modify Q or not | 265 // Set whether we are allowed to modify Q or not |
266 if (FixedQ) | 266 if (FixedQ) |
267 Control (UMFPACK_FIXQ) = 1.0; | 267 Control (UMFPACK_FIXQ) = 1.0; |
268 else | 268 else |
269 { | 269 { |
270 tmp = Voctave_sparse_controls.get_key ("autoamd"); | 270 tmp = octave_sparse_params::get_key ("autoamd"); |
271 if (!xisnan (tmp)) | 271 if (!xisnan (tmp)) |
272 Control (UMFPACK_FIXQ) = tmp; | 272 Control (UMFPACK_FIXQ) = tmp; |
273 } | 273 } |
274 | 274 |
275 // Turn-off UMFPACK scaling for LU | 275 // Turn-off UMFPACK scaling for LU |