00001 /* ========================================================================== */ 00002 /* === Include/cholmod_supernodal.h ========================================= */ 00003 /* ========================================================================== */ 00004 00005 /* ----------------------------------------------------------------------------- 00006 * CHOLMOD/Include/cholmod_supernodal.h. 00007 * Copyright (C) 2005-2006, Timothy A. Davis 00008 * CHOLMOD/Include/cholmod_supernodal.h is licensed under Version 2.0 of the GNU 00009 * General Public License. See gpl.txt for a text of the license. 00010 * CHOLMOD is also available under other licenses; contact authors for details. 00011 * http://www.cise.ufl.edu/research/sparse 00012 * -------------------------------------------------------------------------- */ 00013 00014 /* CHOLMOD Supernodal module. 00015 * 00016 * Supernodal analysis, factorization, and solve. The simplest way to use 00017 * these routines is via the Cholesky module. It does not provide any 00018 * fill-reducing orderings, but does accept the orderings computed by the 00019 * Cholesky module. It does not require the Cholesky module itself, however. 00020 * 00021 * Primary routines: 00022 * ----------------- 00023 * cholmod_super_symbolic supernodal symbolic analysis 00024 * cholmod_super_numeric supernodal numeric factorization 00025 * cholmod_super_lsolve supernodal Lx=b solve 00026 * cholmod_super_ltsolve supernodal L'x=b solve 00027 * 00028 * Prototypes for the BLAS and LAPACK routines that CHOLMOD uses are listed 00029 * below, including how they are used in CHOLMOD. 00030 * 00031 * BLAS routines: 00032 * -------------- 00033 * dtrsv solve Lx=b or L'x=b, L non-unit diagonal, x and b stride-1 00034 * dtrsm solve LX=B or L'X=b, L non-unit diagonal 00035 * dgemv y=y-A*x or y=y-A'*x (x and y stride-1) 00036 * dgemm C=A*B', C=C-A*B, or C=C-A'*B 00037 * dsyrk C=tril(A*A') 00038 * 00039 * LAPACK routines: 00040 * ---------------- 00041 * dpotrf LAPACK: A=chol(tril(A)) 00042 * 00043 * Requires the Core module, and two external packages: LAPACK and the BLAS. 00044 * Optionally used by the Cholesky module. 00045 */ 00046 00047 #ifndef CHOLMOD_SUPERNODAL_H 00048 #define CHOLMOD_SUPERNODAL_H 00049 00050 #include "cholmod_core.h" 00051 00052 /* -------------------------------------------------------------------------- */ 00053 /* cholmod_super_symbolic */ 00054 /* -------------------------------------------------------------------------- */ 00055 00056 /* Analyzes A, AA', or A(:,f)*A(:,f)' in preparation for a supernodal numeric 00057 * factorization. The user need not call this directly; cholmod_analyze is 00058 * a "simple" wrapper for this routine. 00059 */ 00060 00061 int cholmod_super_symbolic 00062 ( 00063 /* ---- input ---- */ 00064 cholmod_sparse *A, /* matrix to analyze */ 00065 cholmod_sparse *F, /* F = A' or A(:,f)' */ 00066 int *Parent, /* elimination tree */ 00067 /* ---- in/out --- */ 00068 cholmod_factor *L, /* simplicial symbolic on input, 00069 * supernodal symbolic on output */ 00070 /* --------------- */ 00071 cholmod_common *Common 00072 ) ; 00073 00074 int cholmod_l_super_symbolic (cholmod_sparse *, cholmod_sparse *, UF_long *, 00075 cholmod_factor *, cholmod_common *) ; 00076 00077 /* -------------------------------------------------------------------------- */ 00078 /* cholmod_super_symbolic2 */ 00079 /* -------------------------------------------------------------------------- */ 00080 00081 /* Analyze for supernodal Cholesky or multifrontal QR. CHOLMOD itself always 00082 * analyzes for supernodal Cholesky, of course. This "for_cholesky = TRUE" 00083 * option is used by SuiteSparseQR only. Added for V1.7 */ 00084 00085 int cholmod_super_symbolic2 00086 ( 00087 /* ---- input ---- */ 00088 int for_cholesky, /* Cholesky if TRUE, QR if FALSE */ 00089 cholmod_sparse *A, /* matrix to analyze */ 00090 cholmod_sparse *F, /* F = A' or A(:,f)' */ 00091 int *Parent, /* elimination tree */ 00092 /* ---- in/out --- */ 00093 cholmod_factor *L, /* simplicial symbolic on input, 00094 * supernodal symbolic on output */ 00095 /* --------------- */ 00096 cholmod_common *Common 00097 ) ; 00098 00099 int cholmod_l_super_symbolic2 (int, cholmod_sparse *, cholmod_sparse *, 00100 UF_long *, cholmod_factor *, cholmod_common *) ; 00101 00102 /* -------------------------------------------------------------------------- */ 00103 /* cholmod_super_numeric */ 00104 /* -------------------------------------------------------------------------- */ 00105 00106 /* Computes the numeric LL' factorization of A, AA', or A(:,f)*A(:,f)' using 00107 * a BLAS-based supernodal method. The user need not call this directly; 00108 * cholmod_factorize is a "simple" wrapper for this routine. 00109 */ 00110 00111 int cholmod_super_numeric 00112 ( 00113 /* ---- input ---- */ 00114 cholmod_sparse *A, /* matrix to factorize */ 00115 cholmod_sparse *F, /* F = A' or A(:,f)' */ 00116 double beta [2], /* beta*I is added to diagonal of matrix to factorize */ 00117 /* ---- in/out --- */ 00118 cholmod_factor *L, /* factorization */ 00119 /* --------------- */ 00120 cholmod_common *Common 00121 ) ; 00122 00123 int cholmod_l_super_numeric (cholmod_sparse *, cholmod_sparse *, double *, 00124 cholmod_factor *, cholmod_common *) ; 00125 00126 /* -------------------------------------------------------------------------- */ 00127 /* cholmod_super_lsolve */ 00128 /* -------------------------------------------------------------------------- */ 00129 00130 /* Solve Lx=b where L is from a supernodal numeric factorization. The user 00131 * need not call this routine directly. cholmod_solve is a "simple" wrapper 00132 * for this routine. */ 00133 00134 int cholmod_super_lsolve 00135 ( 00136 /* ---- input ---- */ 00137 cholmod_factor *L, /* factor to use for the forward solve */ 00138 /* ---- output ---- */ 00139 cholmod_dense *X, /* b on input, solution to Lx=b on output */ 00140 /* ---- workspace */ 00141 cholmod_dense *E, /* workspace of size nrhs*(L->maxesize) */ 00142 /* --------------- */ 00143 cholmod_common *Common 00144 ) ; 00145 00146 int cholmod_l_super_lsolve (cholmod_factor *, cholmod_dense *, cholmod_dense *, 00147 cholmod_common *) ; 00148 00149 /* -------------------------------------------------------------------------- */ 00150 /* cholmod_super_ltsolve */ 00151 /* -------------------------------------------------------------------------- */ 00152 00153 /* Solve L'x=b where L is from a supernodal numeric factorization. The user 00154 * need not call this routine directly. cholmod_solve is a "simple" wrapper 00155 * for this routine. */ 00156 00157 int cholmod_super_ltsolve 00158 ( 00159 /* ---- input ---- */ 00160 cholmod_factor *L, /* factor to use for the backsolve */ 00161 /* ---- output ---- */ 00162 cholmod_dense *X, /* b on input, solution to L'x=b on output */ 00163 /* ---- workspace */ 00164 cholmod_dense *E, /* workspace of size nrhs*(L->maxesize) */ 00165 /* --------------- */ 00166 cholmod_common *Common 00167 ) ; 00168 00169 int cholmod_l_super_ltsolve (cholmod_factor *, cholmod_dense *, cholmod_dense *, 00170 cholmod_common *) ; 00171 00172 #endif