From: wolf Date: Thu, 30 Jun 2005 16:04:46 +0000 (+0000) Subject: Import latest version 4.4. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=70494d0ae3277f97e06b143dab8d6851377029ed;p=dealii-svn.git Import latest version 4.4. git-svn-id: https://svn.dealii.org/trunk@10997 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/contrib/umfpack/AMD/README b/deal.II/contrib/umfpack/AMD/README.txt similarity index 100% rename from deal.II/contrib/umfpack/AMD/README rename to deal.II/contrib/umfpack/AMD/README.txt diff --git a/deal.II/contrib/umfpack/AMD/Source/amd_2.c b/deal.II/contrib/umfpack/AMD/Source/amd_2.c index 6de3ec507f..ca1141e265 100644 --- a/deal.II/contrib/umfpack/AMD/Source/amd_2.c +++ b/deal.II/contrib/umfpack/AMD/Source/amd_2.c @@ -584,7 +584,7 @@ GLOBAL void AMD_2 } else { - dense = (Int) (alpha * sqrt ((double) n)) ; + dense = alpha * sqrt ((double) n) ; } dense = MAX (16, dense) ; dense = MIN (n, dense) ; diff --git a/deal.II/contrib/umfpack/README.deal.II b/deal.II/contrib/umfpack/README.deal.II index 56c3c4133e..b2d3beade0 100644 --- a/deal.II/contrib/umfpack/README.deal.II +++ b/deal.II/contrib/umfpack/README.deal.II @@ -1,4 +1,4 @@ -This directory is an almost identical copy of the UMFPACK 4.3 +This directory is an almost identical copy of the UMFPACK 4.4 release. The only things I have changed are the Makefiles: they build shared libraries instead of static ones if deal.II is so configured, and they put the object files somewhere else. This also allowed us to diff --git a/deal.II/contrib/umfpack/UMFPACK/Doc/ChangeLog b/deal.II/contrib/umfpack/UMFPACK/Doc/ChangeLog index 165d5efa72..1dd8c66b8c 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Doc/ChangeLog +++ b/deal.II/contrib/umfpack/UMFPACK/Doc/ChangeLog @@ -1,3 +1,54 @@ +Jan. 28, 2005: v4.4 released + + * bug fix: when Qinit is provided to umfpack_*_qsymbolic, + only the symmetric and unsymmetric strategies are now permitted. + The auto and 2-by-2 strategies are not allowed. In v4.3 and + earlier, providing Qinit and requesting the symmetric strategy + did not always work (you got the unsymmetric strategy instead). + This does not affect umfpack_*_symbolic, which computes its own + ordering and can use all 4 strategies (auto, symmetric, unsymmetric, + and 2-by-2). + + * umfpack_get_determinant added. + + * packed complex case added for all routines (previously only used in + umfpack_report_vector). This allows arrays of ANSI C/C++ complex + type to be passed directly to UMFPACK. + + * added umf_multicomple.c to assist in the compilation of UMFPACK + in Microsoft Visual Studio, which does not have the required + flexibility of the Unix "make" command. + + * local variable declarations reordered to encourage double-word + alignment of double's and Entry's, for better performance. + + * note that with the exception of the behavior when a user-provided + ordering is passed to umfpack_*_qsymbolic, versions 4.1 through 4.4 + have comparable performance (ordering quality, memory usage, + and run time). v4.1 is much better than v4.0 in performance. + +Jan. 11, 2005: v4.3.1 released + + * bug fix in umf_solve. This bug is only the 4th one found in the C + versions of UMFPACK to date (Version 3.0 to 4.3.1, from March 2001 to + Jan. 2005, excluding workarounds for quirky compilers). No bugs have + been reported in the last Fortran version of UMFPACK (MA38, or UMFPACK + V2.2.1) since its release in Jan. 1998. + + In Version 4.3, a bug in umf_solve caused iterative refinement + to be disabled when solving A'x=b or A.'x=b after factorizing A. + Modified the umfpack mexFunction to factorize A and then solve A'x=b + when performing the operation x=b/A (as "umfpack(b,'/',A). Note that + this has no effect on the use of UMFPACK in MATLAB itself, since MATLAB + does not use the umfpack mexFunction for x=b/A. When computing x=b/A, + MATLAB factorizes A' and computes x=(A'\b')' instead. The following + source code files changed: + + UMFPACK/MATLAB/umfpackmex.c (see above) + UMFPACK/Source/umf_solve.c (see source code: 2 lines changed) + UMFPACK/Include/umfpack.h (version and date changed) + UMFPACK/MATLAB/umfpack_test.m (new file) + Jan. 16, 2004: v4.3 released. * user interface of v4.3 is upwardly-compatible with v4.2 and v4.1. @@ -267,24 +318,24 @@ August-October, 2001: * added umfpack_btf M-file. * modified the BLAS update in the frontal matrix. If there are only - a few pivots in remaining in the current front, then the BLAS3 update - is delayed to include pivots in the next front. + a few pivots in remaining in the current front, then the BLAS3 update + is delayed to include pivots in the next front. * Removed the special-case handling of dense columns from the numerical - factorization (kept it in the colamd preordering). This improves the - performance of UMFPACK on dense matrices by a factor of 5 or so, and - simplifies the code. + factorization (kept it in the colamd preordering). This improves the + performance of UMFPACK on dense matrices by a factor of 5 or so, and + simplifies the code. * Added a symmetric-preference pivoting option. The option slightly - (but uniformly) improves the ordering when factorizing matrices with - symmetric nonzero pattern. That class of matrix is better handled by - the symmetric-pattern multifrontal method (MA41 in the Harwell - Subroutine Library), however. + (but uniformly) improves the ordering when factorizing matrices with + symmetric nonzero pattern. That class of matrix is better handled by + the symmetric-pattern multifrontal method (MA41 in the Harwell + Subroutine Library), however. * Fixed the detection of integer overflow. The 32-bit version cannot - make use of more than 2GB of main memory (use the 64-bit version - in that case, instead). The 32-bit version did not correctly detect - when it was trying to factorize too large of a matrix. + make use of more than 2GB of main memory (use the 64-bit version + in that case, instead). The 32-bit version did not correctly detect + when it was trying to factorize too large of a matrix. May 4, 2001: @@ -296,8 +347,8 @@ April 30, 2001: UMFPACK Version 3.0 released. Changes since 3.0Beta release: * Long integer version added (umfpack_l_* user-callable routines). * Peak memory usage in the numerical factorization reduced by a total of - 12n integers (8n temporary workspace used during numerical - factorization, and 4n for the permanent LU factors which was allocated + 12n integers (8n temporary workspace used during numerical factorization, + and 4n for the permanent LU factors which was allocated at the beginning of factorization). * Ported to the IBM RS 6000 and Compaq Alpha, with help from Anshul Gupta diff --git a/deal.II/contrib/umfpack/UMFPACK/Doc/License b/deal.II/contrib/umfpack/UMFPACK/Doc/License index 20fdc97a62..2347e22ff6 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Doc/License +++ b/deal.II/contrib/umfpack/UMFPACK/Doc/License @@ -1,4 +1,4 @@ -UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. +UMFPACK Version 4.4 (Jan. 28, 2005), Copyright (c) 2005 by Timothy A. Davis. All Rights Reserved. UMFPACK License: diff --git a/deal.II/contrib/umfpack/UMFPACK/Doc/Makefile b/deal.II/contrib/umfpack/UMFPACK/Doc/Makefile index a7458bbcf6..f4d62abbee 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Doc/Makefile +++ b/deal.II/contrib/umfpack/UMFPACK/Doc/Makefile @@ -2,6 +2,9 @@ # UMFPACK Makefile for compiling on Unix systems (for GNU or original make) #------------------------------------------------------------------------------- +# UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. +# All Rights Reserved. See ../Doc/License for License. + all: dist include ../Make/Make.include @@ -22,6 +25,7 @@ purge: clean UMFPACK = umfpack_col_to_triplet umfpack_defaults umfpack_free_numeric \ umfpack_free_symbolic umfpack_get_numeric umfpack_get_lunz \ + umfpack_get_determinant \ umfpack_get_symbolic umfpack_numeric umfpack_qsymbolic \ umfpack_report_control umfpack_report_info umfpack_report_matrix \ umfpack_report_numeric umfpack_report_perm umfpack_report_status \ diff --git a/deal.II/contrib/umfpack/UMFPACK/Doc/QuickStart.pdf b/deal.II/contrib/umfpack/UMFPACK/Doc/QuickStart.pdf index 43c785cfdc..db89a759ad 100644 Binary files a/deal.II/contrib/umfpack/UMFPACK/Doc/QuickStart.pdf and b/deal.II/contrib/umfpack/UMFPACK/Doc/QuickStart.pdf differ diff --git a/deal.II/contrib/umfpack/UMFPACK/Doc/QuickStart.tex b/deal.II/contrib/umfpack/UMFPACK/Doc/QuickStart.tex index eba0ee3b77..12974e1d7f 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Doc/QuickStart.tex +++ b/deal.II/contrib/umfpack/UMFPACK/Doc/QuickStart.tex @@ -18,8 +18,8 @@ \author{Timothy A. Davis \\ Dept. of Computer and Information Science and Engineering \\ Univ. of Florida, Gainesville, FL} -\title{UMFPACK Version 4.3 Quick Start Guide} -\date{Jan. 16, 2004} +\title{UMFPACK Version 4.4 Quick Start Guide} +\date{Jan. 28, 2005} \maketitle %------------------------------------------------------------------------------- @@ -35,9 +35,7 @@ Univ. of Florida, Gainesville, FL} \end{abstract} %------------------------------------------------------------------------------- -Technical Report TR-04-003 - -UMFPACK Version 4.3 (Jan. 16, 2004), Copyright\copyright 2004 by Timothy A. +UMFPACK Version 4.4 (Jan. 28, 2005), Copyright\copyright 2005 by Timothy A. Davis. All Rights Reserved. Refer to the UMFPACK User Guide for the License. See \newline http://www.cise.ufl.edu/research/sparse/umfpack @@ -54,14 +52,15 @@ or non-singular, and real or complex (or any combination). Only square matrices $\m{A}$ can be used to solve $\m{Ax}=\m{b}$ or related systems. Rectangular matrices can only be factorized. -UMFPACK Version 4.0 is a built-in routine in MATLAB 6.5, used by the forward and -backslash operator, and the {\tt lu} routine. The following is a short +UMFPACK Version 4.3 is a built-in routine in MATLAB 7.1, used by the forward and +backslash operator, and the {\tt lu} routine. MATLAB 6.5 used Version 4.0. +The following is a short introduction to Unix users of the C interface of UMFPACK. %------------------------------------------------------------------------------- -The C-callable UMFPACK library consists of 31 user-callable routines and one -include file. Twenty-seven of the routines come in four versions, with +The C-callable UMFPACK library consists of 32 user-callable routines and one +include file. Twenty-eight of the routines come in four versions, with different sizes of integers and for real or complex floating-point numbers. This Quick Start Guide assumes you are working with real matrices (not complex) and with {\tt int}'s as integers (not {\tt long}'s). @@ -69,6 +68,13 @@ Refer to the User Guide for information about the complex and long integer versions. The include file {\tt umfpack.h} must be included in any C program that uses UMFPACK. +For more details, see: +{\em A column pre-ordering strategy for the unsymmetric-pattern multifrontal method}, +Davis, T. A., +ACM Trans. Math. Software, vol 30. no 2, 2004, pp. 165-195, and +{\em Algorithm 832: {UMFPACK}, an unsymmetric-pattern multifrontal method}, +same issue, pp. 196-199. + %------------------------------------------------------------------------------- \section{Primary routines, and a simple example} %------------------------------------------------------------------------------- @@ -79,6 +85,7 @@ is given in Section~\ref{Primary}. Additional routines are available for passing a different column ordering to UMFPACK, changing default parameters, manipulating sparse matrices, getting the LU factors, save and loading the LU factors from a file, +computing the determinant, and reporting results. See the User Guide for more information. \begin{itemize} @@ -227,15 +234,17 @@ for more details. \label{Install} %------------------------------------------------------------------------------- -You will need to install both UMFPACK v4.3 and AMD v1.1 (or AMD v1.0) to use UMFPACK. +You will need to install both UMFPACK v4.4 and AMD v1.1 (or AMD v1.0) to use UMFPACK. The {\tt UMFPACK} and {\tt AMD} subdirectories must be placed side-by-side within the same parent directory. AMD is a stand-alone package that is required by UMFPACK. UMFPACK can be compiled without the BLAS but your performance will be much less than what it should be. System-dependent configurations are in the {\tt AMD/Make} -and {\tt UMFPACK/Make} directories. You can edit the {\tt Make.include} -files in those directories to customize the compilation. The default +and {\tt UMFPACK/Make} directories +(Note that {\tt UMFPACK/Make} is a symbolic link to {\tt AMD/Make}). +You can edit the {\tt Make.include} +file in those directories to customize the compilation. The default settings will work on most systems, except that UMFPACK will be compiled so that it does not use the BLAS. Sample configuration files are provided for Linux, Sun Solaris, SGI IRIX, IBM AIX, and the DEC/Compaq Alpha. @@ -301,8 +310,8 @@ most deal with how the BLAS are called: \item {\tt -DNPOSIX} if you do not have the POSIX-compliant {\tt sysconf} and {\tt times} routines. \item {\tt -DNRECIPROCAL} controls a trade-off between speed and accuracy. - This is normally off by default, except when the {\tt gcc} - compiler is used. + This is off by default (speed preferred over accuracy) except when + compiling for MATLAB. \end{itemize} When you compile your program that uses the C-callable UMFPACK library, @@ -916,7 +925,7 @@ Arguments: UMFPACK_WARNING_singular_matrix - A divide-by-zero occured. Your solution will contain Inf's + A divide-by-zero occurred. Your solution will contain Inf's and/or NaN's. Some parts of the solution may be valid. For example, solving Ax=b with diff --git a/deal.II/contrib/umfpack/UMFPACK/Doc/UserGuide.bib b/deal.II/contrib/umfpack/UMFPACK/Doc/UserGuide.bib index 691ba73e45..a84b90d7b2 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Doc/UserGuide.bib +++ b/deal.II/contrib/umfpack/UMFPACK/Doc/UserGuide.bib @@ -17,11 +17,12 @@ @article{AmestoyDavisDuff03, author={Amestoy, P. R. and Davis, T. A. and Duff, I. S.}, - title={Algorithm 8xx: {AMD}, an approximate minimum degree ordering algorithm}, + title={Algorithm 837: {AMD}, an approximate minimum degree ordering algorithm}, journal=TOMS, - year={2003 (under submission)}, - note={Also TR-03-010 at www.cise.ufl.edu/tech-reports.} - } + year={2004} + ,volume={30} + ,number={3} + ,pages={381-388}} @techreport{AmestoyDavisDuff03_user, author={Amestoy, P. R. and Davis, T. A. and Duff, I. S.}, @@ -37,21 +38,23 @@ author={Davis, T. A.}, title={A column pre-ordering strategy for the unsymmetric-pattern multifrontal method}, journal=TOMS, - year={2003 (under submission)} - ,note={Also TR-03-006 at www.cise.ufl.edu/tech-reports.} - } + year={2004} + ,volume={30} + ,number={2} + ,pages={165-195}} @article{Davis03_algo, author={Davis, T. A.}, - title={Algorithm 8xx: {UMFPACK V4.3}, an unsymmetric-pattern multifrontal method}, + title={Algorithm 832: {UMFPACK}, an unsymmetric-pattern multifrontal method}, journal=TOMS, - year={2004 (under submission)} - ,note={Also TR-04-004 at www.cise.ufl.edu/tech-reports.} - } + year={2004} + ,volume={30} + ,number={2} + ,pages={196-199}} @techreport{Davis03_umf, author={Davis, T. A.}, - title={{UMFPACK} Version 4.3 User Guide}, + title={{UMFPACK} Version 4.4 User Guide}, institution={Univ. of Florida, CISE Dept.}, year={2004} ,number={TR-04-003} @@ -61,7 +64,7 @@ @techreport{Davis03_umfquick, author={Davis, T. A.}, - title={{UMFPACK} Version 4.3 Quick Start Guide}, + title={{UMFPACK} Version 4.4 Quick Start Guide}, institution={Univ. of Florida, CISE Dept.}, year={2004} ,number={TR-04-005} @@ -201,28 +204,23 @@ ,address={Gainesville, FL} ,note={www.cise.ufl.edu/tech-reports}} -@techreport{DavisGilbertLarimoreNg00, +@article{DavisGilbertLarimoreNg00, author={Davis, T. A. and Gilbert, J. R. and Larimore, S. I. and Ng, E. G.}, title={A column approximate minimum degree ordering algorithm}, - institution={Univ. of Florida, CISE Dept.}, - year={2000} - ,number={TR-00-005} - ,address={Gainesville, FL} - ,month={October} - ,note={(www.cise.ufl.edu/tech-reports. Submitted to ACM Trans. Math. Softw.)} - } + journal=TOMS, + year={2004} + ,volume={30} + ,number={3} + ,pages={353-376}} -@techreport{DavisGilbertLarimoreNg00_algo, +@article{DavisGilbertLarimoreNg00_algo, author={Davis, T. A. and Gilbert, J. R. and Larimore, S. I. and Ng, E. G.}, - title={Algorithm 8xx: {COLAMD}, a column approximate minimum degree ordering algorithm}, - institution={Univ. of Florida, CISE Dept.}, - year={2000} - ,number={TR-00-006} - ,address={Gainesville, FL} - ,month={October} - ,note={(www.cise.ufl.edu/tech-reports. Submitted to ACM Trans. Math. Softw.)} - } - + title={Algorithm 836: {COLAMD}, a column approximate minimum degree ordering algorithm}, + journal=TOMS, + year={2004} + ,volume={30} + ,number={3} + ,pages={377-380}} @INCOLLECTION{GilbertNg93, author = {J. R. Gilbert and E. G. Ng}, diff --git a/deal.II/contrib/umfpack/UMFPACK/Doc/UserGuide.pdf b/deal.II/contrib/umfpack/UMFPACK/Doc/UserGuide.pdf index 3aab8d8566..3509a087aa 100644 Binary files a/deal.II/contrib/umfpack/UMFPACK/Doc/UserGuide.pdf and b/deal.II/contrib/umfpack/UMFPACK/Doc/UserGuide.pdf differ diff --git a/deal.II/contrib/umfpack/UMFPACK/Doc/UserGuide.sed1 b/deal.II/contrib/umfpack/UMFPACK/Doc/UserGuide.sed1 index c44a6408b1..c49e8c1504 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Doc/UserGuide.sed1 +++ b/deal.II/contrib/umfpack/UMFPACK/Doc/UserGuide.sed1 @@ -30,3 +30,4 @@ /INCLUDE umfpack_load_symbolic.h/r ../Include/umfpack_load_symbolic.h /INCLUDE umfpack_save_numeric.h/r ../Include/umfpack_save_numeric.h /INCLUDE umfpack_save_symbolic.h/r ../Include/umfpack_save_symbolic.h +/INCLUDE umfpack_get_determinant.h/r ../Include/umfpack_get_determinant.h diff --git a/deal.II/contrib/umfpack/UMFPACK/Doc/UserGuide.stex b/deal.II/contrib/umfpack/UMFPACK/Doc/UserGuide.stex index 99dc586642..4c45880bca 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Doc/UserGuide.stex +++ b/deal.II/contrib/umfpack/UMFPACK/Doc/UserGuide.stex @@ -20,8 +20,8 @@ \author{Timothy A. Davis \\ Dept. of Computer and Information Science and Engineering \\ Univ. of Florida, Gainesville, FL} -\title{UMFPACK Version 4.3 User Guide} -\date{Jan. 16, 2004} +\title{UMFPACK Version 4.4 User Guide} +\date{Jan. 28, 2005} \maketitle %------------------------------------------------------------------------------- @@ -36,9 +36,9 @@ Univ. of Florida, Gainesville, FL} \end{abstract} %------------------------------------------------------------------------------- -Technical Report TR-04-003. +Technical Report TR-04-003 (revised) -UMFPACK Version 4.3 (Jan. 16, 2004), Copyright\copyright 2004 by Timothy A. +UMFPACK Version 4.4 (Jan. 28, 2005), Copyright\copyright 2005 by Timothy A. Davis. All Rights Reserved. {\bf UMFPACK License:} @@ -83,7 +83,7 @@ Davis. All Rights Reserved. %------------------------------------------------------------------------------- UMFPACK\footnote{Pronounced with two syllables: umph-pack} -Version 4.3 is a set of routines for solving systems of linear +Version 4.4 is a set of routines for solving systems of linear equations, $\m{Ax}=\m{b}$, when $\m{A}$ is sparse and unsymmetric. It is based on the Unsymmetric-pattern MultiFrontal method \cite{DavisDuff97,DavisDuff99}. UMFPACK factorizes @@ -249,7 +249,7 @@ Row pivoting for sparsity and numerical accuracy is performed if the diagonal entry is too small. More details of the method, including experimental results, are -described in \cite{Davis03,Davis03}, available at +described in \cite{Davis03,Davis03_algo}, available at http://www.cise.ufl.edu/tech-reports. %------------------------------------------------------------------------------- @@ -257,12 +257,13 @@ http://www.cise.ufl.edu/tech-reports. %------------------------------------------------------------------------------- In addition to appearing as a Collected Algorithm of the ACM, -UMFPACK Version 4.3 is available at http://www.cise.ufl.edu/research/sparse. -An earlier version (Version 4.0) is included as a built-in routine in MATLAB -6.5. Version 4.0 does not have the symmetric or 2-by-2 strategies and it takes +UMFPACK Version 4.4 is available at http://www.cise.ufl.edu/research/sparse. +Version 4.3 is included as a built-in routine in MATLAB +7.1. Version 4.0 (in MATLAB 6.5) +does not have the symmetric or 2-by-2 strategies and it takes less advantage of the level-3 BLAS \cite{DaydeDuff99,ACM679a,ATLAS,GotoVandeGeijn02}. -Version 4.3 (and v4.2 and v4.1) tend to be much faster than Version 4.0, +Version 4.4 (and v4.3 through v4.1) tend to be much faster than Version 4.0, particularly on unsymmetric matrices with mostly symmetric nonzero pattern (such as finite element and circuit simulation matrices). Version 3.0 and following make @@ -278,7 +279,32 @@ MA38 (functionally equivalent to Version 2.2.1) in the Harwell Subroutine Library. %------------------------------------------------------------------------------- -\section{Primary changes since Version 4.1} +\section{Primary changes from prior versions} +%------------------------------------------------------------------------------- + +A detailed list of changes is in the {\tt ChangeLog} file. + +%------------------------------------------------------------------------------- +\subsection{Version 4.4} +%------------------------------------------------------------------------------- + +Bug fix in strategy selection in {\tt umfpack\_*\_qsymbolic}. +Added packed complex case for all complex input/output arguments. +Added {\tt umfpack\_get\_determinant}. +Added minimal support for Microsoft Visual Studio +(the {\tt umf\_multicompile.c} file). + +%------------------------------------------------------------------------------- +\subsection{Version 4.3.1} +%------------------------------------------------------------------------------- + +Minor bug fix in the forward/backsolve. This bug had the effect of turning +off iterative refinement when solving $\m{A}\tr\m{x}=\m{b}$ after factorizing +$\m{A}$. UMFPACK mexFunction now factorizes $\m{A}\tr$ in its forward-slash +operation. + +%------------------------------------------------------------------------------- +\subsection{Version 4.3} %------------------------------------------------------------------------------- No changes are visible to the C or MATLAB user, except the presence of @@ -287,11 +313,11 @@ and three new statistics in the {\tt Info} array. The primary change is the addition of an (optional) drop tolerance. %------------------------------------------------------------------------------- -\section{Primary changes in Version 4.1 (since Version 4.0)} +\subsection{Version 4.1} %------------------------------------------------------------------------------- -A detailed list of changes is in the {\tt ChangeLog} file. The following -is a summary of the main changes that are visible to the C or MATLAB user: +The following is a summary of the main changes that are visible to the C +or MATLAB user: \begin{enumerate} @@ -355,8 +381,8 @@ is a summary of the main changes that are visible to the C or MATLAB user: \section{Using UMFPACK in MATLAB} %------------------------------------------------------------------------------- -The easiest way to use UMFPACK is within MATLAB. Version 4.0 is a built-in -routine in MATLAB 6.5, and is used in {\tt x = A}$\backslash${\tt b} when +The easiest way to use UMFPACK is within MATLAB. Version 4.3 is a built-in +routine in MATLAB 7.1, and is used in {\tt x = A}$\backslash${\tt b} when {\tt A} is sparse, square, unsymmetric (or symmetric but not positive definite), and with nonzero entries that are not confined in a narrow band. It is also used for the {\tt [L,U,P,Q] = lu (A)} usage of {\tt lu}. @@ -379,10 +405,7 @@ of the UMFPACK mexFunction within MATLAB. An optional input argument can be used to modify the control parameters for UMFPACK, and an optional output argument provides statistics on the -factorization. UMFPACK will print these statistics if you turn -on the sparse matrix monitor flag with {\tt spparms ('spumoni', 1)}. -The UMFPACK printing level parameter described in Section~\ref{Reporting} -is set to {\tt spumoni} plus 1. Type {\tt help umfpack} for more information. +factorization. Refer to the AMD User Guide for more details about the AMD mexFunction. @@ -416,14 +439,17 @@ x = A \ b ; \hline & & \\ \begin{minipage}[t]{1.5in} -Solve $\m{Ax}=\m{b}$ using a different column pre-ordering. +Solve $\m{Ax}=\m{b}$ using a different row and column pre-ordering +(symmetric ordering). \end{minipage} & \begin{minipage}[t]{2.2in} \begin{verbatim} S = spones (A) ; Q = symamd (S+S') ; -x = umfpack (A,Q,'\',b) ; +Control = umfpack ; +Control (6) = 3 ; +x = umfpack (A,Q,'\',b,Control) ; \end{verbatim} \end{minipage} & @@ -432,7 +458,7 @@ x = umfpack (A,Q,'\',b) ; spparms ('autommd',0) ; S = spones (A) ; Q = symamd (S+S') ; -x = A (:,Q) \ b ; +x = A (Q,Q) \ b (Q) ; x (Q) = x ; spparms ('autommd',1) ; \end{verbatim} @@ -449,12 +475,14 @@ Solve $\m{A}\tr\m{x}\tr = \m{b}\tr$. \begin{verbatim} x = umfpack (b,'/',A) ; \end{verbatim} +Note: $\m{A}$ is factorized. \end{minipage} & \begin{minipage}[t]{2.2in} \begin{verbatim} x = b / A ; \end{verbatim} +Note: $\m{A}\tr$ is factorized. \end{minipage} \\ & & \\ @@ -492,7 +520,7 @@ x = Q * (U \ (L \ c)) ; } \end{table} -Note: in MATLAB 6.5, use {\tt spparms ('autoamd',0)} in addition to +Note: in MATLAB 6.5 or later, use {\tt spparms ('autoamd',0)} in addition to {\tt spparms ('autommd',0)}, in Table~\ref{matlab}, to turn off MATLAB's default reordering. @@ -502,7 +530,7 @@ This is more restrictive than what you can do with MATLAB's backslash or forward slash. See {\tt umfpack\_solve} for an M-file that removes this restriction. This restriction does not apply to the built-in backslash operator -in MATLAB 6.5, which uses UMFPACK v4.0 to factorize the matrix. +in MATLAB 6.5 or later, which uses UMFPACK to factorize the matrix. You can do this yourself in MATLAB: {\footnotesize @@ -602,13 +630,24 @@ and thus using {\tt utMalloc} might not always be successful. To use the documented {\tt mxMalloc} routine instead, compile the mexFunction with the {\tt -DNUTIL} flag enabled. +To compute the determinant with UMFPACK: + +\begin{verbatim} + d = umfpack (A, 'det') ; + [d e] = umfpack (A, 'det') ; +\end{verbatim} + +The first case is identical to MATLAB's {\tt det}. +The second case returns the determinant in the form +$d \times 10^e$, which avoids overflow if $e$ is large. + %------------------------------------------------------------------------------- \section{Using UMFPACK in a C program} \label{C} %------------------------------------------------------------------------------- -The C-callable UMFPACK library consists of 31 user-callable routines and one -include file. Twenty-seven of the routines come in four versions, with +The C-callable UMFPACK library consists of 32 user-callable routines and one +include file. All but three of the routines come in four versions, with different sizes of integers and for real or complex floating-point numbers: \begin{enumerate} \item {\tt umfpack\_di\_*}: real double precision, {\tt int} integers. @@ -616,7 +655,7 @@ different sizes of integers and for real or complex floating-point numbers: \item {\tt umfpack\_zi\_*}: complex double precision, {\tt int} integers. \item {\tt umfpack\_zl\_*}: complex double precision, {\tt long} integers. \end{enumerate} -where {\tt *} denotes the specific name of one of the 27 routines. +where {\tt *} denotes the specific name of one of the routines. Routine names beginning with {\tt umf\_} are internal to the package, and should not be called by the user. The include file {\tt umfpack.h} must be included in any C program that uses UMFPACK. @@ -630,7 +669,7 @@ for more details. Use only one version for any one problem; do not attempt to use one version to analyze the matrix and another version to factorize the matrix, for example. -The notation {\tt umfpack\_di\_*} refers to all 27 user-callable routines +The notation {\tt umfpack\_di\_*} refers to all user-callable routines for the real double precision and {\tt int} integer case. The notation {\tt umfpack\_*\_numeric}, for example, refers all four versions (real/complex, int/long) of a single operation @@ -669,7 +708,10 @@ precision arguments, and return double precision arguments. In the hold the real part of the matrices; and second double precision arrays hold the imaginary part of the input and output matrices. Internally, complex numbers are stored in arrays with their real and imaginary parts interleaved, -as required by the BLAS. +as required by the BLAS (``packed'' complex form). + +New to Version 4.4 is the option of providing input/output arguments +in packed complex form. %------------------------------------------------------------------------------- \subsection{Primary routines, and a simple example} @@ -770,13 +812,19 @@ The complex versions add another array for the imaginary part: \end{verbatim} } +Alternatively, if {\tt Az} is {\tt NULL}, +the real part of the $k$th entry is located in +{\tt Ax[2*k]} and the imaginary part is located in +{\tt Ax[2*k+1]}, and the {\tt Ax} array is of size {\tt 2*nz}. + All nonzeros are entries, but an entry may be numerically zero. The row indices of entries in column {\tt j} are stored in {\tt Ai[Ap[j]} \ldots {\tt Ap[j+1]-1]}. The corresponding numerical values are stored in {\tt Ax[Ap[j]} \ldots {\tt Ap[j+1]-1]}. The imaginary part, for the complex versions, is stored in - {\tt Az[Ap[j]} \ldots {\tt Ap[j+1]-1]}. + {\tt Az[Ap[j]} \ldots {\tt Ap[j+1]-1]} + (see above for the packed complex case). No duplicate row indices may be present, and the row indices in any given column must be sorted in ascending order. The first entry {\tt Ap[0]} must be @@ -950,7 +998,12 @@ $j =$ {\tt Tj[k]}, and $a_{ij} =$ {\tt Tx[k]}. For the complex versions, The triplets can be in any order in the {\tt Ti}, {\tt Tj}, and {\tt Tx} arrays (and {\tt Tz} for the complex versions), and duplicate entries may -exist. Any duplicate entries are summed when the triplet form is converted to +exist. +If {\tt Tz} is NULL, then the array {\tt Tx} becomes of size {\tt 2*nz}, +and the real and imaginary parts of the +{\tt k}-th triplet are located in {\tt Tx[2*k]} and {\tt Tx[2*k+1]}, +respectively. +Any duplicate entries are summed when the triplet form is converted to compressed column form. This is a convenient way to create a matrix arising in finite-element methods, for example. @@ -992,7 +1045,7 @@ Four routines are provided for manipulating sparse matrices: Applies the row scale factors to a user-provided vector. This is not required to solve the sparse linear system $\m{Ax}=\m{b}$ or $\m{A}\tr\m{x}=\m{b}$, since {\tt umfpack\_*\_solve} applies the scale - factors for those systems. This routine is new to Version 4.1. + factors for those systems. \end{itemize} @@ -1004,6 +1057,10 @@ however. Refer to the discussion of on how to compute these operations in your own code. The only primary matrix operation not provided by UMFPACK is the multiplication of two sparse matrices \cite{Gustavson78}. +A future package under development (as of Jan. 2005), CHOLMOD, +will provide many of these matrix operations, which +can then be used in conjunction with UMFPACK. +Watch my web page for details. %------------------------------------------------------------------------------- \subsection{Getting the contents of opaque objects} @@ -1016,6 +1073,7 @@ except to pass them back to subsequent calls to UMFPACK. Three routines are provided for copying their contents into user-provided arrays using simpler data structures. Four routines are provided for saving and loading the {\tt Numeric} and {\tt Symbolic} objects to/from binary files. +An additional routine is provided that computes the determinant. They are fully described in Section~\ref{Get}: \begin{itemize} @@ -1045,6 +1103,12 @@ They are fully described in Section~\ref{Get}: preordering, supernodal column elimination tree, and information about each frontal matrix) into arrays provided by the user. +\item {\tt umfpack\_*\_get\_determinant}: + + Computes the determinant from the diagonal of $\m{U}$ and the permutations + $\m{P}$ and $\m{Q}$. This is mostly of theoretical interest. + It is not a good test to determine if your matrix is singular or not. + \item {\tt umfpack\_*\_save\_numeric}: Saves a copy of the {\tt Numeric} object to a file, in binary format. @@ -1068,7 +1132,8 @@ They are fully described in Section~\ref{Get}: UMFPACK itself does not make use of these routines; they are provided solely for returning the contents of the opaque {\tt Symbolic} and {\tt Numeric} objects to the user, and saving/loading -them to/from a binary file. +them to/from a binary file. None of them do any computation, except for +{\tt umfpack\_*\_get\_determinant}. %------------------------------------------------------------------------------- \subsection{Reporting routines} @@ -1128,7 +1193,10 @@ compiled into the C-callable UMFPACK library than when used in the MATLAB mexFunction. MATLAB stores its sparse matrices using the same compressed column data structure discussed above, where row and column indices of an $m$-by-$n$ -matrix are in the range 0 to $m-1$ or $n-1$, respectively. +matrix are in the range 0 to $m-1$ or $n-1$, respectively\footnote{Complex +matrices in MATLAB use the split array form, with one {\tt double} array +for the real part and another array for the imaginary part. UMFPACK +supports that format, as well as the packed complex format (new to Version 4.4).} It prints them as if they are in the range 1 to $m$ or $n$. The UMFPACK mexFunction behaves the same way. @@ -1197,11 +1265,14 @@ versions (there is no {\tt umfpack\_di\_timer} routine, for example). UMFPACK uses an optional {\tt double} array (currently of size 20) to modify its control parameters. If you pass {\tt (double *) NULL} instead -of a {\tt Control} array, then defaults are used. +of a {\tt Control} array, then defaults are used. These defaults provide +nearly optimal performance (both speed, memory usage, and numerical accuracy) +for a wide range of matrices from real applications. + This array will almost certainly grow in size in future releases, so be sure to dimension your {\tt Control} array to be of size {\tt UMFPACK\_CONTROL}. That constant is currently defined to be 20, -but will increase in future versions. +but may increase in future versions, since all 20 entries are in use. The contents of this array may be modified by the user (see {\tt umfpack\_*\_defaults}). Each @@ -1279,15 +1350,15 @@ in Sections~\ref{Primary}~through~\ref{Report}, below. Many of the routines return a {\tt status} value. This is also returned as the first entry in the {\tt Info} array, for those routines with that argument. The following list summarizes -all of the error codes in UMFPACK v4.3. Each error code is given a +all of the error codes in UMFPACK. Each error code is given a specific name in the {\tt umfpack.h} include file, so you can use those constants instead of hard-coded values in your program. Future versions may report additional error codes. A value of zero means everything was successful, and the matrix is non-singular. A value greater than zero means the routine was successful, -but a warning occurred. Currently, the only warning code is when the -matrix is singular. A negative value means the routine was not successful. +but a warning occurred. +A negative value means the routine was not successful. In this case, no {\tt Symbolic} or {\tt Numeric} object was created. \begin{itemize} @@ -1296,6 +1367,14 @@ In this case, no {\tt Symbolic} or {\tt Numeric} object was created. \item {\tt UMFPACK\_WARNING\_singular\_matrix}, (1): Matrix is singular. There are exact zeros on the diagonal of $\m{U}$. +\item {\tt UMFPACK\_WARNING\_determinant\_underflow}, (2): + The determinant is nonzero, but smaller in magnitude than + the smallest positive floating-point number. + +\item {\tt UMFPACK\_WARNING\_determinant\_overflow}, (3): + The determinant is larger in magnitude than + the largest positive floating-point number (IEEE Inf). + \item {\tt UMFPACK\_ERROR\_out\_of\_memory}, (-1): Not enough memory. The ANSI C {\tt malloc} or {\tt realloc} routine failed. @@ -1308,7 +1387,9 @@ In this case, no {\tt Symbolic} or {\tt Numeric} object was created. If you try to factorize a matrix using one version of UMFPACK and then use the factors in another version, this error code will trigger as well. You cannot factor your matrix using - version 4.0 and then solve with version 4.1. + version 4.0 and then solve with version 4.1, for example.\footnote{ + Exception: v4.3, v4.3.1, and v4.4 use identical data structures + for the {\tt Numeric} and {\tt Symbolic} objects}. You cannot use different precisions of the same version (real and complex, for example). It is possible for the {\tt Numeric} object to be corrupted by your @@ -1327,9 +1408,11 @@ In this case, no {\tt Symbolic} or {\tt Numeric} object was created. Some arguments of some are optional (you can pass a {\tt NULL} pointer instead of an array). This error code occurs if you pass a {\tt NULL} pointer when that argument is required to be present. - \item {\tt UMFPACK\_ERROR\_n\_nonpositive} (-6): + +\item {\tt UMFPACK\_ERROR\_n\_nonpositive} (-6): The number of rows or columns of the matrix must be greater than zero. - \item {\tt UMFPACK\_ERROR\_invalid\_matrix} (-8): + +\item {\tt UMFPACK\_ERROR\_invalid\_matrix} (-8): The matrix is invalid. For the column-oriented input, this error code will occur if the contents of {\tt Ap} and/or {\tt Ai} are invalid. @@ -1444,7 +1527,10 @@ The matrix $\m{A}$ is {\tt m}-by-{\tt n} with {\tt nz} entries. The {\tt sys} argument of {\tt umfpack\_*\_solve} is an integer in the range 0 to 14 which defines which linear system is -to be solved. Valid values are listed in Table~\ref{sys}. +to be solved. +\footnote{Integer values for {\tt sys} are used instead of strings (as in LINPACK +and LAPACK) to avoid C-to-Fortran portability issues.} +Valid values are listed in Table~\ref{sys}. The notation $\m{A}\he$ refers to the matrix transpose, which is the complex conjugate transpose for complex matrices ({\tt A'} in MATLAB). The array transpose is $\m{A}\tr$, which is {\tt A.'} in MATLAB. @@ -1458,23 +1544,29 @@ The array transpose is $\m{A}\tr$, which is {\tt A.'} in MATLAB. \hline Value & & system \\ \hline +& & \\ {\tt UMFPACK\_A} & (0) & $\m{Ax}=\m{b}$ \\ {\tt UMFPACK\_At} & (1) & $\m{A}\he\m{x}=\m{b}$ \\ {\tt UMFPACK\_Aat} & (2) & $\m{A}\tr\m{x}=\m{b}$ \\ +& & \\ \hline +& & \\ {\tt UMFPACK\_Pt\_L} & (3) & $\m{P}\tr\m{Lx}=\m{b}$ \\ {\tt UMFPACK\_L} & (4) & $\m{Lx}=\m{b}$ \\ {\tt UMFPACK\_Lt\_P} & (5) & $\m{L}\he\m{Px}=\m{b}$ \\ {\tt UMFPACK\_Lat\_P} & (6) & $\m{L}\tr\m{Px}=\m{b}$ \\ {\tt UMFPACK\_Lt} & (7) & $\m{L}\he\m{x}=\m{b}$ \\ {\tt UMFPACK\_Lat} & (8) & $\m{L}\tr\m{x}=\m{b}$ \\ +& & \\ \hline +& & \\ {\tt UMFPACK\_U\_Qt} & (9) & $\m{UQ}\tr\m{x}=\m{b}$ \\ {\tt UMFPACK\_U} & (10) & $\m{Ux}=\m{b}$ \\ {\tt UMFPACK\_Q\_Ut} & (11) & $\m{QU}\he\m{x}=\m{b}$ \\ {\tt UMFPACK\_Q\_Uat} & (12) & $\m{QU}\tr\m{x}=\m{b}$ \\ {\tt UMFPACK\_Ut} & (13) & $\m{U}\he\m{x}=\m{b}$ \\ {\tt UMFPACK\_Uat} & (14) & $\m{U}\tr\m{x}=\m{b}$ \\ +& & \\ \hline \end{tabular} } @@ -1540,13 +1632,14 @@ The {\tt filename} string should be large enough to hold the name of a file. {\footnotesize \begin{verbatim} int lnz, unz, Lp [m+1], Lj [lnz], Up [n+1], Ui [unz], do_recip ; -double Lx [lnz], Ux [unz], D [min (m,n)], Rs [m] ; +double Lx [lnz], Ux [unz], D [min (m,n)], Rs [m], Mx [1], Ex [1] ; int nfr, nchains, P1 [m], Q1 [n], Front_npivcol [n+1], Front_parent [n+1], Front_1strow [n+1], Front_leftmostdesc [n+1], Chain_start [n+1], Chain_maxrows [n+1], Chain_maxcols [n+1] ; char filename [100] ; status = umfpack_di_get_lunz (&lnz, &unz, &m, &n, &nz_udiag, Numeric) ; -status = umfpack_di_get_numeric (Lp, Lj, Lx, Up, Ui, Ux, P, Q, D, &do_recip, Rs, Numeric) ; +status = umfpack_di_get_numeric (Lp, Lj, Lx, Up, Ui, Ux, P, Q, D, + &do_recip, Rs, Numeric) ; status = umfpack_di_get_symbolic (&m, &n, &n1, &nz, &nfr, &nchains, P1, Q1, Front_npivcol, Front_parent, Front_1strow, Front_leftmostdesc, Chain_start, Chain_maxrows, Chain_maxcols, Symbolic) ; @@ -1554,6 +1647,7 @@ status = umfpack_di_load_numeric (&Numeric, filename) ; status = umfpack_di_save_numeric (Numeric, filename) ; status = umfpack_di_load_symbolic (&Symbolic, filename) ; status = umfpack_di_save_symbolic (Symbolic, filename) ; +status = umfapck_di_get_determinant (Mx, Ex, Numeric, Info) ; \end{verbatim} } @@ -1599,6 +1693,9 @@ umfpack_zi_free_numeric (&Numeric) ; \end{verbatim} } +The arrays {\tt Ax}, {\tt Bx}, and {\tt Xx} double in size if +any imaginary argument ({\tt Az}, {\tt Xz}, or {\tt Bz}) is {\tt NULL}. + %------------------------------------------------------------------------------- \subsection{Alternative routines: complex/{\tt int}} %------------------------------------------------------------------------------- @@ -1629,13 +1726,16 @@ status = umfpack_zi_scale (Yx, Yz, Zx, Zz, Numeric) ; \end{verbatim} } +The arrays {\tt Tx}, {\tt Rx}, {\tt Yx}, and {\tt Zx} double in size if +any imaginary argument ({\tt Tz}, {\tt Rz}, {\tt Yz}, or {\tt Zz}) is {\tt NULL}. + %------------------------------------------------------------------------------- \subsection{Getting the contents of opaque objects: complex/{\tt int}} %------------------------------------------------------------------------------- {\footnotesize \begin{verbatim} -double Lz [lnz], Uz [unz], Dx [min (m,n)], Dz [min (m,n)] ; +double Lz [lnz], Uz [unz], Dx [min (m,n)], Dz [min (m,n)], Mz [1] ; status = umfpack_zi_get_lunz (&lnz, &unz, &m, &n, &nz_udiag, Numeric) ; status = umfpack_zi_get_numeric (Lp, Lj, Lx, Lz, Up, Ui, Ux, Uz, P, Q, Dx, Dz, @@ -1647,9 +1747,13 @@ status = umfpack_zi_load_numeric (&Numeric, filename) ; status = umfpack_zi_save_numeric (Numeric, filename) ; status = umfpack_zi_load_symbolic (&Symbolic, filename) ; status = umfpack_zi_save_symbolic (Symbolic, filename) ; +status = umfapck_zi_get_determinant (Mx, Mz, Ex, Numeric, Info) ; \end{verbatim} } +The arrays {\tt Lx}, {\tt Ux}, {\tt Dx}, and {\tt Mx} double in size if +any imaginary argument ({\tt Lz}, {\tt Uz}, {\tt Dz}, or {\tt Mz}) is {\tt NULL}. + %------------------------------------------------------------------------------- \subsection{Reporting routines: complex/{\tt int}} %------------------------------------------------------------------------------- @@ -1671,12 +1775,14 @@ status = umfpack_zi_report_vector (n, Xx, Xz, Control) ; \end{verbatim} } +The arrays {\tt Ax}, {\tt Rx}, {\tt Tx}, and {\tt Xx} double in size if +any imaginary argument ({\tt Az}, {\tt Rz}, {\tt Tz}, or {\tt Xz}) is {\tt NULL}. %------------------------------------------------------------------------------- -\section{Synopsis of utility routines} +\subsection{Utility routines} %------------------------------------------------------------------------------- These routines are the same in all four versions of UMFPACK. @@ -1693,7 +1799,7 @@ umfpack_toc (s) ; } %------------------------------------------------------------------------------- -\section{Synopsis of AMD ordering routines} +\subsection{AMD ordering routines} %------------------------------------------------------------------------------- UMFPACK makes use of the AMD ordering package for its symmetric ordering @@ -1720,7 +1826,7 @@ amd_info (amd_info) ; \section{Using UMFPACK in a Fortran program} %------------------------------------------------------------------------------- -UMFPACK v4.3 includes a basic Fortran 77 interface to some of the C-callable +UMFPACK includes a basic Fortran 77 interface to some of the C-callable UMFPACK routines. Since interfacing C and Fortran programs is not portable, this interface might not work with all C and Fortran compilers. Refer to Section~\ref{Install} for @@ -1871,17 +1977,23 @@ the matrix, solution, and right-hand-side, respectively. The \end{verbatim} } +The Fortran interface does not support the packed complex case. + %------------------------------------------------------------------------------- -\section{Installing the C library} +\section{Installation} \label{Install} %------------------------------------------------------------------------------- +%------------------------------------------------------------------------------- +\subsection{Installing the C library} +%------------------------------------------------------------------------------- + The following discussion assumes you have the {\tt make} program, either in Unix, or in Windows with Cygwin\footnote{www.cygwin.com}. You can skip this section and go to next one if all you want to use is the UMFPACK and AMD mexFunctions in MATLAB. -You will need to install both UMFPACK v4.3 and AMD v1.1 (or AMD v1.0) to use UMFPACK. +You will need to install both UMFPACK v4.4 and AMD v1.1 (or AMD v1.0) to use UMFPACK. The {\tt UMFPACK} and {\tt AMD} subdirectories must be placed side-by-side within the same directory. AMD is a stand-alone package that is required by UMFPACK. UMFPACK can be compiled without the @@ -2054,8 +2166,11 @@ Harwell/Boeing matrices. Note that this uses a stand-alone Fortran program to read in the Fortran-formatted Harwell/Boeing matrices and write them to a file which can be read by a C program. +The {\tt umf\_multicompile.c} file has been added to assist in the +compilation of UMFPACK in Microsoft Visual Studio, for Windows. + %------------------------------------------------------------------------------- -\section{Installing the MATLAB interface} +\subsection{Installing the MATLAB interface} %------------------------------------------------------------------------------- If all you want to do is use the UMFPACK mexFunction in MATLAB, you can skip @@ -2064,8 +2179,7 @@ the use of the {\tt make} command described above. Simply type You can also type {\tt amd\_make} in the {\tt AMD/MATLAB} directory to compile the stand-alone AMD mexFunction (this is not required to compile the UMFPACK mexFunction). This works on any computer with MATLAB, -including Windows. This method of creating the UMFPACK mexFunction -has been tested with MATLAB 5.3, 6.1, and 6.5. +including Windows. You will be prompted to select several configuration options, including whether or not to use the BLAS. @@ -2089,7 +2203,7 @@ this file to the location listed above. If you have MATLAB 6.5 or later, you can probably skip this step. %------------------------------------------------------------------------------- -\section{Installing the Fortran interface} +\subsection{Installing the Fortran interface} %------------------------------------------------------------------------------- Once the 32-bit C-callable UMFPACK library is compiled, you can also compile @@ -2114,7 +2228,7 @@ You may need to modify the interface routines in the file has not been tested. %------------------------------------------------------------------------------- -\section{Known Issues} +\subsection{Known Issues} %------------------------------------------------------------------------------- The Microsoft C or C++ compilers on a Pentium badly break the IEEE 754 standard, @@ -2150,7 +2264,7 @@ all of these warnings. \label{Future} %------------------------------------------------------------------------------- -Here are a few features that are not in UMFPACK Version 4.3, in no particular +Here are a few features that are not in UMFPACK Version 4.4, in no particular order. They may appear in a future release of UMFPACK. If you are interested, let me know and I could consider including them: @@ -2198,7 +2312,8 @@ let me know and I could consider including them: to C and included in UMFPACK. This would result in better performance for matrices from circuit simulation and chemical process engineering. See {\tt umfpack\_btf.m} for the MATLAB - version of this feature. + version of this feature. An upcoming package (KLU) will include + this feature. \item The ability to use user-provided {\tt malloc}, {\tt free}, and {\tt realloc} memory allocation routines. Note that UMFPACK makes very @@ -2220,11 +2335,6 @@ let me know and I could consider including them: The method used in UMFPACK exploits super-columns, however, so this bound is rarely reached. -\item The complex versions could use ANSI C99 {\tt double \_Complex} arguments, - and support the use of interleaved real/imaginary parts as input and output - arguments. The \newline - {\tt umfpack\_*\_report\_vector} routine is one example. - \item Other basic sparse matrix operations, such as sparse matrix multiplication, could be included. @@ -2433,6 +2543,15 @@ INCLUDE umfpack_load_symbolic.h via sed \end{verbatim} } +\newpage +\subsection{umfpack\_*\_get\_determinant} + +{\footnotesize +\begin{verbatim} +INCLUDE umfpack_get_determinant.h via sed +\end{verbatim} +} + %------------------------------------------------------------------------------- \newpage \section{Reporting routines} diff --git a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack.h b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack.h index c1918f6e51..d41f1b34b4 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack.h @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -24,7 +23,10 @@ /* size of Info and Control arrays */ /* -------------------------------------------------------------------------- */ -#define UMFPACK_INFO 90 /* these might be larger in future versions */ +/* These might be larger in future versions, since there are only 3 unused + * entries in Info, and no unused entries in Control. */ + +#define UMFPACK_INFO 90 #define UMFPACK_CONTROL 20 /* -------------------------------------------------------------------------- */ @@ -57,6 +59,7 @@ #include "umfpack_load_numeric.h" #include "umfpack_save_symbolic.h" #include "umfpack_load_symbolic.h" +#include "umfpack_get_determinant.h" /* Reporting routines (the above 14 routines print nothing): */ #include "umfpack_report_status.h" @@ -77,10 +80,10 @@ /* Version, copyright, and license */ /* -------------------------------------------------------------------------- */ -#define UMFPACK_VERSION "UMFPACK V4.3 (Jan. 16, 2004)" +#define UMFPACK_VERSION "UMFPACK V4.4 (Jan. 28, 2005)" #define UMFPACK_COPYRIGHT \ -"UMFPACK: Copyright (c) 2004 by Timothy A. Davis. All Rights Reserved.\n" +"UMFPACK: Copyright (c) 2005 by Timothy A. Davis. All Rights Reserved.\n" #define UMFPACK_LICENSE_PART1 \ "\nUMFPACK License:\n" \ @@ -111,7 +114,8 @@ /* contents of Info */ /* -------------------------------------------------------------------------- */ -/* Note that umfpack_report.m must coincide with these definitions. */ +/* Note that umfpack_report.m must coincide with these definitions. S is + * the submatrix of A after removing row/col singletons and empty rows/cols. */ /* returned by all routines that use Info: */ #define UMFPACK_STATUS 0 /* UMFPACK_OK, or other result */ @@ -158,10 +162,10 @@ #define UMFPACK_2BY2_NZDIAG 55 /* nz on diagonal of PS+(PS)' */ /* statistcs for singleton pruning */ -#define UMFPACK_COL_SINGLETONS 56 -#define UMFPACK_ROW_SINGLETONS 57 -#define UMFPACK_N2 58 -#define UMFPACK_S_SYMMETRIC 59 +#define UMFPACK_COL_SINGLETONS 56 /* # of column singletons */ +#define UMFPACK_ROW_SINGLETONS 57 /* # of row singletons */ +#define UMFPACK_N2 58 /* size of S */ +#define UMFPACK_S_SYMMETRIC 59 /* 1 if S square and symmetricly perm.*/ /* estimates computed in UMFPACK_*symbolic: */ #define UMFPACK_NUMERIC_SIZE_ESTIMATE 20 /* final size of Numeric->Memory */ @@ -267,15 +271,6 @@ #define UMFPACK_COMPILED_WITH_GETRUSAGE 10 /* uses getrusage timer, or not */ #define UMFPACK_COMPILED_IN_DEBUG_MODE 11 /* debugging enabled (very slow!) */ -#if 0 -/* No longer unused. These parameters are now used for the new symmetric and - * 2-by-2 ordering strategies. See 5, 12, 13, and 14, above. */ -#define UMFPACK_RELAXED_AMALGAMATION 5 /* unused (was in v4.0) */ -#define UMFPACK_PIVOT_OPTION 12 /* unused (was in v3.2) */ -#define UMFPACK_RELAXED2_AMALGAMATION 13 /* unused (was in v4.0) */ -#define UMFPACK_RELAXED3_AMALGAMATION 14 /* unused (was in v4.0) */ -#endif - /* -------------------------------------------------------------------------- */ /* Control [UMFPACK_STRATEGY] is one of the following: */ @@ -297,16 +292,6 @@ /* default values of Control: */ /* -------------------------------------------------------------------------- */ -/* Note that the default block sized changed for Version 3.1 and following. - * In Version 4.1, the relaxed amalgamation parameters were removed. These are - * now fixed internally (see umf_local_search.c), and cannot be changed. - * COLAMD aggressive absorption did not exist in v4.0. In v4.1, it is in - * use by default (but can be turned off). Aggressive absorption is used by - * default in AMD, also. - * - * Drop tolerance was added in V4.2. - */ - #define UMFPACK_DEFAULT_PRL 1 #define UMFPACK_DEFAULT_DENSE_ROW 0.2 #define UMFPACK_DEFAULT_DENSE_COL 0.2 @@ -324,13 +309,6 @@ #define UMFPACK_DEFAULT_AGGRESSIVE 1 #define UMFPACK_DEFAULT_DROPTOL 0 -#if 0 -/* no longer unused: for unsymmetric strategy (were used in v4.0) */ -#define UMFPACK_DEFAULT_RELAXED_AMALGAMATION 0.25 /* unused */ -#define UMFPACK_DEFAULT_RELAXED2_AMALGAMATION 0.1 /* unused */ -#define UMFPACK_DEFAULT_RELAXED3_AMALGAMATION 0.125 /* unused */ -#endif - /* default values of Control may change in future versions of UMFPACK. */ /* -------------------------------------------------------------------------- */ @@ -343,6 +321,10 @@ /* A Symbolic or Numeric object was still created. */ #define UMFPACK_WARNING_singular_matrix (1) +/* The following warnings were added in umfpack_*_get_determinant */ +#define UMFPACK_WARNING_determinant_underflow (2) +#define UMFPACK_WARNING_determinant_overflow (3) + /* status < 0 means an error, and the method was not successful. */ /* No Symbolic of Numeric object was created. */ #define UMFPACK_ERROR_out_of_memory (-1) @@ -350,26 +332,13 @@ #define UMFPACK_ERROR_invalid_Symbolic_object (-4) #define UMFPACK_ERROR_argument_missing (-5) #define UMFPACK_ERROR_n_nonpositive (-6) -#define UMFPACK_ERROR_invalid_matrix (-8) /* replaces errors -[7:10,12,14] */ +#define UMFPACK_ERROR_invalid_matrix (-8) #define UMFPACK_ERROR_different_pattern (-11) #define UMFPACK_ERROR_invalid_system (-13) #define UMFPACK_ERROR_invalid_permutation (-15) -#define UMFPACK_ERROR_internal_error (-911) +#define UMFPACK_ERROR_internal_error (-911) /* yes, call me if you get this! */ #define UMFPACK_ERROR_file_IO (-17) -/* The following error codes are no longer used. They are left in for - * historical reasons. They appeared in Version 4.0. Most of them are combined - * into the single UMFPACK_ERROR_invalid_matrix error code (-8). The last one, - * UMFPACK_ERROR_problem_too_large, has been removed. This error can no longer - * occur. */ -#define UMFPACK_ERROR_nz_negative (-7) /* unused */ -#define UMFPACK_ERROR_jumbled_matrix (-8) /* unused */ -#define UMFPACK_ERROR_Ap0_nonzero (-9) /* unused */ -#define UMFPACK_ERROR_row_index_out_of_bounds (-10) /* unused */ -#define UMFPACK_ERROR_col_length_negative (-12) /* unused */ -#define UMFPACK_ERROR_invalid_triplet (-14) /* unused */ -#define UMFPACK_ERROR_problem_too_large (-16) /* unused */ - /* -------------------------------------------------------------------------- */ /* solve codes */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_col_to_triplet.h b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_col_to_triplet.h index 54cb72237f..fdfde6e6d1 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_col_to_triplet.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_col_to_triplet.h @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_defaults.h b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_defaults.h index ee6106914a..8f3ff5ee4c 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_defaults.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_defaults.h @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -58,11 +57,6 @@ Purpose: Sets the default control parameter settings. - NOTE: new control parameters have been added to the Control array for - Version 4.1. These entries were unused in Version 4.0. The default block - size for the BLAS has increased from 24 to 32. Some rarely used control - parameters have been removed (those that controlled relaxed amalgamation). - Arguments: double Control [UMFPACK_CONTROL] ; Output argument. diff --git a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_free_numeric.h b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_free_numeric.h index e0b4ea7d41..e1d81163ed 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_free_numeric.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_free_numeric.h @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_free_symbolic.h b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_free_symbolic.h index 103988a7f6..c9806e528b 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_free_symbolic.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_free_symbolic.h @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_get_determinant.h b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_get_determinant.h new file mode 100644 index 0000000000..e568674dfd --- /dev/null +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_get_determinant.h @@ -0,0 +1,192 @@ +/* ========================================================================== */ +/* === UMFPACK_get_determinant ============================================== */ +/* ========================================================================== */ + +/* -------------------------------------------------------------------------- */ +/* UMFPACK Version 4.4, 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_determinant +( + double *Mx, + double *Ex, + void *NumericHandle, + double User_Info [UMFPACK_INFO] +) ; + +long umfpack_dl_get_determinant +( + double *Mx, + double *Ex, + void *NumericHandle, + double User_Info [UMFPACK_INFO] +) ; + +int umfpack_zi_get_determinant +( + double *Mx, + double *Mz, + double *Ex, + void *NumericHandle, + double User_Info [UMFPACK_INFO] +) ; + +long umfpack_zl_get_determinant +( + double *Mx, + double *Mz, + double *Ex, + void *NumericHandle, + double User_Info [UMFPACK_INFO] +) ; + +/* +double int Syntax: + + #include "umfpack.h" + void *Numeric ; + int status ; + double Mx, Ex, Info [UMFPACK_INFO] ; + status = umfpack_di_get_determinant (&Mx, &Ex, Numeric, Info) ; + +double long Syntax: + + #include "umfpack.h" + void *Numeric ; + long status ; + double Mx, Ex, Info [UMFPACK_INFO] ; + status = umfpack_dl_get_determinant (&Mx, &Ex, Numeric, Info) ; + +complex int Syntax: + + #include "umfpack.h" + void *Numeric ; + int status ; + double Mx, Mz, Ex, Info [UMFPACK_INFO] ; + status = umfpack_zi_get_determinant (&Mx, &Mz, &Ex, Numeric, Info) ; + +complex int Syntax: + + #include "umfpack.h" + void *Numeric ; + long status ; + double *Mx, *Mz, *Ex, Info [UMFPACK_INFO] ; + status = umfpack_zl_get_determinant (&Mx, &Mz, &Ex, Numeric, Info) ; + +packed complex int Syntax: + + Same as above, except Mz is NULL. + +Purpose: + + Using the LU factors and the permutation vectors contained in the Numeric + object, calculate the determinant of the matrix A. + + The value of the determinant can be returned in two forms, depending on + whether Ex is NULL or not. If Ex is NULL then the value of the determinant + is returned on Mx and Mz for the real and imaginary parts. However, to + avoid over- or underflows, the determinant can be split into a mantissa + and exponent, and the parts returned separately, in which case Ex is not + NULL. The actual determinant is then given by + + double det ; + det = Mx * pow (10.0, Ex) ; + + for the double case, or + + double det [2] ; + det [0] = Mx * pow (10.0, Ex) ; // real part + det [1] = Mz * pow (10.0, Ex) ; // imaginary part + + for the complex case. Information on if the determinant will or has + over or under-flowed is given by Info [UMFPACK_STATUS]. + + In the "packed complex" syntax, Mx [0] holds the real part and Mx [1] + holds the imaginary part. Mz is not used (it is NULL). + +Returns: + + Returns UMFPACK_OK if sucessful. Returns UMFPACK_ERROR_out_of_memory if + insufficient memory is available for the n_row integer workspace that + umfpack_*_get_determinant allocates to construct pivots from the + permutation vectors. Returns UMFPACK_ERROR_invalid_Numeric_object if the + Numeric object provided as input is invalid. Returns + UMFPACK_WARNING_singular_matrix if the determinant is zero. Returns + UMFPACK_WARNING_determinant_underflow or + UMFPACK_WARNING_determinant_overflow if the determinant has underflowed + overflowed (for the case when Ex is NULL), or will overflow if Ex is not + NULL and det is computed (see above) in the user program. + +Arguments: + + double *Mx ; Output argument (array of size 1, or size 2 if Mz is NULL) + double *Mz ; Output argument (optional) + double *Ex ; Output argument (optional) + + The determinant returned in mantissa/exponent form, as discussed above. + If Mz is NULL, then both the original and imaginary parts will be + returned in Mx. If Ex is NULL then the determinant is returned directly + in Mx and Mz (or Mx [0] and Mx [1] if Mz is NULL), rather than in + mantissa/exponent form. + + void *Numeric ; Input argument, not modified. + + Numeric must point to a valid Numeric object, computed by + umfpack_*_numeric. + + double Info [UMFPACK_INFO] ; Output argument. + + Contains information about the calculation of the determinant. If a + (double *) NULL pointer is passed, then no statistics are returned in + Info (this is not an error condition). The following statistics are + computed in umfpack_*_determinant: + + Info [UMFPACK_STATUS]: status code. This is also the return value, + whether or not Info is present. + + UMFPACK_OK + + The determinant was successfully found. + + UMFPACK_ERROR_out_of_memory + + Insufficient memory to solve the linear system. + + UMFPACK_ERROR_argument_missing + + Mx is missing (NULL). + + UMFPACK_ERROR_invalid_Numeric_object + + The Numeric object is not valid. + + UMFPACK_ERROR_invalid_system + + The matrix is rectangular. Only square systems can be + handled. + + UMFPACK_WARNING_singluar_matrix + + The determinant is zero or NaN. The matrix is singular. + + UMFPACK_WARNING_determinant_underflow + + When passing from mantissa/exponent form to the determinant + an underflow has or will occur. If the mantissa/exponent from + of obtaining the determinant is used, the underflow will occur + in the user program. If the single argument method of + obtaining the determinant is used, the underflow has already + occurred. + + UMFPACK_WARNING_determinant_overflow + + When passing from mantissa/exponent form to the determinant + an overflow has or will occur. If the mantissa/exponent from + of obtaining the determinant is used, the overflow will occur + in the user program. If the single argument method of + obtaining the determinant is used, the overflow has already + occurred. + +*/ diff --git a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_get_lunz.h b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_get_lunz.h index 8f9d4b0fab..62381e52ed 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_get_lunz.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_get_lunz.h @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_get_numeric.h b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_get_numeric.h index 42001c4b83..f071f2375f 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_get_numeric.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_get_numeric.h @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -110,14 +109,17 @@ complex long Syntax: 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 Numeric object into user-accessible arrays. This routine is not needed to solve a linear 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 on - input. Similarly, Lz, Uz and Dz must exist on input for the complex - versions. + input. All output arguments are optional. If any of them are NULL on input, then that part of the LU factorization is not copied. You can @@ -141,7 +143,7 @@ Arguments: Int Lp [n_row+1] ; Output argument. Int Lj [lnz] ; Output argument. - double Lx [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-row @@ -155,19 +157,19 @@ Arguments: respectively. Each row is stored in sorted order, from low column indices to higher. The last entry in each row is the diagonal, which is numerically equal to one. The sizes of Lp, Lj, Lx, and Lz are - returned by umfpack_*_get_lunz. If Lp, Lj, or Ux (or Uz for the - complex version) 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 complex versions) are passed to - umfpack_*_report_matrix (using the "row" form). - - Future complex version: if Lx is present and Lz is NULL, then both real - and imaginary parts will be returned in Lx[0..2*lnz-1], with Lx[2*k] + returned 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 split + complex case) are passed to umfpack_*_report_matrix (using the + "row" form). + + If Lx is present and Lz is NULL, then both real + and 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. + 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-column @@ -181,14 +183,14 @@ Arguments: respectively. Each column is stored in sorted order, from low row indices to higher. The last entry in each column is the diagonal (assuming that it is nonzero). The sizes of Up, Ui, Ux, and Uz are - returned by umfpack_*_get_lunz. If Up, Ui, or Ux (or Uz for the complex - version) 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 the complex versions) are passed to - umfpack_*_report_matrix (using the "column" form). - - Future complex version: if Ux is present and Uz is NULL, then both real - and imaginary parts will be returned in Ux[0..2*unz-1], with Ux[2*k] + returned 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 the + split complex case) are passed to umfpack_*_report_matrix (using the + "column" form). + + If Ux is present and Uz is NULL, then both real + and 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. @@ -208,7 +210,8 @@ Arguments: the description of Qtree and Front_npivcol in umfpack_*_get_symbolic for details. - double Dx [min(n_row,n_col)] ; Output argument. + double Dx [min(n_row,n_col)] ; Output argument. Size 2*n for + the 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 the @@ -216,8 +219,8 @@ Arguments: Dz for the complex version) and passing Up, Ui, and Ux as NULL. Dx is the real part of the diagonal, and Dz is the imaginary part. - Future complex version: if Dx is present and Dz is NULL, then both real - and imaginary parts will be returned in Dx[0..2*min(n_row,n_col)-1], + If Dx is present and Dz is NULL, then both real + and 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 kth entry. @@ -231,8 +234,6 @@ Arguments: built-in routine or as a mexFunction, then the NRECIPROCAL flag is set, and do_recip will always be zero (false). - NOTE: this argument is new to version 4.1. - double Rs [n_row] ; Output argument. The row scale factors are returned in Rs [0..n_row-1]. Row i of A is @@ -244,8 +245,6 @@ Arguments: the complex version, an approximate absolute value is used (|x_real|+|x_imag|). - NOTE: this argument is new to version 4.1. - void *Numeric ; Input argument, not modified. Numeric must point to a valid Numeric object, computed by diff --git a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_get_symbolic.h b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_get_symbolic.h index 5c48418a6c..d509e1ecb8 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_get_symbolic.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_get_symbolic.h @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -183,8 +182,6 @@ Arguments: in the pivot row, or the pivot column, or both). These appear first in the output permutations P and Q. - NOTE: this argument is new to version 4.1. - Int *nz ; Output argument. The number of nonzeros in A. @@ -281,11 +278,11 @@ Arguments: Front_1strow [k] is the row index of the first row in A (P,Q) whose leftmost entry is in a pivot column for the kth front. This is - necessary only to properly factorize singular matrices. It is new to - Version 4.0. Rows in the range Front_1strow [k] to - Front_1strow [k+1]-1 first become pivot row candidates at the kth front. - Any rows not eliminated in the kth front may be selected as pivot rows - in the parent of k (Front_parent [k]) and so on up the tree. + necessary only to properly factorize singular matrices. Rows in the + range Front_1strow [k] to Front_1strow [k+1]-1 first become pivot row + candidates at the kth front. Any rows not eliminated in the kth front + may be selected as pivot rows in the parent of k (Front_parent [k]) + and so on up the tree. Int Front_leftmostdesc [n_col+1] ; Output argument. diff --git a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_load_numeric.h b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_load_numeric.h index 7d1f3b33dc..29d65963eb 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_load_numeric.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_load_numeric.h @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_load_symbolic.h b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_load_symbolic.h index 69ece02688..fe70ecfb3b 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_load_symbolic.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_load_symbolic.h @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_numeric.h b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_numeric.h index a57fd0d012..f97d68396b 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_numeric.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_numeric.h @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -85,9 +84,13 @@ complex long Syntax: void *Symbolic, *Numeric ; long *Ap, *Ai, status ; double *Ax, *Az, Control [UMFPACK_CONTROL], Info [UMFPACK_INFO] ; - status = umfpack_zl_numeric (Ap, Ai, Ax, Symbolic, &Numeric, + status = umfpack_zl_numeric (Ap, Ai, Ax, Az, Symbolic, &Numeric, Control, Info) ; +packed complex Syntax: + + Same as above, except that Az is NULL. + Purpose: Given a sparse matrix A in column-oriented form, and a symbolic analysis @@ -119,6 +122,7 @@ Arguments: This must be identical to the Ai array passed to umfpack_*_*symbolic. double Ax [nz] ; Input argument, not modified, of size nz = Ap [n_col]. + Size 2*nz for packed complex case. The numerical values of the sparse matrix A. The nonzero pattern (row indices) for column j is stored in Ai [(Ap [j]) ... (Ap [j+1]-1)], and @@ -130,8 +134,8 @@ Arguments: For the complex versions, this holds the imaginary part of A. The imaginary part of column j is held in Az [(Ap [j]) ... (Ap [j+1]-1)]. - Future complex version: if Ax is present and Az is NULL, then both real - and imaginary parts will be contained in Ax[0..2*nz-1], with Ax[2*k] + If Az is NULL, then both real + and imaginary parts are contained in Ax[0..2*nz-1], with Ax[2*k] and Ax[2*k+1] being the real and imaginary part of the kth entry. void *Symbolic ; Input argument, not modified. @@ -162,8 +166,7 @@ Arguments: greater than or equal to Control [UMFPACK_PIVOT_TOLERANCE] times the largest absolute value in the column. A value of 1.0 gives true partial pivoting. If less than or equal to zero, then any nonzero - entry is numerically acceptable as a pivot (this is changed from - Version 4.0). Default: 0.1. + entry is numerically acceptable as a pivot. Default: 0.1. Smaller values tend to lead to sparser LU factors, but the solution to the linear system can become inaccurate. Larger values can lead @@ -175,7 +178,7 @@ Arguments: instead of the more expensive-to-compute exact absolute value sqrt (a_real^2 + a_imag^2)). - Control [UMFPACK_SYM_PIVOT_TOLERANCE]: This parameter is new to V4.1. + Control [UMFPACK_SYM_PIVOT_TOLERANCE]: If diagonal pivoting is attempted (the symmetric or symmetric-2by2 strategies are used) then this parameter is used to control when the diagonal entry is selected in a given pivot column. The absolute @@ -208,8 +211,7 @@ Arguments: In both cases, the symmetry of the Schur complement is preserved. - Control [UMFPACK_SCALE]: This parameter is new to V4.1. Version 4.0 - did not scale the matrix. Note that the user's input matrix is + Control [UMFPACK_SCALE]: Note that the user's input matrix is never modified, only an internal copy is scaled. There are three valid settings for this parameter. If any other @@ -236,7 +238,7 @@ Arguments: Default: UMFPACK_SCALE_SUM. - Control [UMFPACK_ALLOC_INIT]: This parameter has changed in V4.1. + Control [UMFPACK_ALLOC_INIT]: When umfpack_*_numeric starts, it allocates memory for the Numeric object. Part of this is of fixed size (approximately n double's + @@ -281,7 +283,7 @@ Arguments: The strategy of attempting to "malloc" a working space, and re-trying with a smaller space, may not work under MATLAB, since mxMalloc aborts the mexFunction if it fails. The built-in umfpack - routine (version 4.0) in MATLAB 6.5 uses utMalloc instead, which + routine in MATLAB 6.5 uses utMalloc instead, which avoids this problem. As a mexFunction, utMalloc is used unless -DNUTIL is defined at compile time. The utMalloc routine, and utFree and utRealloc, are not documented. If the mexFunction @@ -298,7 +300,7 @@ Arguments: count. It has a small impact on run-time (the extra time required to do the garbage collection and memory reallocation). - Control [UMFPACK_FRONT_ALLOC_INIT]: This parameter is new to V4.1. + Control [UMFPACK_FRONT_ALLOC_INIT]: When UMFPACK starts the factorization of each "chain" of frontal matrices, it allocates a working array to hold the frontal matrices @@ -320,7 +322,7 @@ Arguments: Default: 0.5. - Control [UMFPACK_DROPTOL]: This parameter is new to V4.2. + Control [UMFPACK_DROPTOL]: Entries in L and U with absolute value less than or equal to the drop tolerance are removed from the data structures (unless leaving @@ -500,10 +502,6 @@ Arguments: Info [UMFPACK_MAX_FRONT_SIZE]: the size of the largest frontal matrix (number of entries). - ------------------------------------------------------------------------ - The following statistics were added to Version 4.1: - ------------------------------------------------------------------------ - Info [UMFPACK_NUMERIC_WALLTIME]: The wallclock time taken, in seconds. Info [UMFPACK_MAX_FRONT_NROWS]: the max number of @@ -532,10 +530,6 @@ Arguments: Info [UMFPACK_NOFF_DIAG]: number of off-diagonal pivots selected, if the symmetric or 2-by-2 strategies are used. - ------------------------------------------------------------------------ - The following statistics were added to Version 4.2: - ------------------------------------------------------------------------ - Info [UMFPACK_NZDROPPED]: the number of entries smaller in absolute value than Control [UMFPACK_DROPTOL] that were dropped from L and U. Note that entries on the diagonal of U are never dropped. diff --git a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_qsymbolic.h b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_qsymbolic.h index 23088a12de..f93de8589e 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_qsymbolic.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_qsymbolic.h @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -98,6 +97,10 @@ complex long Syntax: status = umfpack_zl_qsymbolic (n_row, n_col, Ap, Ai, Ax, Az, Qinit, &Symbolic, Control, Info) ; +packed complex Syntax: + + Same as above, except Az is NULL. + Purpose: Given the nonzero pattern of a sparse matrix A in column-oriented form, and @@ -137,4 +140,11 @@ Arguments: column of the matrix A (:,Qinit) to be factorized. If Qinit is an (Int *) NULL pointer, then COLAMD or AMD are called instead. + double Control [UMFPACK_CONTROL] ; Input argument, not modified. + + If Qinit is not NULL, then only two strategies are recognized: + the unsymmetric strategy and the symmetric strategy. + If Control [UMFPACK_STRATEGY] is UMFPACK_STRATEGY_SYMMETRIC, + then the symmetric strategy is used. Otherwise the unsymmetric + strategy is used. */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_control.h b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_control.h index 6aebfdf5b5..607185c1a6 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_control.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_control.h @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_info.h b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_info.h index ccba175018..0f7970903a 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_info.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_info.h @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_matrix.h b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_matrix.h index b0225dae30..831d32ca34 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_matrix.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_matrix.h @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -94,6 +93,10 @@ or: status = umfpack_zl_report_matrix (n_row, n_col, Ap, Ai, Ax, Az, 0, Control) ; +packed complex Syntax: + + Same as above, except Az is NULL. + Purpose: Verifies and prints a row or column-oriented sparse matrix. @@ -149,6 +152,7 @@ Arguments: to n_col-1 (the matrix is 0-based). double Ax [nz] ; Input argument, not modified, of size nz = Ap [n]. + Size 2*nz for packed complex case. The numerical values of the sparse matrix A. @@ -156,23 +160,24 @@ Arguments: for column j is stored in Ai [(Ap [j]) ... (Ap [j+1]-1)], and the corresponding (real) numerical values are stored in Ax [(Ap [j]) ... (Ap [j+1]-1)]. The imaginary parts are stored in - Az [(Ap [j]) ... (Ap [j+1]-1)], for the complex versions. + Az [(Ap [j]) ... (Ap [j+1]-1)], for the complex versions + (see below if Az is NULL). Otherwise, the nonzero pattern (column indices) for row j is stored in Ai [(Ap [j]) ... (Ap [j+1]-1)], and the corresponding (real) numerical values are stored in Ax [(Ap [j]) ... (Ap [j+1]-1)]. The imaginary parts are stored in Az [(Ap [j]) ... (Ap [j+1]-1)], - for the complex versions. + for the complex versions (see below if Az is NULL). - No numerical values are printed if Ax or Az are (double *) NULL. + No numerical values are printed if Ax is NULL. double Az [nz] ; Input argument, not modified, for complex versions. The imaginary values of the sparse matrix A. See the description - of Ax, above. No numerical values are printed if Az is NULL. + of Ax, above. - Future complex version: if Ax is present and Az is NULL, then both real - and imaginary parts will be contained in Ax[0..2*nz-1], with Ax[2*k] + If Az is NULL, then both real + and imaginary parts are contained in Ax[0..2*nz-1], with Ax[2*k] and Ax[2*k+1] being the real and imaginary part of the kth entry. Int col_form ; Input argument, not modified. diff --git a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_numeric.h b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_numeric.h index 54fd8f7ffe..28bad670bb 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_numeric.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_numeric.h @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_perm.h b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_perm.h index 17969dd6e1..cffab230e6 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_perm.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_perm.h @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_status.h b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_status.h index 7d826de56f..3d1e9e0d82 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_status.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_status.h @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -80,7 +79,7 @@ Arguments: 0 or less: no output, even when an error occurs 1: error messages only - 2 or more: print status, whether or not an error occured + 2 or more: print status, whether or not an error occurred 4 or more: also print the UMFPACK Copyright 6 or more: also print the UMFPACK License Default: 1 diff --git a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_symbolic.h b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_symbolic.h index f9d9f12c03..4218dfccd1 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_symbolic.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_symbolic.h @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_triplet.h b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_triplet.h index 928675400d..f3da629d7a 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_triplet.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_triplet.h @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -84,6 +83,10 @@ complex long Syntax: status = umfpack_zl_report_triplet (n_row, n_col, nz, Ti, Tj, Tx, Tz, Control) ; +packed complex Syntax: + + Same as above, except Tz is NULL. + Purpose: Verifies and prints a matrix in triplet form. @@ -115,6 +118,7 @@ Arguments: Int Ti [nz] ; Input argument, not modified. Int Tj [nz] ; Input argument, not modified. double Tx [nz] ; Input argument, not modified. + Size 2*nz for packed complex case. double Tz [nz] ; Input argument, not modified, for complex versions. Ti, Tj, Tx (and Tz for complex versions) hold the "triplet" form of a @@ -123,12 +127,12 @@ Arguments: imaginary part of a_ij is Tz [k] (for complex versions). The row and column indices i and j must be in the range 0 to n_row-1 or 0 to n_col-1, respectively. Duplicate entries may be present. The - "triplets" may be in any order. Tx and Tz are optional; if Tx or Tz are - not present ((double *) NULL pointers), then the numerical values are + "triplets" may be in any order. Tx and Tz are optional; if Tx is + not present ((double *) NULL), then the numerical values are not printed. - Future complex version: if Tx is present and Tz is NULL, then both real - and imaginary parts will be contained in Tx[0..2*nz-1], with Tx[2*k] + If Tx is present and Tz is NULL, then both real + and imaginary parts are contained in Tx[0..2*nz-1], with Tx[2*k] and Tx[2*k+1] being the real and imaginary part of the kth entry. double Control [UMFPACK_CONTROL] ; Input argument, not modified. diff --git a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_vector.h b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_vector.h index 66db99d1f8..1bae66ab7b 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_vector.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_vector.h @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -75,7 +74,7 @@ Returns: UMFPACK_OK if Control [UMFPACK_PRL] <= 2 (the input is not checked). Otherwise: - + UMFPACK_OK if the vector is valid. UMFPACK_ERROR_argument_missing if X or Xx is missing. UMFPACK_ERROR_n_nonpositive if n <= 0. @@ -108,13 +107,13 @@ Arguments: when passed to umfpack_*_report_vector (this is untested, however). This is the "merged" form of the complex vector X. - Future work: all complex routines in UMFPACK could use this same + Note that all complex routines in UMFPACK V4.4 use this same strategy for their complex arguments. The split format is useful for MATLAB, which holds its real and imaginary parts in seperate arrays. - The merged format is compatible with the intrinsic double _Complex + The packed format is compatible with the intrinsic double _Complex type in ANSI C99, and is also compatible with SuperLU's method of - storing complex matrices. In the current version, only - umfpack_*_report_vector supports both formats. + storing complex matrices. In Version 4.3, this routine was the only + one that allowed for packed complex arguments. double Control [UMFPACK_CONTROL] ; Input argument, not modified. diff --git a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_save_numeric.h b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_save_numeric.h index 0e3f57be87..9eeb4be6e4 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_save_numeric.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_save_numeric.h @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -69,9 +68,7 @@ complex long Syntax: Purpose: Saves a Numeric object to a file, which can later be read by - umfpack_*_load_numeric. The Numeric object is not modified. You need - to call umfpack_*_free_numeric if you to delete the Numeric object after - saving it to a file. + umfpack_*_load_numeric. The Numeric object is not modified. Returns: diff --git a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_save_symbolic.h b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_save_symbolic.h index a183ede9b2..26eab600b1 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_save_symbolic.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_save_symbolic.h @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -69,9 +68,7 @@ complex long Syntax: Purpose: Saves a Symbolic object to a file, which can later be read by - umfpack_*_load_symbolic. The Symbolic object is not modified. You need - to call umfpack_*_free_symbolic if you to delete the Symbolic object after - saving it to a file. + umfpack_*_load_symbolic. The Symbolic object is not modified. Returns: diff --git a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_scale.h b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_scale.h index 8e254f8f2e..11138aa48d 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_scale.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_scale.h @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -66,6 +65,10 @@ complex long Syntax: double *Bx, *Bz, *Xx, *Xz ; status = umfpack_zl_scale (Xx, Xz, Bx, Bz, Numeric) ; +packed complex Syntax: + + Same as above, except both Xz and Bz are NULL. + Purpose: Given LU factors computed by umfpack_*_numeric (PAQ=LU, PRAQ=LU, or @@ -79,23 +82,27 @@ Returns: UMFPACK_ERROR_invalid_Numeric_object is returned in the Numeric object is invalid. UMFPACK_ERROR_argument_missing is returned if any of the input vectors are missing (X and B for the real version, - and Xx, Xz, Bx, and Bz for the complex version). + and Xx and Bx for the complex version). Arguments: double X [n_row] ; Output argument. or: double Xx [n_row] ; Output argument, real part. + Size 2*n_row for packed complex case. double Xz [n_row] ; Output argument, imaginary part. - The output vector X. + The output vector X. If either Xz or Bz are NULL, the vector + X is in packed complex form, with the kth entry in Xx [2*k] and + Xx [2*k+1], and likewise for B. double B [n_row] ; Input argument, not modified. or: double Bx [n_row] ; Input argument, not modified, real part. + Size 2*n_row for packed complex case. double Bz [n_row] ; Input argument, not modified, imaginary part. - The input vector B. + The input vector B. See above if either Xz or Bz are NULL. void *Numeric ; Input argument, not modified. diff --git a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_solve.h b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_solve.h index d6a0a96106..6bbce1c3c6 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_solve.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_solve.h @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -98,6 +97,10 @@ complex long Syntax: status = umfpack_zl_solve (sys, Ap, Ai, Ax, Az, Xx, Xz, Bx, Bz, Numeric, Control, Info) ; +packed complex Syntax: + + Same as above, Xz, Bz, and Az are NULL. + Purpose: Given LU factors computed by umfpack_*_numeric (PAQ=LU, PRAQ=LU, or @@ -145,12 +148,10 @@ Arguments: For the other values of the sys argument, iterative refinement is not performed (Control [UMFPACK_IRSTEP], Ap, Ai, Ax, and Az are ignored). - Earlier versions used a string argument for sys. It was changed to an - integer to make it easier for a Fortran code to call UMFPACK. - Int Ap [n+1] ; Input argument, not modified. Int Ai [nz] ; Input argument, not modified. double Ax [nz] ; Input argument, not modified. + Size 2*nz for packed complex case. double Az [nz] ; Input argument, not modified, for complex versions. If iterative refinement is requested (Control [UMFPACK_IRSTEP] >= 1, @@ -164,25 +165,27 @@ Arguments: system other than Ax=b, A'x=b, or A.'x=b is being solved, or if A is singular, since in each of these cases A is not accessed. - Future complex version: if Ax is present and Az is NULL, then both real - and imaginary parts will be contained in Ax[0..2*nz-1], with Ax[2*k] + If Az, Xz, or Bz are NULL, then both real + and imaginary parts are contained in Ax[0..2*nz-1], with Ax[2*k] and Ax[2*k+1] being the real and imaginary part of the kth entry. double X [n] ; Output argument. or: - double Xx [n] ; Output argument, real part. + double Xx [n] ; Output argument, real part + Size 2*n for packed complex case. double Xz [n] ; Output argument, imaginary part. The solution to the linear system, where n = n_row = n_col is the dimension of the matrices A, L, and U. - Future complex version: if Xx is present and Xz is NULL, then both real - and imaginary parts will be returned in Xx[0..2*n-1], with Xx[2*k] and + If Az, Xz, or Bz are NULL, then both real + and imaginary parts are returned in Xx[0..2*n-1], with Xx[2*k] and Xx[2*k+1] being the real and imaginary part of the kth entry. double B [n] ; Input argument, not modified. or: double Bx [n] ; Input argument, not modified, real part. + Size 2*n for packed complex case. double Bz [n] ; Input argument, not modified, imaginary part. The right-hand side vector, b, stored as a conventional array of size n @@ -190,8 +193,8 @@ Arguments: solve for multiple right-hand-sides, nor does it allow b to be stored in a sparse-column form. - Future complex version: if Bx is present and Bz is NULL, then both real - and imaginary parts will be contained in Bx[0..2*n-1], with Bx[2*k] + If Az, Xz, or Bz are NULL, then both real + and imaginary parts are contained in Bx[0..2*n-1], with Bx[2*k] and Bx[2*k+1] being the real and imaginary part of the kth entry. void *Numeric ; Input argument, not modified. @@ -229,7 +232,7 @@ Arguments: UMFPACK_WARNING_singular_matrix - A divide-by-zero occured. Your solution will contain Inf's + A divide-by-zero occurred. Your solution will contain Inf's and/or NaN's. Some parts of the solution may be valid. For example, solving Ax=b with @@ -243,9 +246,9 @@ Arguments: UMFPACK_ERROR_argument_missing One or more required arguments are missing. The B, X, (or - Bx, Bz, Xx and Xz for the complex versions) arguments + Bx and Xx for the complex versions) arguments are always required. Info and Control are not required. Ap, - Ai, Ax (and Az for complex versions) are required if Ax=b, + Ai, Ax are required if Ax=b, A'x=b, A.'x=b is to be solved, the (default) iterative refinement is requested, and the matrix A is nonsingular. @@ -290,10 +293,6 @@ Arguments: Info [UMFPACK_SOLVE_TIME]: The time taken, in seconds. - ------------------------------------------------------------------------ - The following statistic was added to Version 4.1: - ------------------------------------------------------------------------ - Info [UMFPACK_SOLVE_WALLTIME]: The wallclock time taken, in seconds. Only the above listed Info [...] entries are accessed. The remaining diff --git a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_symbolic.h b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_symbolic.h index ed09ca5d1d..3ee4ffa5f1 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_symbolic.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_symbolic.h @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -94,6 +93,10 @@ complex long Syntax: status = umfpack_zl_symbolic (n_row, n_col, Ap, Ai, Ax, Az, &Symbolic, Control, Info) ; +packed complex Syntax: + + Same as above, except Az is NULL. + Purpose: Given nonzero pattern of a sparse matrix A in column-oriented form, @@ -145,6 +148,7 @@ Arguments: to print the matrix A. double Ax [nz] ; Optional input argument, not modified. + Size 2*nz for packed complex case. The numerical values of the sparse matrix A. The nonzero pattern (row indices) for column j is stored in Ai [(Ap [j]) ... (Ap [j+1]-1)], and @@ -161,8 +165,8 @@ Arguments: For the complex versions, this holds the imaginary part of A. The imaginary part of column j is held in Az [(Ap [j]) ... (Ap [j+1]-1)]. - Future complex version: if Ax is present and Az is NULL, then both real - and imaginary parts will be contained in Ax[0..2*nz-1], with Ax[2*k] + If Az is NULL, then both real + and imaginary parts are contained in Ax[0..2*nz-1], with Ax[2*k] and Ax[2*k+1] being the real and imaginary part of the kth entry. Used by the 2-by-2 strategy only. See the description of Ax, above. @@ -187,8 +191,7 @@ Arguments: Control [UMFPACK_STRATEGY]: This is the most important control parameter. It determines what kind of ordering and pivoting - strategy that UMFPACK should use. It is new to Version 4.1 - There are 4 options: + strategy that UMFPACK should use. There are 4 options: UMFPACK_STRATEGY_AUTO: This is the default. The input matrix is analyzed to determine how symmetric the nonzero pattern is, and @@ -200,8 +203,7 @@ Arguments: is used to order the columns of A, followed by a postorder of the column elimination tree. No attempt is made to perform diagonal pivoting. The column ordering is refined during - factorization. This strategy was the only one provided with - UMFPACK V4.0. + factorization. In the numerical factorization, the Control [UMFPACK_SYM_PIVOT_TOLERANCE] parameter is ignored. A @@ -209,8 +211,8 @@ Arguments: Control [UMFPACK_PIVOT_TOLERANCE] (default 0.1) times the largest entry in its column. - UMFPACK_STRATEGY_SYMMETRIC: Use the symmetric strategy (new to - Version 4.1). In this method, the approximate minimum degree + UMFPACK_STRATEGY_SYMMETRIC: Use the symmetric strategy + In this method, the approximate minimum degree ordering (AMD) is applied to A+A', followed by a postorder of the elimination tree of A+A'. UMFPACK attempts to perform diagonal pivoting during numerical factorization. No refinement @@ -251,16 +253,15 @@ Arguments: parameter affects when updates are applied to the working frontal matrix, and can indirectly affect fill-in and operation count. As long as the block size is large enough (8 or so), this parameter - has a modest effect on performance. + has a modest effect on performance. Control [UMFPACK_2BY2_TOLERANCE]: a diagonal entry S (k,k) is considered "small" if it is < tol * max (abs (S (:,k))), where S a submatrix of the scaled input matrix, with pivots of zero Markowitz cost removed. - Control [UMFPACK_SCALE]: This parameter is new to V4.1. See - umfpack_numeric.h for a description. Only affects the 2-by-2 - strategy. Default: UMFPACK_SCALE_SUM. + Control [UMFPACK_SCALE]: See umfpack_numeric.h for a description. + Only affects the 2-by-2 strategy. Default: UMFPACK_SCALE_SUM. Control [UMFPACK_FIXQ]: If > 0, then the pre-ordering Q is not modified during numeric factorization. If < 0, then Q may be modified. If @@ -315,9 +316,6 @@ Arguments: Something very serious went wrong. This is a bug. Please contact the author (davis@cise.ufl.edu). - Note that the UMFPACK_ERROR_problem_too_large error code is no - longer returned (it was in Version 4.0). - Info [UMFPACK_NROW]: the value of the input argument n_row. Info [UMFPACK_NCOL]: the value of the input argument n_col. @@ -378,7 +376,7 @@ Arguments: Info [UMFPACK_VARIABLE_PEAK_ESTIMATE]: the estimated peak size (in Units) of the variable-sized part of the Numeric object. This is - usually an upper bound, but that is not guaranteed. + usually an upper bound, but that is not guaranteed. Info [UMFPACK_VARIABLE_FINAL_ESTIMATE]: the estimated final size (in Units) of the variable-sized part of the Numeric object. This is @@ -441,10 +439,6 @@ Arguments: Info [UMFPACK_SYMBOLIC_TIME]: The CPU time taken, in seconds. - ------------------------------------------------------------------------ - The rest of the statistics are new to Version 4.1: - ------------------------------------------------------------------------ - Info [UMFPACK_SYMBOLIC_WALLTIME]: The wallclock time taken, in seconds. Info [UMFPACK_STRATEGY_USED]: The ordering strategy used: diff --git a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_tictoc.h b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_tictoc.h index 550d7d5d5d..121755895a 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_tictoc.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_tictoc.h @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_timer.h b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_timer.h index a29c2f4dac..8d8d8cf10c 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_timer.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_timer.h @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -23,9 +22,8 @@ Purpose: Returns the CPU time used by the process. Includes both "user" and "system" time (the latter is time spent by the system on behalf of the process, and is thus charged to the process). It does not return the wall clock time. - This was the timer used internally in UMFPACK V4.0. See umfpack_tic and - umfpack_toc (the file umfpack_tictoc.h) for the timer used internally by - UMFPACK V4.1. + See umfpack_tic and umfpack_toc (the file umfpack_tictoc.h) for the timer + used internally by UMFPACK. This routine uses the Unix getrusage routine, if available. It is less subject to overflow than the ANSI C clock routine. If getrusage is not diff --git a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_transpose.h b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_transpose.h index f9d34cbb29..5f2fa92c7d 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_transpose.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_transpose.h @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -98,6 +97,10 @@ complex long Syntax: status = umfpack_zl_transpose (n_row, n_col, Ap, Ai, Ax, Az, P, Q, Rp, Ri, Rx, Rz, do_conjugate) ; +packed complex Syntax: + + Same as above, except Az are Rz are NULL. + Purpose: Transposes and optionally permutes a sparse matrix in row or column-form, @@ -111,12 +114,7 @@ Purpose: A. Factorizing A' or A.' instead of A can be much better, particularly if AA' is much sparser than A'A. You can still solve Ax=b if you factorize A' or A.', by solving with the sys argument UMFPACK_At or UMFPACK_Aat, - respectively, in umfpack_*_*solve. The umfpack mexFunction (umfpackmex.c) - is one example. To compute x = A/b, it computes x = (A.'\b.').' instead, - by factorizing A.'. It then uses the regular solve, since b.' and x.' are - stored identically as b and x, respectively (both b.' and b are dense - vectors). If b and x were arrays, the umfpack mexFunction would need to - first compute b.' and then transpose the resulting solution. + respectively, in umfpack_*_*solve. Returns: @@ -155,6 +153,7 @@ Arguments: Row indices must be in the range 0 to n_row-1 (the matrix is 0-based). double Ax [nz] ; Input argument, not modified, of size nz = Ap [n_col]. + Size 2*nz if Az or Rz are NULL. double Az [nz] ; Input argument, not modified, for complex versions. If present, these are the numerical values of the sparse matrix A. @@ -162,13 +161,12 @@ Arguments: Ai [(Ap [j]) ... (Ap [j+1]-1)], and the corresponding real numerical values are stored in Ax [(Ap [j]) ... (Ap [j+1]-1)]. The imaginary values are stored in Az [(Ap [j]) ... (Ap [j+1]-1)]. The values are - transposed only if Ax and Rx are present (for the real version), and - only if all four (Ax, Az, Rx, and Rz) are present for the complex - version. These are not an error conditions; you are able to transpose + transposed only if Ax and Rx are present. + This is not an error conditions; you are able to transpose and permute just the pattern of a matrix. - Future complex version: if Ax is present and Az is NULL, then both real - and imaginary parts will be contained in Ax[0..2*nz-1], with Ax[2*k] + If Az or Rz are NULL, then both real + and imaginary parts are contained in Ax[0..2*nz-1], with Ax[2*k] and Ax[2*k+1] being the real and imaginary part of the kth entry. Int P [n_row] ; Input argument, not modified. @@ -200,18 +198,19 @@ Arguments: same form as the row indices Ai for the matrix A. double Rx [nz] ; Output argument. + Size 2*nz if Az or Rz are NULL. double Rz [nz] ; Output argument, imaginary part for complex versions. If present, these are the numerical values of the sparse matrix R, in the same form as the values Ax and Az of the matrix A. - Future complex version: if Rx is present and Rz is NULL, then both real - and imaginary parts will be contained in Rx[0..2*nz-1], with Rx[2*k] + If Az or Rz are NULL, then both real + and imaginary parts are contained in Rx[0..2*nz-1], with Rx[2*k] and Rx[2*k+1] being the real and imaginary part of the kth entry. Int do_conjugate ; Input argument for complex versions only. - If true, and if Ax, Az, Rx, and Rz are all present, then the linear + If true, and if Ax and Rx are present, then the linear algebraic transpose is computed (complex conjugate). If false, the array transpose is computed instead. */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_triplet_to_col.h b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_triplet_to_col.h index ea55157117..abeee030d8 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_triplet_to_col.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_triplet_to_col.h @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -98,10 +97,14 @@ long Syntax: status = umfpack_zl_triplet_to_col (n_row, n_col, nz, Ti, Tj, Tx, Tz, Ap, Ai, Ax, Az, Map) ; +packed complex Syntax: + + Same as above, except Tz and Az are NULL. + Purpose: Converts a sparse matrix from "triplet" form to compressed-column form. - Analogous to A = spconvert (Ti, Tj, Tx + Tx*1i) in MATLAB, except that + Analogous to A = spconvert (Ti, Tj, Tx + Tz*1i) in MATLAB, except that zero entries present in the triplet form are present in A. The triplet form of a matrix is a very simple data structure for basic @@ -174,6 +177,7 @@ Arguments: Int Ti [nz] ; Input argument, not modified. Int Tj [nz] ; Input argument, not modified. double Tx [nz] ; Input argument, not modified. + Size 2*nz if Tz or Az are NULL. double Tz [nz] ; Input argument, not modified, for complex versions. Ti, Tj, Tx, and Tz hold the "triplet" form of a sparse matrix. The kth @@ -183,14 +187,13 @@ Arguments: n_row-1 and 0 to n_col-1, respectively. Duplicate entries may be present; they are summed in the output matrix. This is not an error condition. The "triplets" may be in any order. Tx, Tz, Ax, and Az - are optional. For the real version, Ax is computed only if both Ax - and Tx are present (not (double *) NULL). For the complex version, Ax - and Az are computed only if Tx, Tz, Ax, and Az are all present. These - are not error conditions; the routine can create just the pattern of - the output matrix from the pattern of the triplets. - - Future complex version: if Tx is present and Tz is NULL, then both real - and imaginary parts will be contained in Tx[0..2*nz-1], with Tx[2*k] + are optional. Ax is computed only if both Ax and Tx are present + (not (double *) NULL). This is not error condition; the routine can + create just the pattern of the output matrix from the pattern of the + triplets. + + If Az or Tz are NULL, then both real + and imaginary parts are contained in Tx[0..2*nz-1], with Tx[2*k] and Tx[2*k+1] being the real and imaginary part of the kth entry. Int Ap [n_col+1] ; Output argument. @@ -213,7 +216,7 @@ Arguments: are in ascending order, and no duplicate row indices are present. Row indices are in the range 0 to n_col-1 (the matrix is 0-based). - double Ax [nz] ; Output argument. + double Ax [nz] ; Output argument. Size 2*nz if Tz or Az are NULL. double Az [nz] ; Output argument for complex versions. Ax and Az (for the complex versions) are double arrays of size nz on @@ -221,8 +224,7 @@ Arguments: in both arrays. Ax is optional; if Tx and/or Ax are not present (a (double *) NULL - pointer), then Ax is not computed. Az is also optional; if Tz and/or - Az are not present, then Az is not computed. If present, Ax holds the + pointer), then Ax is not computed. If present, Ax holds the numerical values of the the real part of the sparse matrix A and Az holds the imaginary parts. The nonzero pattern (row indices) for column j is stored in Ai [(Ap [j]) ... (Ap [j+1]-1)], and the @@ -230,8 +232,8 @@ Arguments: Ax [(Ap [j]) ... (Ap [j+1]-1)]. The imaginary parts are stored in Az [(Ap [j]) ... (Ap [j+1]-1)], for the complex versions. - Future complex version: if Ax is present and Az is NULL, then both real - and imaginary parts will be returned in Ax[0..2*nz2-1], with Ax[2*k] + If Az or Tz are NULL, then both real + and imaginary parts are returned in Ax[0..2*nz2-1], with Ax[2*k] and Ax[2*k+1] being the real and imaginary part of the kth entry. int Map [nz] ; Optional output argument. @@ -247,8 +249,8 @@ Arguments: first one, without calling this routine. If Ti and Tj do not change, then Ap, and Ai can be reused from the prior call to umfpack_*_triplet_to_col. You only need to recompute Ax (and Az for the - complex version). This code excerpt properly sums up all duplicate - values (for the real version): + split complex version). This code excerpt properly sums up all + duplicate values (for the real version): for (p = 0 ; p < Ap [n_col] ; p++) Ax [p] = 0 ; for (k = 0 ; k < nz ; k++) Ax [Map [k]] += Tx [k] ; diff --git a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_wsolve.h b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_wsolve.h index 7eda906edc..b537221cb7 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_wsolve.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_wsolve.h @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -108,6 +107,10 @@ complex long Syntax: status = umfpack_zl_wsolve (sys, Ap, Ai, Ax, Az, Xx, Xz, Bx, Bz, Numeric, Control, Info, Wi, W) ; +packed complex Syntax: + + Same as above, except Az, Xz, and Bz are NULL. + Purpose: Given LU factors computed by umfpack_*_numeric (PAQ=LU) and the @@ -128,6 +131,7 @@ Arguments: Int Ap [n+1] ; Input argument, not modified. Int Ai [nz] ; Input argument, not modified. double Ax [nz] ; Input argument, not modified. + Size 2*nz in packed complex case. double X [n] ; Output argument. double B [n] ; Input argument, not modified. void *Numeric ; Input argument, not modified. @@ -137,8 +141,10 @@ Arguments: for complex versions: double Az [nz] ; Input argument, not modified, imaginary part double Xx [n] ; Output argument, real part. + Size 2*n in packed complex case. double Xz [n] ; Output argument, imaginary part - double Bx [n] ; Input argument, not modified, real part + double Bx [n] ; Input argument, not modified, real part. + Size 2*n in packed complex case. double Bz [n] ; Input argument, not modified, imaginary part The above arguments are identical to umfpack_*_solve, except that the diff --git a/deal.II/contrib/umfpack/UMFPACK/MATLAB/Contents.m b/deal.II/contrib/umfpack/UMFPACK/MATLAB/Contents.m index c6657b2375..8514438b17 100644 --- a/deal.II/contrib/umfpack/UMFPACK/MATLAB/Contents.m +++ b/deal.II/contrib/umfpack/UMFPACK/MATLAB/Contents.m @@ -7,16 +7,18 @@ % umfpack_demo a long demo % umfpack_simple a simple demo % umfpack_btf factorize A using a block triangular form -% umfpack_solve x = A\b or x = b/A +% umfpack_solve x = A\b or x = b/A % lu_normest estimates norm (L*U-A, 1) without forming L*U-A % luflop given L and U, computes # of flops required to compute them +% umfpack_test for testing umfpack (requires UFget interface to UF sparse +% matrix collection) % % See also: % amd symmetric minimum degree ordering % colamd unsymmetric column approx minimum degree ordering % symamd symmetric approx minimum degree ordering, based on colamd % -% UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. -% Davis. All Rights Reserved. Type umfpack_details for License. +% UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. +% All Rights Reserved. Type umfpack_details for License. help Contents diff --git a/deal.II/contrib/umfpack/UMFPACK/MATLAB/GNUmakefile b/deal.II/contrib/umfpack/UMFPACK/MATLAB/GNUmakefile index 90edfec8dd..20bdee5e60 100644 --- a/deal.II/contrib/umfpack/UMFPACK/MATLAB/GNUmakefile +++ b/deal.II/contrib/umfpack/UMFPACK/MATLAB/GNUmakefile @@ -2,9 +2,6 @@ # UMFPACK GNUmakefile for the UMFPACK MATLAB mexFunction (GNU "make" only) #------------------------------------------------------------------------------- -# UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. -# Davis. All Rights Reserved. See ../README for License. - all: umfpack luflop include ../Make/Make.include @@ -38,7 +35,7 @@ UMFINT = umf_analyze umf_apply_order umf_colamd umf_free umf_fsize \ # non-user-callable and user-callable amd_*.[ch] files (int/long versions only): AMD = amd_aat amd_1 amd_2 amd_dump amd_postorder amd_post_tree amd_defaults \ - amd_order amd_control amd_info amd_valid + amd_order amd_control amd_info amd_valid amd_preprocess # non-user-callable, created from umf_ltsolve.c, umf_utsolve.c, # umf_triplet.c, and umf_assemble.c , with int/long and real/complex versions: @@ -52,10 +49,10 @@ UMF = $(UMF_CREATED) $(UMFCH) # user-callable umfpack_*.[ch] files (int/long and real/complex): UMFPACK = umfpack_col_to_triplet umfpack_defaults umfpack_free_numeric \ umfpack_free_symbolic umfpack_get_numeric umfpack_get_lunz \ - umfpack_get_symbolic umfpack_numeric umfpack_qsymbolic \ - umfpack_report_control umfpack_report_info umfpack_report_matrix \ - umfpack_report_numeric umfpack_report_perm umfpack_report_status \ - umfpack_report_symbolic umfpack_report_triplet \ + umfpack_get_symbolic umfpack_get_determinant umfpack_numeric \ + umfpack_qsymbolic umfpack_report_control umfpack_report_info \ + umfpack_report_matrix umfpack_report_numeric umfpack_report_perm \ + umfpack_report_status umfpack_report_symbolic umfpack_report_triplet \ umfpack_report_vector umfpack_solve umfpack_symbolic \ umfpack_transpose umfpack_triplet_to_col umfpack_scale \ umfpack_load_numeric umfpack_save_numeric \ diff --git a/deal.II/contrib/umfpack/UMFPACK/MATLAB/Makefile b/deal.II/contrib/umfpack/UMFPACK/MATLAB/Makefile index 4501ba33a5..91b56a6960 100644 --- a/deal.II/contrib/umfpack/UMFPACK/MATLAB/Makefile +++ b/deal.II/contrib/umfpack/UMFPACK/MATLAB/Makefile @@ -2,9 +2,6 @@ # UMFPACK Makefile for the UMFPACK MATLAB mexFunction (old "make" only) #------------------------------------------------------------------------------- -# UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. -# Davis. All Rights Reserved. See ../README for License. - # This is a very ugly Makefile, and is only provided for those who do not # have GNU make. Note that it is not used if you have GNU make. It ignores # dependency checking and just compiles everything. It was created @@ -144,6 +141,8 @@ umfpack: $(MV) -f umfpack_get_lunz.o umfpack_md_get_lunz.o $(MX) -DDINT -c ../Source/umfpack_get_symbolic.c $(MV) -f umfpack_get_symbolic.o umfpack_md_get_symbolic.o + $(MX) -DDINT -c ../Source/umfpack_get_determinant.c + $(MV) -f umfpack_get_determinant.o umfpack_md_get_determinant.o $(MX) -DDINT -c ../Source/umfpack_numeric.c $(MV) -f umfpack_numeric.o umfpack_md_numeric.o $(MX) -DDINT -c ../Source/umfpack_qsymbolic.c @@ -290,6 +289,8 @@ umfpack: $(MV) -f umfpack_get_lunz.o umfpack_mz_get_lunz.o $(MX) -DZINT -c ../Source/umfpack_get_symbolic.c $(MV) -f umfpack_get_symbolic.o umfpack_mz_get_symbolic.o + $(MX) -DZINT -c ../Source/umfpack_get_determinant.c + $(MV) -f umfpack_get_determinant.o umfpack_mz_get_determinant.o $(MX) -DZINT -c ../Source/umfpack_numeric.c $(MV) -f umfpack_numeric.o umfpack_mz_numeric.o $(MX) -DZINT -c ../Source/umfpack_qsymbolic.c @@ -380,7 +381,8 @@ umfpack: umfpack_md_col_to_triplet.o umfpack_md_defaults.o \ umfpack_md_free_numeric.o umfpack_md_free_symbolic.o \ umfpack_md_get_numeric.o umfpack_md_get_lunz.o \ - umfpack_md_get_symbolic.o umfpack_md_numeric.o \ + umfpack_md_get_symbolic.o umfpack_md_get_determinant.o \ + umfpack_md_numeric.o \ umfpack_md_qsymbolic.o umfpack_md_report_control.o \ umfpack_md_report_info.o umfpack_md_report_matrix.o \ umfpack_md_report_numeric.o umfpack_md_report_perm.o \ @@ -410,7 +412,8 @@ umfpack: umfpack_mz_col_to_triplet.o umfpack_mz_defaults.o \ umfpack_mz_free_numeric.o umfpack_mz_free_symbolic.o \ umfpack_mz_get_numeric.o umfpack_mz_get_lunz.o \ - umfpack_mz_get_symbolic.o umfpack_mz_numeric.o \ + umfpack_mz_get_symbolic.o umfpack_mz_get_determinant.o \ + umfpack_mz_numeric.o \ umfpack_mz_qsymbolic.o umfpack_mz_report_control.o \ umfpack_mz_report_info.o umfpack_mz_report_matrix.o \ umfpack_mz_report_numeric.o umfpack_mz_report_perm.o \ diff --git a/deal.II/contrib/umfpack/UMFPACK/MATLAB/lu_normest.m b/deal.II/contrib/umfpack/UMFPACK/MATLAB/lu_normest.m index ea3490cfca..23731effee 100644 --- a/deal.II/contrib/umfpack/UMFPACK/MATLAB/lu_normest.m +++ b/deal.II/contrib/umfpack/UMFPACK/MATLAB/lu_normest.m @@ -7,14 +7,14 @@ function rho = lu_normest (A, L, U) % % which estimates the computation of the 1-norm: % -% rho = norm (A-L*U, 1) +% rho = norm (A-L*U, 1) % % Authors: William W. Hager, Math Dept., Univ. of Florida % Timothy A. Davis, CISE Dept., Univ. of Florida % Gainesville, FL, 32611, USA. % based on normest1, contributed on November, 1997 % -% This code can be quite easily adapted to estimate the 1-norm of any +% This code can be quite easily adapted to estimate the 1-norm of any % matrix E, where E itself is dense or not explicitly represented, but the % computation of E (and E') times a vector is easy. In this case, our matrix % of interest is: diff --git a/deal.II/contrib/umfpack/UMFPACK/MATLAB/luflop.m b/deal.II/contrib/umfpack/UMFPACK/MATLAB/luflop.m index dcc080b55e..2abda1e341 100644 --- a/deal.II/contrib/umfpack/UMFPACK/MATLAB/luflop.m +++ b/deal.II/contrib/umfpack/UMFPACK/MATLAB/luflop.m @@ -14,11 +14,11 @@ function f = luflop (L, U) % L and U must be sparse. % % Note: the above expression has a subtle undercount when exact numerical -% cancelation occurs. Try [L,U,P] = lu (sparse (ones (10))) and then +% cancelation occurs. Try [L,U,P] = lu (sparse (ones (10))) and then % luflop (L,U). -% UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. -% Davis. All Rights Reserved. Type umfpack_details for License. +% UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. +% All Rights Reserved. Type umfpack_details for License. help luflop error ('luflop mexFunction not found! Use umfpack_make to compile luflop.') ; diff --git a/deal.II/contrib/umfpack/UMFPACK/MATLAB/luflopmex.c b/deal.II/contrib/umfpack/UMFPACK/MATLAB/luflopmex.c index 5342856ae8..10a26c5021 100644 --- a/deal.II/contrib/umfpack/UMFPACK/MATLAB/luflopmex.c +++ b/deal.II/contrib/umfpack/UMFPACK/MATLAB/luflopmex.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -45,9 +44,10 @@ void mexFunction /* local variables */ /* ---------------------------------------------------------------------- */ + double flop_count ; + double *pflop ; int *Lp, *Li, *Up, *Ui, *Unz, n, k, row, col, p, Lnz_k, Unz_k ; mxArray *Lmatrix, *Umatrix ; - double flop_count, *pflop ; /* ---------------------------------------------------------------------- */ /* get inputs L, U */ diff --git a/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack.m b/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack.m index 3285bb6935..a86bfbd6c7 100644 --- a/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack.m +++ b/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack.m @@ -1,7 +1,7 @@ function [out1, out2, out3, out4, out5] = umfpack (in1, in2, in3, in4, in5) -% UMFPACK v4.3 is a MATLAB mexFunction for solving sparse linear systems. +% UMFPACK v4.4 is a MATLAB mexFunction for solving sparse linear systems. % -% UMFPACK v4.3: | MATLAB approximate equivalent: +% UMFPACK v4.4: | MATLAB approximate equivalent: % --------------------------------------------------------------------- % x = umfpack (A, '\', b) ; | x = A \ b % | @@ -20,7 +20,7 @@ function [out1, out2, out3, out4, out5] = umfpack (in1, in2, in3, in4, in5) % | R = spdiags (r, 0, m, m) ; % | [L,U,P] = lu ((R\A)*Q) ; % | -% [P,Q,F,C] = umfpack (A, 'symbolic') | [m,n] = size (A) ; +% [P,Q,F,C] = umfpack (A, 'symbolic') | [m,n] = size (A) ; % | I = speye (n) ; % | Q = I (:, colamd (A)) ; % | [count,h,parent,post] = ... @@ -36,8 +36,8 @@ function [out1, out2, out3, out4, out5] = umfpack (in1, in2, in3, in4, in5) % See also: lu_normest, colamd, amd. % To use UMFPACK for an arbitrary b, see umfpack_solve. -% UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. -% Davis. All Rights Reserved. Type umfpack_details for License. +% UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. +% All Rights Reserved. Type umfpack_details for License. help umfpack error ('umfpack mexFunction not found! Use umfpack_make to compile umfpack.') ; diff --git a/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_btf.m b/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_btf.m index a9da270f6b..2efb865d68 100644 --- a/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_btf.m +++ b/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_btf.m @@ -11,8 +11,8 @@ function x = umfpack_btf (A, b, Control) % % See also: umfpack, umfpack_factorize, umfpack_details, dmperm -% UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. -% Davis. All Rights Reserved. Type umfpack_details for License. +% UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. +% All Rights Reserved. Type umfpack_details for License. if (nargin < 2) help umfpack_btf diff --git a/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_demo.m b/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_demo.m index 422a32ffa1..8a7bd1477f 100644 --- a/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_demo.m +++ b/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_demo.m @@ -6,8 +6,8 @@ function umfpack_demo % See also umfpack, umfpack_make, umfpack_details, umfpack_report, % and umfpack_simple. -% UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. -% Davis. All Rights Reserved. Type umfpack_details for License. +% UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. +% All Rights Reserved. Type umfpack_details for License. %------------------------------------------------------------------------------- % get default control parameters @@ -193,3 +193,10 @@ XM = B'/A ; fprintf ('Difference between UMFPACK and MATLAB solution: %g\n', ... norm (XU - XM, Inf)) ; + +%------------------------------------------------------------------------------- +% compute the determinant +%------------------------------------------------------------------------------- + +fprintf ('\n--------------------------------------------------------------\n') ; +fprintf ('det(A): %g UMFPACK determinant: %g\n', det (A), umfpack (A, 'det')) ; diff --git a/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_demo.m.out b/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_demo.m.out index 10adebe433..cab2e0f0d0 100644 --- a/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_demo.m.out +++ b/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_demo.m.out @@ -8,19 +8,19 @@ Enter the printing level for UMFPACK's output statistics: Factor and solve a small system, Ax=b, using default parameters Solving Ax=b via UMFPACK: Solving Ax=b via MATLAB: -Difference between UMFPACK and MATLAB solution: 1.24345e-14 +Difference between UMFPACK and MATLAB solution: 0 -------------------------------------------------------------- Factorizing [L, U, P, Q, R] = umfpack (A) P * (R\A) * Q - L*U should be zero: -norm (P*(R\A)*Q - L*U, 1) = 4.2068e-16 (exact) 3.74627e-16 (estimated) +norm (P*(R\A)*Q - L*U, 1) = 6.80012e-16 (exact) 6.80012e-16 (estimated) Solution to Ax=b via UMFPACK factorization: x = Q * (U \ (L \ (P * (R \ b)))) -UMFPACK flop count: 2362 +UMFPACK flop count: 2354 Factorizing [L, U, P] = lu (A (:, q)) If you are using a version of MATLAB prior to V6.0, then the @@ -31,7 +31,7 @@ q = colmmd (A) ; Solution to Ax=b via MATLAB factorization: x = U \ (L \ (P * b)) ; x (q) = x ; -Difference between UMFPACK and MATLAB solution: 1.37668e-14 +Difference between UMFPACK and MATLAB solution: 7.10543e-15 MATLAB LU flop count: 3164 @@ -39,7 +39,7 @@ MATLAB LU flop count: 3164 Solve A'x=b: Solving A'x=b via UMFPACK: Solving A'x=b via MATLAB: -Difference between UMFPACK and MATLAB solution: 3.10862e-15 +Difference between UMFPACK and MATLAB solution: 2.66454e-15 -------------------------------------------------------------- Compute C = A', and compute the LU factorization of C. @@ -48,25 +48,29 @@ Factorizing A' can sometimes be better than factorizing A itself same as the solution to Ax=b for the original A. P * (R\C) * Q - L*U should be zero: -norm (P*(R\C)*Q - L*U, 1) = 1.31839e-16 (exact) 6.41848e-17 (estimated) +norm (P*(R\C)*Q - L*U, 1) = 1.94289e-16 (exact) 5.55112e-17 (estimated) Solution to Ax=b via UMFPACK, using the factors of C: x = R \ (P' * (L' \ (U' \ (Q' * b)))) ; Solution to Ax=b via MATLAB: -Difference between UMFPACK and MATLAB solution: 1.77636e-14 +Difference between UMFPACK and MATLAB solution: 7.10543e-15 -------------------------------------------------------------- Solve AX=B, where B is n-by-10, and sparse -Difference between UMFPACK and MATLAB solution: 2.88198e-14 +Difference between UMFPACK and MATLAB solution: 6.72949e-14 -------------------------------------------------------------- Solve AX=B, where B is n-by-10, and sparse, using umfpack_btf -Difference between UMFPACK and MATLAB solution: 9.79736e-14 +Difference between UMFPACK and MATLAB solution: 8.51541e-14 -------------------------------------------------------------- Solve A'X=B, where B is n-by-10, and sparse -Difference between UMFPACK and MATLAB solution: 1.05244e-13 +Difference between UMFPACK and MATLAB solution: 7.99291e-14 + +-------------------------------------------------------------- +det(A): -4.07453e-05 UMFPACK determinant: -4.07453e-05 +>> >> diary off diff --git a/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_details.m b/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_details.m index 315de174cc..2039abed09 100644 --- a/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_details.m +++ b/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_details.m @@ -1,5 +1,5 @@ function [out1, out2, out3, out4, out5] = umfpack (in1, in2, in3, in4, in5) -% UMFPACK v4.3: details on each usage. +% UMFPACK v4.4: details on each usage. % % Factor or solve a sparse linear system, returning either the solution x to % Ax=b or A'x'=b', the factorization LU=PAQ, or LU=P(R\A)Q. A must be sparse. @@ -116,23 +116,32 @@ function [out1, out2, out3, out4, out5] = umfpack (in1, in2, in3, in4, in5) % % Prints the current Control settings, and Info % +% det = umfpack (A, 'det') ; +% [det dexp] = umfpack (A, 'det') ; +% +% Computes the determinant of A. The 2nd form returns the determinant +% in the form det*10^dexp, where det is in the range +/- 1 to 10, +% which helps to avoid overflow/underflow when dexp is out of range of +% normal floating-point numbers. +% % If present, Qinit is a user-supplied 1-by-n permutation vector. It is an % initial fill-reducing column pre-ordering for A; if not present, then colamd % or amd are used instead. If present, Control is a user-supplied 20-by-1 % array. Control and Info are optional; if Control is not present, defaults % are used. If a Control entry is NaN, then the default is used for that entry. % -% UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. -% Davis. All Rights Reserved. -% +% +% UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. +% All Rights Reserved. Type umfpack_details for License. +% % UMFPACK License: -% +% % Your use or distribution of UMFPACK or any modified version of % UMFPACK implies that you agree to this License. -% +% % THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY % EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK. -% +% % Permission is hereby granted to use or copy this program, provided % that the Copyright, this License, and the Availability of the original % version is retained on all copies. User documentation of any code that @@ -143,7 +152,7 @@ function [out1, out2, out3, out4, out5] = umfpack (in1, in2, in3, in4, in5) % retained, and a notice that the code was modified is included. This % software was developed with support from the National Science Foundation, % and is provided to you free of charge. -% +% % Availability: http://www.cise.ufl.edu/research/sparse/umfpack % % See also umfpack, umfpack_make, umfpack_report, diff --git a/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_make.m b/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_make.m index ca239a9fe3..efc34d5858 100644 --- a/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_make.m +++ b/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_make.m @@ -3,11 +3,11 @@ function umfpack_make % % Compiles the UMFPACK mexFunction and then runs a simple demo. % -% UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. -% Davis. All Rights Reserved. Type umfpack_details for License. -% % See also: umfpack, umfpack_details, umfpack_report, umfpack_demo, and % umfpack_simple. +% +% UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. +% All Rights Reserved. Type umfpack_details for License. help umfpack_make @@ -190,12 +190,12 @@ umfint = { 'analyze', 'apply_order', 'colamd', 'free', 'fsize', ... % non-user-callable and user-callable amd_*.[ch] files (int versions only): amd = { 'aat', '1', '2', 'dump', 'postorder', 'post_tree', 'defaults', ... - 'order', 'control', 'info', 'valid' } ; + 'order', 'control', 'info', 'valid', 'preprocess' } ; % user-callable umfpack_*.[ch] files (real/complex): user = { 'col_to_triplet', 'defaults', 'free_numeric', ... 'free_symbolic', 'get_numeric', 'get_lunz', ... - 'get_symbolic', 'numeric', 'qsymbolic', ... + 'get_symbolic', 'get_determinant', 'numeric', 'qsymbolic', ... 'report_control', 'report_info', 'report_matrix', ... 'report_numeric', 'report_perm', 'report_status', ... 'report_symbolic', 'report_triplet', ... @@ -220,7 +220,7 @@ end rules = { [mx ' -DDINT'] , [mx ' -DZINT'] } ; kinds = { 'md', 'mz' } ; -for what = 1:2 +for what = 1:2 rule = rules {what} ; kind = kinds {what} ; diff --git a/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_report.m b/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_report.m index 10d661a1dc..16a85d9437 100644 --- a/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_report.m +++ b/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_report.m @@ -20,8 +20,8 @@ function umfpack_report (Control, Info) % See also umfpack, umfpack_make, umfpack_details, % umfpack_demo, and umfpack_simple. -% UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. -% Davis. All Rights Reserved. See ../README for License. +% UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. +% All Rights Reserved. Type umfpack_details for License. %------------------------------------------------------------------------------- % get inputs, use defaults if input arguments not present @@ -45,7 +45,7 @@ end % control settings %------------------------------------------------------------------------------- -fprintf ('\nUMFPACK Version 4.3: Control settings:\n\n') ; +fprintf ('\nUMFPACK Version 4.4: Control settings:\n\n') ; fprintf (' Control (1): print level: %d\n', Control (1)) ; fprintf (' Control (2): dense row parameter: %g\n', Control (2)) ; fprintf (' "dense" rows have > max (16, (%g)*16*sqrt(n_col)) entries\n', Control (2)) ; diff --git a/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_simple.m b/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_simple.m index 829b6718a4..83a636aabe 100644 --- a/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_simple.m +++ b/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_simple.m @@ -1,16 +1,16 @@ % umfpack_simple: a simple demo of UMFPACK % -% UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. -% Davis. All Rights Reserved. -% +% UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. +% All Rights Reserved. Type umfpack_details for License. +% % UMFPACK License: -% +% % Your use or distribution of UMFPACK or any modified version of % UMFPACK implies that you agree to this License. -% +% % THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY % EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK. -% +% % Permission is hereby granted to use or copy this program, provided % that the Copyright, this License, and the Availability of the original % version is retained on all copies. User documentation of any code that @@ -21,7 +21,7 @@ % retained, and a notice that the code was modified is included. This % software was developed with support from the National Science Foundation, % and is provided to you free of charge. -% +% % Availability: http://www.cise.ufl.edu/research/sparse/umfpack % % See also: umfpack, umfpack_details diff --git a/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_simple.m.out b/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_simple.m.out index 6c019147ad..90349e61b9 100644 --- a/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_simple.m.out +++ b/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_simple.m.out @@ -1,18 +1,17 @@ >> umfpack_simple - umfpack_simple: a simple demo of UMFPACK - UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. - Davis. All Rights Reserved. - + UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. + All Rights Reserved. Type umfpack_details for License. + UMFPACK License: - + Your use or distribution of UMFPACK or any modified version of UMFPACK implies that you agree to this License. - + THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK. - + Permission is hereby granted to use or copy this program, provided that the Copyright, this License, and the Availability of the original version is retained on all copies. User documentation of any code that @@ -23,11 +22,13 @@ retained, and a notice that the code was modified is included. This software was developed with support from the National Science Foundation, and is provided to you free of charge. - + Availability: http://www.cise.ufl.edu/research/sparse/umfpack See also: umfpack, umfpack_details + + Hit enter to agree to the above License: A = diff --git a/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_solve.m b/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_solve.m index 1a988c5833..56bf6c4fde 100644 --- a/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_solve.m +++ b/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_solve.m @@ -10,8 +10,8 @@ function x = umfpack_solve (arg1, op, arg2, Control) % See also umfpack, umfpack_make, umfpack_details, umfpack_report, % and umfpack_simple. -% UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. -% Davis. All Rights Reserved. Type umfpack_details for License. +% UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. +% All Rights Reserved. Type umfpack_details for License. %------------------------------------------------------------------------------- % check inputs and get default control parameters @@ -62,7 +62,7 @@ if (op == '\') else - % factorize with UMFPACK and do the forward/back solves in MATLAB + % factorize with UMFPACK and do the forward/back solves in MATLAB [L, U, P, Q, R] = umfpack (A, Control) ; x = Q * (U \ (L \ (P * (R \ b)))) ; diff --git a/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_test.m b/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_test.m new file mode 100644 index 0000000000..3805a63ab8 --- /dev/null +++ b/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_test.m @@ -0,0 +1,152 @@ +% UMFPACK_TEST: test UMFPACK solve: b/A, A\b with iterative refinement +% Requires the UFsparse package for downloading matrices from the UF +% sparse matrix library. +% +% UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. +% All Rights Reserved. Type umfpack_details for License. + +index = UFget ; + +f = find (index.nrows == index.ncols) ; +[ignore, i] = sort (index.nrows (f)) ; +f = f (i) ; + +Control = umfpack ; +Control (1) = 0 ; + +warning ('off', 'all') ; +figure (1) +clf + + +for i = f + + fprintf ('\nmatrix: %s %s %d\n', index.Group{i}, index.Name{i}, index.nrows(i)) ; + + Prob = UFget (i) ; + A = Prob.A ; + n = size (A,1) ; + + b = rand (1,n) ; + c = b' ; + + try + + %----------------------------------------------------------------------- + % symbolic factorization + %----------------------------------------------------------------------- + + [P1, Q1, Fr, Ch, Info] = umfpack (A, 'symbolic') ; + subplot (2,2,1) + spy (A) + title ('A') + + subplot (2,2,2) + treeplot (Fr (1:end-1,2)') ; + title ('supercolumn etree') + + %----------------------------------------------------------------------- + % P(R\A)Q = LU + %----------------------------------------------------------------------- + + [L,U,P,Q,R,Info] = umfpack (A) ; + err = lu_normest (P*(R\A)*Q, L, U) ; + fprintf ('norm est PR\\AQ-LU: %g relative: %g\n', ... + err, err / norm (A,1)) ; + + subplot (2,2,3) + spy (P*A*Q) + title ('PAQ') ; + + cs = Info (57) ; + rs = Info (58) ; + + subplot (2,2,4) + hold off + spy (L|U) + hold on + if (cs > 0) + plot ([0 cs n n 0] + .5, [0 cs cs 0 0]+.5, 'c') ; + end + if (rs > 0) + plot ([0 rs rs 0 0] + cs +.5, [cs cs+rs n n cs]+.5, 'r') ; + end + + title ('LU factors') + drawnow + + %----------------------------------------------------------------------- + % PAQ = LU + %----------------------------------------------------------------------- + + [L,U,P,Q] = umfpack (A) ; + err = lu_normest (P*A*Q, L, U) ; + fprintf ('norm est PAQ-LU: %g relative: %g\n', ... + err, err / norm (A,1)) ; + + %----------------------------------------------------------------------- + % solve + %----------------------------------------------------------------------- + + x1 = b/A ; + y1 = A\c ; + m1 = norm (b-x1*A) ; + m2 = norm (A*y1-c) ; + + % factor the transpose + Control (8) = 2 ; + [x, info] = umfpack (A', '\', c, Control) ; + lunz0 = info (44) + info (45) - info (67) ; + r = norm (A'*x-c) ; + + fprintf (':: %8.2e matlab: %8.2e %8.2e\n', r, m1, m2) ; + + % factor the original matrix and solve xA=b + for ir = 0:4 + Control (8) = ir ; + [x, info] = umfpack (b, '/', A, Control) ; + r = norm (b-x*A) ; + if (ir == 0) + lunz1 = info (44) + info (45) - info (67) ; + end + fprintf ('%d: %8.2e %d %d\n', ir, r, info (81), info (82)) ; + end + + % factor the original matrix and solve Ax=b + for ir = 0:4 + Control (8) = ir ; + [x, info] = umfpack (A, '\', c, Control) ; + r = norm (A*x-c) ; + fprintf ('%d: %8.2e %d %d\n', ir, r, info (81), info (82)) ; + end + + fprintf ('lunz trans %12d no trans: %12d trans/notrans: %10.4f\n', ... + lunz0, lunz1, lunz0 / lunz1) ; + + %----------------------------------------------------------------------- + % get the determinant + %----------------------------------------------------------------------- + + det1 = det (A) ; + det2 = umfpack (A, 'det') ; + [det3 dexp3] = umfpack (A, 'det') ; + err = abs (det1-det2) ; + err3 = abs (det1 - (det3 * 10^dexp3)) ; + denom = det1 ; + if (denom == 0) + denom = 1 ; + end + err = err / denom ; + err3 = err3 / denom ; + fprintf ('det: %24.16e + (%24.16e)i MATLAB\n', real(det1), imag(det1)) ; + fprintf ('det: %24.16e + (%24.16e)i umfpack\n',real(det2), imag(det2)) ; + fprintf ('det: (%24.16e + (%24.16e)i) * 10^(%g) umfpack\n', real(det3), imag(det3), dexp3) ; + fprintf ('diff %g %g\n', err, err3) ; + + catch + fprintf ('failed\n') ; + end + +% pause + +end diff --git a/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpackmex.c b/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpackmex.c index 8e64a7e422..23dad00431 100644 --- a/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpackmex.c +++ b/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpackmex.c @@ -3,13 +3,10 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ -/* Minor revision, Aug 13, 2003 (version 4.1.1). Removed call to spparms. */ -/* -------------------------------------------------------------------------- */ /* MATLAB interface for umfpack. @@ -21,10 +18,6 @@ L is unit lower triangular, U is upper triangular, and R is diagonal. P and Q are permutation matrices (permutations of an identity matrix). - This has changed since v4.0. The outputs P and Q are returned as - permutation matrices instead of permutation vectors, and the row scale - factor r is also returned. v4.0 did not scale the matrix. - The matrix A is scaled, by default. Each row i is divided by r (i), where r (i) is the sum of the absolute values of the entries in that row. The scaled matrix has an infinity norm of 1. The scale factors r (i) are @@ -46,7 +39,7 @@ returns LU factors such that L*U = P*A*Q, with no scaling. - See umfpack.m and umfpack.h for details. + See umfpack.m, umfpack_details.m, and umfpack.h for details. Note that this mexFunction accesses only the user-callable UMFPACK routines. Thus, is also provides another example of how user C code can access @@ -64,7 +57,12 @@ factorizing A, and then solving via the transposed L and U matrices. The solution is still x = (A.'\b.').', except that A is factorized instead of A.'. + + Modified for v4.3.1, Jan 10, 2005: default has been changed to + NO_TRANSPOSE_FORWARD_SLASH, to test iterative refinement for b/A. + v4.4: added method for computing the determinant. */ +#define NO_TRANSPOSE_FORWARD_SLASH /* default has changed for v4.3.1 */ #include "umfpack.h" #include "mex.h" @@ -144,6 +142,9 @@ void mexFunction /* local variables */ /* ---------------------------------------------------------------------- */ + double Info [UMFPACK_INFO], Control [UMFPACK_CONTROL], dx, dz, dexp ; + double *Lx, *Lz, *Ux, *Uz, *Ax, *Az, *Bx, *Bz, *Xx, *Xz, *User_Control, + *p, *q, *OutInfo, *p1, *p2, *p3, *p4, *Ltx, *Ltz, *Rs, *Px, *Qx ; void *Symbolic, *Numeric ; int *Lp, *Li, *Up, *Ui, *Ap, *Ai, *P, *Q, do_solve, lnz, unz, nn, i, transpose, size, do_info, do_numeric, *Front_npivcol, op, k, *Rp, *Ri, @@ -151,10 +152,7 @@ void mexFunction nfronts, nchains, *Ltp, *Ltj, *Qinit, print_level, status2, no_scale, *Front_1strow, *Front_leftmostdesc, n_row, n_col, n_inner, sys, ignore1, ignore2, ignore3, A_is_complex, B_is_complex, X_is_complex, - *Pp, *Pi, *Qp, *Qi, do_recip ; - double *Lx, *Lz, *Ux, *Uz, *Ax, *Az, *Bx, *Bz, *Xx, *Xz, *User_Control, - *p, *q, Info [UMFPACK_INFO], Control [UMFPACK_CONTROL], *OutInfo, - *p1, *p2, *p3, *p4, *Ltx, *Ltz, *Rs, *Px, *Qx ; + *Pp, *Pi, *Qp, *Qi, do_recip, do_det ; mxArray *Amatrix, *Bmatrix, *User_Control_matrix, *User_Qinit ; char *operator, *operation ; mxComplexity Atype, Xtype ; @@ -177,6 +175,7 @@ void mexFunction do_numeric = TRUE ; transpose = FALSE ; no_scale = FALSE ; + do_det = FALSE ; /* find the operator */ op = 0 ; @@ -312,6 +311,27 @@ void mexFunction mexErrMsgTxt ("wrong number of arguments") ; } + } + else if (STRING_MATCH (operator, "det")) + { + + /* -------------------------------------------------------------- */ + /* compute the determinant */ + /* -------------------------------------------------------------- */ + + /* + * [det] = umfpack (A, 'det') ; + * [dmantissa dexp] = umfpack (A, 'det') ; + */ + + operation = "determinant" ; + do_det = TRUE ; + Amatrix = (mxArray *) pargin [0] ; + if (nargin > 2 || nargout > 2) + { + mexErrMsgTxt ("wrong number of arguments") ; + } + } else { @@ -741,7 +761,7 @@ void mexFunction } /* ------------------------------------------------------------------ */ - /* return the solution or the factorization */ + /* return the solution, determinant, or the factorization */ /* ------------------------------------------------------------------ */ if (do_solve) @@ -923,6 +943,66 @@ void mexFunction } } + } + else if (do_det) + { + + /* -------------------------------------------------------------- */ + /* get the determinant */ + /* -------------------------------------------------------------- */ + + if (nargout == 2) + { + /* [det dexp] = umfpack (A, 'det') ; + * return determinant in the form det * 10^dexp */ + p = &dexp ; + } + else + { + /* [det] = umfpack (A, 'det') ; + * return determinant as a single scalar (overflow or + * underflow is much more likely) */ + p = (double *) NULL ; + } + if (A_is_complex) + { + status = umfpack_zi_get_determinant (&dx, &dz, p, + Numeric, Info) ; + umfpack_zi_free_numeric (&Numeric) ; + } + else + { + status = umfpack_di_get_determinant (&dx, p, + Numeric, Info) ; + umfpack_di_free_numeric (&Numeric) ; + dz = 0 ; + } + if (status < 0) + { + error ("extracting LU factors failed", A_is_complex, nargout, + pargout, Control, Info, status, do_info) ; + } + if (A_is_complex) + { + pargout [0] = mxCreateDoubleMatrix (1, 1, mxCOMPLEX) ; + p = mxGetPr (pargout [0]) ; + *p = dx ; + p = mxGetPi (pargout [0]) ; + *p = dz ; + } + else + { + pargout [0] = mxCreateDoubleMatrix (1, 1, mxREAL) ; + p = mxGetPr (pargout [0]) ; + *p = dx ; + } + if (nargout == 2) + { + pargout [1] = mxCreateDoubleMatrix (1, 1, mxREAL) ; + p = mxGetPr (pargout [1]) ; + *p = dexp ; + } + } else { diff --git a/deal.II/contrib/umfpack/UMFPACK/README b/deal.II/contrib/umfpack/UMFPACK/README.txt similarity index 93% rename from deal.II/contrib/umfpack/UMFPACK/README rename to deal.II/contrib/umfpack/UMFPACK/README.txt index ff39cb6f17..e601f38e5f 100644 --- a/deal.II/contrib/umfpack/UMFPACK/README +++ b/deal.II/contrib/umfpack/UMFPACK/README.txt @@ -1,4 +1,4 @@ -UMFPACK Version 4.3: a set of routines solving sparse linear systems via LU +UMFPACK Version 4.4: a set of routines solving sparse linear systems via LU factorization. Requires two other packages: the BLAS (dense matrix operations) and AMD (sparse matrix minimum degree ordering). Includes a C-callable and MATLAB interface, and a basic FORTRAN 77 interface to @@ -26,7 +26,7 @@ Quick start (for MATLAB users): -------------------------------------------------------------------------------- -UMFPACK Version 4.3 (Jan. 16, 2003), Copyright (c) 2003 by Timothy A. +UMFPACK Version 4.4 (Jan. 28, 2005), Copyright (c) 2005 by Timothy A. Davis. All Rights Reserved. UMFPACK License: @@ -61,16 +61,17 @@ Availability: (http://www.mathworks.com). COLAMD V1.0 appears as a column-preordering in SuperLU (SuperLU is available at http://www.netlib.org). UMFPACK v4.0 is a built-in routine in MATLAB 6.5. + UMFPACK v4.3 is a built-in routine in MATLAB 7.1. -------------------------------------------------------------------------------- Refer to ../AMD/README for the License for AMD, which is a separate package for ordering sparse matrices that is required by UMFPACK. -UMFPACK v4.3 can use either AMD v1.0 or v1.1. +UMFPACK v4.4 can use either AMD v1.0 or v1.1. -------------------------------------------------------------------------------- -This is the UMFPACK README file. It is a terse overview of UMFPACK. +This is the UMFPACK README.txt file. It is a terse overview of UMFPACK. Refer to the User Guide (Doc/UserGuide.pdf) for how to install and use UMFPACK, or to the Quick Start Guide, QuickStart.pdf. @@ -124,6 +125,9 @@ Acknowledgements: Anderson also incorporated UMFPACK v4.0 into MATLAB, for lu, backslash (\), and forward slash (/). + David Bateman (Motorola) wrote the initial version of the packed complex + input option, and umfpack_get_determinant. + -------------------------------------------------------------------------------- Files and directories in the UMFPACK distribution: -------------------------------------------------------------------------------- @@ -147,7 +151,7 @@ Files and directories in the UMFPACK distribution: Makefile top-level Makefile for GNU make or original make. Windows users would require Cygwin to use "make" - README this file + README.txt this file ---------------------------------------------------------------------------- Doc directory: documentation @@ -182,9 +186,12 @@ Files and directories in the UMFPACK distribution: umfpack_defaults.c set Control defaults umfpack_free_numeric.c free Numeric object umfpack_free_symbolic.c free Symbolic object + umfpack_get_determinant.c compute determinant from Numeric object umfpack_get_lunz.c get nz's in L and U umfpack_get_numeric.c get Numeric object umfpack_get_symbolic.c get Symbolic object + umfpack_load_numeric.c load Numeric object from file + umfpack_load_symbolic.c load Symbolic object from file umfpack_numeric.c numeric factorization umfpack_qsymbolic.c symbolic factorization, user Q umfpack_report_control.c print Control settings @@ -196,6 +203,8 @@ Files and directories in the UMFPACK distribution: umfpack_report_symbolic.c print Symbolic object umfpack_report_triplet.c print triplet matrix umfpack_report_vector.c print dense vector + umfpack_save_numeric.c save Numeric object to file + umfpack_save_symbolic.c save Symbolic object to file umfpack_scale.c scale a vector umfpack_solve.c solve a linear system umfpack_symbolic.c symbolic factorization @@ -270,9 +279,12 @@ Files and directories in the UMFPACK distribution: umfpack_defaults.h umfpack_free_numeric.h umfpack_free_symbolic.h + umfpack_get_determinant.h umfpack_get_lunz.h umfpack_get_numeric.h umfpack_get_symbolic.h + umfpack_load_numeric.h + umfpack_load_symbolic.h umfpack_numeric.h umfpack_qsymbolic.h umfpack_report_control.h @@ -284,6 +296,8 @@ Files and directories in the UMFPACK distribution: umfpack_report_symbolic.h umfpack_report_triplet.h umfpack_report_vector.h + umfpack_save_numeric.h + umfpack_save_symbolic.h umfpack_scale.h umfpack_solve.h umfpack_symbolic.h @@ -291,6 +305,7 @@ Files and directories in the UMFPACK distribution: umfpack_timer.h umfpack_transpose.h umfpack_triplet_to_col.h + umfpack_wsolve.h note that there is no umfpack_wsolve.c. The umfpack_*_wsolve routines are created from the umfpack_solve.c file. @@ -335,12 +350,14 @@ Files and directories in the UMFPACK distribution: umf4_f77zwrapper.c a simple FORTRAN interface for the complex UMFPACK routines. compile with "make fortran" umf4zhb.f a demo of the FORTRAN interface (complex) - umf4zhb.out output of umf4zhb with Bai/qc324.cua, which is - not included in this distribution, see - http://www.cise.ufl.edu/research/sparse/matrices + umf4zhb.out output of umf4zhb with HB/qc324.cua umf4hb64.f 64-bit version of umf4hb.f + simple_compile a single command that compiles the double/int + version of UMFPACK (useful prototype for + Microsoft Visual Studio project) + ---------------------------------------------------------------------------- MATLAB directory: ---------------------------------------------------------------------------- @@ -349,18 +366,19 @@ Files and directories in the UMFPACK distribution: GNUmakefile a nice Makefile, for GNU make Makefile an ugly Unix Makefile (for older make's) + lu_normest.m 1-norm estimate of A-L*U (by Hager & Davis). luflop.m for "help luflop" luflopmex.c luflop mexFunction, for computing LU flop count - lu_normest.m 1-norm estimate of A-L*U (by Hager & Davis). + umfpack.m for "help umfpack" umfpack_btf.m solve Ax=b using umfpack and dmperm umfpack_demo.m a full umfpack demo umfpack_details.m the details of how to use umfpack - umfpack.m for "help umfpack" umfpack_make.m compile the umfpack mexFunction within MATLAB - umfpackmex.c the umfpack mexFunction umfpack_report.m report statistics umfpack_simple.m a simple umfpack demo umfpack_solve.m x=A\b or b/A for arbitrary b + umfpack_test.m extensive test, requires UF sparse matrices + umfpackmex.c the umfpack mexFunction west0067.mat sparse matrix for umfpack_demo.m umfpack_demo.m.out output of umfpack_demo.m diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_2by2.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_2by2.c index e3111a7542..0e0b8a311d 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_2by2.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_2by2.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -422,12 +421,13 @@ GLOBAL void UMF_2by2 /* local variables */ /* ---------------------------------------------------------------------- */ + Entry aij ; + double cmax, value, rs, ctol, dvalue ; Int k, p, row, col, do_values, do_sum, do_max, do_scale, nweak, weak, p1, p2, dfound, unmatched, n2, oldrow, newrow, oldcol, newcol, pp ; - - double cmax, value, rs, ctol, dvalue ; - Entry aij ; - +#ifdef COMPLEX + Int split = SPLIT (Az) ; +#endif #ifndef NRECIPROCAL Int do_recip = FALSE ; #endif @@ -448,12 +448,7 @@ GLOBAL void UMF_2by2 /* use the values, but only if they are present */ /* ignore the values if tol <= 0 */ - do_values = (tol > 0) - && (Ax != (double *) NULL) -#ifdef COMPLEX - && (Az != (double *) NULL) -#endif - ; + do_values = (tol > 0) && (Ax != (double *) NULL) ; if (do_values && (Rs != (double *) NULL)) { do_sum = (scale == UMFPACK_SCALE_SUM) ; @@ -490,7 +485,7 @@ GLOBAL void UMF_2by2 for (p = Ap [col] ; p < p2 ; p++) { row = Ai [p] ; - ASSIGN (aij, Ax [p], Az [p]) ; + ASSIGN (aij, Ax, Az, p, split) ; APPROX_ABS (value, aij) ; rs = Rs [row] ; if (!SCALAR_IS_NAN (rs)) @@ -601,7 +596,7 @@ GLOBAL void UMF_2by2 newrow = InvRperm1 [oldrow] - n1 ; ASSERT (newrow >= -n1 && newrow < n2) ; if (newrow < 0) continue ; - ASSIGN (aij, Ax [p], Az [p]) ; + ASSIGN (aij, Ax, Az, p, split) ; APPROX_ABS (value, aij) ; /* if either cmax or value is NaN, define cmax as NaN */ if (!SCALAR_IS_NAN (cmax)) @@ -635,7 +630,7 @@ GLOBAL void UMF_2by2 newrow = InvRperm1 [oldrow] - n1 ; ASSERT (newrow >= -n1 && newrow < n2) ; if (newrow < 0) continue ; - ASSIGN (aij, Ax [p], Az [p]) ; + ASSIGN (aij, Ax, Az, p, split) ; APPROX_ABS (value, aij) ; value *= Rs [oldrow] ; /* if either cmax or value is NaN, define cmax as NaN */ @@ -670,7 +665,7 @@ GLOBAL void UMF_2by2 newrow = InvRperm1 [oldrow] - n1 ; ASSERT (newrow >= -n1 && newrow < n2) ; if (newrow < 0) continue ; - ASSIGN (aij, Ax [p], Az [p]) ; + ASSIGN (aij, Ax, Az, p, split) ; APPROX_ABS (value, aij) ; value /= Rs [oldrow] ; /* if either cmax or value is NaN, define cmax as NaN */ @@ -755,7 +750,7 @@ GLOBAL void UMF_2by2 oldrow = Ai [p] ; newrow = InvRperm1 [oldrow] - n1 ; if (newrow < 0) continue ; - ASSIGN (aij, Ax [p], Az [p]) ; + ASSIGN (aij, Ax, Az, p, split) ; APPROX_ABS (value, aij) ; weak = WEAK (value, ctol) ; if (!weak) @@ -775,7 +770,7 @@ GLOBAL void UMF_2by2 oldrow = Ai [p] ; newrow = InvRperm1 [oldrow] - n1 ; if (newrow < 0) continue ; - ASSIGN (aij, Ax [p], Az [p]) ; + ASSIGN (aij, Ax, Az, p, split) ; APPROX_ABS (value, aij) ; value *= Rs [oldrow] ; weak = WEAK (value, ctol) ; @@ -796,7 +791,7 @@ GLOBAL void UMF_2by2 oldrow = Ai [p] ; newrow = InvRperm1 [oldrow] - n1 ; if (newrow < 0) continue ; - ASSIGN (aij, Ax [p], Az [p]) ; + ASSIGN (aij, Ax, Az, p, split) ; APPROX_ABS (value, aij) ; value /= Rs [oldrow] ; weak = WEAK (value, ctol) ; diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_2by2.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_2by2.h index a7bb479af5..4e88d1dced 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_2by2.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_2by2.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_analyze.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_analyze.c index b4da7e291b..34d6b80129 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_analyze.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_analyze.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -29,8 +28,6 @@ #include "umf_internal.h" #include "umf_apply_order.h" -#include "umf_malloc.h" -#include "umf_free.h" #include "umf_fsize.h" /* ========================================================================== */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_analyze.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_analyze.h index cb3af8a9fb..a1e0540082 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_analyze.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_analyze.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_apply_order.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_apply_order.c index 88e9b62d68..10b6c4b8c8 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_apply_order.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_apply_order.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_apply_order.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_apply_order.h index 73b63a6945..b8e2ca4921 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_apply_order.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_apply_order.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_assemble.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_assemble.c index 1e1b0f224e..335c89048a 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_assemble.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_assemble.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -28,12 +27,12 @@ PRIVATE void row_assemble ) { + Entry *S, *Fcblock, *Frow ; Int tpi, e, *E, *Fcpos, *Frpos, *Row_degree, *Row_tuples, *Row_tlen, rdeg0, f, nrows, ncols, *Rows, *Cols, col, ncolsleft, j ; Tuple *tp, *tp1, *tp2, *tpend ; Unit *Memory, *p ; Element *ep ; - Entry *S, *Fcblock, *Frow ; #ifndef FIXQ Int *Col_degree ; @@ -180,12 +179,12 @@ PRIVATE void col_assemble ) { + Entry *S, *Fcblock, *Fcol ; Int tpi, e, *E, *Fcpos, *Frpos, *Row_degree, *Col_tuples, *Col_tlen, cdeg0, f, nrows, ncols, *Rows, *Cols, row, nrowsleft, i ; Tuple *tp, *tp1, *tp2, *tpend ; Unit *Memory, *p ; Element *ep ; - Entry *S, *Fcblock, *Fcol ; #if !defined (FIXQ) || !defined (NDEBUG) Int *Col_degree ; diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_assemble.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_assemble.h index 4cbfc57556..860194aedf 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_assemble.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_assemble.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_blas3_update.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_blas3_update.c index acceb5f775..5aab565e2d 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_blas3_update.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_blas3_update.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_blas3_update.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_blas3_update.h index 2285d97fdc..86bb8102a2 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_blas3_update.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_blas3_update.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_build_tuples.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_build_tuples.c index cabb7e0239..a570da1065 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_build_tuples.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_build_tuples.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_build_tuples.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_build_tuples.h index a4b5ed1e6f..f17e601b30 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_build_tuples.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_build_tuples.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_colamd.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_colamd.c index 8a574dd183..252fbfb23f 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_colamd.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_colamd.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_colamd.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_colamd.h index b33ebe197d..e40f9c2e8a 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_colamd.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_colamd.h @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_config.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_config.h index ea4b641418..d73762c434 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_config.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_config.h @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -256,7 +255,7 @@ about 36 minutes. BE CAREFUL: if you compare the run time of UMFPACK with other sparse matrix packages, be sure to use the same timer. See umfpack_tictoc.c for the timer used internally by UMFPACK. See also - umfpack_timer.c for the timer used in an earlier version of UMFPACK (V4.0). + umfpack_timer.c for the timer used in an earlier version of UMFPACK. That timer is still available as a user-callable routine, but it is no longer used internally by UMFPACK. */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_create_element.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_create_element.c index 48b1d5907c..d6eb1157c8 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_create_element.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_create_element.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_create_element.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_create_element.h index 81df97f4d3..c407f1c067 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_create_element.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_create_element.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_dump.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_dump.c index 9990c2c49b..4f197b9bbd 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_dump.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_dump.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -244,13 +243,14 @@ GLOBAL void UMF_dump_rowcol Int check_degree /* true if degree is to be checked */ ) { + Entry value ; + Entry *C ; Int f, nrows, j, jj, len, e, deg, index, n_row, n_col, *Cols, *Rows, nn, dumpdeg, ncols, preve, *E, tpi, *Pattern, approx_deg, not_in_use ; Tuple *tp, *tend ; Element *ep ; Int *Row_tuples, *Row_degree, *Row_tlen ; Int *Col_tuples, *Col_degree, *Col_tlen ; - Entry value, *C ; Unit *p ; Int is_there ; @@ -937,10 +937,13 @@ GLOBAL void UMF_dump_col_matrix ) { Int col, p, p1, p2, row ; +#ifdef COMPLEX + Int split = SPLIT (Az) ; +#endif + if (!Ai || !Ap) return ; DEBUG6 (("============================================ COLUMN FORM:\n")) ; - ASSERT (n_col >= 0) ; nz = Ap [n_col] ; DEBUG2 (("UMF_dump_col: nz "ID"\n", nz)) ; @@ -965,13 +968,13 @@ GLOBAL void UMF_dump_col_matrix if (Ax != (double *) NULL) { #ifdef COMPLEX - if (Az != (double *) NULL) + if (split) { DEBUG6 ((" (%e+%ei) ", Ax [p], Az [p])) ; } else { - DEBUG6 ((" %e", Ax [p])) ; + DEBUG6 ((" (%e+%ei) ", Ax [2*p], Ax [2*p+1])) ; } #else DEBUG6 ((" %e", Ax [p])) ; @@ -1045,6 +1048,8 @@ GLOBAL void UMF_dump_start { FILE *ff ; + AMD_debug_init ("from umfpack") ; + /* get the debug print level from the "debug.umf" file, if it exists */ UMF_debug = -999 ; ff = fopen ("debug.umf", "r") ; diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_dump.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_dump.h index de220f37a1..71f11128fe 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_dump.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_dump.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_extend_front.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_extend_front.c index 7c14b4648a..9a61fcc324 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_extend_front.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_extend_front.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -127,8 +126,8 @@ GLOBAL Int UMF_extend_front if (Work->do_grow) { - fnr2 = (Int) (UMF_FRONTAL_GROWTH * Work->fnrows_new + 2) ; - fnc2 = (Int) (UMF_FRONTAL_GROWTH * Work->fncols_new + 2) ; + fnr2 = UMF_FRONTAL_GROWTH * Work->fnrows_new + 2 ; + fnc2 = UMF_FRONTAL_GROWTH * Work->fncols_new + 2 ; if (!UMF_grow_front (Numeric, fnr2, fnc2, Work, 1)) { DEBUGm4 (("out of memory: extend front\n")) ; diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_extend_front.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_extend_front.h index 45e3d47500..afccb8444f 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_extend_front.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_extend_front.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_free.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_free.c index 5f74ae97ba..c1e02beca4 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_free.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_free.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_free.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_free.h index b2bf660d2c..f5987312f7 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_free.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_free.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_fsize.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_fsize.c index ceaf648b2b..c7f6056f65 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_fsize.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_fsize.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_fsize.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_fsize.h index cef2ad9878..757cbf38db 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_fsize.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_fsize.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_garbage_collection.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_garbage_collection.c index abaf180f5d..b4188823ea 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_garbage_collection.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_garbage_collection.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_garbage_collection.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_garbage_collection.h index 29d9186cf7..6445bfdd8c 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_garbage_collection.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_garbage_collection.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_get_memory.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_get_memory.c index 480288b2df..abe201613c 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_get_memory.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_get_memory.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -34,10 +33,10 @@ GLOBAL Int UMF_get_memory Int do_Fcpos ) { + double nsize, bsize, tsize ; Int i, minsize, newsize, newmem, costly, row, col, *Row_tlen, *Col_tlen, n_row, n_col, *Row_degree, *Col_degree ; Unit *mnew, *p ; - double nsize, bsize, tsize ; /* ---------------------------------------------------------------------- */ /* get and check parameters */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_get_memory.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_get_memory.h index 754f1faced..4b5bb3e710 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_get_memory.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_get_memory.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_grow_front.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_grow_front.c index 90f1ad02e7..8a7a01e777 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_grow_front.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_grow_front.c @@ -3,16 +3,14 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ /* Current frontal matrix is too small. Make it bigger. */ #include "umf_internal.h" -#include "umf_realloc.h" #include "umf_mem_free_tail_block.h" #include "umf_mem_alloc_tail_block.h" #include "umf_get_memory.h" @@ -33,11 +31,11 @@ GLOBAL Int UMF_grow_front /* local variables */ /* ---------------------------------------------------------------------- */ + double s ; Entry *Fcold, *Fcnew ; Int j, i, col, *Fcpos, *Fcols, fnrows_max, fncols_max, fnr_curr, nb, fnrows_new, fncols_new, fnr_min, fnc_min, minsize, newsize, fnrows, fncols, *E, eloc ; - double s ; /* ---------------------------------------------------------------------- */ /* get parameters */ @@ -115,8 +113,8 @@ GLOBAL Int UMF_grow_front /* the desired front size is bigger than the integer maximum */ /* compute a such that a*a*s < Int_MAX / sizeof (Entry) */ double a = 0.9 * sqrt ((Int_MAX / sizeof (Entry)) / s) ; - fnr2 = (Int) MAX (fnr_min, a * fnr2) ; - fnc2 = (Int) MAX (fnc_min, a * fnc2) ; + fnr2 = MAX (fnr_min, a * fnr2) ; + fnc2 = MAX (fnc_min, a * fnc2) ; /* the new frontal size is a*r*a*c = a*a*s */ newsize = fnr2 * fnc2 ; ASSERT (fnr2 >= 0) ; @@ -188,8 +186,8 @@ GLOBAL Int UMF_grow_front /* try again with something smaller */ while ((fnr2 != fnr_min || fnc2 != fnc_min) && !eloc) { - fnr2 = (Int) MIN (fnr2 - 2, fnr2 * UMF_REALLOC_REDUCTION) ; - fnc2 = (Int) MIN (fnc2 - 2, fnc2 * UMF_REALLOC_REDUCTION) ; + fnr2 = MIN (fnr2 - 2, fnr2 * UMF_REALLOC_REDUCTION) ; + fnc2 = MIN (fnc2 - 2, fnc2 * UMF_REALLOC_REDUCTION) ; ASSERT (fnr_min >= 0) ; ASSERT (fnr_min % 2 == 1) ; fnr2 = MAX (fnr_min, fnr2) ; diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_grow_front.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_grow_front.h index 2f27fe52d3..b95be62e1e 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_grow_front.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_grow_front.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_init_front.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_init_front.c index ec40ed806b..e9fab62236 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_init_front.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_init_front.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -65,8 +64,8 @@ GLOBAL Int UMF_init_front #endif if (Work->do_grow) { - fnr2 = (Int) (UMF_FRONTAL_GROWTH * Work->fnrows_new + 2) ; - fnc2 = (Int) (UMF_FRONTAL_GROWTH * Work->fncols_new + 2) ; + fnr2 = UMF_FRONTAL_GROWTH * Work->fnrows_new + 2 ; + fnc2 = UMF_FRONTAL_GROWTH * Work->fncols_new + 2 ; if (!UMF_grow_front (Numeric, fnr2, fnc2, Work, Work->pivrow_in_front ? 2 : 0)) { diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_init_front.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_init_front.h index 96a77ab66d..67039cb2de 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_init_front.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_init_front.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_internal.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_internal.h index f4e26c2f80..5a0e3014d9 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_internal.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_internal.h @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -16,6 +15,9 @@ file names and routine names all start with "umf_". */ +#ifndef _UMF_INTERNAL +#define _UMF_INTERNAL + /* -------------------------------------------------------------------------- */ /* ANSI standard include files */ /* -------------------------------------------------------------------------- */ @@ -747,10 +749,12 @@ typedef struct /* SymbolicType */ /* for testing out-of-memory conditions: */ #define UMF_TCOV_TEST -GLOBAL extern Int umf_fail, umf_fail_lo, umf_fail_hi ; -GLOBAL extern Int umf_realloc_fail, umf_realloc_lo, umf_realloc_hi ; +GLOBAL extern int umf_fail, umf_fail_lo, umf_fail_hi ; +GLOBAL extern int umf_realloc_fail, umf_realloc_lo, umf_realloc_hi ; /* for testing malloc count: */ #define UMF_MALLOC_COUNT #endif + +#endif diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_is_permutation.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_is_permutation.c index 845ece2ac0..77ae6ccbe5 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_is_permutation.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_is_permutation.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_is_permutation.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_is_permutation.h index 386604b2f5..a9ed1dc58a 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_is_permutation.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_is_permutation.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_kernel.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_kernel.c index 7e433f1653..cd1fa5bdad 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_kernel.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_kernel.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_kernel.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_kernel.h index 3f64436204..912e7f3567 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_kernel.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_kernel.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_kernel_init.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_kernel_init.c index a1f0b97068..fec1650d6d 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_kernel_init.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_kernel_init.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -28,7 +27,6 @@ #include "umf_mem_alloc_head_block.h" #include "umf_mem_alloc_tail_block.h" #include "umf_mem_free_tail_block.h" -#include "umf_free.h" #include "umf_scale.h" /* ========================================================================== */ @@ -49,9 +47,10 @@ PRIVATE Int packsp /* returns new value of pnew */ Unit *Memory /* contains the sparse vector on input and output */ ) { - Entry x, *Bx, *Bx2 ; - Int p, i, len, len_new, *Bi, *Bi2 ; + Entry x ; double s ; + Entry *Bx, *Bx2 ; + Int p, i, len, len_new, *Bi, *Bi2 ; /* get the pointers to the sparse vector, and its length */ p = *p_p ; @@ -154,6 +153,10 @@ GLOBAL Int UMF_kernel_init /* local variables */ /* ---------------------------------------------------------------------- */ + Entry x, pivot_value ; + double unused = 0, rsmin, rsmax, rs, droptol ; + Entry *D, *C, *Lval, **Rpx ; + double *Rs ; Int row, k, oldcol, size, e, p1, p2, p, nz, *Rows, *Cols, *E, i, *Upos, *Lpos, n_row, n_col, *Wp, *Cperm_init, *Frpos, *Fcpos, *Row_degree, nn, *Row_tlen, *Col_degree, *Col_tlen, oldrow, newrow, ilast, *Wrp, @@ -162,11 +165,11 @@ GLOBAL Int UMF_kernel_init *Lip, *Uip, *Lilen, *Uilen, llen, pa, *Cdeg, *Rdeg, n1, clen, do_scale, lnz, unz, lip, uip, k1, *Rperm, *Cperm, pivcol, *Li, lilen, drop, **Rpi, nempty_row, dense_row_threshold, empty_elements, rpi, rpx ; - double unused = 0, *Rs, rsmin, rsmax, rs, droptol ; - Entry *D, *C, x, *Lval, pivot_value, **Rpx ; Element *ep ; Unit *Memory ; - +#ifdef COMPLEX + Int split = SPLIT (Az) ; +#endif #ifndef NRECIPROCAL Int do_recip = FALSE ; #endif @@ -370,8 +373,8 @@ GLOBAL Int UMF_kernel_init } for (p = p1 ; p < p2 ; p++) { - double value ; Entry aij ; + double value ; row = Ai [p] ; if (row <= ilast || row >= n_row) { @@ -379,7 +382,7 @@ GLOBAL Int UMF_kernel_init DEBUGm4 (("invalid matrix (Ai)\n")) ; return (FALSE) ; } - ASSIGN (aij, Ax [p], Az [p]) ; + ASSIGN (aij, Ax, Az, p, split) ; APPROX_ABS (value, aij) ; rs = Rs [row] ; if (!SCALAR_IS_NAN (rs)) @@ -669,7 +672,7 @@ GLOBAL Int UMF_kernel_init { oldrow = Ai [pa] ; newrow = Frpos [oldrow] ; - ASSIGN (x, Ax [pa], Az [pa]) ; + ASSIGN (x, Ax, Az, pa, split) ; /* scale the value using the scale factors, Rs */ if (do_scale) @@ -677,7 +680,7 @@ GLOBAL Int UMF_kernel_init #ifndef NRECIPROCAL if (do_recip) { - SCALE_RECIP (x, Rs [oldrow]) ; + SCALE (x, Rs [oldrow]) ; } else #endif @@ -790,7 +793,7 @@ GLOBAL Int UMF_kernel_init { oldrow = Ai [pa] ; newrow = Frpos [oldrow] ; - ASSIGN (x, Ax [pa], Az [pa]) ; + ASSIGN (x, Ax, Az, pa, split) ; /* scale the value using the scale factors, Rs */ if (do_scale) @@ -799,7 +802,7 @@ GLOBAL Int UMF_kernel_init if (do_recip) { /* multiply by the reciprocal */ - SCALE_RECIP (x, Rs [oldrow]) ; + SCALE (x, Rs [oldrow]) ; } else #endif @@ -910,15 +913,15 @@ GLOBAL Int UMF_kernel_init { /* :: pattern change (dense row too short) :: */ DEBUGm4 (("bad dense row (too short)\n")) ; - return (FALSE) ; + return (FALSE) ; /* pattern changed */ } } #ifndef NDEBUG if (prefer_diagonal) { - Int *InvCperm, newcol ; Entry aij ; + Int *InvCperm, newcol ; UMF_dump_diagonal_map (Diagonal_map, Diagonal_imap, n1, nn, nempty) ; InvCperm = (Int *) malloc (n_col * sizeof (Int)) ; ASSERT (InvCperm != (Int *) NULL) ; @@ -935,7 +938,7 @@ GLOBAL Int UMF_kernel_init { oldrow = Ai [p] ; newrow = Frpos [oldrow] ; - ASSIGN (aij, Ax [p], Az [p]) ; + ASSIGN (aij, Ax, Az, p, split) ; if (newrow == Diagonal_map [newcol]) { DEBUG0 (("old row "ID" col "ID" new row "ID" col "ID, @@ -947,7 +950,7 @@ GLOBAL Int UMF_kernel_init #ifndef NRECIPROCAL if (do_recip) { - SCALE_RECIP (aij, Rs [oldrow]) ; + SCALE (aij, Rs [oldrow]) ; } else #endif diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_kernel_init.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_kernel_init.h index 67deb41e69..e3d22cf99b 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_kernel_init.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_kernel_init.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_kernel_wrapup.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_kernel_wrapup.c index 6b32a1bce0..91b00204d4 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_kernel_wrapup.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_kernel_wrapup.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -25,12 +24,13 @@ GLOBAL void UMF_kernel_wrapup /* local variables */ /* ---------------------------------------------------------------------- */ + Entry pivot_value ; + double d ; + Entry *D ; Int i, k, col, row, llen, ulen, *ip, *Rperm, *Cperm, *Lilen, npiv, lp, *Uilen, *Lip, *Uip, *Cperm_init, up, pivrow, pivcol, *Lpos, *Upos, *Wr, *Wc, *Wp, *Frpos, *Fcpos, *Row_degree, *Col_degree, *Rperm_init, n_row, n_col, n_inner, zero_pivot, nan_pivot, n1 ; - Entry *D, pivot_value ; - double d ; #ifndef NDEBUG UMF_dump_matrix (Numeric, Work, FALSE) ; diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_kernel_wrapup.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_kernel_wrapup.h index 4550821eba..2a62d99079 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_kernel_wrapup.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_kernel_wrapup.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_local_search.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_local_search.c index 7c54cd2aa8..b8a444c536 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_local_search.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_local_search.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -22,12 +21,11 @@ #include "umf_row_search.h" #include "umf_mem_free_tail_block.h" -/* Version 4.1: relaxed amalgamation control parameters are now fixed, and - * cannot be changed via Control [..] settings, as they could in Version 4.0. */ -#define RELAX1 0.25 /* this was UMFPACK_DEFAULT_RELAXED_AMALGAMATION */ -#define SYM_RELAX1 0.0 /* this is new to Version 4.1 */ -#define RELAX2 0.1 /* this was UMFPACK_DEFAULT_RELAXED2_AMALGAMATION */ -#define RELAX3 0.125 /* this was UMFPACK_DEFAULT_RELAXED3_AMALGAMATION */ +/* relaxed amalgamation control parameters are fixed at compile time */ +#define RELAX1 0.25 +#define SYM_RELAX1 0.0 +#define RELAX2 0.1 +#define RELAX3 0.125 /* ========================================================================== */ /* === remove_candidate ===================================================== */ @@ -119,9 +117,9 @@ GLOBAL Int UMF_local_search /* local variables */ /* ---------------------------------------------------------------------- */ + double relax1 ; Entry *Flblock, *Fublock, *Fs, *Fcblock, *C, *Wx, *Wy, *Fu, *Flublock, *Flu ; - double relax1 ; Int pos, nrows, *Cols, *Rows, e, f, status, max_cdeg, fnzeros, nb, j, col, i, row, cdeg_in, rdeg [2][2], fnpiv, nothing [2], new_LUsize, pivrow [2][2], pivcol [2], *Wp, *Fcpos, *Frpos, new_fnzeros, cdeg_out, diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_local_search.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_local_search.h index 51ca38bdaa..f5fe61f99e 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_local_search.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_local_search.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_lsolve.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_lsolve.c index 03a84a31e0..8c58c388de 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_lsolve.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_lsolve.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -22,9 +21,10 @@ GLOBAL double UMF_lsolve Int Pattern [ ] /* a work array of size n */ ) { + Entry xk ; + Entry *xp, *Lval ; Int k, deg, *ip, j, row, *Lpos, *Lilen, *Lip, llen, lp, newLchain, pos, npiv, n1, *Li ; - Entry *xp, xk, *Lval ; /* ---------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_lsolve.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_lsolve.h index 75d6467823..05d630fd73 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_lsolve.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_lsolve.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_ltsolve.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_ltsolve.c index 6011f0c24b..a4b44c9429 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_ltsolve.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_ltsolve.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -27,9 +26,10 @@ UMF_ltsolve /* solve L.'x=b (array transpose) */ Int Pattern [ ] /* a work array of size n */ ) { + Entry xk ; + Entry *xp, *Lval ; Int k, deg, *ip, j, row, *Lpos, *Lilen, kstart, kend, *Lip, llen, lp, pos, npiv, n1, *Li ; - Entry *xp, xk, *Lval ; /* ---------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_ltsolve.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_ltsolve.h index 3b4ad1f53b..22f4352757 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_ltsolve.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_ltsolve.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_malloc.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_malloc.c index 9416435e5e..411e08d282 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_malloc.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_malloc.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -34,8 +33,8 @@ GLOBAL Int UMF_malloc_count = 0 ; #ifdef UMF_TCOV_TEST /* For exhaustive statement coverage testing only! */ -GLOBAL Int umf_fail, umf_fail_lo, umf_fail_hi ; -GLOBAL Int umf_realloc_fail, umf_realloc_lo, umf_realloc_hi ; +GLOBAL int umf_fail, umf_fail_lo, umf_fail_hi ; +GLOBAL int umf_realloc_fail, umf_realloc_lo, umf_realloc_hi ; #endif GLOBAL void *UMF_malloc diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_malloc.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_malloc.h index 44529b57c9..edd44ed013 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_malloc.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_malloc.h @@ -1,10 +1,12 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ +#ifndef _UMF_MALLOC +#define _UMF_MALLOC + #if defined (UMF_MALLOC_COUNT) || !defined (NDEBUG) GLOBAL extern Int UMF_malloc_count ; #endif @@ -14,3 +16,5 @@ GLOBAL void *UMF_malloc Int n_objects, size_t size_of_object ) ; + +#endif diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_mem_alloc_element.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_mem_alloc_element.c index 6eefa35504..74d6ba03ec 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_mem_alloc_element.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_mem_alloc_element.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_mem_alloc_element.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_mem_alloc_element.h index b3886cf396..5482f0b1bf 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_mem_alloc_element.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_mem_alloc_element.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_mem_alloc_head_block.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_mem_alloc_head_block.c index 9f94c2c775..6db2caaf23 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_mem_alloc_head_block.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_mem_alloc_head_block.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_mem_alloc_head_block.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_mem_alloc_head_block.h index 7217e51049..be882b5c7a 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_mem_alloc_head_block.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_mem_alloc_head_block.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_mem_alloc_tail_block.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_mem_alloc_tail_block.c index a6ca5cf7c5..56473675c8 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_mem_alloc_tail_block.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_mem_alloc_tail_block.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_mem_alloc_tail_block.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_mem_alloc_tail_block.h index b0502e0727..1062d2404f 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_mem_alloc_tail_block.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_mem_alloc_tail_block.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_mem_free_tail_block.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_mem_free_tail_block.c index 842d4bca6c..5fac99129f 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_mem_free_tail_block.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_mem_free_tail_block.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_mem_free_tail_block.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_mem_free_tail_block.h index 87b232bae1..43d136ed21 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_mem_free_tail_block.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_mem_free_tail_block.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_mem_init_memoryspace.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_mem_init_memoryspace.c index 5a2310d5d2..37fcc455ff 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_mem_init_memoryspace.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_mem_init_memoryspace.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_mem_init_memoryspace.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_mem_init_memoryspace.h index 8626eeb9ac..1095fdddb6 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_mem_init_memoryspace.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_mem_init_memoryspace.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_multicompile.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_multicompile.c new file mode 100644 index 0000000000..f1f3d64edf --- /dev/null +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_multicompile.c @@ -0,0 +1,58 @@ +/* ========================================================================== */ +/* === UMF_multicompile ===================================================== */ +/* ========================================================================== */ + +/* -------------------------------------------------------------------------- */ +/* UMFPACK Version 4.4, 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 */ +/* -------------------------------------------------------------------------- */ + +/* This file is not needed if you have the Unix/Linux "make" command for + * compiling UMFPACK. Microsoft Visual Studio cannot be configured to compile + * one file multiple times, with different -D flags. In this case, you can + * use this file instead. To use this file, see the Demo/simple_compile file. + * + * This file includes the following source files: + * + * umf_ltsolve.c + * umf_utsolve.c + * umf_triplet.c + * umf_assemble.c + * umf_store_lu.c + * umfpack_solve.c + * + * This file simply compiles the above files with different pre-#define'd flags, + * by defining the flags and then #include'ing the source files themselves. + * This is a rather unconventional approach, since by convention #include is + * supposed to be used with *.h files not *.c. However, it is one way of + * working around the limitations of Microsoft Visual Studio. + * + * You still need to compile all files separately as well, with none of the + * pre-#define'd terms listed below. + */ + +/* compile the complex conjugate forward/backsolves */ +#define CONJUGATE_SOLVE +#include "umf_ltsolve.c" +#include "umf_utsolve.c" + +/* compile umf_triplet with DO_MAP, DO_VALUES and DO_MAP, and just DO_VALUES */ +#define DO_MAP +#include "umf_triplet.c" +#define DO_VALUES +#include "umf_triplet.c" +#undef DO_MAP +#include "umf_triplet.c" + +/* compile the FIXQ version of umf_assemble */ +#define FIXQ +#include "umf_assemble.c" + +/* compile the DROP version of umf_store_lu */ +#define DROP +#include "umf_store_lu.c" + +/* compile umfpack_wsolve */ +#define WSOLVE +#include "umfpack_solve.c" diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_realloc.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_realloc.c index 339705bd61..dc3d33c5d4 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_realloc.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_realloc.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_realloc.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_realloc.h index 376de63a3a..88cd8a69f1 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_realloc.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_realloc.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_report_perm.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_report_perm.c index 0f67f3cf4d..659f8bedd5 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_report_perm.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_report_perm.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_report_perm.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_report_perm.h index 5fd7a7ab07..b513301fbd 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_report_perm.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_report_perm.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_report_vector.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_report_vector.c index d811d57421..38475b5fc5 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_report_vector.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_report_vector.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -19,14 +18,13 @@ PRIVATE void print_value ( Int i, const double Xx [ ], - const double Xz [ ], + const double Xz [ ], /* used for complex case only */ Int scalar /* if true, then print real part only */ ) { - Entry *X, xi ; + Entry xi ; /* if Xz is null, then X is in "merged" format (compatible with Entry, */ /* and ANSI C99 double _Complex type). */ - X = (Entry *) Xx ; PRINTF ((" "ID" :", INDEX (i))) ; if (scalar) { @@ -34,14 +32,7 @@ PRIVATE void print_value } else { - if (Xz != (double *) NULL) - { - ASSIGN (xi, Xx [i], Xz [i]) ; - } - else - { - xi = X [i] ; - } + ASSIGN (xi, Xx, Xz, i, SPLIT (Xz)) ; PRINT_ENTRY (xi) ; } PRINTF (("\n")) ; diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_report_vector.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_report_vector.h index 9ca5ae8197..8d0cba1c1d 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_report_vector.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_report_vector.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_row_search.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_row_search.c index 3a73a7252c..14757fb2b7 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_row_search.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_row_search.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_row_search.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_row_search.h index 9490c87532..61b64d252e 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_row_search.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_row_search.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_scale.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_scale.c index b07654f9db..42966db7dd 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_scale.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_scale.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -20,9 +19,9 @@ GLOBAL void UMF_scale Entry X [ ] ) { - Int i ; Entry x ; double s ; + Int i ; /* ---------------------------------------------------------------------- */ /* compute the approximate absolute value of the pivot, and select method */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_scale.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_scale.h index 74967a064e..1ffd45beec 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_scale.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_scale.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_scale_column.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_scale_column.c index 2c47898280..8404f3126f 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_scale_column.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_scale_column.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -53,11 +52,11 @@ GLOBAL void UMF_scale_column /* local variables */ /* ---------------------------------------------------------------------- */ + Entry pivot_value ; + Entry *Fcol, *Flublock, *Flblock, *Fublock, *Fcblock ; Int k, k1, fnr_curr, fnrows, fncols, *Frpos, *Fcpos, pivrow, pivcol, *Frows, *Fcols, fnc_curr, fnpiv, *Row_tuples, nb, *Col_tuples, *Rperm, *Cperm, fspos, col2, row2 ; - Entry pivot_value, *Fcol, - *Flublock, *Flblock, *Fublock, *Fcblock ; #ifndef NDEBUG Int *Col_degree, *Row_degree ; #endif diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_scale_column.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_scale_column.h index fe383635ed..c949ec9f1b 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_scale_column.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_scale_column.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_set_stats.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_set_stats.c index 63e51a7bb9..eb0d2dc518 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_set_stats.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_set_stats.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_set_stats.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_set_stats.h index 5b0a6c4cd2..7fadbcb61e 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_set_stats.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_set_stats.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_singletons.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_singletons.c index 841edeed03..b63a560768 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_singletons.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_singletons.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -710,6 +709,7 @@ PRIVATE Int finish_permutation { /* this row/col is empty in the pruned submatrix */ ASSERT (s < nx - nempty) ; + DEBUG0 (("empty k "ID"\n", k)) ; nempty++ ; Xperm [nx - nempty] = x ; } @@ -745,6 +745,7 @@ GLOBAL Int UMF_singletons const Int Ap [ ], /* size n_col+1 */ const Int Ai [ ], /* size nz = Ap [n_col] */ const Int Quser [ ], /* size n_col if present */ + Int strategy, /* strategy requested by user */ /* output, not defined on input: */ Int Cdeg [ ], /* size n_col */ @@ -821,9 +822,21 @@ GLOBAL Int UMF_singletons if (Quser != (Int *) NULL) { - /* look for singletons, but respect the user's input permutation */ - n1 = find_user_singletons (n_row, n_col, Ap, Ai, Quser, - Cdeg, Rdeg, Cperm, Rperm, &n1r, &n1c, Rp, Ri, W) ; + /* user has provided an input column ordering */ + if (strategy == UMFPACK_STRATEGY_UNSYMMETRIC) + { + /* look for singletons, but respect the user's input permutation */ + n1 = find_user_singletons (n_row, n_col, Ap, Ai, Quser, + Cdeg, Rdeg, Cperm, Rperm, &n1r, &n1c, Rp, Ri, W) ; + } + else + { + /* do not look for singletons if Quser given and strategy is + * not unsymmetric */ + n1 = 0 ; + n1r = 0 ; + n1c = 0 ; + } } else { @@ -842,8 +855,19 @@ GLOBAL Int UMF_singletons /* eliminate empty rows and complete the row permutation */ /* ---------------------------------------------------------------------- */ - nempty_row = finish_permutation (n1, n_row, Rdeg, (Int *) NULL, Rperm, - &max_rdeg) ; + if (Quser != (Int *) NULL && strategy == UMFPACK_STRATEGY_SYMMETRIC) + { + /* rows should be symmetrically permuted according to Quser */ + ASSERT (n_row == n_col) ; + nempty_row = finish_permutation (n1, n_row, Rdeg, Quser, Rperm, + &max_rdeg) ; + } + else + { + /* rows should not be symmetrically permuted according to Quser */ + nempty_row = finish_permutation (n1, n_row, Rdeg, (Int *) NULL, Rperm, + &max_rdeg) ; + } /* ---------------------------------------------------------------------- */ /* compute the inverse of Rperm */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_singletons.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_singletons.h index 460defa95c..d2d420cc4f 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_singletons.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_singletons.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -12,6 +11,7 @@ GLOBAL Int UMF_singletons const Int Ap [ ], const Int Ai [ ], const Int Quser [ ], + Int strategy, Int Cdeg [ ], Int Cperm [ ], Int Rdeg [ ], diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_solve.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_solve.c index 8450c40ee8..f670f0ca64 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_solve.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_solve.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -74,10 +73,14 @@ GLOBAL Int UMF_solve /* local variables */ /* ---------------------------------------------------------------------- */ + Entry axx, wi, xj, zi, xi, aij, bi ; + double omega [3], d, z2i, yi, flops ; + Entry *W, *Z, *S, *X ; + double *Z2, *Y, *B2, *Rs ; Int *Rperm, *Cperm, i, n, p, step, j, nz, status, p2, do_scale ; - Entry axx, wi, xj, zi, xi, aij, *W, *Z, *S, *X, bi ; - double omega [3], d, *Z2, *Y, z2i, yi, *B2, *Rs, flops ; - +#ifdef COMPLEX + Int split ; +#endif #ifndef NRECIPROCAL Int do_recip = Numeric->do_recip ; #endif @@ -89,9 +92,6 @@ GLOBAL Int UMF_solve #ifndef NDEBUG UMF_dump_lu (Numeric) ; ASSERT (Numeric && Xx && Bx && Pattern && SolveWork && Info) ; -#ifdef COMPLEX - ASSERT (Xz && Bz) ; -#endif #endif nz = 0 ; @@ -134,19 +134,33 @@ GLOBAL Int UMF_solve B2 = (double *) NULL ; #ifdef COMPLEX - X = (Entry *) (SolveWork + 2*n) ; /* Entry X [0..n-1] */ if (irstep > 0) { - if (!Ap || !Ai || !Ax || !Az) + if (!Ap || !Ai || !Ax) { return (UMFPACK_ERROR_argument_missing) ; } + /* A, B, and X in split format if Az, Bz, and Xz present */ + split = SPLIT (Az) && SPLIT (Bz) && SPLIT (Xz) ; Z = (Entry *) (SolveWork + 4*n) ; /* Entry Z [0..n-1] */ S = (Entry *) (SolveWork + 6*n) ; /* Entry S [0..n-1] */ Y = (double *) (SolveWork + 8*n) ; /* double Y [0..n-1] */ B2 = (double *) (SolveWork + 9*n) ; /* double B2 [0..n-1] */ Z2 = (double *) Z ; /* double Z2 [0..n-1], equiv. to Z */ } + else + { + /* A is ignored, only look at X and B for split/packed cases */ + split = SPLIT (Bz) && SPLIT (Xz) ; + } + if (split) + { + X = (Entry *) (SolveWork + 2*n) ; /* Entry X [0..n-1] */ + } + else + { + X = (Entry *) Xx ; /* Entry X [0..n-1] */ + } #else X = (Entry *) Xx ; /* Entry X [0..n-1] */ if (irstep > 0) @@ -195,7 +209,7 @@ GLOBAL Int UMF_solve for (p = 0 ; p < p2 ; p++) { /* Y [Ai [p]] += ABS (Ax [p]) ; */ - ASSIGN (aij, Ax [p], Az [p]) ; + ASSIGN (aij, Ax, Az, p, split) ; ABS (d, aij) ; Y [Ai [p]] += d ; } @@ -205,7 +219,7 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* B2 [i] = ABS (B [i]) ; */ - ASSIGN (bi, Bx [i], Bz [i]) ; + ASSIGN (bi, Bx, Bz, i, split) ; ABS (B2 [i], bi) ; } @@ -262,8 +276,8 @@ GLOBAL Int UMF_solve /* multiply by the scale factors */ for (i = 0 ; i < n ; i++) { - ASSIGN (X [i], Bx [i], Bz [i]) ; - SCALE_RECIP (X [i], Rs [i]) ; + ASSIGN (X [i], Bx, Bz, i, split) ; + SCALE (X [i], Rs [i]) ; } } else @@ -272,7 +286,7 @@ GLOBAL Int UMF_solve /* divide by the scale factors */ for (i = 0 ; i < n ; i++) { - ASSIGN (X [i], Bx [i], Bz [i]) ; + ASSIGN (X [i], Bx, Bz, i, split) ; SCALE_DIV (X [i], Rs [i]) ; } } @@ -288,7 +302,7 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* W [i] = B [Rperm [i]] ; */ - ASSIGN (W [i], Bx [Rperm [i]], Bz [Rperm [i]]) ; + ASSIGN (W [i], Bx, Bz, Rperm [i], split) ; } } } @@ -297,7 +311,7 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* Z [i] = B [i] ; */ - ASSIGN (Z [i], Bx [i], Bz [i]) ; + ASSIGN (Z [i], Bx, Bz, i, split) ; } flops += MULTSUB_FLOPS * nz ; for (i = 0 ; i < n ; i++) @@ -307,7 +321,7 @@ GLOBAL Int UMF_solve for (p = Ap [i] ; p < p2 ; p++) { /* Z [Ai [p]] -= Ax [p] * xi ; */ - ASSIGN (aij, Ax [p], Az [p]) ; + ASSIGN (aij, Ax, Az, p, split) ; MULT_SUB (Z [Ai [p]], aij, xi) ; } } @@ -320,7 +334,7 @@ GLOBAL Int UMF_solve /* multiply by the scale factors */ for (i = 0 ; i < n ; i++) { - SCALE_RECIP (Z [i], Rs [i]) ; + SCALE (Z [i], Rs [i]) ; } } else @@ -376,7 +390,7 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* W [i] = B [i] ; */ - ASSIGN (W [i], Bx [i], Bz [i]) ; + ASSIGN (W [i], Bx, Bz, i, split) ; Z2 [i] = 0. ; } flops += (MULT_FLOPS + DECREMENT_FLOPS + ABS_FLOPS + 1) * nz ; @@ -389,7 +403,7 @@ GLOBAL Int UMF_solve i = Ai [p] ; /* axx = Ax [p] * xj ; */ - ASSIGN (aij, Ax [p], Az [p]) ; + ASSIGN (aij, Ax, Az, p, split) ; MULT (axx, aij, xj) ; /* W [i] -= axx ; */ @@ -412,7 +426,7 @@ GLOBAL Int UMF_solve /* multiply by the scale factors */ for (i = 0 ; i < n ; i++) { - SCALE_RECIP (W [i], Rs [i]) ; + SCALE (W [i], Rs [i]) ; Z2 [i] *= Rs [i] ; } } @@ -479,7 +493,7 @@ GLOBAL Int UMF_solve /* yi += ABS (Ax [p]) * Rs [Ai [p]] ; */ /* note that abs (aij) is the same as * abs (conj (aij)) */ - ASSIGN (aij, Ax [p], Az [p]) ; + ASSIGN (aij, Ax, Az, p, split) ; ABS (d, aij) ; yi += (d * Rs [Ai [p]]) ; } @@ -499,7 +513,7 @@ GLOBAL Int UMF_solve /* yi += ABS (Ax [p]) / Rs [Ai [p]] ; */ /* note that abs (aij) is the same as * abs (conj (aij)) */ - ASSIGN (aij, Ax [p], Az [p]) ; + ASSIGN (aij, Ax, Az, p, split) ; ABS (d, aij) ; yi += (d / Rs [Ai [p]]) ; } @@ -520,7 +534,7 @@ GLOBAL Int UMF_solve /* yi += ABS (Ax [p]) ; */ /* note that abs (aij) is the same as * abs (conj (aij)) */ - ASSIGN (aij, Ax [p], Az [p]) ; + ASSIGN (aij, Ax, Az, p, split) ; ABS (d, aij) ; yi += d ; } @@ -532,7 +546,7 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* B2 [i] = ABS (B [i]) ; */ - ASSIGN (bi, Bx [i], Bz [i]) ; + ASSIGN (bi, Bx, Bz, i, split) ; ABS (B2 [i], bi) ; } @@ -554,7 +568,7 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* W [i] = B [Cperm [i]] ; */ - ASSIGN (W [i], Bx [Cperm [i]], Bz [Cperm [i]]) ; + ASSIGN (W [i], Bx, Bz, Cperm [i], split) ; } } else @@ -563,7 +577,7 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* Z [i] = B [i] ; */ - ASSIGN (Z [i], Bx [i], Bz [i]) ; + ASSIGN (Z [i], Bx, Bz, i, split) ; } flops += MULTSUB_FLOPS * nz ; for (i = 0 ; i < n ; i++) @@ -573,7 +587,7 @@ GLOBAL Int UMF_solve for (p = Ap [i] ; p < p2 ; p++) { /* zi -= conjugate (Ax [p]) * X [Ai [p]] ; */ - ASSIGN (aij, Ax [p], Az [p]) ; + ASSIGN (aij, Ax, Az, p, split) ; MULT_SUB_CONJ (zi, X [Ai [p]], aij) ; } Z [i] = zi ; @@ -608,7 +622,7 @@ GLOBAL Int UMF_solve /* multiply by the scale factors */ for (i = 0 ; i < n ; i++) { - SCALE_RECIP (X [i], Rs [i]) ; + SCALE (X [i], Rs [i]) ; } } else @@ -641,7 +655,7 @@ GLOBAL Int UMF_solve /* multiply by the scale factors */ for (i = 0 ; i < n ; i++) { - SCALE_RECIP (Z [i], Rs [i]) ; + SCALE (Z [i], Rs [i]) ; } } else @@ -660,8 +674,8 @@ GLOBAL Int UMF_solve /* X += Z */ for (i = 0 ; i < n ; i++) { - /* X [i] += W [i] ; */ - ASSEMBLE (X [i], W [i]) ; + /* X [i] += Z [i] ; was +=W[i] in v4.3, which is wrong */ + ASSEMBLE (X [i], Z [i]) ; /* bug fix, v4.3.1 */ } } @@ -682,13 +696,13 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* wi = B [i] ; */ - ASSIGN (wi, Bx [i], Bz [i]) ; + ASSIGN (wi, Bx, Bz, i, split) ; z2i = 0. ; p2 = Ap [i+1] ; for (p = Ap [i] ; p < p2 ; p++) { /* axx = conjugate (Ax [p]) * X [Ai [p]] ; */ - ASSIGN (aij, Ax [p], Az [p]) ; + ASSIGN (aij, Ax, Az, p, split) ; MULT_CONJ (axx, X [Ai [p]], aij) ; /* wi -= axx ; */ @@ -752,7 +766,7 @@ GLOBAL Int UMF_solve /* yi += ABS (Ax [p]) * Rs [Ai [p]] ; */ /* note that A.' is the array transpose, * so no conjugate */ - ASSIGN (aij, Ax [p], Az [p]) ; + ASSIGN (aij, Ax, Az, p, split) ; ABS (d, aij) ; yi += (d * Rs [Ai [p]]) ; } @@ -772,7 +786,7 @@ GLOBAL Int UMF_solve /* yi += ABS (Ax [p]) / Rs [Ai [p]] ; */ /* note that A.' is the array transpose, * so no conjugate */ - ASSIGN (aij, Ax [p], Az [p]) ; + ASSIGN (aij, Ax, Az, p, split) ; ABS (d, aij) ; yi += (d / Rs [Ai [p]]) ; } @@ -793,7 +807,7 @@ GLOBAL Int UMF_solve /* yi += ABS (Ax [p]) */ /* note that A.' is the array transpose, * so no conjugate */ - ASSIGN (aij, Ax [p], Az [p]) ; + ASSIGN (aij, Ax, Az, p, split) ; ABS (d, aij) ; yi += d ; } @@ -805,7 +819,7 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* B2 [i] = ABS (B [i]) ; */ - ASSIGN (bi, Bx [i], Bz [i]) ; + ASSIGN (bi, Bx, Bz, i, split) ; ABS (B2 [i], bi) ; } @@ -827,7 +841,7 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* W [i] = B [Cperm [i]] ; */ - ASSIGN (W [i], Bx [Cperm [i]], Bz [Cperm [i]]) ; + ASSIGN (W [i], Bx, Bz, Cperm [i], split) ; } } else @@ -836,7 +850,7 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* Z [i] = B [i] ; */ - ASSIGN (Z [i], Bx [i], Bz [i]) ; + ASSIGN (Z [i], Bx, Bz, i, split) ; } flops += MULTSUB_FLOPS * nz ; for (i = 0 ; i < n ; i++) @@ -846,7 +860,7 @@ GLOBAL Int UMF_solve for (p = Ap [i] ; p < p2 ; p++) { /* zi -= Ax [p] * X [Ai [p]] ; */ - ASSIGN (aij, Ax [p], Az [p]) ; + ASSIGN (aij, Ax, Az, p, split) ; MULT_SUB (zi, aij, X [Ai [p]]) ; } Z [i] = zi ; @@ -881,7 +895,7 @@ GLOBAL Int UMF_solve /* multiply by the scale factors */ for (i = 0 ; i < n ; i++) { - SCALE_RECIP (X [i], Rs [i]) ; + SCALE (X [i], Rs [i]) ; } } else @@ -914,7 +928,7 @@ GLOBAL Int UMF_solve /* multiply by the scale factors */ for (i = 0 ; i < n ; i++) { - SCALE_RECIP (Z [i], Rs [i]) ; + SCALE (Z [i], Rs [i]) ; } } else @@ -933,8 +947,8 @@ GLOBAL Int UMF_solve /* X += Z */ for (i = 0 ; i < n ; i++) { - /* X [i] += W [i] ; */ - ASSEMBLE (X [i], W [i]) ; + /* X [i] += Z [i] ; was +=W[i] in v4.3, which is wrong */ + ASSEMBLE (X [i], Z [i]) ; /* bug fix, v4.3.1 */ } } @@ -955,13 +969,13 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* wi = B [i] ; */ - ASSIGN (wi, Bx [i], Bz [i]) ; + ASSIGN (wi, Bx, Bz, i, split) ; z2i = 0. ; p2 = Ap [i+1] ; for (p = Ap [i] ; p < p2 ; p++) { /* axx = Ax [p] * X [Ai [p]] ; */ - ASSIGN (aij, Ax [p], Az [p]) ; + ASSIGN (aij, Ax, Az, p, split) ; MULT (axx, aij, X [Ai [p]]) ; /* wi -= axx ; */ @@ -997,7 +1011,7 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* X [i] = B [Rperm [i]] ; */ - ASSIGN (X [i], Bx [Rperm [i]], Bz [Rperm [i]]) ; + ASSIGN (X [i], Bx, Bz, Rperm [i], split) ; } flops = UMF_lsolve (Numeric, X, Pattern) ; status = UMFPACK_OK ; @@ -1013,7 +1027,7 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* X [i] = B [i] ; */ - ASSIGN (X [i], Bx [i], Bz [i]) ; + ASSIGN (X [i], Bx, Bz, i, split) ; } flops = UMF_lsolve (Numeric, X, Pattern) ; status = UMFPACK_OK ; @@ -1029,7 +1043,7 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* W [i] = B [i] ; */ - ASSIGN (W [i], Bx [i], Bz [i]) ; + ASSIGN (W [i], Bx, Bz, i, split) ; } flops = UMF_lhsolve (Numeric, W, Pattern) ; for (i = 0 ; i < n ; i++) @@ -1049,7 +1063,7 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* W [i] = B [i] ; */ - ASSIGN (W [i], Bx [i], Bz [i]) ; + ASSIGN (W [i], Bx, Bz, i, split) ; } flops = UMF_ltsolve (Numeric, W, Pattern) ; for (i = 0 ; i < n ; i++) @@ -1069,7 +1083,7 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* X [i] = B [i] ; */ - ASSIGN (X [i], Bx [i], Bz [i]) ; + ASSIGN (X [i], Bx, Bz, i, split) ; } flops = UMF_lhsolve (Numeric, X, Pattern) ; status = UMFPACK_OK ; @@ -1085,7 +1099,7 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* X [i] = B [i] ; */ - ASSIGN (X [i], Bx [i], Bz [i]) ; + ASSIGN (X [i], Bx, Bz, i, split) ; } flops = UMF_ltsolve (Numeric, X, Pattern) ; status = UMFPACK_OK ; @@ -1101,7 +1115,7 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* W [i] = B [i] ; */ - ASSIGN (W [i], Bx [i], Bz [i]) ; + ASSIGN (W [i], Bx, Bz, i, split) ; } flops = UMF_usolve (Numeric, W, Pattern) ; for (i = 0 ; i < n ; i++) @@ -1120,7 +1134,7 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* X [i] = B [i] ; */ - ASSIGN (X [i], Bx [i], Bz [i]) ; + ASSIGN (X [i], Bx, Bz, i, split) ; } flops = UMF_usolve (Numeric, X, Pattern) ; @@ -1135,7 +1149,7 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* X [i] = B [Cperm [i]] ; */ - ASSIGN (X [i], Bx [Cperm [i]], Bz [Cperm [i]]) ; + ASSIGN (X [i], Bx, Bz, Cperm [i], split) ; } flops = UMF_uhsolve (Numeric, X, Pattern) ; @@ -1150,7 +1164,7 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* X [i] = B [Cperm [i]] ; */ - ASSIGN (X [i], Bx [Cperm [i]], Bz [Cperm [i]]) ; + ASSIGN (X [i], Bx, Bz, Cperm [i], split) ; } flops = UMF_utsolve (Numeric, X, Pattern) ; @@ -1165,7 +1179,7 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* X [i] = B [i] ; */ - ASSIGN (X [i], Bx [i], Bz [i]) ; + ASSIGN (X [i], Bx, Bz, i, split) ; } flops = UMF_uhsolve (Numeric, X, Pattern) ; @@ -1180,7 +1194,7 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* X [i] = B [i] ; */ - ASSIGN (X [i], Bx [i], Bz [i]) ; + ASSIGN (X [i], Bx, Bz, i, split) ; } flops = UMF_utsolve (Numeric, X, Pattern) ; @@ -1192,10 +1206,13 @@ GLOBAL Int UMF_solve #ifdef COMPLEX /* copy the solution back, from Entry X [ ] to double Xx [ ] and Xz [ ] */ - for (i = 0 ; i < n ; i++) + if (split) { - Xx [i] = REAL_COMPONENT (X [i]) ; - Xz [i] = IMAG_COMPONENT (X [i]) ; + for (i = 0 ; i < n ; i++) + { + Xx [i] = REAL_COMPONENT (X [i]) ; + Xz [i] = IMAG_COMPONENT (X [i]) ; + } } #endif diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_solve.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_solve.h index 35a4867594..d818eb266f 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_solve.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_solve.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_start_front.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_start_front.c index e4eac15091..a994fb605f 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_start_front.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_start_front.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -24,9 +23,9 @@ GLOBAL Int UMF_start_front /* returns TRUE if successful, FALSE otherwise */ SymbolicType *Symbolic ) { + double maxbytes ; Int fnrows_max, fncols_max, fnr2, fnc2, fsize, fcurr_size, maxfrsize, overflow, nb, f, cdeg ; - double maxbytes ; nb = Symbolic->nb ; fnrows_max = Symbolic->Chain_maxrows [chain] ; @@ -159,7 +158,7 @@ GLOBAL Int UMF_start_front /* returns TRUE if successful, FALSE otherwise */ if (Numeric->front_alloc_init < 0) { /* allocate a front of -Numeric->front_alloc_init entries */ - fsize = (Int) -Numeric->front_alloc_init ; + fsize = -Numeric->front_alloc_init ; fsize = MAX (1, fsize) ; } else @@ -171,7 +170,7 @@ GLOBAL Int UMF_start_front /* returns TRUE if successful, FALSE otherwise */ } else { - fsize = (Int) (Numeric->front_alloc_init * maxfrsize) ; + fsize = Numeric->front_alloc_init * maxfrsize ; } if (cdeg > 0) diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_start_front.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_start_front.h index 5992e73351..fa4b7f188f 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_start_front.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_start_front.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_store_lu.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_store_lu.c index df0c63e094..fcc6c7ec79 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_store_lu.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_store_lu.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -16,7 +15,6 @@ #include "umf_internal.h" #include "umf_mem_alloc_head_block.h" -#include "umf_mem_free_tail_block.h" #include "umf_get_memory.h" /* ========================================================================== */ @@ -35,6 +33,12 @@ GLOBAL Int UMF_store_lu /* local variables */ /* ---------------------------------------------------------------------- */ + Entry pivot_value ; +#ifdef DROP + double droptol ; +#endif + Entry *D, *Lval, *Uval, *Fl1, *Fl2, *Fu1, *Fu2, + *Flublock, *Flblock, *Fublock ; Int i, k, fnr_curr, fnrows, fncols, row, col, pivrow, pivcol, *Frows, *Fcols, *Lpattern, *Upattern, *Lpos, *Upos, llen, ulen, fnc_curr, fnpiv, uilen, lnz, unz, nb, *Lilen, @@ -42,8 +46,6 @@ GLOBAL Int UMF_store_lu pivrow_position, p, size, lip, uip, lnzi, lnzx, unzx, lnz2i, lnz2x, unz2i, unz2x, zero_pivot, *Pivrow, *Pivcol, kk, Lnz [MAXNB] ; - Entry *D, pivot_value, *Lval, *Uval, *Fl1, *Fl2, *Fu1, *Fu2, - *Flublock, *Flblock, *Fublock ; #ifndef NDEBUG Int *Col_degree, *Row_degree ; @@ -51,7 +53,6 @@ GLOBAL Int UMF_store_lu #ifdef DROP Int all_lnz, all_unz ; - double droptol ; droptol = Numeric->droptol ; #endif @@ -94,7 +95,7 @@ GLOBAL Int UMF_store_lu nb = Work->nb ; #ifndef NDEBUG - DEBUG1 (("\n##################################### STORE LU: fnrows "ID + DEBUG1 (("\nSTORE LU: fnrows "ID " fncols "ID"\n", fnrows, fncols)) ; DEBUG2 (("\nFrontal matrix, including all space:\n" @@ -212,8 +213,9 @@ GLOBAL Int UMF_store_lu for (i = kk + 1 ; i < fnpiv ; i++) { + Entry x ; double s ; - Entry x = Fl1 [i] ; + x = Fl1 [i] ; if (IS_ZERO (x)) continue ; all_lnz++ ; APPROX_ABS (s, x) ; @@ -224,8 +226,9 @@ GLOBAL Int UMF_store_lu for (i = 0 ; i < fnrows ; i++) { + Entry x ; double s ; - Entry x = Fl2 [i] ; + x = Fl2 [i] ; if (IS_ZERO (x)) continue ; all_lnz++ ; APPROX_ABS (s, x) ; @@ -384,9 +387,10 @@ GLOBAL Int UMF_store_lu for (i = kk + 1 ; i < fnpiv ; i++) { + Entry x ; double s ; Int row2, pos ; - Entry x = Fl1 [i] ; + x = Fl1 [i] ; APPROX_ABS (s, x) ; if (s <= droptol) continue ; row2 = Pivrow [i] ; @@ -399,9 +403,10 @@ GLOBAL Int UMF_store_lu for (i = 0 ; i < fnrows ; i++) { + Entry x ; double s ; Int row2, pos ; - Entry x = Fl2 [i] ; + x = Fl2 [i] ; APPROX_ABS (s, x) ; if (s <= droptol) continue ; row2 = Frows [i] ; @@ -416,8 +421,9 @@ GLOBAL Int UMF_store_lu for (i = kk + 1 ; i < fnpiv ; i++) { + Entry x ; Int row2, pos ; - Entry x = Fl1 [i] ; + x = Fl1 [i] ; if (IS_ZERO (x)) continue ; row2 = Pivrow [i] ; pos = llen++ ; @@ -429,8 +435,9 @@ GLOBAL Int UMF_store_lu for (i = 0 ; i < fnrows ; i++) { + Entry x ; Int row2, pos ; - Entry x = Fl2 [i] ; + x = Fl2 [i] ; if (IS_ZERO (x)) continue ; row2 = Frows [i] ; pos = llen++ ; @@ -451,9 +458,10 @@ GLOBAL Int UMF_store_lu for (i = kk + 1 ; i < fnpiv ; i++) { + Entry x ; double s ; Int row2, pos ; - Entry x = Fl1 [i] ; + x = Fl1 [i] ; APPROX_ABS (s, x) ; if (s <= droptol) continue ; row2 = Pivrow [i] ; @@ -470,9 +478,10 @@ GLOBAL Int UMF_store_lu for (i = 0 ; i < fnrows ; i++) { + Entry x ; double s ; Int row2, pos ; - Entry x = Fl2 [i] ; + x = Fl2 [i] ; APPROX_ABS (s, x) ; if (s <= droptol) continue ; row2 = Frows [i] ; @@ -491,8 +500,9 @@ GLOBAL Int UMF_store_lu for (i = kk + 1 ; i < fnpiv ; i++) { + Entry x ; Int row2, pos ; - Entry x = Fl1 [i] ; + x = Fl1 [i] ; if (IS_ZERO (x)) continue ; row2 = Pivrow [i] ; pos = Lpos [row2] ; @@ -508,8 +518,9 @@ GLOBAL Int UMF_store_lu for (i = 0 ; i < fnrows ; i++) { + Entry x ; Int row2, pos ; - Entry x = Fl2 [i] ; + x = Fl2 [i] ; if (IS_ZERO (x)) continue ; row2 = Frows [i] ; pos = Lpos [row2] ; @@ -634,8 +645,9 @@ GLOBAL Int UMF_store_lu for (i = kk + 1 ; i < fnpiv ; i++) { + Entry x ; double s ; - Entry x = Fu1 [i*nb] ; + x = Fu1 [i*nb] ; if (IS_ZERO (x)) continue ; all_unz++ ; APPROX_ABS (s, x) ; @@ -646,8 +658,9 @@ GLOBAL Int UMF_store_lu for (i = 0 ; i < fncols ; i++) { + Entry x ; double s ; - Entry x = Fu2 [i] ; + x = Fu2 [i] ; if (IS_ZERO (x)) continue ; all_unz++ ; APPROX_ABS (s, x) ; @@ -849,9 +862,10 @@ GLOBAL Int UMF_store_lu for (i = kk + 1 ; i < fnpiv ; i++) { + Entry x ; double s ; Int col2, pos ; - Entry x = Fu1 [i*nb] ; + x = Fu1 [i*nb] ; APPROX_ABS (s, x) ; if (s <= droptol) continue ; col2 = Pivcol [i] ; @@ -863,9 +877,10 @@ GLOBAL Int UMF_store_lu for (i = 0 ; i < fncols ; i++) { + Entry x ; double s ; Int col2, pos ; - Entry x = Fu2 [i] ; + x = Fu2 [i] ; APPROX_ABS (s, x) ; if (s <= droptol) continue ; col2 = Fcols [i] ; @@ -879,8 +894,9 @@ GLOBAL Int UMF_store_lu for (i = kk + 1 ; i < fnpiv ; i++) { + Entry x ; Int col2, pos ; - Entry x = Fu1 [i*nb] ; + x = Fu1 [i*nb] ; if (IS_ZERO (x)) continue ; col2 = Pivcol [i] ; pos = ulen++ ; @@ -891,8 +907,9 @@ GLOBAL Int UMF_store_lu for (i = 0 ; i < fncols ; i++) { + Entry x ; Int col2, pos ; - Entry x = Fu2 [i] ; + x = Fu2 [i] ; if (IS_ZERO (x)) continue ; col2 = Fcols [i] ; pos = ulen++ ; @@ -915,9 +932,10 @@ GLOBAL Int UMF_store_lu for (i = kk + 1 ; i < fnpiv ; i++) { + Entry x ; double s ; Int col2, pos ; - Entry x = Fu1 [i*nb] ; + x = Fu1 [i*nb] ; APPROX_ABS (s, x) ; if (s <= droptol) continue ; col2 = Pivcol [i] ; @@ -933,9 +951,10 @@ GLOBAL Int UMF_store_lu for (i = 0 ; i < fncols ; i++) { + Entry x ; double s ; Int col2, pos ; - Entry x = Fu2 [i] ; + x = Fu2 [i] ; APPROX_ABS (s, x) ; if (s <= droptol) continue ; col2 = Fcols [i] ; @@ -953,8 +972,9 @@ GLOBAL Int UMF_store_lu for (i = kk + 1 ; i < fnpiv ; i++) { + Entry x ; Int col2, pos ; - Entry x = Fu1 [i*nb] ; + x = Fu1 [i*nb] ; if (IS_ZERO (x)) continue ; col2 = Pivcol [i] ; pos = Upos [col2] ; @@ -969,8 +989,9 @@ GLOBAL Int UMF_store_lu for (i = 0 ; i < fncols ; i++) { + Entry x ; Int col2, pos ; - Entry x = Fu2 [i] ; + x = Fu2 [i] ; if (IS_ZERO (x)) continue ; col2 = Fcols [i] ; pos = Upos [col2] ; diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_store_lu.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_store_lu.h index 142ee5b71d..2541b83c2c 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_store_lu.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_store_lu.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_symbolic_usage.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_symbolic_usage.c index cc8b94a298..cce83651da 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_symbolic_usage.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_symbolic_usage.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_symbolic_usage.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_symbolic_usage.h index 1767c2ce06..ab8bbe1680 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_symbolic_usage.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_symbolic_usage.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_transpose.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_transpose.c index 074911939d..47331e9c21 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_transpose.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_transpose.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -61,6 +60,9 @@ GLOBAL Int UMF_transpose /* ---------------------------------------------------------------------- */ Int i, j, k, p, bp, newj, do_values ; +#ifdef COMPLEX + Int split ; +#endif /* ---------------------------------------------------------------------- */ /* check inputs */ @@ -185,16 +187,16 @@ GLOBAL Int UMF_transpose /* ---------------------------------------------------------------------- */ do_values = Ax && Rx ; -#ifdef COMPLEX - do_values = do_values && Az && Rz ; -#endif #ifdef COMPLEX + split = SPLIT (Az) && SPLIT (Rz) ; + if (do_conjugate && do_values) { if (Q != (Int *) NULL) { - + if (split) + { /* R = A (P,Q)' */ for (newj = 0 ; newj < nq ; newj++) { @@ -208,11 +210,28 @@ GLOBAL Int UMF_transpose Rz [bp] = -Az [p] ; } } - + } + else + { + /* R = A (P,Q)' (merged complex values) */ + for (newj = 0 ; newj < nq ; newj++) + { + j = Q [newj] ; + ASSERT (j >= 0 && j < n_col) ; + for (p = Ap [j] ; p < Ap [j+1] ; p++) + { + bp = W [Ai [p]]++ ; + Ri [bp] = newj ; + Rx [2*bp] = Ax [2*p] ; + Rx [2*bp+1] = -Ax [2*p+1] ; + } + } + } } else { - + if (split) + { /* R = A (P,:)' */ for (j = 0 ; j < n_col ; j++) { @@ -224,7 +243,21 @@ GLOBAL Int UMF_transpose Rz [bp] = -Az [p] ; } } - + } + else + { + /* R = A (P,:)' (merged complex values) */ + for (j = 0 ; j < n_col ; j++) + { + for (p = Ap [j] ; p < Ap [j+1] ; p++) + { + bp = W [Ai [p]]++ ; + Ri [bp] = j ; + Rx [2*bp] = Ax [2*p] ; + Rx [2*bp+1] = -Ax [2*p+1] ; + } + } + } } } else @@ -234,27 +267,47 @@ GLOBAL Int UMF_transpose { if (do_values) { - - /* R = A (P,Q).' */ - for (newj = 0 ; newj < nq ; newj++) +#ifdef COMPLEX + if (split) +#endif { - j = Q [newj] ; - ASSERT (j >= 0 && j < n_col) ; - for (p = Ap [j] ; p < Ap [j+1] ; p++) + /* R = A (P,Q).' */ + for (newj = 0 ; newj < nq ; newj++) { - bp = W [Ai [p]]++ ; - Ri [bp] = newj ; - Rx [bp] = Ax [p] ; + j = Q [newj] ; + ASSERT (j >= 0 && j < n_col) ; + for (p = Ap [j] ; p < Ap [j+1] ; p++) + { + bp = W [Ai [p]]++ ; + Ri [bp] = newj ; + Rx [bp] = Ax [p] ; #ifdef COMPLEX - Rz [bp] = Az [p] ; + Rz [bp] = Az [p] ; #endif + } } } - +#ifdef COMPLEX + else + { + /* R = A (P,Q).' (merged complex values) */ + for (newj = 0 ; newj < nq ; newj++) + { + j = Q [newj] ; + ASSERT (j >= 0 && j < n_col) ; + for (p = Ap [j] ; p < Ap [j+1] ; p++) + { + bp = W [Ai [p]]++ ; + Ri [bp] = newj ; + Rx [2*bp] = Ax [2*p] ; + Rx [2*bp+1] = Ax [2*p+1] ; + } + } + } +#endif } else { - /* R = pattern of A (P,Q).' */ for (newj = 0 ; newj < nq ; newj++) { @@ -265,32 +318,49 @@ GLOBAL Int UMF_transpose Ri [W [Ai [p]]++] = newj ; } } - } } else { if (do_values) { - - /* R = A (P,:).' */ - for (j = 0 ; j < n_col ; j++) +#ifdef COMPLEX + if (split) +#endif { - for (p = Ap [j] ; p < Ap [j+1] ; p++) + /* R = A (P,:).' */ + for (j = 0 ; j < n_col ; j++) { - bp = W [Ai [p]]++ ; - Ri [bp] = j ; - Rx [bp] = Ax [p] ; + for (p = Ap [j] ; p < Ap [j+1] ; p++) + { + bp = W [Ai [p]]++ ; + Ri [bp] = j ; + Rx [bp] = Ax [p] ; #ifdef COMPLEX - Rz [bp] = Az [p] ; + Rz [bp] = Az [p] ; #endif + } } } - +#ifdef COMPLEX + else + { + /* R = A (P,:).' (merged complex values) */ + for (j = 0 ; j < n_col ; j++) + { + for (p = Ap [j] ; p < Ap [j+1] ; p++) + { + bp = W [Ai [p]]++ ; + Ri [bp] = j ; + Rx [2*bp] = Ax [2*p] ; + Rx [2*bp+1] = Ax [2*p+1] ; + } + } + } +#endif } else { - /* R = pattern of A (P,:).' */ for (j = 0 ; j < n_col ; j++) { @@ -299,10 +369,8 @@ GLOBAL Int UMF_transpose Ri [W [Ai [p]]++] = j ; } } - } } - } #ifndef NDEBUG diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_transpose.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_transpose.h index 0e1aac9c22..354e678283 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_transpose.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_transpose.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_triplet.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_triplet.c index 8192af7f2c..8e74bff23f 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_triplet.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_triplet.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -13,15 +12,13 @@ Not user callable. Converts triplet input to column-oriented form. Duplicate entries may exist (they are summed in the output). The columns of the column-oriented form are in sorted order. The input is not modified. - Returns 1 if OK, 0 if an error occured. + Returns 1 if OK, 0 if an error occurred. Compiled into four different routines for each version (di, dl, zi, zl), for a total of 16 different routines. */ #include "umf_internal.h" -#include "umf_malloc.h" -#include "umf_free.h" #ifdef DO_MAP #ifdef DO_VALUES @@ -72,6 +69,11 @@ GLOBAL Int UMF_triplet_nomap_nox Int i, j, k, p, cp, p1, p2, pdest, pj ; #ifdef DO_MAP Int duplicates ; +#endif +#ifdef DO_VALUES +#ifdef COMPLEX + Int split = SPLIT (Tz) && SPLIT (Az) && SPLIT (Rz) ; +#endif #endif /* ---------------------------------------------------------------------- */ @@ -98,7 +100,7 @@ GLOBAL Int UMF_triplet_nomap_nox #ifdef DO_VALUES { Entry tt ; - ASSIGN (tt, Tx [k], Tz [k]) ; + ASSIGN (tt, Tx, Tz, k, split) ; EDEBUG2 (tt) ; DEBUG1 (("\n")) ; } @@ -131,9 +133,19 @@ GLOBAL Int UMF_triplet_nomap_nox #endif Rj [p] = Tj [k] ; #ifdef DO_VALUES - Rx [p] = Tx [k] ; #ifdef COMPLEX - Rz [p] = Tz [k] ; + if (split) + { + Rx [p] = Tx [k] ; + Rz [p] = Tz [k] ; + } + else + { + Rx [2*p ] = Tx [2*k ] ; + Rx [2*p+1] = Tx [2*k+1] ; + } +#else + Rx [p] = Tx [k] ; #endif #endif } @@ -206,9 +218,19 @@ GLOBAL Int UMF_triplet_nomap_nox #endif #ifdef DO_VALUES /* sum the entry */ - Rx [pj] += Rx [p] ; #ifdef COMPLEX - Rz [pj] += Rz [p] ; + if (split) + { + Rx [pj] += Rx [p] ; + Rz [pj] += Rz [p] ; + } + else + { + Rx[2*pj ] += Rx[2*p ] ; + Rx[2*pj+1] += Rx[2*p+1] ; + } +#else + Rx [pj] += Rx [p] ; #endif #endif } @@ -225,9 +247,19 @@ GLOBAL Int UMF_triplet_nomap_nox { Rj [pdest] = j ; #ifdef DO_VALUES - Rx [pdest] = Rx [p] ; #ifdef COMPLEX - Rz [pdest] = Rz [p] ; + if (split) + { + Rx [pdest] = Rx [p] ; + Rz [pdest] = Rz [p] ; + } + else + { + Rx [2*pdest ] = Rx [2*p ] ; + Rx [2*pdest+1] = Rx [2*p+1] ; + } +#else + Rx [pdest] = Rx [p] ; #endif #endif } @@ -325,9 +357,19 @@ GLOBAL Int UMF_triplet_nomap_nox #endif Ai [cp] = i ; #ifdef DO_VALUES - Ax [cp] = Rx [p] ; #ifdef COMPLEX - Az [cp] = Rz [p] ; + if (split) + { + Ax [cp] = Rx [p] ; + Az [cp] = Rz [p] ; + } + else + { + Ax [2*cp ] = Rx [2*p ] ; + Ax [2*cp+1] = Rx [2*p+1] ; + } +#else + Ax [cp] = Rx [p] ; #endif #endif } diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_triplet.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_triplet.h index 73704e6593..18947d39db 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_triplet.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_triplet.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_tuple_lengths.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_tuple_lengths.c index 6843428d1d..e31e04cf24 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_tuple_lengths.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_tuple_lengths.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -28,9 +27,9 @@ GLOBAL Int UMF_tuple_lengths /* return memory usage */ /* local variables */ /* ---------------------------------------------------------------------- */ + double dusage ; Int e, nrows, ncols, nel, i, *Rows, *Cols, row, col, n_row, n_col, *E, *Row_degree, *Row_tlen, *Col_degree, *Col_tlen, usage, n1 ; - double dusage ; Element *ep ; Unit *p ; diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_tuple_lengths.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_tuple_lengths.h index 6d1560b9b2..8931c47f37 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_tuple_lengths.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_tuple_lengths.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_usolve.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_usolve.c index c292eb4d25..b536d4e93d 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_usolve.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_usolve.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -26,9 +25,10 @@ GLOBAL double UMF_usolve /* local variables */ /* ---------------------------------------------------------------------- */ + Entry xk ; + Entry *xp, *D, *Uval ; Int k, deg, j, *ip, col, *Upos, *Uilen, pos, *Uip, n, ulen, up, newUchain, npiv, n1, *Ui ; - Entry *xp, xk, *D, *Uval ; /* ---------------------------------------------------------------------- */ /* get parameters */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_usolve.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_usolve.h index c546111380..d1854b9b72 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_usolve.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_usolve.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_utsolve.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_utsolve.c index bd7d08e57d..8672084a8e 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_utsolve.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_utsolve.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -31,9 +30,10 @@ UMF_utsolve /* solve U.'x=b (array transpose) */ /* local variables */ /* ---------------------------------------------------------------------- */ + Entry xk ; + Entry *xp, *D, *Uval ; Int k, deg, j, *ip, col, *Upos, *Uilen, kstart, kend, up, *Uip, n, uhead, ulen, pos, npiv, n1, *Ui ; - Entry *xp, xk, *D, *Uval ; /* ---------------------------------------------------------------------- */ /* get parameters */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_utsolve.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_utsolve.h index 86ccb40140..4dfdd4a863 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_utsolve.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_utsolve.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_valid_numeric.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_valid_numeric.c index 58da8ac94b..a0dc93329f 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_valid_numeric.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_valid_numeric.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_valid_numeric.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_valid_numeric.h index 11895fd12e..dd71f633ea 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_valid_numeric.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_valid_numeric.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_valid_symbolic.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_valid_symbolic.c index 1acc6ac5f1..7115175468 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_valid_symbolic.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_valid_symbolic.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_valid_symbolic.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_valid_symbolic.h index 5cada3c146..0653491515 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_valid_symbolic.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_valid_symbolic.h @@ -1,7 +1,6 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_version.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_version.h index b3c4df09ec..7eb6d6a31b 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_version.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_version.h @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -120,18 +119,17 @@ SCALAR_IS_LTZERO(x): #define Entry double -#define REAL_COMPONENT(c) (c) -#define IMAG_COMPONENT(c) (0.) -#define ASSIGN(c,s1,s2) { (c) = (s1) ; } +#define SPLIT(s) (1) +#define REAL_COMPONENT(c) (c) +#define IMAG_COMPONENT(c) (0.) +#define ASSIGN(c,s1,s2,p,split) { (c) = (s1)[p] ; } #define CLEAR(c) { (c) = 0. ; } #define CLEAR_AND_INCREMENT(p) { *p++ = 0. ; } #define IS_NAN(a) SCALAR_IS_NAN (a) #define IS_ZERO(a) SCALAR_IS_ZERO (a) #define IS_NONZERO(a) SCALAR_IS_NONZERO (a) #define SCALE_DIV(c,s) { (c) /= (s) ; } -#ifndef NRECIPROCAL -#define SCALE_RECIP(c,s) { (c) *= (s) ; } -#endif +#define SCALE(c,s) { (c) *= (s) ; } #define ASSEMBLE(c,a) { (c) += (a) ; } #define ASSEMBLE_AND_INCREMENT(c,p) { (c) += *p++ ; } #define DECREMENT(c,a) { (c) -= (a) ; } @@ -216,11 +214,24 @@ typedef struct /* -------------------------------------------------------------------------- */ -/* c = (s1) + (s2)i */ -#define ASSIGN(c,s1,s2) \ +/* Return TRUE if a complex number is in split form, FALSE if in packed form */ +#define SPLIT(sz) ((sz) != (double *) NULL) + +/* -------------------------------------------------------------------------- */ + +/* c = (s1) + (s2)*i, if s2 is null, then X is in "packed" format (compatible + * with Entry and ANSI C99 double _Complex type). */ +#define ASSIGN(c,s1,s2,p,split) \ { \ - (c).Real = (s1) ; \ - (c).Imag = (s2) ; \ + if (split) \ + { \ + (c).Real = (s1)[p] ; \ + (c).Imag = (s2)[p] ; \ + } \ + else \ + { \ + (c) = ((Entry *)(s1))[p] ; \ + } \ } /* -------------------------------------------------------------------------- */ @@ -271,15 +282,12 @@ typedef struct /* -------------------------------------------------------------------------- */ -/* c *= s, where s is the reciprocal scale factor. Not used if - * NRECIPROCAL is defined at compile time. */ -#ifndef NRECIPROCAL -#define SCALE_RECIP(c,s) \ +/* c *= s */ +#define SCALE(c,s) \ { \ (c).Real *= (s) ; \ (c).Imag *= (s) ; \ } -#endif /* -------------------------------------------------------------------------- */ @@ -603,6 +611,7 @@ typedef struct #define UMFPACK_get_lunz umfpack_di_get_lunz #define UMFPACK_get_numeric umfpack_di_get_numeric #define UMFPACK_get_symbolic umfpack_di_get_symbolic +#define UMFPACK_get_determinant umfpack_di_get_determinant #define UMFPACK_numeric umfpack_di_numeric #define UMFPACK_qsymbolic umfpack_di_qsymbolic #define UMFPACK_report_control umfpack_di_report_control @@ -717,6 +726,7 @@ typedef struct #define UMFPACK_get_lunz umfpack_dl_get_lunz #define UMFPACK_get_numeric umfpack_dl_get_numeric #define UMFPACK_get_symbolic umfpack_dl_get_symbolic +#define UMFPACK_get_determinant umfpack_dl_get_determinant #define UMFPACK_numeric umfpack_dl_numeric #define UMFPACK_qsymbolic umfpack_dl_qsymbolic #define UMFPACK_report_control umfpack_dl_report_control @@ -831,6 +841,7 @@ typedef struct #define UMFPACK_get_lunz umfpack_zi_get_lunz #define UMFPACK_get_numeric umfpack_zi_get_numeric #define UMFPACK_get_symbolic umfpack_zi_get_symbolic +#define UMFPACK_get_determinant umfpack_zi_get_determinant #define UMFPACK_numeric umfpack_zi_numeric #define UMFPACK_qsymbolic umfpack_zi_qsymbolic #define UMFPACK_report_control umfpack_zi_report_control @@ -945,6 +956,7 @@ typedef struct #define UMFPACK_get_lunz umfpack_zl_get_lunz #define UMFPACK_get_numeric umfpack_zl_get_numeric #define UMFPACK_get_symbolic umfpack_zl_get_symbolic +#define UMFPACK_get_determinant umfpack_zl_get_determinant #define UMFPACK_numeric umfpack_zl_numeric #define UMFPACK_qsymbolic umfpack_zl_qsymbolic #define UMFPACK_report_control umfpack_zl_report_control diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_col_to_triplet.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_col_to_triplet.c index ef27bc2e8d..44d3a3e1bc 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_col_to_triplet.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_col_to_triplet.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_defaults.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_defaults.c index 8de4c1b0d0..36cf91a819 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_defaults.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_defaults.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_free_numeric.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_free_numeric.c index ec19adfa9d..76f4eb5bcb 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_free_numeric.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_free_numeric.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_free_symbolic.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_free_symbolic.c index 347727f85f..618ec49178 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_free_symbolic.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_free_symbolic.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_get_determinant.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_get_determinant.c new file mode 100644 index 0000000000..bdfd751fef --- /dev/null +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_get_determinant.c @@ -0,0 +1,307 @@ +/* ========================================================================== */ +/* === UMFPACK_get_determinant ============================================== */ +/* ========================================================================== */ + +/* -------------------------------------------------------------------------- */ +/* UMFPACK Version 4.4, 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 */ +/* -------------------------------------------------------------------------- */ + +/* + User-callable. From the LU factors, scale factor, and permutation vectors + held in the Numeric object, calculates the determinant of the matrix A. + See umfpack_get_determinant.h for a more detailed description. + + Dynamic memory usage: calls UMF_malloc once, for a total space of + n integers, and then frees all of it via UMF_free when done. + + Contributed by David Bateman, Motorola, Nov. 2004. + Modified for V4.4, Jan. 2005. +*/ + +#include "umf_internal.h" +#include "umf_valid_numeric.h" +#include "umf_malloc.h" +#include "umf_free.h" + +/* ========================================================================== */ +/* === rescale_determinant ================================================== */ +/* ========================================================================== */ + +/* If the mantissa is too big or too small, rescale it and change exponent */ + +PRIVATE Int rescale_determinant +( + Entry *d_mantissa, + double *d_exponent +) +{ + double d_abs ; + + ABS (d_abs, *d_mantissa) ; + + if (SCALAR_IS_ZERO (d_abs)) + { + /* the determinant is zero */ + *d_exponent = 0 ; + return (FALSE) ; + } + + if (SCALAR_IS_NAN (d_abs)) + { + /* the determinant is NaN */ + return (FALSE) ; + } + + while (d_abs < 1.) + { + SCALE (*d_mantissa, 10.0) ; + *d_exponent = *d_exponent - 1.0 ; + ABS (d_abs, *d_mantissa) ; + } + + while (d_abs >= 10.) + { + SCALE (*d_mantissa, 0.1) ; + *d_exponent = *d_exponent + 1.0 ; + ABS (d_abs, *d_mantissa) ; + } + + return (TRUE) ; +} + +/* ========================================================================== */ +/* === UMFPACK_get_determinant ============================================== */ +/* ========================================================================== */ + +GLOBAL Int UMFPACK_get_determinant +( + double *Mx, +#ifdef COMPLEX + double *Mz, +#endif + double *Ex, + void *NumericHandle, + double User_Info [UMFPACK_INFO] +) +{ + /* ---------------------------------------------------------------------- */ + /* local variables */ + /* ---------------------------------------------------------------------- */ + + Entry d_mantissa, d_tmp ; + double d_exponent, Info2 [UMFPACK_INFO], one [2] = {1.0, 0.0}, d_sign ; + Entry *D ; + double *Info, *Rs ; + NumericType *Numeric ; + Int i, n, itmp, npiv, *Wi, *Rperm, *Cperm, do_scale ; + +#ifndef NRECIPROCAL + Int do_recip ; +#endif + + /* ---------------------------------------------------------------------- */ + /* check input parameters */ + /* ---------------------------------------------------------------------- */ + + if (User_Info != (double *) NULL) + { + /* return Info in user's array */ + Info = User_Info ; + } + else + { + /* no Info array passed - use local one instead */ + Info = Info2 ; + for (i = 0 ; i < UMFPACK_INFO ; i++) + { + Info [i] = EMPTY ; + } + } + + Info [UMFPACK_STATUS] = UMFPACK_OK ; + + Numeric = (NumericType *) NumericHandle ; + if (!UMF_valid_numeric (Numeric)) + { + Info [UMFPACK_STATUS] = UMFPACK_ERROR_invalid_Numeric_object ; + return (UMFPACK_ERROR_invalid_Numeric_object) ; + } + + if (Numeric->n_row != Numeric->n_col) + { + /* only square systems can be handled */ + Info [UMFPACK_STATUS] = UMFPACK_ERROR_invalid_system ; + return (UMFPACK_ERROR_invalid_system) ; + } + + if (Mx == (double *) NULL) + { + Info [UMFPACK_STATUS] = UMFPACK_ERROR_argument_missing ; + return (UMFPACK_ERROR_argument_missing) ; + } + + n = Numeric->n_row ; + + /* ---------------------------------------------------------------------- */ + /* allocate workspace */ + /* ---------------------------------------------------------------------- */ + + Wi = (Int *) UMF_malloc (n, sizeof (Int)) ; + + if (!Wi) + { + DEBUGm4 (("out of memory: get determinant\n")) ; + Info [UMFPACK_STATUS] = UMFPACK_ERROR_out_of_memory ; + return (UMFPACK_ERROR_out_of_memory) ; + } + + /* ---------------------------------------------------------------------- */ + /* compute the determinant */ + /* ---------------------------------------------------------------------- */ + + Rs = Numeric->Rs ; /* row scale factors */ + do_scale = (Rs != (double *) NULL) ; + +#ifndef NRECIPROCAL + do_recip = Numeric->do_recip ; +#endif + + d_mantissa = ((Entry *) one) [0] ; + d_exponent = 0.0 ; + D = Numeric->D ; + + /* compute product of diagonal entries of U */ + for (i = 0 ; i < n ; i++) + { + MULT (d_tmp, d_mantissa, D [i]) ; + d_mantissa = d_tmp ; + + if (!rescale_determinant (&d_mantissa, &d_exponent)) + { + /* the determinant is zero or NaN */ + Info [UMFPACK_STATUS] = UMFPACK_WARNING_singular_matrix ; + /* no need to compute the determinant of R */ + do_scale = FALSE ; + break ; + } + } + + /* compute product of diagonal entries of R (or its inverse) */ + if (do_scale) + { + for (i = 0 ; i < n ; i++) + { +#ifndef NRECIPROCAL + if (do_recip) + { + /* compute determinant of R inverse */ + SCALE_DIV (d_mantissa, Rs [i]) ; + } + else +#endif + { + /* compute determinant of R */ + SCALE (d_mantissa, Rs [i]) ; + } + if (!rescale_determinant (&d_mantissa, &d_exponent)) + { + /* the determinant is zero or NaN. This is very unlikey to + * occur here, since the scale factors for a tiny or zero row + * are set to 1. */ + Info [UMFPACK_STATUS] = UMFPACK_WARNING_singular_matrix ; + break ; + } + } + } + + /* ---------------------------------------------------------------------- */ + /* determine if P and Q are odd or even permutations */ + /* ---------------------------------------------------------------------- */ + + npiv = 0 ; + Rperm = Numeric->Rperm ; + + for (i = 0 ; i < n ; i++) + { + Wi [i] = Rperm [i] ; + } + + for (i = 0 ; i < n ; i++) + { + while (Wi [i] != i) + { + itmp = Wi [Wi [i]] ; + Wi [Wi [i]] = Wi [i] ; + Wi [i] = itmp ; + npiv++ ; + } + } + + Cperm = Numeric->Cperm ; + + for (i = 0 ; i < n ; i++) + { + Wi [i] = Cperm [i] ; + } + + for (i = 0 ; i < n ; i++) + { + while (Wi [i] != i) + { + itmp = Wi [Wi [i]] ; + Wi [Wi [i]] = Wi [i] ; + Wi [i] = itmp ; + npiv++ ; + } + } + + /* if npiv is odd, the sign is -1. if it is even, the sign is +1 */ + d_sign = (npiv % 2) ? -1. : 1. ; + + /* ---------------------------------------------------------------------- */ + /* free workspace */ + /* ---------------------------------------------------------------------- */ + + (void) UMF_free ((void *) Wi) ; + + /* ---------------------------------------------------------------------- */ + /* compute the magnitude and exponent of the determinant */ + /* ---------------------------------------------------------------------- */ + + if (Ex == (double *) NULL) + { + /* Ex is not provided, so return the entire determinant in d_mantissa */ + SCALE (d_mantissa, pow (10.0, d_exponent)) ; + } + else + { + Ex [0] = d_exponent ; + } + + Mx [0] = d_sign * REAL_COMPONENT (d_mantissa) ; + +#ifdef COMPLEX + if (SPLIT (Mz)) + { + Mz [0] = d_sign * IMAG_COMPONENT (d_mantissa) ; + } + else + { + Mx [1] = d_sign * IMAG_COMPONENT (d_mantissa) ; + } +#endif + + /* determine if the determinant has (or will) overflow or underflow */ + if (d_exponent + 1.0 > log10 (DBL_MAX)) + { + Info [UMFPACK_STATUS] = UMFPACK_WARNING_determinant_overflow ; + } + else if (d_exponent - 1.0 < log10 (DBL_MIN)) + { + Info [UMFPACK_STATUS] = UMFPACK_WARNING_determinant_underflow ; + } + + return (UMFPACK_OK) ; +} diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_get_lunz.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_get_lunz.c index 37ac8bffe6..d1d2d3108a 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_get_lunz.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_get_lunz.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_get_numeric.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_get_numeric.c index e270b1e3a4..d429c97567 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_get_numeric.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_get_numeric.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -125,13 +124,8 @@ GLOBAL Int UMFPACK_get_numeric /* allocate workspace */ /* ---------------------------------------------------------------------- */ -#ifdef COMPLEX - getL = Lp && Lj && Lx && Lz ; - getU = Up && Ui && Ux && Uz ; -#else getL = Lp && Lj && Lx ; getU = Up && Ui && Ux ; -#endif if (getL || getU) { @@ -191,22 +185,33 @@ GLOBAL Int UMFPACK_get_numeric if (Dx != (double *) NULL) { D = Numeric->D ; - for (k = 0 ; k < n_inner ; k++) +#ifdef COMPLEX + if (SPLIT (Dz)) { - Dx [k] = REAL_COMPONENT (D [k]) ; + for (k = 0 ; k < n_inner ; k++) + { + Dx [k] = REAL_COMPONENT (D [k]) ; + Dz [k] = IMAG_COMPONENT (D [k]) ; + } } - } - -#ifdef COMPLEX - if (Dz != (double *) NULL) - { - D = Numeric->D ; - for (k = 0 ; k < n_inner ; k++) + else { - Dz [k] = IMAG_COMPONENT (D [k]) ; + for (k = 0 ; k < n_inner ; k++) + { + Dx [2*k ] = REAL_COMPONENT (D [k]) ; + Dx [2*k+1] = IMAG_COMPONENT (D [k]) ; + } + } +#else + { + D = Numeric->D ; + for (k = 0 ; k < n_inner ; k++) + { + Dx [k] = D [k] ; + } } - } #endif + } /* return the flag stating whether the scale factors are to be multiplied, * or divided. If do_recip is TRUE, multiply. Otherwise, divided. @@ -332,9 +337,13 @@ PRIVATE void get_L /* local variables */ /* ---------------------------------------------------------------------- */ + Entry value ; + Entry *xp, *Lval ; Int deg, *ip, j, row, n_row, n_col, n_inner, *Lpos, *Lilen, *Lip, p, llen, - lnz2, lp, newLchain, k, pos, npiv, *Li, n1 ; - Entry *xp, value, *Lval ; + lnz2, lp, newLchain, k, pos, npiv, *Li, n1 ; +#ifdef COMPLEX + Int split = SPLIT (Lz) ; +#endif /* ---------------------------------------------------------------------- */ /* get parameters */ @@ -487,9 +496,20 @@ PRIVATE void get_L { p = Wi [row]++ ; Lj [p] = k ; - Lx [p] = REAL_COMPONENT (value) ; #ifdef COMPLEX - Lz [p] = IMAG_COMPONENT (value) ; + if (split) + { + + Lx [p] = REAL_COMPONENT (value) ; + Lz [p] = IMAG_COMPONENT (value) ; + } + else + { + Lx [2*p ] = REAL_COMPONENT (value) ; + Lx [2*p+1] = IMAG_COMPONENT (value) ; + } +#else + Lx [p] = value ; #endif } } @@ -550,9 +570,19 @@ PRIVATE void get_L { p = Wi [row]++ ; Lj [p] = k ; - Lx [p] = REAL_COMPONENT (value) ; #ifdef COMPLEX - Lz [p] = IMAG_COMPONENT (value) ; + if (split) + { + Lx [p] = REAL_COMPONENT (value) ; + Lz [p] = IMAG_COMPONENT (value) ; + } + else + { + Lx [2*p ] = REAL_COMPONENT (value) ; + Lx [2*p+1] = IMAG_COMPONENT (value) ; + } +#else + Lx [p] = value ; #endif } } @@ -563,10 +593,22 @@ PRIVATE void get_L { p = Wi [row]++ ; Lj [p] = row ; - Lx [p] = 1. ; + #ifdef COMPLEX - Lz [p] = 0. ; + if (split) + { + Lx [p] = 1. ; + Lz [p] = 0. ; + } + else + { + Lx [2*p ] = 1. ; + Lx [2*p+1] = 0. ; + } +#else + Lx [p] = 1. ; #endif + ASSERT (Wi [row] == Lp [row+1]) ; } @@ -660,10 +702,13 @@ PRIVATE void get_U /* local variables */ /* ---------------------------------------------------------------------- */ + Entry value ; + Entry *xp, *D, *Uval ; Int deg, j, *ip, col, *Upos, *Uilen, *Uip, n_col, ulen, *Usi, - unz2, p, k, up, newUchain, pos, npiv, n1 ; - Entry *xp, *D, value, *Uval ; - + unz2, p, k, up, newUchain, pos, npiv, n1 ; +#ifdef COMPLEX + Int split = SPLIT (Uz) ; +#endif #ifndef NDEBUG Int nnzpiv = 0 ; #endif @@ -842,9 +887,20 @@ PRIVATE void get_U { p = --(Wi [col]) ; Ui [p] = col ; - Ux [p] = REAL_COMPONENT (D [col]) ; #ifdef COMPLEX - Uz [p] = IMAG_COMPONENT (D [col]) ; + if (split) + { + + Ux [p] = REAL_COMPONENT (D [col]) ; + Uz [p] = IMAG_COMPONENT (D [col]) ; + } + else + { + Ux [2*p ] = REAL_COMPONENT (D [col]) ; + Ux [2*p+1] = IMAG_COMPONENT (D [col]) ; + } +#else + Ux [p] = D [col] ; #endif } } @@ -895,10 +951,21 @@ PRIVATE void get_U { p = --(Wi [col]) ; Ui [p] = k ; - Ux [p] = REAL_COMPONENT (value) ; #ifdef COMPLEX - Uz [p] = IMAG_COMPONENT (value) ; + if (split) + { + Ux [p] = REAL_COMPONENT (value) ; + Uz [p] = IMAG_COMPONENT (value) ; + } + else + { + Ux [2*p ] = REAL_COMPONENT (value) ; + Ux [2*p+1] = IMAG_COMPONENT (value) ; + } +#else + Ux [p] = value ; #endif + } } @@ -959,9 +1026,19 @@ PRIVATE void get_U { p = --(Wi [col]) ; Ui [p] = k ; - Ux [p] = REAL_COMPONENT (value) ; #ifdef COMPLEX - Uz [p] = IMAG_COMPONENT (value) ; + if (split) + { + Ux [p] = REAL_COMPONENT (value) ; + Uz [p] = IMAG_COMPONENT (value) ; + } + else + { + Ux [2*p ] = REAL_COMPONENT (value) ; + Ux [2*p+1] = IMAG_COMPONENT (value) ; + } +#else + Ux [p] = value ; #endif } } diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_get_symbolic.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_get_symbolic.c index 6a88f37b7e..5d69579d22 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_get_symbolic.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_get_symbolic.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_load_numeric.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_load_numeric.c index db98757cb7..f8fbd1fcbe 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_load_numeric.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_load_numeric.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_load_symbolic.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_load_symbolic.c index dceea052f7..4fc21884cf 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_load_symbolic.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_load_symbolic.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_numeric.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_numeric.c index a79e8df3a9..61444cc80c 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_numeric.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_numeric.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -81,13 +80,14 @@ GLOBAL Int UMFPACK_numeric /* local variables */ /* ---------------------------------------------------------------------- */ + double Info2 [UMFPACK_INFO], alloc_init, relpt, relpt2, droptol, + front_alloc_init, stats [2] ; + double *Info ; + WorkType WorkSpace, *Work ; NumericType *Numeric ; SymbolicType *Symbolic ; - WorkType WorkSpace, *Work ; Int n_row, n_col, n_inner, newsize, i, status, *inew, npiv, ulen, scale ; Unit *mnew ; - double Info2 [UMFPACK_INFO], *Info, alloc_init, relpt, relpt2, droptol, - front_alloc_init, stats [2] ; /* ---------------------------------------------------------------------- */ /* get the amount of time used by the process so far */ @@ -116,7 +116,7 @@ GLOBAL Int UMFPACK_numeric alloc_init = GET_CONTROL (UMFPACK_ALLOC_INIT, UMFPACK_DEFAULT_ALLOC_INIT) ; front_alloc_init = GET_CONTROL (UMFPACK_FRONT_ALLOC_INIT, UMFPACK_DEFAULT_FRONT_ALLOC_INIT) ; - scale = (Int) GET_CONTROL (UMFPACK_SCALE, UMFPACK_DEFAULT_SCALE) ; + scale = GET_CONTROL (UMFPACK_SCALE, UMFPACK_DEFAULT_SCALE) ; droptol = GET_CONTROL (UMFPACK_DROPTOL, UMFPACK_DEFAULT_DROPTOL) ; relpt = MAX (0.0, MIN (relpt, 1.0)) ; @@ -189,11 +189,7 @@ GLOBAL Int UMFPACK_numeric Info [UMFPACK_NCOL] = n_col ; Info [UMFPACK_SIZE_OF_UNIT] = (double) (sizeof (Unit)) ; - if (!Ap || !Ai || !Ax || !NumericHandle -#ifdef COMPLEX - || !Az -#endif - ) + if (!Ap || !Ai || !Ax || !NumericHandle) { Info [UMFPACK_STATUS] = UMFPACK_ERROR_argument_missing ; return (UMFPACK_ERROR_argument_missing) ; @@ -540,9 +536,9 @@ PRIVATE Int numeric_alloc Int scale ) { + double nsize, bsize ; Int n_row, n_col, n_inner, min_usage, trying ; NumericType *Numeric ; - double nsize, bsize ; DEBUG0 (("numeric alloc:\n")) ; diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_qsymbolic.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_qsymbolic.c index db1406f13d..0aba148fa3 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_qsymbolic.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_qsymbolic.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -118,7 +117,7 @@ PRIVATE void do_amd AMD_1 (n, Ap, Ai, Q, Qinv, Sdeg, Clen, Ci, amd_Control, amd_Info) ; /* return estimates computed from AMD on PA+PA' */ - Symbolic->amd_dmax = (Int) amd_Info [AMD_DMAX] ; + Symbolic->amd_dmax = amd_Info [AMD_DMAX] ; Symbolic->amd_lunz = 2 * amd_Info [AMD_LNZ] + n ; Info [UMFPACK_SYMMETRIC_LUNZ] = Symbolic->amd_lunz ; Info [UMFPACK_SYMMETRIC_FLOPS] = DIV_FLOPS * amd_Info [AMD_NDIV] + @@ -158,13 +157,12 @@ PRIVATE Int prune_singletons ) { Int row, k, pp, p, oldcol, newcol, newrow, nzdiag, do_nzdiag ; - - nzdiag = 0 ; - do_nzdiag = (Ax != (double *) NULL) #ifdef COMPLEX - && (Az != (double *) NULL) + Int split = SPLIT (Az) ; #endif - ; + + nzdiag = 0 ; + do_nzdiag = (Ax != (double *) NULL) ; #ifndef NDEBUG DEBUGm4 (("Prune : S = A (Cperm1 (n1+1:end), Rperm1 (n1+1:end))\n")) ; @@ -204,14 +202,29 @@ PRIVATE Int prune_singletons if (newrow == newcol) { /* this is the diagonal entry */ - if (SCALAR_IS_NONZERO (Ax [p]) #ifdef COMPLEX - || SCALAR_IS_NONZERO (Az [p]) -#endif - ) + if (split) + { + if (SCALAR_IS_NONZERO (Ax [p]) || + SCALAR_IS_NONZERO (Az [p])) + { + nzdiag++ ; + } + } + else + { + if (SCALAR_IS_NONZERO (Ax [2*p ]) || + SCALAR_IS_NONZERO (Ax [2*p+1])) + { + nzdiag++ ; + } + } +#else + if (SCALAR_IS_NONZERO (Ax [p])) { nzdiag++ ; } +#endif } } } @@ -220,7 +233,6 @@ PRIVATE Int prune_singletons } Sp [n_col - n1] = pp ; - ASSERT (AMD_valid (n_row - n1, n_col - n1, Sp, Si)) ; return (nzdiag) ; } @@ -304,6 +316,12 @@ GLOBAL Int UMFPACK_qsymbolic /* local variables */ /* ---------------------------------------------------------------------- */ + double knobs [COLAMD_KNOBS], flops, f, r, c, force_fixQ, + Info2 [UMFPACK_INFO], drow, dcol, dtail_usage, dlf, duf, dmax_usage, + dhead_usage, dlnz, dunz, dmaxfrsize, dClen, dClen_analyze, sym, + amd_Info [AMD_INFO], dClen_amd, dr, dc, cr, cc, cp, + amd_Control [AMD_CONTROL], stats [2], tol ; + double *Info ; Int i, nz, j, newj, status, f1, f2, maxnrows, maxncols, nfr, col, nchains, maxrows, maxcols, p, nb, nn, *Chain_start, *Chain_maxrows, *Chain_maxcols, *Front_npivcol, *Ci, Clen, colamd_stats [COLAMD_STATS], @@ -316,12 +334,8 @@ GLOBAL Int UMFPACK_qsymbolic *Fr_cols, nempty_row, nempty_col, user_auto_strategy, fail, max_rdeg, head_usage, tail_usage, lnz, unz, esize, *Esize, rdeg, *Cdeg, *Rdeg, *Cperm1, *Rperm1, n1, oldcol, newcol, n1c, n1r, *Rperm_2by2, oldrow, - dense_row_threshold, tlen, aggressive ; - double knobs [COLAMD_KNOBS], flops, f, r, c, *Info, force_fixQ, - Info2 [UMFPACK_INFO], drow, dcol, dtail_usage, dlf, duf, dmax_usage, - dhead_usage, dlnz, dunz, dmaxfrsize, dClen, dClen_analyze, sym, - amd_Info [AMD_INFO], dClen_amd, dr, dc, cr, cc, cp, - amd_Control [AMD_CONTROL], stats [2], tol, scale ; + dense_row_threshold, tlen, aggressive, scale, *Rp, *Ri ; + SymbolicType *Symbolic ; SWType SWspace, *SW ; @@ -345,8 +359,8 @@ GLOBAL Int UMFPACK_qsymbolic drow = GET_CONTROL (UMFPACK_DENSE_ROW, UMFPACK_DEFAULT_DENSE_ROW) ; dcol = GET_CONTROL (UMFPACK_DENSE_COL, UMFPACK_DEFAULT_DENSE_COL) ; - nb = (Int) GET_CONTROL (UMFPACK_BLOCK_SIZE, UMFPACK_DEFAULT_BLOCK_SIZE) ; - strategy = (Int) GET_CONTROL (UMFPACK_STRATEGY, UMFPACK_DEFAULT_STRATEGY) ; + nb = GET_CONTROL (UMFPACK_BLOCK_SIZE, UMFPACK_DEFAULT_BLOCK_SIZE) ; + strategy = GET_CONTROL (UMFPACK_STRATEGY, UMFPACK_DEFAULT_STRATEGY) ; tol = GET_CONTROL (UMFPACK_2BY2_TOLERANCE, UMFPACK_DEFAULT_2BY2_TOLERANCE) ; scale = GET_CONTROL (UMFPACK_SCALE, UMFPACK_DEFAULT_SCALE) ; force_fixQ = GET_CONTROL (UMFPACK_FIXQ, UMFPACK_DEFAULT_FIXQ) ; @@ -441,6 +455,20 @@ GLOBAL Int UMFPACK_qsymbolic strategy = UMFPACK_STRATEGY_AUTO ; } + if (Quser != (Int *) NULL) + { + /* when the user provides Q, only symmetric and unsymmetric strategies + * are available */ + if (strategy == UMFPACK_STRATEGY_2BY2) + { + strategy = UMFPACK_STRATEGY_SYMMETRIC ; + } + if (strategy != UMFPACK_STRATEGY_SYMMETRIC) + { + strategy = UMFPACK_STRATEGY_UNSYMMETRIC ; + } + } + user_auto_strategy = (strategy == UMFPACK_STRATEGY_AUTO) ; /* ---------------------------------------------------------------------- */ @@ -490,7 +518,7 @@ GLOBAL Int UMFPACK_qsymbolic Clen = UMF_COLAMD_RECOMMENDED (nz, n_row, n_col) ; Clen_analyze = UMF_ANALYZE_CLEN (nz, n_row, n_col, nn) ; Clen = MAX (Clen, Clen_analyze) ; - Clen_amd = (Int) (2.4 * nz + 8 * n_inner) ; + Clen_amd = 2.4 * nz + 8 * n_inner ; Clen_amd += MAX (nn, nz) ; /* for Ri, in UMF_2by2 */ Clen = MAX (Clen, Clen_amd) ; @@ -653,7 +681,8 @@ GLOBAL Int UMFPACK_qsymbolic * and use Rperm_init as workspace */ ASSERT (Clen >= nz + n_row + MAX (n_row, n_col)) ; - status = UMF_singletons (n_row, n_col, Ap, Ai, Quser, Cdeg, Cperm1, Rdeg, + status = UMF_singletons (n_row, n_col, Ap, Ai, Quser, strategy, + Cdeg, Cperm1, Rdeg, Rperm1, InvRperm1, &n1, &n1c, &n1r, &nempty_col, &nempty_row, &is_sym, &max_rdeg, /* workspace: */ Rperm_init, Ci, Ci + nz, Ci + nz + n_row) ; @@ -696,9 +725,8 @@ GLOBAL Int UMFPACK_qsymbolic { /* either the pruned submatrix rectangular, or it is square and * Rperm [n1 .. n-nempty-1] is not the same as Cperm [n1 .. n-nempty-1]. - * For the auto strategy, switch to the unsymmetric strategy. - * Otherwise, if the strategy selected by the user is symmetric or - * 2-by-2, then the singletons will be discarded. */ + * Switch to the unsymmetric strategy, ignoring user-requested + * strategy. */ strategy = UMFPACK_STRATEGY_UNSYMMETRIC ; DEBUGm4 (("Strategy: Unsymmetric singletons\n")) ; } @@ -742,11 +770,36 @@ GLOBAL Int UMFPACK_qsymbolic , Rperm1, nn #endif ) ; - nzaat = AMD_aat (n2, Sp, Si, Sdeg, Wq, amd_Info) ; + + /* use Ci as workspace to sort S into R, if needed [ */ + if (Quser != (Int *) NULL) + { + /* need to sort the columns of S first */ + Rp = Ci ; + Ri = Ci + (n_row) + 1 ; + (void) UMF_transpose (n2, n2, Sp, Si, (double *) NULL, + (Int *) NULL, (Int *) NULL, 0, + Rp, Ri, (double *) NULL, Wq, FALSE +#ifdef COMPLEX + , (double *) NULL, (double *) NULL, FALSE +#endif + ) ; + } + else + { + /* S already has sorted columns */ + Rp = Sp ; + Ri = Si ; + } + ASSERT (AMD_valid (n2, n2, Rp, Ri)) ; + + nzaat = AMD_aat (n2, Rp, Ri, Sdeg, Wq, amd_Info) ; sym = amd_Info [AMD_SYMMETRY] ; Info [UMFPACK_N2] = n2 ; /* nzdiag = amd_Info [AMD_NZDIAG] counts the zero entries of S too */ + /* done using Ci as workspace to sort S into R ] */ + #ifndef NDEBUG for (k = 0 ; k < n2 ; k++) { @@ -755,6 +808,7 @@ GLOBAL Int UMFPACK_qsymbolic ASSERT (Sp [n2] - n2 <= nzaat && nzaat <= 2 * Sp [n2]) ; DEBUG0 (("Explicit zeros: "ID" %g\n", nzdiag, amd_Info [AMD_NZDIAG])) ; #endif + } /* get statistics from amd_aat, if computed */ @@ -809,9 +863,8 @@ GLOBAL Int UMFPACK_qsymbolic if (strategy == UMFPACK_STRATEGY_2BY2) { - Int *Rp, *Ri, *Blen, *W, nz_papat, nzd2, nweak, unmatched, - Clen3 ; double sym2 ; + Int *Blen, *W, nz_papat, nzd2, nweak, unmatched, Clen3 ; /* ------------------------------------------------------------------ */ /* get workspace for UMF_2by2 */ @@ -870,7 +923,7 @@ GLOBAL Int UMFPACK_qsymbolic #ifdef COMPLEX Az, #endif - tol, (Int) scale, Cperm1, + tol, scale, Cperm1, #ifndef NDEBUG Rperm1, #endif @@ -904,7 +957,7 @@ GLOBAL Int UMFPACK_qsymbolic } nz_papat = AMD_aat (n2, Rp, Ri, Sdeg, Wq, amd_Info) ; sym2 = amd_Info [AMD_SYMMETRY] ; - nzd2 = (Int) amd_Info [AMD_NZDIAG] ; + nzd2 = amd_Info [AMD_NZDIAG] ; Info [UMFPACK_2BY2_PATTERN_SYMMETRY] = sym2 ; Info [UMFPACK_2BY2_NZ_PA_PLUS_PAT] = nz_papat ; @@ -1550,7 +1603,7 @@ GLOBAL Int UMFPACK_qsymbolic /* empty rows go to dummy front nfr */ for (row = 0 ; row < n_row ; row++) { - InFront [row] = nfr ; + InFront [row] = nfr ; } /* assign the singleton pivot rows to the "empty" front */ for (k = 0 ; k < n1 ; k++) @@ -1808,13 +1861,9 @@ GLOBAL Int UMFPACK_qsymbolic Entry aij ; oldrow = Ai [p] ; newrow = Ci [oldrow] ; - if (Ax != (double *) NULL -#ifdef COMPLEX - && Az != (double *) NULL -#endif - ) + if (Ax != (double *) NULL) { - ASSIGN (aij, Ax [p], Az [p]) ; + ASSIGN (aij, Ax, Az, p, SPLIT (Az)) ; } if (oldrow == oldcol) { diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_control.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_control.c index 7431a86226..94b12e07ce 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_control.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_control.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -21,11 +20,11 @@ GLOBAL void UMFPACK_report_control const double Control [UMFPACK_CONTROL] ) { - Int prl, nb, irstep, strategy, scale, s ; double drow, dcol, relpt, relpt2, alloc_init, front_alloc_init, amd_alpha, tol, force_fixQ, droptol, aggr ; + Int prl, nb, irstep, strategy, scale, s ; - prl = (Int) GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ; + prl = GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ; if (prl < 2) { @@ -96,7 +95,7 @@ GLOBAL void UMFPACK_report_control /* block size */ /* ---------------------------------------------------------------------- */ - nb = (Int) GET_CONTROL (UMFPACK_BLOCK_SIZE, UMFPACK_DEFAULT_BLOCK_SIZE) ; + nb = GET_CONTROL (UMFPACK_BLOCK_SIZE, UMFPACK_DEFAULT_BLOCK_SIZE) ; nb = MAX (1, nb) ; PRINTF ((" "ID": block size for dense matrix kernels: "ID"\n", (Int) INDEX (UMFPACK_BLOCK_SIZE), nb)) ; @@ -105,7 +104,7 @@ GLOBAL void UMFPACK_report_control /* strategy */ /* ---------------------------------------------------------------------- */ - strategy = (Int) GET_CONTROL (UMFPACK_STRATEGY, UMFPACK_DEFAULT_STRATEGY) ; + strategy = GET_CONTROL (UMFPACK_STRATEGY, UMFPACK_DEFAULT_STRATEGY) ; if (strategy < UMFPACK_STRATEGY_AUTO || strategy > UMFPACK_STRATEGY_SYMMETRIC) { @@ -153,7 +152,7 @@ GLOBAL void UMFPACK_report_control } else { - s =(Int) -alloc_init ; + s = -alloc_init ; s = MAX (1, s) ; PRINTF ((" "ID": initial allocation (in Units): "ID"\n", (Int) INDEX (UMFPACK_ALLOC_INIT), s)) ; @@ -163,7 +162,7 @@ GLOBAL void UMFPACK_report_control /* maximum iterative refinement steps */ /* ---------------------------------------------------------------------- */ - irstep = (Int) GET_CONTROL (UMFPACK_IRSTEP, UMFPACK_DEFAULT_IRSTEP) ; + irstep = GET_CONTROL (UMFPACK_IRSTEP, UMFPACK_DEFAULT_IRSTEP) ; irstep = MAX (0, irstep) ; PRINTF ((" "ID": max iterative refinement steps: "ID"\n", (Int) INDEX (UMFPACK_IRSTEP), irstep)) ; @@ -230,7 +229,7 @@ GLOBAL void UMFPACK_report_control /* scaling */ /* ---------------------------------------------------------------------- */ - scale = (Int) GET_CONTROL (UMFPACK_SCALE, UMFPACK_DEFAULT_SCALE) ; + scale = GET_CONTROL (UMFPACK_SCALE, UMFPACK_DEFAULT_SCALE) ; if (scale != UMFPACK_SCALE_NONE && scale != UMFPACK_SCALE_MAX) { scale = UMFPACK_DEFAULT_SCALE ; @@ -264,7 +263,7 @@ GLOBAL void UMFPACK_report_control } else { - s = (Int) -front_alloc_init ; + s = -front_alloc_init ; s = MAX (1, s) ; PRINTF ((" "ID": initial frontal matrix size (# of Entry's): "ID"\n", (Int) INDEX (UMFPACK_FRONT_ALLOC_INIT), s)) ; diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_info.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_info.c index 48a66233b5..800b1e1953 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_info.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_info.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -89,7 +88,7 @@ GLOBAL void UMFPACK_report_info /* get control settings and status to determine what to print */ /* ---------------------------------------------------------------------- */ - prl = (Int) GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ; + prl = GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ; if (!Info || prl < 2) { @@ -264,7 +263,7 @@ GLOBAL void UMFPACK_report_info Info [UMFPACK_NEMPTY_ROW]) ; PRINT_INFO (" number of empty columns %.0f\n", Info [UMFPACK_NEMPTY_COL]) ; - is_sym = (Int) Info [UMFPACK_S_SYMMETRIC] ; + is_sym = Info [UMFPACK_S_SYMMETRIC] ; if (is_sym > 0) { PRINTF ((" submatrix S square and diagonal preserved\n")) ; diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_matrix.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_matrix.c index 90331396e1..1c2914ed25 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_matrix.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_matrix.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -15,8 +14,6 @@ */ #include "umf_internal.h" -#include "umf_malloc.h" -#include "umf_free.h" GLOBAL Int UMFPACK_report_matrix ( @@ -32,15 +29,18 @@ GLOBAL Int UMFPACK_report_matrix const double Control [UMFPACK_CONTROL] ) { + Entry a ; Int prl, i, k, length, ilast, p, nz, prl1, p1, p2, n, n_i, do_values ; char *vector, *index ; - Entry a ; +#ifdef COMPLEX + Int split = SPLIT (Az) ; +#endif /* ---------------------------------------------------------------------- */ /* determine the form, and check if inputs exist */ /* ---------------------------------------------------------------------- */ - prl = (Int) GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ; + prl = GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ; if (prl <= 2) { @@ -97,11 +97,7 @@ GLOBAL Int UMFPACK_report_matrix return (UMFPACK_ERROR_argument_missing) ; } -#ifdef COMPLEX - do_values = Ax && Az ; -#else do_values = Ax != (double *) NULL ; -#endif PRINTF4 (("\n")) ; @@ -161,7 +157,7 @@ GLOBAL Int UMFPACK_report_matrix if (do_values && prl >= 4) { PRINTF ((":")) ; - ASSIGN (a, Ax [p], Az [p]) ; + ASSIGN (a, Ax, Az, p, split) ; PRINT_ENTRY (a) ; } if (i < 0 || i >= n_i) diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_numeric.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_numeric.c index ac0d6dd6bc..670f79e60f 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_numeric.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_numeric.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -56,7 +55,7 @@ GLOBAL Int UMFPACK_report_numeric npiv ; NumericType *Numeric ; - prl = (Int) GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ; + prl = GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ; if (prl <= 2) { diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_perm.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_perm.c index 11ec1bc366..f6f78bf07f 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_perm.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_perm.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -31,7 +30,7 @@ GLOBAL Int UMFPACK_report_perm { Int prl, *W, status ; - prl = (Int) GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ; + prl = GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ; if (prl <= 2) { diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_status.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_status.c index 2ec58e9ec1..7be57b91f4 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_status.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_status.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -28,7 +27,7 @@ GLOBAL void UMFPACK_report_status /* get control settings and status to determine what to print */ /* ---------------------------------------------------------------------- */ - prl = (Int) GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ; + prl = GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ; if (prl < 1) { @@ -38,7 +37,7 @@ GLOBAL void UMFPACK_report_status if (status == UMFPACK_OK && prl <= 1) { - /* no output generated if prl is 1 or less and no error occured. */ + /* no output generated if prl is 1 or less and no error occurred. */ /* note that the default printing level is 1. */ return ; } diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_symbolic.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_symbolic.c index c89248bc4b..ad43478dfb 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_symbolic.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_symbolic.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -37,7 +36,7 @@ GLOBAL Int UMFPACK_report_symbolic *Front_leftmostdesc, *Front_parent, done, status1, status2 ; SymbolicType *Symbolic ; - prl = (Int) GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ; + prl = GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ; if (prl <= 2) { diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_triplet.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_triplet.c index 06ebbec9cb..c7212ff404 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_triplet.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_triplet.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -30,10 +29,13 @@ GLOBAL Int UMFPACK_report_triplet const double Control [UMFPACK_CONTROL] ) { - Int prl, prl1, k, i, j, do_values ; Entry t ; + Int prl, prl1, k, i, j, do_values ; +#ifdef COMPLEX + Int split = SPLIT (Tz) ; +#endif - prl = (Int) GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ; + prl = GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ; if (prl <= 2) { @@ -63,11 +65,7 @@ GLOBAL Int UMFPACK_report_triplet PRINTF4 (("\n")) ; -#ifdef COMPLEX - do_values = Tx && Tz ; -#else do_values = Tx != (double *) NULL ; -#endif prl1 = prl ; for (k = 0 ; k < nz ; k++) @@ -77,7 +75,7 @@ GLOBAL Int UMFPACK_report_triplet PRINTF4 ((" "ID" : "ID" "ID" ", INDEX (k), INDEX (i), INDEX (j))) ; if (do_values && prl >= 4) { - ASSIGN (t, Tx [k], Tz [k]) ; + ASSIGN (t, Tx, Tz, k, split) ; PRINT_ENTRY (t) ; } PRINTF4 (("\n")) ; diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_vector.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_vector.c index 3f8a39f3ec..204801b6e4 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_vector.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_vector.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -33,7 +32,7 @@ GLOBAL Int UMFPACK_report_vector double *Xz = (double *) NULL ; #endif - prl = (Int) GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ; + prl = GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ; if (prl <= 2) { diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_save_numeric.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_save_numeric.c index b7803b7c17..a912a6f65b 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_save_numeric.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_save_numeric.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_save_symbolic.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_save_symbolic.c index 7908b83f23..e3144d83ac 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_save_symbolic.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_save_symbolic.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_scale.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_scale.c index 90d0221ff1..a2f8b78a07 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_scale.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_scale.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -46,6 +45,9 @@ GLOBAL Int UMFPACK_scale NumericType *Numeric ; Int n, i ; double *Rs ; +#ifdef COMPLEX + Int split = SPLIT (Xz) && SPLIT (Bz) ; +#endif Numeric = (NumericType *) NumericHandle ; if (!UMF_valid_numeric (Numeric)) @@ -56,11 +58,7 @@ GLOBAL Int UMFPACK_scale n = Numeric->n_row ; Rs = Numeric->Rs ; - if (!Xx || !Bx -#ifdef COMPLEX - || !Xz || !Bz -#endif - ) + if (!Xx || !Bx) { return (UMFPACK_ERROR_argument_missing) ; } @@ -75,37 +73,85 @@ GLOBAL Int UMFPACK_scale if (Numeric->do_recip) { /* multiply by the scale factors */ +#ifdef COMPLEX + if (split) + { + for (i = 0 ; i < n ; i++) + { + Xx [i] = Bx [i] * Rs [i] ; + Xz [i] = Bz [i] * Rs [i] ; + } + } + else + { + for (i = 0 ; i < n ; i++) + { + Xx [2*i ] = Bx [2*i ] * Rs [i] ; + Xx [2*i+1] = Bx [2*i+1] * Rs [i] ; + } + } +#else for (i = 0 ; i < n ; i++) { Xx [i] = Bx [i] * Rs [i] ; -#ifdef COMPLEX - Xz [i] = Bz [i] * Rs [i] ; -#endif } +#endif } else #endif { /* divide by the scale factors */ +#ifdef COMPLEX + if (split) + { + for (i = 0 ; i < n ; i++) + { + Xx [i] = Bx [i] / Rs [i] ; + Xz [i] = Bz [i] / Rs [i] ; + } + } + else + { + for (i = 0 ; i < n ; i++) + { + Xx [2*i ] = Bx [2*i ] / Rs [i] ; + Xx [2*i+1] = Bx [2*i+1] / Rs [i] ; + } + } +#else for (i = 0 ; i < n ; i++) { Xx [i] = Bx [i] / Rs [i] ; -#ifdef COMPLEX - Xz [i] = Bz [i] / Rs [i] ; -#endif } +#endif } } else { /* no scale factors, just copy B into X */ +#ifdef COMPLEX + if (split) + { + for (i = 0 ; i < n ; i++) + { + Xx [i] = Bx [i] ; + Xz [i] = Bz [i] ; + } + } + else + { + for (i = 0 ; i < n ; i++) + { + Xx [2*i ] = Bx [2*i ] ; + Xx [2*i+1] = Bx [2*i+1] ; + } + } +#else for (i = 0 ; i < n ; i++) { Xx [i] = Bx [i] ; -#ifdef COMPLEX - Xz [i] = Bz [i] ; -#endif } +#endif } return (UMFPACK_OK) ; diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_solve.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_solve.c index 8d13a41fbd..1db93566e7 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_solve.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_solve.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -76,9 +75,10 @@ UMFPACK_solve /* local variables */ /* ---------------------------------------------------------------------- */ + double Info2 [UMFPACK_INFO], stats [2] ; + double *Info ; NumericType *Numeric ; Int n, i, irstep, status ; - double Info2 [UMFPACK_INFO], *Info, /* tstart, tend */ stats [2] ; #ifndef WSOLVE Int *Pattern, wsize ; double *W ; @@ -100,7 +100,7 @@ UMFPACK_solve /* get parameters */ /* ---------------------------------------------------------------------- */ - irstep = (Int) GET_CONTROL (UMFPACK_IRSTEP, UMFPACK_DEFAULT_IRSTEP) ; + irstep = GET_CONTROL (UMFPACK_IRSTEP, UMFPACK_DEFAULT_IRSTEP) ; if (User_Info != (double *) NULL) { @@ -150,11 +150,7 @@ UMFPACK_solve irstep = 0 ; } - if (!Xx || !Bx -#ifdef COMPLEX - || !Xz || !Bz -#endif - ) + if (!Xx || !Bx) { Info [UMFPACK_STATUS] = UMFPACK_ERROR_argument_missing ; return (UMFPACK_ERROR_argument_missing) ; diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_symbolic.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_symbolic.c index 2125695978..20b9a26da5 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_symbolic.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_symbolic.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_tictoc.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_tictoc.c index 706f3acb85..96d34d1c51 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_tictoc.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_tictoc.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -58,8 +57,8 @@ void umfpack_tic (double stats [2]) /* stats [0]: current wallclock time, in seconds */ /* stats [1]: user + system time for the process, in seconds */ - struct tms t ; double ticks ; + struct tms t ; ticks = (double) sysconf (_SC_CLK_TCK) ; stats [0] = (double) times (&t) / ticks ; diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_timer.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_timer.c index be0e7fc647..2307fedd02 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_timer.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_timer.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -13,8 +12,7 @@ User-callable. Returns the time in seconds used by the process. BE CAREFUL: if you compare the run time of UMFPACK with other sparse matrix packages, be sure to use the same timer. See umfpack_timer.h for details. - This was the timer used internally by UMFPACK Version 4.0. See - umfpack_tictoc.h, which is the timer now used internally by UMFPACK V4.1. + See umfpack_tictoc.h, which is the timer used internally by UMFPACK. */ #ifdef NO_TIMER diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_transpose.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_transpose.c index 7dedecb6be..3717fdf978 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_transpose.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_transpose.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_triplet_to_col.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_triplet_to_col.c index a868231a81..d72e069bb1 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_triplet_to_col.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_triplet_to_col.c @@ -3,9 +3,8 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.3 (Jan. 16, 2004), Copyright (c) 2004 by Timothy A. */ -/* Davis. All Rights Reserved. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* UMFPACK Version 4.4, 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 */ /* -------------------------------------------------------------------------- */ @@ -13,7 +12,7 @@ User callable. Converts triplet input to column-oriented form. Duplicate entries may exist (they are summed in the output). The columns of the column-oriented form are in sorted order. The input is not modified. - Returns 1 if OK, 0 if an error occured. See umfpack_triplet_to_col.h for + Returns 1 if OK, 0 if an error occurred. See umfpack_triplet_to_col.h for details. If Map is present (a non-NULL pointer to an Int array of size nz), then on @@ -72,7 +71,11 @@ GLOBAL Int UMFPACK_triplet_to_col /* ---------------------------------------------------------------------- */ Int *RowCount, *Rp, *Rj, *W, nn, do_values, do_map, *Map2, status ; - double *Rx, *Rz ; + double *Rx ; +#ifdef COMPLEX + double *Rz ; + Int split ; +#endif #ifndef NDEBUG UMF_dump_start ( ) ; @@ -105,36 +108,32 @@ GLOBAL Int UMFPACK_triplet_to_col /* ---------------------------------------------------------------------- */ Rx = (double *) NULL ; - Rz = (double *) NULL ; -#ifdef COMPLEX - do_values = Ax && Tx && Az && Tz ; + do_values = Ax && Tx ; + if (do_values) { - Rx = (double *) UMF_malloc (nz+1, sizeof (double)) ; - Rz = (double *) UMF_malloc (nz+1, sizeof (double)) ; - if (!Rx || !Rz) +#ifdef COMPLEX + Rx = (double *) UMF_malloc (2*nz+2, sizeof (double)) ; + split = SPLIT (Tz) && SPLIT (Az) ; + if (split) { - DEBUGm4 (("out of memory: triplet work (complex)\n")) ; - (void) UMF_free ((void *) Rx) ; - (void) UMF_free ((void *) Rz) ; - ASSERT (UMF_malloc_count == init_count) ; - return (UMFPACK_ERROR_out_of_memory) ; + Rz = Rx + nz ; + } + else + { + Rz = (double *) NULL ; } - } #else - do_values = Ax && Tx ; - if (do_values) - { Rx = (double *) UMF_malloc (nz+1, sizeof (double)) ; +#endif if (!Rx) { - DEBUGm4 (("out of memory: triplet work (real)\n")) ; + DEBUGm4 (("out of memory: triplet work \n")) ; ASSERT (UMF_malloc_count == init_count) ; return (UMFPACK_ERROR_out_of_memory) ; } } -#endif do_map = (Map != (Int *) NULL) ; Map2 = (Int *) NULL ; @@ -146,7 +145,6 @@ GLOBAL Int UMFPACK_triplet_to_col { DEBUGm4 (("out of memory: triplet map\n")) ; (void) UMF_free ((void *) Rx) ; - (void) UMF_free ((void *) Rz) ; ASSERT (UMF_malloc_count == init_count) ; return (UMFPACK_ERROR_out_of_memory) ; } @@ -160,7 +158,6 @@ GLOBAL Int UMFPACK_triplet_to_col { DEBUGm4 (("out of memory: triplet work (int)\n")) ; (void) UMF_free ((void *) Rx) ; - (void) UMF_free ((void *) Rz) ; (void) UMF_free ((void *) Map2) ; (void) UMF_free ((void *) Rp) ; (void) UMF_free ((void *) Rj) ; @@ -171,7 +168,7 @@ GLOBAL Int UMFPACK_triplet_to_col } ASSERT (UMF_malloc_count == init_count + 4 + - (Rx != (double *) NULL) + (Rz != (double *) NULL) + do_map) ; + (Rx != (double *) NULL) + do_map) ; /* ---------------------------------------------------------------------- */ /* convert from triplet to column form */ @@ -217,7 +214,6 @@ GLOBAL Int UMFPACK_triplet_to_col /* ---------------------------------------------------------------------- */ (void) UMF_free ((void *) Rx) ; - (void) UMF_free ((void *) Rz) ; (void) UMF_free ((void *) Map2) ; (void) UMF_free ((void *) Rp) ; (void) UMF_free ((void *) Rj) ;