52 Matrix Control (UMFPACK_CONTROL, 1);
58 Control (UMFPACK_PRL) = tmp;
60 if (piv_thres.
nelem () == 2)
62 tmp = (piv_thres (0) > 1. ? 1. : piv_thres (0));
64 Control (UMFPACK_PIVOT_TOLERANCE) = tmp;
65 tmp = (piv_thres (1) > 1. ? 1. : piv_thres (1));
67 Control (UMFPACK_SYM_PIVOT_TOLERANCE) = tmp;
73 Control (UMFPACK_PIVOT_TOLERANCE) = tmp;
77 Control (UMFPACK_SYM_PIVOT_TOLERANCE) = tmp;
83 Control (UMFPACK_FIXQ) = tmp;
86 Control (UMFPACK_SCALE) = UMFPACK_SCALE_SUM;
88 Control (UMFPACK_SCALE) = UMFPACK_SCALE_NONE;
94 const double *Ax = a.
data ();
96 UMFPACK_DNAME (report_matrix) (nr, nc, Ap, Ai, Ax, 1, control);
99 Matrix Info (1, UMFPACK_INFO);
101 int status =
UMFPACK_DNAME (qsymbolic) (nr, nc, Ap, Ai, Ax, 0,
102 &Symbolic, control, info);
106 (*current_liboctave_error_handler)
107 (
"SparseLU::SparseLU symbolic factorization failed");
120 &Numeric, control, info) ;
123 cond = Info (UMFPACK_RCOND);
127 (*current_liboctave_error_handler)
128 (
"SparseLU::SparseLU numeric factorization failed");
141 &ignore2, &ignore3, Numeric) ;
145 (*current_liboctave_error_handler)
146 (
"SparseLU::SparseLU extracting LU factors failed");
159 static_cast<octave_idx_type> (1));
169 static_cast<octave_idx_type> (1));
202 (*current_liboctave_error_handler)
203 (
"SparseLU::SparseLU extracting LU factors failed");
230 (*current_liboctave_error_handler) (
"UMFPACK not installed");
236 double droptol,
bool milu,
bool udiag)
240 (*current_liboctave_error_handler)
241 (
"Modified incomplete LU not implemented");
248 Matrix Control (UMFPACK_CONTROL, 1);
254 Control (UMFPACK_PRL) = tmp;
256 if (piv_thres.
nelem () == 2)
258 tmp = (piv_thres (0) > 1. ? 1. : piv_thres (0));
260 Control (UMFPACK_PIVOT_TOLERANCE) = tmp;
261 tmp = (piv_thres (1) > 1. ? 1. : piv_thres (1));
263 Control (UMFPACK_SYM_PIVOT_TOLERANCE) = tmp;
269 Control (UMFPACK_PIVOT_TOLERANCE) = tmp;
273 Control (UMFPACK_SYM_PIVOT_TOLERANCE) = tmp;
277 Control (UMFPACK_DROPTOL) = droptol;
282 Control (UMFPACK_FIXQ) = 1.0;
287 Control (UMFPACK_FIXQ) = tmp;
291 Control (UMFPACK_SCALE) = UMFPACK_SCALE_SUM;
293 Control (UMFPACK_SCALE) = UMFPACK_SCALE_NONE;
299 const double *Ax = a.
data ();
305 Matrix Info (1, UMFPACK_INFO);
315 qinit[i] = static_cast<octave_idx_type> (Qinit (i));
318 qinit, &Symbolic, control, info);
324 (*current_liboctave_error_handler)
325 (
"SparseLU::SparseLU symbolic factorization failed");
338 &Numeric, control, info) ;
341 cond = Info (UMFPACK_RCOND);
345 (*current_liboctave_error_handler)
346 (
"SparseLU::SparseLU numeric factorization failed");
359 &ignore1, &ignore2, &ignore3,
364 (*current_liboctave_error_handler)
365 (
"SparseLU::SparseLU extracting LU factors failed");
378 static_cast<octave_idx_type> (1));
388 static_cast<octave_idx_type> (1));
413 Ltx, Up, Uj, Ux, p, q,
421 (*current_liboctave_error_handler)
422 (
"SparseLU::SparseLU extracting LU factors failed");
454 (*current_liboctave_error_handler)
455 (
"Option udiag of incomplete LU not implemented");
458 (*current_liboctave_error_handler) (
"UMFPACK not installed");
octave_idx_type * xridx(void)
octave_idx_type cols(void) const
octave_idx_type rows(void) const
SparseMatrix transpose(void) const
octave_idx_type * xcidx(void)
octave_idx_type * cidx(void)
static double get_key(const std::string &key)
octave_idx_type nelem(void) const
Number of elements in the array.
void resize(const dim_vector &dv, const T &rfv)
MArray< octave_idx_type > P
octave_idx_type * ridx(void)
MArray< octave_idx_type > Q
void scale(Matrix &m, double x, double y, double z)
#define OCTAVE_LOCAL_BUFFER(T, buf, size)
const T * fortran_vec(void) const
#define UMFPACK_DNAME(name)