Rev 1820 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
/* ========================================================================== *//* === umfpack_get_numeric ================================================== *//* ========================================================================== *//* -------------------------------------------------------------------------- *//* UMFPACK Version 4.5, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, *//* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. *//* web: http://www.cise.ufl.edu/research/sparse/umfpack *//* -------------------------------------------------------------------------- */int umfpack_di_get_numeric(int Lp [ ],int Lj [ ],double Lx [ ],int Up [ ],int Ui [ ],double Ux [ ],int P [ ],int Q [ ],double Dx [ ],int *do_recip,double Rs [ ],void *Numeric) ;long umfpack_dl_get_numeric(long Lp [ ],long Lj [ ],double Lx [ ],long Up [ ],long Ui [ ],double Ux [ ],long P [ ],long Q [ ],double Dx [ ],long *do_recip,double Rs [ ],void *Numeric) ;int umfpack_zi_get_numeric(int Lp [ ],int Lj [ ],double Lx [ ], double Lz [ ],int Up [ ],int Ui [ ],double Ux [ ], double Uz [ ],int P [ ],int Q [ ],double Dx [ ], double Dz [ ],int *do_recip,double Rs [ ],void *Numeric) ;long umfpack_zl_get_numeric(long Lp [ ],long Lj [ ],double Lx [ ], double Lz [ ],long Up [ ],long Ui [ ],double Ux [ ], double Uz [ ],long P [ ],long Q [ ],double Dx [ ], double Dz [ ],long *do_recip,double Rs [ ],void *Numeric) ;/*double int Syntax:#include "umfpack.h"void *Numeric ;int *Lp, *Lj, *Up, *Ui, *P, *Q, status, do_recip ;double *Lx, *Ux, *Dx, *Rs ;status = umfpack_di_get_numeric (Lp, Lj, Lx, Up, Ui, Ux, P, Q, Dx,&do_recip, Rs, Numeric) ;double long Syntax:#include "umfpack.h"void *Numeric ;long *Lp, *Lj, *Up, *Ui, *P, *Q, status, do_recip ;double *Lx, *Ux, *Dx, *Rs ;status = umfpack_dl_get_numeric (Lp, Lj, Lx, Up, Ui, Ux, P, Q, Dx,&do_recip, Rs, Numeric) ;complex int Syntax:#include "umfpack.h"void *Numeric ;int *Lp, *Lj, *Up, *Ui, *P, *Q, status, do_recip ;double *Lx, *Lz, *Ux, *Uz, *Dx, *Dz, *Rs ;status = umfpack_zi_get_numeric (Lp, Lj, Lx, Lz, Up, Ui, Ux, Uz, P, Q,Dx, Dz, &do_recip, Rs, Numeric) ;complex long Syntax:#include "umfpack.h"void *Numeric ;long *Lp, *Lj, *Up, *Ui, *P, *Q, status, do_recip ;double *Lx, *Lz, *Ux, *Uz, *Dx, *Dz, *Rs ;status = umfpack_zl_get_numeric (Lp, Lj, Lx, Lz, Up, Ui, Ux, Uz, P, Q,Dx, Dz, &do_recip, Rs, Numeric) ;packed complex int/long Syntax:Same as above, except Lz, Uz, and Dz are all NULL.Purpose:This routine copies the LU factors and permutation vectors from the Numericobject into user-accessible arrays. This routine is not needed to solve alinear system. Note that the output arrays Lp, Lj, Lx, Up, Ui, Ux, P, Q,Dx, and Rs are not allocated by umfpack_*_get_numeric; they must exist oninput.All output arguments are optional. If any of them are NULLon input, then that part of the LU factorization is not copied. You canuse this routine to extract just the parts of the LU factorization thatyou want. For example, to retrieve just the column permutation Q, use:#define noD (double *) NULL#define noI (int *) NULLstatus = umfpack_di_get_numeric (noI, noI, noD, noI, noI, noD, noI,Q, noD, noI, noD, Numeric) ;Returns:Returns UMFPACK_OK if successful. Returns UMFPACK_ERROR_out_of_memoryif insufficient memory is available for the 2*max(n_row,n_col) integerworkspace that umfpack_*_get_numeric allocates to construct L and/or U.Returns UMFPACK_ERROR_invalid_Numeric_object if the Numeric object providedas input is invalid.Arguments:Int Lp [n_row+1] ; Output argument.Int Lj [lnz] ; Output argument.double Lx [lnz] ; Output argument. Size 2*lnz for packed complex case.double Lz [lnz] ; Output argument for complex versions.The n_row-by-min(n_row,n_col) matrix L is returned in compressed-rowform. The column indices of row i and corresponding numerical valuesare in:Lj [Lp [i] ... Lp [i+1]-1]Lx [Lp [i] ... Lp [i+1]-1] real partLz [Lp [i] ... Lp [i+1]-1] imaginary part (complex versions)respectively. Each row is stored in sorted order, from low columnindices to higher. The last entry in each row is the diagonal, whichis numerically equal to one. The sizes of Lp, Lj, Lx, and Lz arereturned by umfpack_*_get_lunz. If Lp, Lj, or Lx are not present,then the matrix L is not returned. This is not an error condition.The L matrix can be printed if n_row, Lp, Lj, Lx (and Lz for the splitcomplex case) are passed to umfpack_*_report_matrix (using the"row" form).If Lx is present and Lz is NULL, then both realand imaginary parts are returned in Lx[0..2*lnz-1], with Lx[2*k]and Lx[2*k+1] being the real and imaginary part of the kth entry.Int Up [n_col+1] ; Output argument.Int Ui [unz] ; Output argument.double Ux [unz] ; Output argument. Size 2*unz for packed complex case.double Uz [unz] ; Output argument for complex versions.The min(n_row,n_col)-by-n_col matrix U is returned in compressed-columnform. The row indices of column j and corresponding numerical valuesare inUi [Up [j] ... Up [j+1]-1]Ux [Up [j] ... Up [j+1]-1] real partUz [Up [j] ... Up [j+1]-1] imaginary part (complex versions)respectively. Each column is stored in sorted order, from low rowindices to higher. The last entry in each column is the diagonal(assuming that it is nonzero). The sizes of Up, Ui, Ux, and Uz arereturned by umfpack_*_get_lunz. If Up, Ui, or Ux are not present,then the matrix U is not returned. This is not an error condition.The U matrix can be printed if n_col, Up, Ui, Ux (and Uz for thesplit complex case) are passed to umfpack_*_report_matrix (using the"column" form).If Ux is present and Uz is NULL, then both realand imaginary parts are returned in Ux[0..2*unz-1], with Ux[2*k]and Ux[2*k+1] being the real and imaginary part of the kth entry.Int P [n_row] ; Output argument.The permutation vector P is defined as P [k] = i, where the originalrow i of A is the kth pivot row in PAQ. If you do not want the P vectorto be returned, simply pass (Int *) NULL for P. This is not an errorcondition. You can print P and Q with umfpack_*_report_perm.Int Q [n_col] ; Output argument.The permutation vector Q is defined as Q [k] = j, where the originalcolumn j of A is the kth pivot column in PAQ. If you not want the Qvector to be returned, simply pass (Int *) NULL for Q. This is notan error condition. Note that Q is not necessarily identical toQtree, the column pre-ordering held in the Symbolic object. Refer tothe description of Qtree and Front_npivcol in umfpack_*_get_symbolic fordetails.double Dx [min(n_row,n_col)] ; Output argument. Size 2*n forthe packed complex case.double Dz [min(n_row,n_col)] ; Output argument for complex versions.The diagonal of U is also returned in Dx and Dz. You can extract thediagonal of U without getting all of U by passing a non-NULL Dx (andDz for the complex version) and passing Up, Ui, and Ux as NULL. Dx isthe real part of the diagonal, and Dz is the imaginary part.If Dx is present and Dz is NULL, then both realand imaginary parts are returned in Dx[0..2*min(n_row,n_col)-1],with Dx[2*k] and Dx[2*k+1] being the real and imaginary part of the kthentry.Int *do_recip ; Output argument.If do_recip is returned as zero (false), then the scale factors Rs [i]are to be used by multiplying row i by Rs [i]. Otherwise, the entriesin row i are to be divided by Rs [i].If UMFPACK has been compiled with gcc, or for MATLAB as either abuilt-in routine or as a mexFunction, then the NRECIPROCAL flag isset, and do_recip will always be zero (false).double Rs [n_row] ; Output argument.The row scale factors are returned in Rs [0..n_row-1]. Row i of A isscaled by dividing or multiplying its values by Rs [i]. If defaultscaling is in use, Rs [i] is the sum of the absolute values of row i(or its reciprocal). If max row scaling is in use, then Rs [i] is themaximum absolute value in row i (or its reciprocal).Otherwise, Rs [i] = 1. If row i is all zero, Rs [i] = 1 as well. Forthe complex version, an approximate absolute value is used(|x_real|+|x_imag|).void *Numeric ; Input argument, not modified.Numeric must point to a valid Numeric object, computed byumfpack_*_numeric.*/