54 Matrix Control (UMFPACK_CONTROL, 1);
60 Control (UMFPACK_PRL) = tmp;
61 if (piv_thres.
nelem () == 2)
63 tmp = (piv_thres (0) > 1. ? 1. : piv_thres (0));
65 Control (UMFPACK_PIVOT_TOLERANCE) = tmp;
66 tmp = (piv_thres (1) > 1. ? 1. : piv_thres (1));
68 Control (UMFPACK_SYM_PIVOT_TOLERANCE) = tmp;
74 Control (UMFPACK_PIVOT_TOLERANCE) = tmp;
78 Control (UMFPACK_SYM_PIVOT_TOLERANCE) = tmp;
84 Control (UMFPACK_FIXQ) = tmp;
88 Control (UMFPACK_SCALE) = UMFPACK_SCALE_SUM;
90 Control (UMFPACK_SCALE) = UMFPACK_SCALE_NONE;
96 const Complex *Ax = a.
data ();
99 reinterpret_cast<const double *
> (Ax),
103 Matrix Info (1, UMFPACK_INFO);
106 reinterpret_cast<const double *
> (Ax),
108 &Symbolic, control, info);
112 (*current_liboctave_error_handler)
113 (
"SparseComplexLU::SparseComplexLU symbolic factorization failed");
126 reinterpret_cast<const double *
> (Ax),
127 0, Symbolic, &Numeric, control,
131 cond = Info (UMFPACK_RCOND);
135 (*current_liboctave_error_handler)
136 (
"SparseComplexLU::SparseComplexLU numeric factorization failed");
149 &ignore2, &ignore3, Numeric);
153 (*current_liboctave_error_handler)
154 (
"SparseComplexLU::SparseComplexLU extracting LU factors failed");
167 static_cast<octave_idx_type> (1));
177 static_cast<octave_idx_type> (1));
185 Rfact = SparseMatrix (nr, nr, nr);
202 reinterpret_cast<double *
> (Ltx),
204 reinterpret_cast <double *> (Ux),
206 &do_recip, Rx, Numeric);
212 (*current_liboctave_error_handler)
213 (
"SparseComplexLU::SparseComplexLU extracting LU factors failed");
227 reinterpret_cast<double *
> (
Lfact.
data ()),
232 reinterpret_cast<double *
> (
Ufact.
data ()),
243 (*current_liboctave_error_handler) (
"UMFPACK not installed");
250 bool FixedQ,
double droptol,
251 bool milu,
bool udiag)
255 (*current_liboctave_error_handler)
256 (
"Modified incomplete LU not implemented");
263 Matrix Control (UMFPACK_CONTROL, 1);
269 Control (UMFPACK_PRL) = tmp;
270 if (piv_thres.
nelem () == 2)
272 tmp = (piv_thres (0) > 1. ? 1. : piv_thres (0));
274 Control (UMFPACK_PIVOT_TOLERANCE) = tmp;
275 tmp = (piv_thres (1) > 1. ? 1. : piv_thres (1));
277 Control (UMFPACK_SYM_PIVOT_TOLERANCE) = tmp;
283 Control (UMFPACK_PIVOT_TOLERANCE) = tmp;
287 Control (UMFPACK_SYM_PIVOT_TOLERANCE) = tmp;
291 Control (UMFPACK_DROPTOL) = droptol;
295 Control (UMFPACK_FIXQ) = 1.0;
300 Control (UMFPACK_FIXQ) = tmp;
305 Control (UMFPACK_SCALE) = UMFPACK_SCALE_SUM;
307 Control (UMFPACK_SCALE) = UMFPACK_SCALE_NONE;
313 const Complex *Ax = a.
data ();
316 reinterpret_cast<const double *
> (Ax), 0,
320 Matrix Info (1, UMFPACK_INFO);
331 qinit[i] = static_cast<octave_idx_type> (Qinit (i));
334 reinterpret_cast<const double *
> (Ax),
335 0, qinit, &Symbolic, control,
342 (*current_liboctave_error_handler)
343 (
"SparseComplexLU::SparseComplexLU symbolic factorization failed");
356 reinterpret_cast<const double *
> (Ax), 0,
357 Symbolic, &Numeric, control, info);
360 cond = Info (UMFPACK_RCOND);
364 (*current_liboctave_error_handler)
365 (
"SparseComplexLU::SparseComplexLU numeric factorization failed");
378 &ignore1, &ignore2, &ignore3,
383 (*current_liboctave_error_handler)
384 (
"SparseComplexLU::SparseComplexLU extracting LU factors failed");
397 static_cast<octave_idx_type> (1));
407 static_cast<octave_idx_type> (1));
415 Rfact = SparseMatrix (nr, nr, nr);
433 reinterpret_cast<double *
> (Ltx),
435 reinterpret_cast<double *> (Ux),
437 &do_recip, Rx, Numeric);
443 (*current_liboctave_error_handler)
444 (
"SparseComplexLU::SparseComplexLU extracting LU factors failed");
459 reinterpret_cast<double *
> (
Lfact.
data ()),
465 reinterpret_cast<double *
> (
Ufact.
data ()),
477 (*current_liboctave_error_handler)
478 (
"Option udiag of incomplete LU not implemented");
481 (*current_liboctave_error_handler) (
"UMFPACK not installed");