From: bangerth Date: Thu, 16 Aug 2007 02:34:22 +0000 (+0000) Subject: Upgrade to UMFPACK 5.1 and AMD 2.2, together with the include file from UFconfig... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17947dfb0714605ec0e5107be77c82f58a63ebf6;p=dealii-svn.git Upgrade to UMFPACK 5.1 and AMD 2.2, together with the include file from UFconfig 3.0. git-svn-id: https://svn.dealii.org/trunk@14960 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/contrib/umfpack/AMD/Demo/Makefile b/deal.II/contrib/umfpack/AMD/Demo/Makefile deleted file mode 100644 index 395cc73375..0000000000 --- a/deal.II/contrib/umfpack/AMD/Demo/Makefile +++ /dev/null @@ -1,79 +0,0 @@ -#------------------------------------------------------------------------------ -# compile the AMD demo (for both GNU make or original make) -#----------------------------------------------------------------------------- - -all: amd_simple amd_demo amd_demo2 - -include ../Make/Make.include - -C = $(CC) $(CFLAGS) $(CONFIG) -I../Include - -INC = ../Include/amd.h - -../Lib/libamd.a: - ( cd ../Source ; make ) - -../Lib/libamdf77.a: - ( cd ../Source ; make fortran ) - -#------------------------------------------------------------------------------ -# Create the demo program, run it, and compare the output -#------------------------------------------------------------------------------ - -dist: - -amd_demo: amd_demo.c ../Lib/libamd.a $(INC) - $(C) -DDINT -o amd_demo amd_demo.c ../Lib/libamd.a $(LIB) - ./amd_demo > my_amd_demo.out - - diff amd_demo.out my_amd_demo.out - -amd_demo2: amd_demo2.c ../Lib/libamd.a $(INC) - $(C) -DDINT -o amd_demo2 amd_demo2.c ../Lib/libamd.a $(LIB) - ./amd_demo2 > my_amd_demo2.out - - diff amd_demo2.out my_amd_demo2.out - -amd_simple: amd_simple.c ../Lib/libamd.a $(INC) - $(C) -DDINT -o amd_simple amd_simple.c ../Lib/libamd.a $(LIB) - ./amd_simple > my_amd_simple.out - - diff amd_simple.out my_amd_simple.out - -#------------------------------------------------------------------------------ -# compile the Fortran demo -#------------------------------------------------------------------------------ - -fortran: amd_f77demo amd_f77simple - -cross: amd_f77cross - -amd_f77demo: amd_f77demo.f ../Lib/libamdf77.a - $(F77) $(F77FLAGS) -o amd_f77demo amd_f77demo.f ../Lib/libamdf77.a \ - $(F77LIB) - ./amd_f77demo > my_amd_f77demo.out - - diff amd_f77demo.out my_amd_f77demo.out - -amd_f77simple: amd_f77simple.f ../Lib/libamdf77.a - $(F77) $(F77FLAGS) -o amd_f77simple amd_f77simple.f \ - ../Lib/libamdf77.a $(F77LIB) - ./amd_f77simple > my_amd_f77simple.out - - diff amd_f77simple.out my_amd_f77simple.out - -amd_f77wrapper.o: amd_f77wrapper.c - $(C) -DDINT -c amd_f77wrapper.c - -amd_f77cross: amd_f77cross.f amd_f77wrapper.o ../Lib/libamd.a - $(F77) $(F77FLAGS) -o amd_f77cross amd_f77cross.f amd_f77wrapper.o \ - ../Lib/libamd.a $(F77LIB) - ./amd_f77cross > my_amd_f77cross.out - - diff amd_f77cross.out my_amd_f77cross.out - -#------------------------------------------------------------------------------ -# Remove all but the files in the original distribution -#------------------------------------------------------------------------------ - -purge: clean - - $(RM) amd_demo my_amd_demo.out - - $(RM) amd_demo2 my_amd_demo2.out - - $(RM) amd_simple my_amd_simple.out - - $(RM) amd_f77demo my_amd_f77demo.out - - $(RM) amd_f77simple my_amd_f77simple.out - - $(RM) amd_f77cross my_amd_f77cross.out diff --git a/deal.II/contrib/umfpack/AMD/Demo/amd_demo.c b/deal.II/contrib/umfpack/AMD/Demo/amd_demo.c deleted file mode 100644 index 009dc3d583..0000000000 --- a/deal.II/contrib/umfpack/AMD/Demo/amd_demo.c +++ /dev/null @@ -1,169 +0,0 @@ -/* ========================================================================= */ -/* === AMD demo main program =============================================== */ -/* ========================================================================= */ - -/* ------------------------------------------------------------------------- */ -/* AMD Version 1.1 (Jan. 21, 2004), Copyright (c) 2004 by Timothy A. Davis, */ -/* Patrick R. Amestoy, and Iain S. Duff. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ -/* web: http://www.cise.ufl.edu/research/sparse/amd */ -/* ------------------------------------------------------------------------- */ - -/* A simple C main program that illustrates the use of the ANSI C interface - * to AMD. - */ - -#include "amd.h" -#include -#include - -int main (int argc, char **argv) -{ - /* The symmetric can_24 Harwell/Boeing matrix, including upper and lower - * triangular parts, and the diagonal entries. Note that this matrix is - * 0-based, with row and column indices in the range 0 to n-1. */ - int n = 24, nz, - Ap [ ] = { 0, 9, 15, 21, 27, 33, 39, 48, 57, 61, 70, 76, 82, 88, 94, 100, - 106, 110, 119, 128, 137, 143, 152, 156, 160 }, - Ai [ ] = { - /* column 0: */ 0, 5, 6, 12, 13, 17, 18, 19, 21, - /* column 1: */ 1, 8, 9, 13, 14, 17, - /* column 2: */ 2, 6, 11, 20, 21, 22, - /* column 3: */ 3, 7, 10, 15, 18, 19, - /* column 4: */ 4, 7, 9, 14, 15, 16, - /* column 5: */ 0, 5, 6, 12, 13, 17, - /* column 6: */ 0, 2, 5, 6, 11, 12, 19, 21, 23, - /* column 7: */ 3, 4, 7, 9, 14, 15, 16, 17, 18, - /* column 8: */ 1, 8, 9, 14, - /* column 9: */ 1, 4, 7, 8, 9, 13, 14, 17, 18, - /* column 10: */ 3, 10, 18, 19, 20, 21, - /* column 11: */ 2, 6, 11, 12, 21, 23, - /* column 12: */ 0, 5, 6, 11, 12, 23, - /* column 13: */ 0, 1, 5, 9, 13, 17, - /* column 14: */ 1, 4, 7, 8, 9, 14, - /* column 15: */ 3, 4, 7, 15, 16, 18, - /* column 16: */ 4, 7, 15, 16, - /* column 17: */ 0, 1, 5, 7, 9, 13, 17, 18, 19, - /* column 18: */ 0, 3, 7, 9, 10, 15, 17, 18, 19, - /* column 19: */ 0, 3, 6, 10, 17, 18, 19, 20, 21, - /* column 20: */ 2, 10, 19, 20, 21, 22, - /* column 21: */ 0, 2, 6, 10, 11, 19, 20, 21, 22, - /* column 22: */ 2, 20, 21, 22, - /* column 23: */ 6, 11, 12, 23 } ; - - int P [24], Pinv [24], i, j, k, jnew, p, inew, result ; - double Control [AMD_CONTROL], Info [AMD_INFO] ; - char A [24][24] ; - - printf ("AMD demo, with the 24-by-24 Harwell/Boeing matrix, can_24:\n") ; - - /* get the default parameters, and print them */ - amd_defaults (Control) ; - amd_control (Control) ; - - /* print the input matrix */ - nz = Ap [n] ; - printf ("\nInput matrix: %d-by-%d, with %d entries.\n" - " Note that for a symmetric matrix such as this one, only the\n" - " strictly lower or upper triangular parts would need to be\n" - " passed to AMD, since AMD computes the ordering of A+A'. The\n" - " diagonal entries are also not needed, since AMD ignores them.\n" - , n, n, nz) ; - for (j = 0 ; j < n ; j++) - { - printf ("\nColumn: %d, number of entries: %d, with row indices in" - " Ai [%d ... %d]:\n row indices:", - j, Ap [j+1] - Ap [j], Ap [j], Ap [j+1]-1) ; - for (p = Ap [j] ; p < Ap [j+1] ; p++) - { - i = Ai [p] ; - printf (" %d", i) ; - } - printf ("\n") ; - } - - /* print a character plot of the input matrix. This is only reasonable - * because the matrix is small. */ - printf ("\nPlot of input matrix pattern:\n") ; - for (j = 0 ; j < n ; j++) - { - for (i = 0 ; i < n ; i++) A [i][j] = '.' ; - for (p = Ap [j] ; p < Ap [j+1] ; p++) - { - i = Ai [p] ; - A [i][j] = 'X' ; - } - } - printf (" ") ; - for (j = 0 ; j < n ; j++) printf (" %1d", j % 10) ; - printf ("\n") ; - for (i = 0 ; i < n ; i++) - { - printf ("%2d: ", i) ; - for (j = 0 ; j < n ; j++) - { - printf (" %c", A [i][j]) ; - } - printf ("\n") ; - } - - /* order the matrix */ - result = amd_order (n, Ap, Ai, P, Control, Info) ; - printf ("return value from amd_order: %d (should be %d)\n", - result, AMD_OK) ; - - /* print the statistics */ - amd_info (Info) ; - - if (result != AMD_OK) - { - printf ("AMD failed\n") ; - exit (1) ; - } - - /* print the permutation vector, P, and compute the inverse permutation */ - printf ("Permutation vector:\n") ; - for (k = 0 ; k < n ; k++) - { - /* row/column j is the kth row/column in the permuted matrix */ - j = P [k] ; - Pinv [j] = k ; - printf (" %2d", j) ; - } - printf ("\n\n") ; - - printf ("Inverse permutation vector:\n") ; - for (j = 0 ; j < n ; j++) - { - k = Pinv [j] ; - printf (" %2d", k) ; - } - printf ("\n\n") ; - - /* print a character plot of the permuted matrix. */ - printf ("\nPlot of permuted matrix pattern:\n") ; - for (jnew = 0 ; jnew < n ; jnew++) - { - j = P [jnew] ; - for (inew = 0 ; inew < n ; inew++) A [inew][jnew] = '.' ; - for (p = Ap [j] ; p < Ap [j+1] ; p++) - { - inew = Pinv [Ai [p]] ; - A [inew][jnew] = 'X' ; - } - } - printf (" ") ; - for (j = 0 ; j < n ; j++) printf (" %1d", j % 10) ; - printf ("\n") ; - for (i = 0 ; i < n ; i++) - { - printf ("%2d: ", i) ; - for (j = 0 ; j < n ; j++) - { - printf (" %c", A [i][j]) ; - } - printf ("\n") ; - } - - return (0) ; -} diff --git a/deal.II/contrib/umfpack/AMD/Demo/amd_demo.out b/deal.II/contrib/umfpack/AMD/Demo/amd_demo.out deleted file mode 100644 index eb8d845bc1..0000000000 --- a/deal.II/contrib/umfpack/AMD/Demo/amd_demo.out +++ /dev/null @@ -1,177 +0,0 @@ -AMD demo, with the 24-by-24 Harwell/Boeing matrix, can_24: - -amd: approximate minimum degree ordering, parameters: - dense row parameter: 10 - (rows with more than max (10 * sqrt (n), 16) entries are - considered "dense", and placed last in output permutation) - aggressive absorption: yes - - -Input matrix: 24-by-24, with 160 entries. - Note that for a symmetric matrix such as this one, only the - strictly lower or upper triangular parts would need to be - passed to AMD, since AMD computes the ordering of A+A'. The - diagonal entries are also not needed, since AMD ignores them. - -Column: 0, number of entries: 9, with row indices in Ai [0 ... 8]: - row indices: 0 5 6 12 13 17 18 19 21 - -Column: 1, number of entries: 6, with row indices in Ai [9 ... 14]: - row indices: 1 8 9 13 14 17 - -Column: 2, number of entries: 6, with row indices in Ai [15 ... 20]: - row indices: 2 6 11 20 21 22 - -Column: 3, number of entries: 6, with row indices in Ai [21 ... 26]: - row indices: 3 7 10 15 18 19 - -Column: 4, number of entries: 6, with row indices in Ai [27 ... 32]: - row indices: 4 7 9 14 15 16 - -Column: 5, number of entries: 6, with row indices in Ai [33 ... 38]: - row indices: 0 5 6 12 13 17 - -Column: 6, number of entries: 9, with row indices in Ai [39 ... 47]: - row indices: 0 2 5 6 11 12 19 21 23 - -Column: 7, number of entries: 9, with row indices in Ai [48 ... 56]: - row indices: 3 4 7 9 14 15 16 17 18 - -Column: 8, number of entries: 4, with row indices in Ai [57 ... 60]: - row indices: 1 8 9 14 - -Column: 9, number of entries: 9, with row indices in Ai [61 ... 69]: - row indices: 1 4 7 8 9 13 14 17 18 - -Column: 10, number of entries: 6, with row indices in Ai [70 ... 75]: - row indices: 3 10 18 19 20 21 - -Column: 11, number of entries: 6, with row indices in Ai [76 ... 81]: - row indices: 2 6 11 12 21 23 - -Column: 12, number of entries: 6, with row indices in Ai [82 ... 87]: - row indices: 0 5 6 11 12 23 - -Column: 13, number of entries: 6, with row indices in Ai [88 ... 93]: - row indices: 0 1 5 9 13 17 - -Column: 14, number of entries: 6, with row indices in Ai [94 ... 99]: - row indices: 1 4 7 8 9 14 - -Column: 15, number of entries: 6, with row indices in Ai [100 ... 105]: - row indices: 3 4 7 15 16 18 - -Column: 16, number of entries: 4, with row indices in Ai [106 ... 109]: - row indices: 4 7 15 16 - -Column: 17, number of entries: 9, with row indices in Ai [110 ... 118]: - row indices: 0 1 5 7 9 13 17 18 19 - -Column: 18, number of entries: 9, with row indices in Ai [119 ... 127]: - row indices: 0 3 7 9 10 15 17 18 19 - -Column: 19, number of entries: 9, with row indices in Ai [128 ... 136]: - row indices: 0 3 6 10 17 18 19 20 21 - -Column: 20, number of entries: 6, with row indices in Ai [137 ... 142]: - row indices: 2 10 19 20 21 22 - -Column: 21, number of entries: 9, with row indices in Ai [143 ... 151]: - row indices: 0 2 6 10 11 19 20 21 22 - -Column: 22, number of entries: 4, with row indices in Ai [152 ... 155]: - row indices: 2 20 21 22 - -Column: 23, number of entries: 4, with row indices in Ai [156 ... 159]: - row indices: 6 11 12 23 - -Plot of input matrix pattern: - 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 - 0: X . . . . X X . . . . . X X . . . X X X . X . . - 1: . X . . . . . . X X . . . X X . . X . . . . . . - 2: . . X . . . X . . . . X . . . . . . . . X X X . - 3: . . . X . . . X . . X . . . . X . . X X . . . . - 4: . . . . X . . X . X . . . . X X X . . . . . . . - 5: X . . . . X X . . . . . X X . . . X . . . . . . - 6: X . X . . X X . . . . X X . . . . . . X . X . X - 7: . . . X X . . X . X . . . . X X X X X . . . . . - 8: . X . . . . . . X X . . . . X . . . . . . . . . - 9: . X . . X . . X X X . . . X X . . X X . . . . . -10: . . . X . . . . . . X . . . . . . . X X X X . . -11: . . X . . . X . . . . X X . . . . . . . . X . X -12: X . . . . X X . . . . X X . . . . . . . . . . X -13: X X . . . X . . . X . . . X . . . X . . . . . . -14: . X . . X . . X X X . . . . X . . . . . . . . . -15: . . . X X . . X . . . . . . . X X . X . . . . . -16: . . . . X . . X . . . . . . . X X . . . . . . . -17: X X . . . X . X . X . . . X . . . X X X . . . . -18: X . . X . . . X . X X . . . . X . X X X . . . . -19: X . . X . . X . . . X . . . . . . X X X X X . . -20: . . X . . . . . . . X . . . . . . . . X X X X . -21: X . X . . . X . . . X X . . . . . . . X X X X . -22: . . X . . . . . . . . . . . . . . . . . X X X . -23: . . . . . . X . . . . X X . . . . . . . . . . X -return value from amd_order: 0 (should be 0) - -amd: approximate minimum degree ordering, results: - status: OK - n, dimension of A: 24 - nz, number of nonzeros in A: 160 - symmetry of A: 1.0000 - number of nonzeros on diagonal: 24 - nonzeros in pattern of A+A' (excl. diagonal): 136 - # dense rows/columns of A+A': 0 - memory used, in bytes: 1516 - # of memory compactions: 0 - - The following approximate statistics are for a subsequent - factorization of A(P,P) + A(P,P)'. They are slight upper - bounds if there are no dense rows/columns in A+A', and become - looser if dense rows/columns exist. - - nonzeros in L (excluding diagonal): 97 - nonzeros in L (including diagonal): 121 - # divide operations for LDL' or LU: 97 - # multiply-subtract operations for LDL': 275 - # multiply-subtract operations for LU: 453 - max nz. in any column of L (incl. diagonal): 8 - - chol flop count for real A, sqrt counted as 1 flop: 671 - LDL' flop count for real A: 647 - LDL' flop count for complex A: 3073 - LU flop count for real A (with no pivoting): 1003 - LU flop count for complex A (with no pivoting): 4497 - -Permutation vector: - 22 20 10 23 12 5 16 8 14 4 15 7 1 9 13 17 0 2 3 6 11 18 21 19 - -Inverse permutation vector: - 16 12 17 18 9 5 19 11 7 13 2 20 4 14 8 10 6 15 21 23 1 22 0 3 - - -Plot of permuted matrix pattern: - 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 - 0: X X . . . . . . . . . . . . . . . X . . . . X . - 1: X X X . . . . . . . . . . . . . . X . . . . X X - 2: . X X . . . . . . . . . . . . . . . X . . X X X - 3: . . . X X . . . . . . . . . . . . . . X X . . . - 4: . . . X X X . . . . . . . . . . X . . X X . . . - 5: . . . . X X . . . . . . . . X X X . . X . . . . - 6: . . . . . . X . . X X X . . . . . . . . . . . . - 7: . . . . . . . X X . . . X X . . . . . . . . . . - 8: . . . . . . . X X X . X X X . . . . . . . . . . - 9: . . . . . . X . X X X X . X . . . . . . . . . . -10: . . . . . . X . . X X X . . . . . . X . . X . . -11: . . . . . . X . X X X X . X . X . . X . . X . . -12: . . . . . . . X X . . . X X X X . . . . . . . . -13: . . . . . . . X X X . X X X X X . . . . . X . . -14: . . . . . X . . . . . . X X X X X . . . . . . . -15: . . . . . X . . . . . X X X X X X . . . . X . X -16: . . . . X X . . . . . . . . X X X . . X . X X X -17: X X . . . . . . . . . . . . . . . X . X X . X . -18: . . X . . . . . . . X X . . . . . . X . . X . X -19: . . . X X X . . . . . . . . . . X X . X X . X X -20: . . . X X . . . . . . . . . . . . X . X X . X . -21: . . X . . . . . . . X X . X . X X . X . . X . X -22: X X X . . . . . . . . . . . . . X X . X X . X X -23: . X X . . . . . . . . . . . . X X . X X . X X X diff --git a/deal.II/contrib/umfpack/AMD/Demo/amd_demo2.c b/deal.II/contrib/umfpack/AMD/Demo/amd_demo2.c deleted file mode 100644 index 450d7c55ba..0000000000 --- a/deal.II/contrib/umfpack/AMD/Demo/amd_demo2.c +++ /dev/null @@ -1,261 +0,0 @@ -/* ========================================================================= */ -/* === AMD demo main program (jumbled matrix version) ====================== */ -/* ========================================================================= */ - -/* ------------------------------------------------------------------------- */ -/* AMD Version 1.1 (Jan. 21, 2004), Copyright (c) 2004 by Timothy A. Davis, */ -/* Patrick R. Amestoy, and Iain S. Duff. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ -/* web: http://www.cise.ufl.edu/research/sparse/amd */ -/* ------------------------------------------------------------------------- */ - -/* A simple C main program that illustrates the use of the ANSI C interface - * to AMD. - * - * Identical to amd_demo.c, except that it operates on an input matrix that has - * unsorted columns and duplicate entries. - */ - -#include "amd.h" -#include -#include - -int main (int argc, char **argv) -{ - /* The symmetric can_24 Harwell/Boeing matrix (jumbled, and not symmetric). - * Since AMD operates on A+A', only A(i,j) or A(j,i) need to be specified, - * or both. The diagonal entries are optional (some are missing). - * There are many duplicate entries, which must be removed. */ - int n = 24, nz, - Ap [ ] = { 0, 9, 14, 20, 28, 33, 37, 44, 53, 58, 63, 63, 66, 69, 72, 75, - 78, 82, 86, 91, 97, 101, 112, 112, 116 }, - Ai [ ] = { - /* column 0: */ 0, 17, 18, 21, 5, 12, 5, 0, 13, - /* column 1: */ 14, 1, 8, 13, 17, - /* column 2: */ 2, 20, 11, 6, 11, 22, - /* column 3: */ 3, 3, 10, 7, 18, 18, 15, 19, - /* column 4: */ 7, 9, 15, 14, 16, - /* column 5: */ 5, 13, 6, 17, - /* column 6: */ 5, 0, 11, 6, 12, 6, 23, - /* column 7: */ 3, 4, 9, 7, 14, 16, 15, 17, 18, - /* column 8: */ 1, 9, 14, 14, 14, - /* column 9: */ 7, 13, 8, 1, 17, - /* column 10: */ - /* column 11: */ 2, 12, 23, - /* column 12: */ 5, 11, 12, - /* column 13: */ 0, 13, 17, - /* column 14: */ 1, 9, 14, - /* column 15: */ 3, 15, 16, - /* column 16: */ 16, 4, 4, 15, - /* column 17: */ 13, 17, 19, 17, - /* column 18: */ 15, 17, 19, 9, 10, - /* column 19: */ 17, 19, 20, 0, 6, 10, - /* column 20: */ 22, 10, 20, 21, - /* column 21: */ 6, 2, 10, 19, 20, 11, 21, 22, 22, 22, 22, - /* column 22: */ - /* column 23: */ 12, 11, 12, 23 } ; - - int Rp [25], Ri [116] ; - int P [24], Pinv [24], i, j, k, jnew, p, inew, result ; - double Control [AMD_CONTROL], Info [AMD_INFO] ; - char A [24][24] ; - - printf ("AMD demo, with a jumbled version of the 24-by-24\n") ; - printf ("Harwell/Boeing matrix, can_24:\n") ; - - /* get the default parameters, and print them */ - amd_defaults (Control) ; - amd_control (Control) ; - - /* print the input matrix */ - nz = Ap [n] ; - printf ("\nJumbled input matrix: %d-by-%d, with %d entries.\n" - " Note that for a symmetric matrix such as this one, only the\n" - " strictly lower or upper triangular parts would need to be\n" - " passed to AMD, since AMD computes the ordering of A+A'. The\n" - " diagonal entries are also not needed, since AMD ignores them.\n" - " This version of the matrix has jumbled columns and duplicate\n" - " row indices, and must be fixed by amd_preprocess prior to\n" - " ordering it with amd_order.\n" , n, n, nz) ; - for (j = 0 ; j < n ; j++) - { - printf ("\nColumn: %d, number of entries: %d, with row indices in" - " Ai [%d ... %d]:\n row indices:", - j, Ap [j+1] - Ap [j], Ap [j], Ap [j+1]-1) ; - for (p = Ap [j] ; p < Ap [j+1] ; p++) - { - i = Ai [p] ; - printf (" %d", i) ; - } - printf ("\n") ; - } - - /* print a character plot of the input matrix. This is only reasonable - * because the matrix is small. */ - printf ("\nPlot of (jumbled) input matrix pattern:\n") ; - for (j = 0 ; j < n ; j++) - { - for (i = 0 ; i < n ; i++) A [i][j] = '.' ; - for (p = Ap [j] ; p < Ap [j+1] ; p++) - { - i = Ai [p] ; - A [i][j] = 'X' ; - } - } - printf (" ") ; - for (j = 0 ; j < n ; j++) printf (" %1d", j % 10) ; - printf ("\n") ; - for (i = 0 ; i < n ; i++) - { - printf ("%2d: ", i) ; - for (j = 0 ; j < n ; j++) - { - printf (" %c", A [i][j]) ; - } - printf ("\n") ; - } - - /* sort, remove duplicates, and transpose A to get R */ - result = amd_preprocess (n, Ap, Ai, Rp, Ri) ; - printf ("return value from amd_preprocess: %d (should be %d)\n", - result, AMD_OK) ; - - if (result != AMD_OK) - { - printf ("AMD failed\n") ; - exit (1) ; - } - - /* print the sorted/transposed matrix R */ - printf ("\nThe column-oriented form of the sorted/transposed matrix R:\n"); - for (j = 0 ; j < n ; j++) - { - printf ("\nColumn: %d, number of entries: %d, with row indices in" - " Ri [%d ... %d]:\n row indices:", - j, Rp [j+1] - Rp [j], Rp [j], Rp [j+1]-1) ; - for (p = Rp [j] ; p < Rp [j+1] ; p++) - { - i = Ri [p] ; - printf (" %d", i) ; - } - printf ("\n") ; - } - - /* print a character plot of the matrix R. */ - printf ("\nPlot of the sorted/transposed matrix R:\n") ; - for (j = 0 ; j < n ; j++) - { - for (i = 0 ; i < n ; i++) A [i][j] = '.' ; - for (p = Rp [j] ; p < Rp [j+1] ; p++) - { - i = Ri [p] ; - A [i][j] = 'X' ; - } - } - printf (" ") ; - for (j = 0 ; j < n ; j++) printf (" %1d", j % 10) ; - printf (" \n") ; - for (i = 0 ; i < n ; i++) - { - printf ("%2d: ", i) ; - for (j = 0 ; j < n ; j++) - { - printf (" %c", A [i][j]) ; - } - printf (" \n") ; - } - - /* print a character plot of the matrix R+R'. */ - printf ("\nPlot of symmetric matrix to be ordered by amd_order:\n") ; - for (j = 0 ; j < n ; j++) - { - for (i = 0 ; i < n ; i++) A [i][j] = '.' ; - } - for (j = 0 ; j < n ; j++) - { - A [j][j] = 'X' ; - for (p = Rp [j] ; p < Rp [j+1] ; p++) - { - i = Ri [p] ; - A [i][j] = 'X' ; - A [j][i] = 'X' ; - } - } - printf (" ") ; - for (j = 0 ; j < n ; j++) printf (" %1d", j % 10) ; - printf ("\n") ; - for (i = 0 ; i < n ; i++) - { - printf ("%2d: ", i) ; - for (j = 0 ; j < n ; j++) - { - printf (" %c", A [i][j]) ; - } - printf ("\n") ; - } - - /* order the matrix */ - result = amd_order (n, Rp, Ri, P, Control, Info) ; - printf ("return value from amd_order: %d (should be %d)\n", - result, AMD_OK) ; - - /* print the statistics */ - amd_info (Info) ; - - if (result != AMD_OK) - { - printf ("AMD failed\n") ; - exit (1) ; - } - - /* print the permutation vector, P, and compute the inverse permutation */ - printf ("Permutation vector:\n") ; - for (k = 0 ; k < n ; k++) - { - /* row/column j is the kth row/column in the permuted matrix */ - j = P [k] ; - Pinv [j] = k ; - printf (" %2d", j) ; - } - printf ("\n\n") ; - - printf ("Inverse permutation vector:\n") ; - for (j = 0 ; j < n ; j++) - { - k = Pinv [j] ; - printf (" %2d", k) ; - } - printf ("\n\n") ; - - /* print a character plot of the permuted matrix. */ - printf ("\nPlot of (symmetrized) permuted matrix pattern:\n") ; - for (j = 0 ; j < n ; j++) - { - for (i = 0 ; i < n ; i++) A [i][j] = '.' ; - } - for (jnew = 0 ; jnew < n ; jnew++) - { - j = P [jnew] ; - A [jnew][jnew] = 'X' ; - for (p = Rp [j] ; p < Rp [j+1] ; p++) - { - inew = Pinv [Ri [p]] ; - A [inew][jnew] = 'X' ; - A [jnew][inew] = 'X' ; - } - } - printf (" ") ; - for (j = 0 ; j < n ; j++) printf (" %1d", j % 10) ; - printf ("\n") ; - for (i = 0 ; i < n ; i++) - { - printf ("%2d: ", i) ; - for (j = 0 ; j < n ; j++) - { - printf (" %c", A [i][j]) ; - } - printf ("\n") ; - } - - return (0) ; -} diff --git a/deal.II/contrib/umfpack/AMD/Demo/amd_demo2.out b/deal.II/contrib/umfpack/AMD/Demo/amd_demo2.out deleted file mode 100644 index c03e8d5690..0000000000 --- a/deal.II/contrib/umfpack/AMD/Demo/amd_demo2.out +++ /dev/null @@ -1,310 +0,0 @@ -AMD demo, with a jumbled version of the 24-by-24 -Harwell/Boeing matrix, can_24: - -amd: approximate minimum degree ordering, parameters: - dense row parameter: 10 - (rows with more than max (10 * sqrt (n), 16) entries are - considered "dense", and placed last in output permutation) - aggressive absorption: yes - - -Jumbled input matrix: 24-by-24, with 116 entries. - Note that for a symmetric matrix such as this one, only the - strictly lower or upper triangular parts would need to be - passed to AMD, since AMD computes the ordering of A+A'. The - diagonal entries are also not needed, since AMD ignores them. - This version of the matrix has jumbled columns and duplicate - row indices, and must be fixed by amd_preprocess prior to - ordering it with amd_order. - -Column: 0, number of entries: 9, with row indices in Ai [0 ... 8]: - row indices: 0 17 18 21 5 12 5 0 13 - -Column: 1, number of entries: 5, with row indices in Ai [9 ... 13]: - row indices: 14 1 8 13 17 - -Column: 2, number of entries: 6, with row indices in Ai [14 ... 19]: - row indices: 2 20 11 6 11 22 - -Column: 3, number of entries: 8, with row indices in Ai [20 ... 27]: - row indices: 3 3 10 7 18 18 15 19 - -Column: 4, number of entries: 5, with row indices in Ai [28 ... 32]: - row indices: 7 9 15 14 16 - -Column: 5, number of entries: 4, with row indices in Ai [33 ... 36]: - row indices: 5 13 6 17 - -Column: 6, number of entries: 7, with row indices in Ai [37 ... 43]: - row indices: 5 0 11 6 12 6 23 - -Column: 7, number of entries: 9, with row indices in Ai [44 ... 52]: - row indices: 3 4 9 7 14 16 15 17 18 - -Column: 8, number of entries: 5, with row indices in Ai [53 ... 57]: - row indices: 1 9 14 14 14 - -Column: 9, number of entries: 5, with row indices in Ai [58 ... 62]: - row indices: 7 13 8 1 17 - -Column: 10, number of entries: 0, with row indices in Ai [63 ... 62]: - row indices: - -Column: 11, number of entries: 3, with row indices in Ai [63 ... 65]: - row indices: 2 12 23 - -Column: 12, number of entries: 3, with row indices in Ai [66 ... 68]: - row indices: 5 11 12 - -Column: 13, number of entries: 3, with row indices in Ai [69 ... 71]: - row indices: 0 13 17 - -Column: 14, number of entries: 3, with row indices in Ai [72 ... 74]: - row indices: 1 9 14 - -Column: 15, number of entries: 3, with row indices in Ai [75 ... 77]: - row indices: 3 15 16 - -Column: 16, number of entries: 4, with row indices in Ai [78 ... 81]: - row indices: 16 4 4 15 - -Column: 17, number of entries: 4, with row indices in Ai [82 ... 85]: - row indices: 13 17 19 17 - -Column: 18, number of entries: 5, with row indices in Ai [86 ... 90]: - row indices: 15 17 19 9 10 - -Column: 19, number of entries: 6, with row indices in Ai [91 ... 96]: - row indices: 17 19 20 0 6 10 - -Column: 20, number of entries: 4, with row indices in Ai [97 ... 100]: - row indices: 22 10 20 21 - -Column: 21, number of entries: 11, with row indices in Ai [101 ... 111]: - row indices: 6 2 10 19 20 11 21 22 22 22 22 - -Column: 22, number of entries: 0, with row indices in Ai [112 ... 111]: - row indices: - -Column: 23, number of entries: 4, with row indices in Ai [112 ... 115]: - row indices: 12 11 12 23 - -Plot of (jumbled) input matrix pattern: - 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 - 0: X . . . . . X . . . . . . X . . . . . X . . . . - 1: . X . . . . . . X X . . . . X . . . . . . . . . - 2: . . X . . . . . . . . X . . . . . . . . . X . . - 3: . . . X . . . X . . . . . . . X . . . . . . . . - 4: . . . . . . . X . . . . . . . . X . . . . . . . - 5: X . . . . X X . . . . . X . . . . . . . . . . . - 6: . . X . . X X . . . . . . . . . . . . X . X . . - 7: . . . X X . . X . X . . . . . . . . . . . . . . - 8: . X . . . . . . . X . . . . . . . . . . . . . . - 9: . . . . X . . X X . . . . . X . . . X . . . . . -10: . . . X . . . . . . . . . . . . . . X X X X . . -11: . . X . . . X . . . . . X . . . . . . . . X . X -12: X . . . . . X . . . . X X . . . . . . . . . . X -13: X X . . . X . . . X . . . X . . . X . . . . . . -14: . X . . X . . X X . . . . . X . . . . . . . . . -15: . . . X X . . X . . . . . . . X X . X . . . . . -16: . . . . X . . X . . . . . . . X X . . . . . . . -17: X X . . . X . X . X . . . X . . . X X X . . . . -18: X . . X . . . X . . . . . . . . . . . . . . . . -19: . . . X . . . . . . . . . . . . . X X X . X . . -20: . . X . . . . . . . . . . . . . . . . X X X . . -21: X . . . . . . . . . . . . . . . . . . . X X . . -22: . . X . . . . . . . . . . . . . . . . . X X . . -23: . . . . . . X . . . . X . . . . . . . . . . . X -return value from amd_preprocess: 0 (should be 0) - -The column-oriented form of the sorted/transposed matrix R: - -Column: 0, number of entries: 4, with row indices in Ri [0 ... 3]: - row indices: 0 6 13 19 - -Column: 1, number of entries: 4, with row indices in Ri [4 ... 7]: - row indices: 1 8 9 14 - -Column: 2, number of entries: 3, with row indices in Ri [8 ... 10]: - row indices: 2 11 21 - -Column: 3, number of entries: 3, with row indices in Ri [11 ... 13]: - row indices: 3 7 15 - -Column: 4, number of entries: 2, with row indices in Ri [14 ... 15]: - row indices: 7 16 - -Column: 5, number of entries: 4, with row indices in Ri [16 ... 19]: - row indices: 0 5 6 12 - -Column: 6, number of entries: 5, with row indices in Ri [20 ... 24]: - row indices: 2 5 6 19 21 - -Column: 7, number of entries: 4, with row indices in Ri [25 ... 28]: - row indices: 3 4 7 9 - -Column: 8, number of entries: 2, with row indices in Ri [29 ... 30]: - row indices: 1 9 - -Column: 9, number of entries: 5, with row indices in Ri [31 ... 35]: - row indices: 4 7 8 14 18 - -Column: 10, number of entries: 5, with row indices in Ri [36 ... 40]: - row indices: 3 18 19 20 21 - -Column: 11, number of entries: 5, with row indices in Ri [41 ... 45]: - row indices: 2 6 12 21 23 - -Column: 12, number of entries: 5, with row indices in Ri [46 ... 50]: - row indices: 0 6 11 12 23 - -Column: 13, number of entries: 6, with row indices in Ri [51 ... 56]: - row indices: 0 1 5 9 13 17 - -Column: 14, number of entries: 5, with row indices in Ri [57 ... 61]: - row indices: 1 4 7 8 14 - -Column: 15, number of entries: 6, with row indices in Ri [62 ... 67]: - row indices: 3 4 7 15 16 18 - -Column: 16, number of entries: 4, with row indices in Ri [68 ... 71]: - row indices: 4 7 15 16 - -Column: 17, number of entries: 9, with row indices in Ri [72 ... 80]: - row indices: 0 1 5 7 9 13 17 18 19 - -Column: 18, number of entries: 3, with row indices in Ri [81 ... 83]: - row indices: 0 3 7 - -Column: 19, number of entries: 5, with row indices in Ri [84 ... 88]: - row indices: 3 17 18 19 21 - -Column: 20, number of entries: 4, with row indices in Ri [89 ... 92]: - row indices: 2 19 20 21 - -Column: 21, number of entries: 3, with row indices in Ri [93 ... 95]: - row indices: 0 20 21 - -Column: 22, number of entries: 3, with row indices in Ri [96 ... 98]: - row indices: 2 20 21 - -Column: 23, number of entries: 3, with row indices in Ri [99 ... 101]: - row indices: 6 11 23 - -Plot of the sorted/transposed matrix R: - 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 - 0: X . . . . X . . . . . . X X . . . X X . . X . . - 1: . X . . . . . . X . . . . X X . . X . . . . . . - 2: . . X . . . X . . . . X . . . . . . . . X . X . - 3: . . . X . . . X . . X . . . . X . . X X . . . . - 4: . . . . . . . X . X . . . . X X X . . . . . . . - 5: . . . . . X X . . . . . . X . . . X . . . . . . - 6: X . . . . X X . . . . X X . . . . . . . . . . X - 7: . . . X X . . X . X . . . . X X X X X . . . . . - 8: . X . . . . . . . X . . . . X . . . . . . . . . - 9: . X . . . . . X X . . . . X . . . X . . . . . . -10: . . . . . . . . . . . . . . . . . . . . . . . . -11: . . X . . . . . . . . . X . . . . . . . . . . X -12: . . . . . X . . . . . X X . . . . . . . . . . . -13: X . . . . . . . . . . . . X . . . X . . . . . . -14: . X . . . . . . . X . . . . X . . . . . . . . . -15: . . . X . . . . . . . . . . . X X . . . . . . . -16: . . . . X . . . . . . . . . . X X . . . . . . . -17: . . . . . . . . . . . . . X . . . X . X . . . . -18: . . . . . . . . . X X . . . . X . X . X . . . . -19: X . . . . . X . . . X . . . . . . X . X X . . . -20: . . . . . . . . . . X . . . . . . . . . X X X . -21: . . X . . . X . . . X X . . . . . . . X X X X . -22: . . . . . . . . . . . . . . . . . . . . . . . . -23: . . . . . . . . . . . X X . . . . . . . . . . X - -Plot of symmetric matrix to be ordered by amd_order: - 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 - 0: X . . . . X X . . . . . X X . . . X X X . X . . - 1: . X . . . . . . X X . . . X X . . X . . . . . . - 2: . . X . . . X . . . . X . . . . . . . . X X X . - 3: . . . X . . . X . . X . . . . X . . X X . . . . - 4: . . . . X . . X . X . . . . X X X . . . . . . . - 5: X . . . . X X . . . . . X X . . . X . . . . . . - 6: X . X . . X X . . . . X X . . . . . . X . X . X - 7: . . . X X . . X . X . . . . X X X X X . . . . . - 8: . X . . . . . . X X . . . . X . . . . . . . . . - 9: . X . . X . . X X X . . . X X . . X X . . . . . -10: . . . X . . . . . . X . . . . . . . X X X X . . -11: . . X . . . X . . . . X X . . . . . . . . X . X -12: X . . . . X X . . . . X X . . . . . . . . . . X -13: X X . . . X . . . X . . . X . . . X . . . . . . -14: . X . . X . . X X X . . . . X . . . . . . . . . -15: . . . X X . . X . . . . . . . X X . X . . . . . -16: . . . . X . . X . . . . . . . X X . . . . . . . -17: X X . . . X . X . X . . . X . . . X X X . . . . -18: X . . X . . . X . X X . . . . X . X X X . . . . -19: X . . X . . X . . . X . . . . . . X X X X X . . -20: . . X . . . . . . . X . . . . . . . . X X X X . -21: X . X . . . X . . . X X . . . . . . . X X X X . -22: . . X . . . . . . . . . . . . . . . . . X X X . -23: . . . . . . X . . . . X X . . . . . . . . . . X -return value from amd_order: 0 (should be 0) - -amd: approximate minimum degree ordering, results: - status: OK - n, dimension of A: 24 - nz, number of nonzeros in A: 102 - symmetry of A: 0.4000 - number of nonzeros on diagonal: 17 - nonzeros in pattern of A+A' (excl. diagonal): 136 - # dense rows/columns of A+A': 0 - memory used, in bytes: 1516 - # of memory compactions: 0 - - The following approximate statistics are for a subsequent - factorization of A(P,P) + A(P,P)'. They are slight upper - bounds if there are no dense rows/columns in A+A', and become - looser if dense rows/columns exist. - - nonzeros in L (excluding diagonal): 97 - nonzeros in L (including diagonal): 121 - # divide operations for LDL' or LU: 97 - # multiply-subtract operations for LDL': 275 - # multiply-subtract operations for LU: 453 - max nz. in any column of L (incl. diagonal): 8 - - chol flop count for real A, sqrt counted as 1 flop: 671 - LDL' flop count for real A: 647 - LDL' flop count for complex A: 3073 - LU flop count for real A (with no pivoting): 1003 - LU flop count for complex A (with no pivoting): 4497 - -Permutation vector: - 22 20 10 23 12 5 16 8 14 4 15 7 1 9 13 17 0 2 3 6 11 18 21 19 - -Inverse permutation vector: - 16 12 17 18 9 5 19 11 7 13 2 20 4 14 8 10 6 15 21 23 1 22 0 3 - - -Plot of (symmetrized) permuted matrix pattern: - 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 - 0: X X . . . . . . . . . . . . . . . X . . . . X . - 1: X X X . . . . . . . . . . . . . . X . . . . X X - 2: . X X . . . . . . . . . . . . . . . X . . X X X - 3: . . . X X . . . . . . . . . . . . . . X X . . . - 4: . . . X X X . . . . . . . . . . X . . X X . . . - 5: . . . . X X . . . . . . . . X X X . . X . . . . - 6: . . . . . . X . . X X X . . . . . . . . . . . . - 7: . . . . . . . X X . . . X X . . . . . . . . . . - 8: . . . . . . . X X X . X X X . . . . . . . . . . - 9: . . . . . . X . X X X X . X . . . . . . . . . . -10: . . . . . . X . . X X X . . . . . . X . . X . . -11: . . . . . . X . X X X X . X . X . . X . . X . . -12: . . . . . . . X X . . . X X X X . . . . . . . . -13: . . . . . . . X X X . X X X X X . . . . . X . . -14: . . . . . X . . . . . . X X X X X . . . . . . . -15: . . . . . X . . . . . X X X X X X . . . . X . X -16: . . . . X X . . . . . . . . X X X . . X . X X X -17: X X . . . . . . . . . . . . . . . X . X X . X . -18: . . X . . . . . . . X X . . . . . . X . . X . X -19: . . . X X X . . . . . . . . . . X X . X X . X X -20: . . . X X . . . . . . . . . . . . X . X X . X . -21: . . X . . . . . . . X X . X . X X . X . . X . X -22: X X X . . . . . . . . . . . . . X X . X X . X X -23: . X X . . . . . . . . . . . . X X . X X . X X X diff --git a/deal.II/contrib/umfpack/AMD/Demo/amd_f77cross.f b/deal.II/contrib/umfpack/AMD/Demo/amd_f77cross.f deleted file mode 100644 index ddbfd00268..0000000000 --- a/deal.II/contrib/umfpack/AMD/Demo/amd_f77cross.f +++ /dev/null @@ -1,51 +0,0 @@ -C ====================================================================== -C === AMD_cross ======================================================== -C ====================================================================== - -C ---------------------------------------------------------------------- -C AMD Version 1.1 (Jan. 21, 2004), Copyright (c) 2004 by Timothy A. -C Davis, Patrick R. Amestoy, and Iain S. Duff. See ../README for -C License. email: davis@cise.ufl.edu CISE Department, Univ. of -C Florida. web: http://www.cise.ufl.edu/research/sparse/amd -C ---------------------------------------------------------------------- - -C This program provides an example of how to call the C version of AMD -C from a Fortran program. It is HIGHLY non-portable. - -C The amd_order routine returns PERM (1) < 0 if an error occurs. -C (-1: out of memory, -2: invalid matrix) - -C Note that the input matrix is 0-based. From Fortran, column j of the -C matrix is in AI (AP (I)+1 ... AP (I+1)). The row indices in this -C set are in the range 0 to N-1. To demonstrate this translation, -C the input matrix is printed in 1-based form. This program uses -C the same 5-by-5 test matrix as amd_simple.c. - - INTEGER N, NZ, K, P - PARAMETER (N = 5, NZ = 14) - INTEGER AP (N+1), AI (NZ), PERM (N) - DATA AP / 0, 2, 6, 10, 12, 14 / - DATA AI / 0,1, 0,1,2,4, 1,2,3,4, 2,3, 1,4 / - DOUBLE PRECISION CONTROL (5), INFO (20) - -C print the input matrix - PRINT 10, N, N, NZ -10 FORMAT ('Input matrix:', I2, '-by-', I2, ' with',I3,' entries') - DO 40 J = 1, N - PRINT 20, J, AP (J+1) - AP (J), AP (J)+1, AP (J+1) -20 FORMAT ( /, 'Column: ', I2, ' number of entries: ', I2, - $ ' with row indices in AI (', I3, ' ... ', I3, ')') - PRINT 30, ((AI (P) + 1), P = AP (J) + 1, AP (J+1)) -30 FORMAT (' row indices: ', 24I3) -40 CONTINUE - - CALL AMDDEFAULTS (CONTROL) - CALL AMDORDER (N, AP, AI, PERM, CONTROL, INFO) - CALL AMDINFO (INFO) - - DO 60 K = 1, N - PRINT 50, K, PERM (K) + 1 -50 FORMAT ('PERM (',I2,') = ', I2) -60 CONTINUE - END - diff --git a/deal.II/contrib/umfpack/AMD/Demo/amd_f77cross.out b/deal.II/contrib/umfpack/AMD/Demo/amd_f77cross.out deleted file mode 100644 index 6d8a670da5..0000000000 --- a/deal.II/contrib/umfpack/AMD/Demo/amd_f77cross.out +++ /dev/null @@ -1,51 +0,0 @@ -Input matrix: 5-by- 5 with 14 entries - -Column: 1 number of entries: 2 with row indices in AI ( 1 ... 2) - row indices: 1 2 - -Column: 2 number of entries: 4 with row indices in AI ( 3 ... 6) - row indices: 1 2 3 5 - -Column: 3 number of entries: 4 with row indices in AI ( 7 ... 10) - row indices: 2 3 4 5 - -Column: 4 number of entries: 2 with row indices in AI ( 11 ... 12) - row indices: 3 4 - -Column: 5 number of entries: 2 with row indices in AI ( 13 ... 14) - row indices: 2 5 - -amd: approximate minimum degree ordering, results: - status: OK - n, dimension of A: 5 - nz, number of nonzeros in A: 14 - symmetry of A: 0.8889 - number of nonzeros on diagonal: 5 - nonzeros in pattern of A+A' (excl. diagonal): 10 - # dense rows/columns of A+A': 0 - memory used, in bytes: 228 - # of memory compactions: 0 - - The following approximate statistics are for a subsequent - factorization of A(P,P) + A(P,P)'. They are slight upper - bounds if there are no dense rows/columns in A+A', and become - looser if dense rows/columns exist. - - nonzeros in L (excluding diagonal): 5 - nonzeros in L (including diagonal): 10 - # divide operations for LDL' or LU: 5 - # multiply-subtract operations for LDL': 6 - # multiply-subtract operations for LU: 7 - max nz. in any column of L (incl. diagonal): 3 - - chol flop count for real A, sqrt counted as 1 flop: 22 - LDL' flop count for real A: 17 - LDL' flop count for complex A: 93 - LU flop count for real A (with no pivoting): 19 - LU flop count for complex A (with no pivoting): 101 - -PERM ( 1) = 1 -PERM ( 2) = 4 -PERM ( 3) = 3 -PERM ( 4) = 5 -PERM ( 5) = 2 diff --git a/deal.II/contrib/umfpack/AMD/Demo/amd_f77demo.f b/deal.II/contrib/umfpack/AMD/Demo/amd_f77demo.f deleted file mode 100644 index 3ed47ab206..0000000000 --- a/deal.II/contrib/umfpack/AMD/Demo/amd_f77demo.f +++ /dev/null @@ -1,161 +0,0 @@ -C ====================================================================== -C === Fortran AMD demo main program ==================================== -C ====================================================================== - -C ---------------------------------------------------------------------- -C AMD Version 1.1 (Jan. 21, 2004), Copyright (c) 2004 by Timothy A. -C Davis, Patrick R. Amestoy, and Iain S. Duff. See ../README for -C License. email: davis@cise.ufl.edu CISE Department, Univ. of -C Florida. web: http://www.cise.ufl.edu/research/sparse/amd -C ---------------------------------------------------------------------- - -C A simple Fortran 77 main program that illustrates the use of the -C Fortran version of AMD (both the AMD and AMDBAR routines). Note -C that aggressive absorption has no effect on this particular matrix. - -C AP and AI contain the symmetric can_24 Harwell/Boeing matrix, -C including upper and lower triangular parts, but excluding the -C diagonal entries. Note that this matrix is 1-based, with row -C and column indices in the range 1 to N. - - INTEGER N, NZ, IWLEN, PFREE, I, J, K, JNEW, P, INEW, - $ METHOD, NCMPA - PARAMETER (N = 24, NZ = 136, IWLEN = 200) - INTEGER PE (N), DEGREE (N), NV (N), NEXT (N), PERM (N), W (N), - $ HEAD (N), PINV (N), LEN (N), AP (N+1), AI (NZ), IW (IWLEN) - CHARACTER A (24,24) - - DATA AP - $ / 1, 9, 14, 19, 24, 29, 34, 42, 50, 53, 61, 66, 71, - $ 76, 81, 86, 91, 94, 102, 110, 118, 123, 131, 134, 137 / - DATA AI / - $ 6, 7, 13, 14, 18, 19, 20, 22, - $ 9, 10, 14, 15, 18, - $ 7, 12, 21, 22, 23, - $ 8, 11, 16, 19, 20, - $ 8, 10, 15, 16, 17, - $ 1, 7, 13, 14, 18, - $ 1, 3, 6, 12, 13, 20, 22, 24, - $ 4, 5, 10, 15, 16, 17, 18, 19, - $ 2, 10, 15, - $ 2, 5, 8, 9, 14, 15, 18, 19, - $ 4, 19, 20, 21, 22, - $ 3, 7, 13, 22, 24, - $ 1, 6, 7, 12, 24, - $ 1, 2, 6, 10, 18, - $ 2, 5, 8, 9, 10, - $ 4, 5, 8, 17, 19, - $ 5, 8, 16, - $ 1, 2, 6, 8, 10, 14, 19, 20, - $ 1, 4, 8, 10, 11, 16, 18, 20, - $ 1, 4, 7, 11, 18, 19, 21, 22, - $ 3, 11, 20, 22, 23, - $ 1, 3, 7, 11, 12, 20, 21, 23, - $ 3, 21, 22, - $ 7, 12, 13 / - -C print the input matrix - PRINT 11, N, N, NZ -11 FORMAT ('AMD Fortran 77 demo, with the 24-by-24', - $ ' Harwell/Boeing matrix, can_24:' - $ /, 'Input matrix: ', I2, '-by-', I2,' with ',I3,' entries', - $ /, 'Note that the Fortran version of AMD requires that' - $ /, 'no diagonal entries be present.') - DO 20 J = 1, N - PRINT 21, J, AP (J+1) - AP (J), AP (J), AP (J+1)-1 -21 FORMAT ( /, 'Column: ', I2, ' number of entries: ', I2, - $ ' with row indices in AI (', I3, ' ... ', I3, ')') - PRINT 10, ((AI (P)), P = AP (J), AP (J+1) - 1) -10 FORMAT (' row indices: ', 24I3) -20 CONTINUE - -C print a character plot of the input matrix. This is only -C reasonable because the matrix is small. - PRINT 31 -31 FORMAT ('Plot of input matrix pattern:') - DO 50 J = 1,N - DO 30 I = 1,N - A (I, J) = '.' -30 CONTINUE -C add the diagonal entry to the plot - A (J, J) = 'X' - DO 40 P = AP (J), AP (J+1) - 1 - I = AI (P) - A (I, J) = 'X' -40 CONTINUE -50 CONTINUE - PRINT 60, ((MOD (J, 10)), J = 1,N) -60 FORMAT (' ', 24I2) - DO 80 I = 1,N - PRINT 70, I, (A (I, J), J = 1,N) -70 FORMAT (' ', I2, ': ', 24A2) -80 CONTINUE - - DO 190 METHOD = 1,2 - -C load the matrix into AMD's workspace - DO 90 J = 1,N - PE (J) = AP (J) - LEN (J) = AP (J+1) - AP (J) -90 CONTINUE - DO 100 P = 1,NZ - IW (P) = AI (P) -100 CONTINUE - PFREE = NZ + 1 - -C order the matrix using AMD or AMDBAR - IF (METHOD .EQ. 1) THEN - PRINT 101 -101 FORMAT (/, '------------------------------------------', - $ /, 'ordering the matrix with AMD', - $ /, '------------------------------------------') - CALL AMD (N, PE, IW, LEN, IWLEN, PFREE, NV, NEXT, - $ PERM, HEAD, PINV, DEGREE, NCMPA, W) - ELSE - PRINT 102 -102 FORMAT (/, '------------------------------------------', - $ /, 'ordering the matrix with AMDBAR', - $ /, '------------------------------------------') - CALL AMDBAR (N, PE, IW, LEN, IWLEN, PFREE, NV, NEXT, - $ PERM, HEAD, PINV, DEGREE, NCMPA, W) - ENDIF - -C print the permutation vector, PERM, and its inverse, PINV. -C row/column J = PERM (K) is the Kth row/column in the -C permuted matrix. - PRINT 110, (PERM (K), K = 1,N) -110 FORMAT (/, 'Permutation vector: ', /, 24I3) - PRINT 120, (PINV (J), J = 1,N) -120 FORMAT (/, 'Inverse permutation vector: ', /, 24I3) - -C print a character plot of the permuted matrix. - PRINT 121 -121 FORMAT ('Plot of permuted matrix pattern:') - DO 150 JNEW = 1,N - J = PERM (JNEW) - DO 130 INEW = 1,N - A (INEW, JNEW) = '.' -130 CONTINUE -C add the diagonal entry to the plot - A (JNEW, JNEW) = 'X' - DO 140 P = AP (J), AP (J+1) - 1 - INEW = PINV (AI (P)) - A (INEW, JNEW) = 'X' -140 CONTINUE -150 CONTINUE - PRINT 60, ((MOD (J, 10)), J = 1,N) - DO 160 I = 1,N - PRINT 70, I, (A (I, J), J = 1,N) -160 CONTINUE - -C print the permuted matrix, PERM*A*PERM' - DO 180 JNEW = 1,N - J = PERM (JNEW) - PRINT 171, JNEW, J, AP (J+1) - AP (J) -171 FORMAT (/, 'New column: ', I2, ' old column: ', I2, - $ ' number of entries: ', I2) - PRINT 170, (PINV (AI (P)), P = AP (J), AP (J+1) - 1) -170 FORMAT (' new row indices: ', 24I3) -180 CONTINUE -190 CONTINUE - END diff --git a/deal.II/contrib/umfpack/AMD/Demo/amd_f77demo.out b/deal.II/contrib/umfpack/AMD/Demo/amd_f77demo.out deleted file mode 100644 index 10758dd511..0000000000 --- a/deal.II/contrib/umfpack/AMD/Demo/amd_f77demo.out +++ /dev/null @@ -1,318 +0,0 @@ -AMD Fortran 77 demo, with the 24-by-24 Harwell/Boeing matrix, can_24: -Input matrix: 24-by-24 with 136 entries -Note that the Fortran version of AMD requires that -no diagonal entries be present. - -Column: 1 number of entries: 8 with row indices in AI ( 1 ... 8) - row indices: 6 7 13 14 18 19 20 22 - -Column: 2 number of entries: 5 with row indices in AI ( 9 ... 13) - row indices: 9 10 14 15 18 - -Column: 3 number of entries: 5 with row indices in AI ( 14 ... 18) - row indices: 7 12 21 22 23 - -Column: 4 number of entries: 5 with row indices in AI ( 19 ... 23) - row indices: 8 11 16 19 20 - -Column: 5 number of entries: 5 with row indices in AI ( 24 ... 28) - row indices: 8 10 15 16 17 - -Column: 6 number of entries: 5 with row indices in AI ( 29 ... 33) - row indices: 1 7 13 14 18 - -Column: 7 number of entries: 8 with row indices in AI ( 34 ... 41) - row indices: 1 3 6 12 13 20 22 24 - -Column: 8 number of entries: 8 with row indices in AI ( 42 ... 49) - row indices: 4 5 10 15 16 17 18 19 - -Column: 9 number of entries: 3 with row indices in AI ( 50 ... 52) - row indices: 2 10 15 - -Column: 10 number of entries: 8 with row indices in AI ( 53 ... 60) - row indices: 2 5 8 9 14 15 18 19 - -Column: 11 number of entries: 5 with row indices in AI ( 61 ... 65) - row indices: 4 19 20 21 22 - -Column: 12 number of entries: 5 with row indices in AI ( 66 ... 70) - row indices: 3 7 13 22 24 - -Column: 13 number of entries: 5 with row indices in AI ( 71 ... 75) - row indices: 1 6 7 12 24 - -Column: 14 number of entries: 5 with row indices in AI ( 76 ... 80) - row indices: 1 2 6 10 18 - -Column: 15 number of entries: 5 with row indices in AI ( 81 ... 85) - row indices: 2 5 8 9 10 - -Column: 16 number of entries: 5 with row indices in AI ( 86 ... 90) - row indices: 4 5 8 17 19 - -Column: 17 number of entries: 3 with row indices in AI ( 91 ... 93) - row indices: 5 8 16 - -Column: 18 number of entries: 8 with row indices in AI ( 94 ... 101) - row indices: 1 2 6 8 10 14 19 20 - -Column: 19 number of entries: 8 with row indices in AI (102 ... 109) - row indices: 1 4 8 10 11 16 18 20 - -Column: 20 number of entries: 8 with row indices in AI (110 ... 117) - row indices: 1 4 7 11 18 19 21 22 - -Column: 21 number of entries: 5 with row indices in AI (118 ... 122) - row indices: 3 11 20 22 23 - -Column: 22 number of entries: 8 with row indices in AI (123 ... 130) - row indices: 1 3 7 11 12 20 21 23 - -Column: 23 number of entries: 3 with row indices in AI (131 ... 133) - row indices: 3 21 22 - -Column: 24 number of entries: 3 with row indices in AI (134 ... 136) - row indices: 7 12 13 -Plot of input matrix pattern: - 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 - 1: X . . . . X X . . . . . X X . . . X X X . X . . - 2: . X . . . . . . X X . . . X X . . X . . . . . . - 3: . . X . . . X . . . . X . . . . . . . . X X X . - 4: . . . X . . . X . . X . . . . X . . X X . . . . - 5: . . . . X . . X . X . . . . X X X . . . . . . . - 6: X . . . . X X . . . . . X X . . . X . . . . . . - 7: X . X . . X X . . . . X X . . . . . . X . X . X - 8: . . . X X . . X . X . . . . X X X X X . . . . . - 9: . X . . . . . . X X . . . . X . . . . . . . . . - 10: . X . . X . . X X X . . . X X . . X X . . . . . - 11: . . . X . . . . . . X . . . . . . . X X X X . . - 12: . . X . . . X . . . . X X . . . . . . . . X . X - 13: X . . . . X X . . . . X X . . . . . . . . . . X - 14: X X . . . X . . . X . . . X . . . X . . . . . . - 15: . X . . X . . X X X . . . . X . . . . . . . . . - 16: . . . X X . . X . . . . . . . X X . X . . . . . - 17: . . . . X . . X . . . . . . . X X . . . . . . . - 18: X X . . . X . X . X . . . X . . . X X X . . . . - 19: X . . X . . . X . X X . . . . X . X X X . . . . - 20: X . . X . . X . . . X . . . . . . X X X X X . . - 21: . . X . . . . . . . X . . . . . . . . X X X X . - 22: X . X . . . X . . . X X . . . . . . . X X X X . - 23: . . X . . . . . . . . . . . . . . . . . X X X . - 24: . . . . . . X . . . . X X . . . . . . . . . . X - ------------------------------------------- -ordering the matrix with AMD ------------------------------------------- - -Permutation vector: - 24 23 17 9 15 5 21 13 6 11 16 8 2 10 14 18 1 3 4 19 7 12 22 20 - -Inverse permutation vector: - 17 13 18 19 6 9 21 12 4 14 10 22 8 15 5 11 3 16 20 24 7 23 2 1 -Plot of permuted matrix pattern: - 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 - 1: X . . . . . . X . . . . . . . . . . . . X X . . - 2: . X . . . . X . . . . . . . . . . X . . . . X . - 3: . . X . . X . . . . X X . . . . . . . . . . . . - 4: . . . X X . . . . . . . X X . . . . . . . . . . - 5: . . . X X X . . . . . X X X . . . . . . . . . . - 6: . . X . X X . . . . X X . X . . . . . . . . . . - 7: . X . . . . X . . X . . . . . . . X . . . . X X - 8: X . . . . . . X X . . . . . . . X . . . X X . . - 9: . . . . . . . X X . . . . . X X X . . . X . . . - 10: . . . . . . X . . X . . . . . . . . X X . . X X - 11: . . X . . X . . . . X X . . . . . . X X . . . . - 12: . . X . X X . . . . X X . X . X . . X X . . . . - 13: . . . X X . . . . . . . X X X X . . . . . . . . - 14: . . . X X X . . . . . X X X X X . . . X . . . . - 15: . . . . . . . . X . . . X X X X X . . . . . . . - 16: . . . . . . . . X . . X X X X X X . . X . . . X - 17: . . . . . . . X X . . . . . X X X . . X X . X X - 18: . X . . . . X . . . . . . . . . . X . . X X X . - 19: . . . . . . . . . X X X . . . . . . X X . . . X - 20: . . . . . . . . . X X X . X . X X . X X . . . X - 21: X . . . . . . X X . . . . . . . X X . . X X X X - 22: X . . . . . . X . . . . . . . . . X . . X X X . - 23: . X . . . . X . . X . . . . . . X X . . X X X X - 24: . . . . . . X . . X . . . . . X X . X X X . X X - -New column: 1 old column: 24 number of entries: 3 - new row indices: 21 22 8 - -New column: 2 old column: 23 number of entries: 3 - new row indices: 18 7 23 - -New column: 3 old column: 17 number of entries: 3 - new row indices: 6 12 11 - -New column: 4 old column: 9 number of entries: 3 - new row indices: 13 14 5 - -New column: 5 old column: 15 number of entries: 5 - new row indices: 13 6 12 4 14 - -New column: 6 old column: 5 number of entries: 5 - new row indices: 12 14 5 11 3 - -New column: 7 old column: 21 number of entries: 5 - new row indices: 18 10 24 23 2 - -New column: 8 old column: 13 number of entries: 5 - new row indices: 17 9 21 22 1 - -New column: 9 old column: 6 number of entries: 5 - new row indices: 17 21 8 15 16 - -New column: 10 old column: 11 number of entries: 5 - new row indices: 19 20 24 7 23 - -New column: 11 old column: 16 number of entries: 5 - new row indices: 19 6 12 3 20 - -New column: 12 old column: 8 number of entries: 8 - new row indices: 19 6 14 5 11 3 16 20 - -New column: 13 old column: 2 number of entries: 5 - new row indices: 4 14 15 5 16 - -New column: 14 old column: 10 number of entries: 8 - new row indices: 13 6 12 4 15 5 16 20 - -New column: 15 old column: 14 number of entries: 5 - new row indices: 17 13 9 14 16 - -New column: 16 old column: 18 number of entries: 8 - new row indices: 17 13 9 12 14 15 20 24 - -New column: 17 old column: 1 number of entries: 8 - new row indices: 9 21 8 15 16 20 24 23 - -New column: 18 old column: 3 number of entries: 5 - new row indices: 21 22 7 23 2 - -New column: 19 old column: 4 number of entries: 5 - new row indices: 12 10 11 20 24 - -New column: 20 old column: 19 number of entries: 8 - new row indices: 17 19 12 14 10 11 16 24 - -New column: 21 old column: 7 number of entries: 8 - new row indices: 17 18 9 22 8 24 23 1 - -New column: 22 old column: 12 number of entries: 5 - new row indices: 18 21 8 23 1 - -New column: 23 old column: 22 number of entries: 8 - new row indices: 17 18 21 10 22 24 7 2 - -New column: 24 old column: 20 number of entries: 8 - new row indices: 17 19 21 10 16 20 7 23 - ------------------------------------------- -ordering the matrix with AMDBAR ------------------------------------------- - -Permutation vector: - 24 23 17 9 15 5 21 13 6 11 16 8 2 10 14 18 1 3 4 19 7 12 22 20 - -Inverse permutation vector: - 17 13 18 19 6 9 21 12 4 14 10 22 8 15 5 11 3 16 20 24 7 23 2 1 -Plot of permuted matrix pattern: - 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 - 1: X . . . . . . X . . . . . . . . . . . . X X . . - 2: . X . . . . X . . . . . . . . . . X . . . . X . - 3: . . X . . X . . . . X X . . . . . . . . . . . . - 4: . . . X X . . . . . . . X X . . . . . . . . . . - 5: . . . X X X . . . . . X X X . . . . . . . . . . - 6: . . X . X X . . . . X X . X . . . . . . . . . . - 7: . X . . . . X . . X . . . . . . . X . . . . X X - 8: X . . . . . . X X . . . . . . . X . . . X X . . - 9: . . . . . . . X X . . . . . X X X . . . X . . . - 10: . . . . . . X . . X . . . . . . . . X X . . X X - 11: . . X . . X . . . . X X . . . . . . X X . . . . - 12: . . X . X X . . . . X X . X . X . . X X . . . . - 13: . . . X X . . . . . . . X X X X . . . . . . . . - 14: . . . X X X . . . . . X X X X X . . . X . . . . - 15: . . . . . . . . X . . . X X X X X . . . . . . . - 16: . . . . . . . . X . . X X X X X X . . X . . . X - 17: . . . . . . . X X . . . . . X X X . . X X . X X - 18: . X . . . . X . . . . . . . . . . X . . X X X . - 19: . . . . . . . . . X X X . . . . . . X X . . . X - 20: . . . . . . . . . X X X . X . X X . X X . . . X - 21: X . . . . . . X X . . . . . . . X X . . X X X X - 22: X . . . . . . X . . . . . . . . . X . . X X X . - 23: . X . . . . X . . X . . . . . . X X . . X X X X - 24: . . . . . . X . . X . . . . . X X . X X X . X X - -New column: 1 old column: 24 number of entries: 3 - new row indices: 21 22 8 - -New column: 2 old column: 23 number of entries: 3 - new row indices: 18 7 23 - -New column: 3 old column: 17 number of entries: 3 - new row indices: 6 12 11 - -New column: 4 old column: 9 number of entries: 3 - new row indices: 13 14 5 - -New column: 5 old column: 15 number of entries: 5 - new row indices: 13 6 12 4 14 - -New column: 6 old column: 5 number of entries: 5 - new row indices: 12 14 5 11 3 - -New column: 7 old column: 21 number of entries: 5 - new row indices: 18 10 24 23 2 - -New column: 8 old column: 13 number of entries: 5 - new row indices: 17 9 21 22 1 - -New column: 9 old column: 6 number of entries: 5 - new row indices: 17 21 8 15 16 - -New column: 10 old column: 11 number of entries: 5 - new row indices: 19 20 24 7 23 - -New column: 11 old column: 16 number of entries: 5 - new row indices: 19 6 12 3 20 - -New column: 12 old column: 8 number of entries: 8 - new row indices: 19 6 14 5 11 3 16 20 - -New column: 13 old column: 2 number of entries: 5 - new row indices: 4 14 15 5 16 - -New column: 14 old column: 10 number of entries: 8 - new row indices: 13 6 12 4 15 5 16 20 - -New column: 15 old column: 14 number of entries: 5 - new row indices: 17 13 9 14 16 - -New column: 16 old column: 18 number of entries: 8 - new row indices: 17 13 9 12 14 15 20 24 - -New column: 17 old column: 1 number of entries: 8 - new row indices: 9 21 8 15 16 20 24 23 - -New column: 18 old column: 3 number of entries: 5 - new row indices: 21 22 7 23 2 - -New column: 19 old column: 4 number of entries: 5 - new row indices: 12 10 11 20 24 - -New column: 20 old column: 19 number of entries: 8 - new row indices: 17 19 12 14 10 11 16 24 - -New column: 21 old column: 7 number of entries: 8 - new row indices: 17 18 9 22 8 24 23 1 - -New column: 22 old column: 12 number of entries: 5 - new row indices: 18 21 8 23 1 - -New column: 23 old column: 22 number of entries: 8 - new row indices: 17 18 21 10 22 24 7 2 - -New column: 24 old column: 20 number of entries: 8 - new row indices: 17 19 21 10 16 20 7 23 diff --git a/deal.II/contrib/umfpack/AMD/Demo/amd_f77simple.f b/deal.II/contrib/umfpack/AMD/Demo/amd_f77simple.f deleted file mode 100644 index ef189fb416..0000000000 --- a/deal.II/contrib/umfpack/AMD/Demo/amd_f77simple.f +++ /dev/null @@ -1,38 +0,0 @@ -C ---------------------------------------------------------------------- -C AMD Version 1.1 (Jan. 21, 2004), Copyright (c) 2004 by Timothy A. -C Davis, Patrick R. Amestoy, and Iain S. Duff. See ../README for -C License. email: davis@cise.ufl.edu CISE Department, Univ. of -C Florida. web: http://www.cise.ufl.edu/research/sparse/amd -C ---------------------------------------------------------------------- - -C This program provides an example of how to call the Fortran version -C of AMD. It uses the same matrix as the amd_simple.c demo (in C). -C Note that the diagonal entries are not present, and the matrix is -C symmetric. - - INTEGER N, NZ, J, K, P, IWLEN, PFREE, NCMPA - PARAMETER (N = 5, NZ = 10, IWLEN = 17) - INTEGER AP (N+1), AI (NZ), LAST (N), PE (N), LEN (N), ELEN (N), - $ IW (IWLEN), DEGREE (N), NV (N), NEXT (N), HEAD (N), W (N) - DATA AP / 1, 2, 5, 8, 9, 11/ - DATA AI / 2, 1,3,5, 2,4,5, 3, 2,3 / - -C load the matrix into the AMD workspace - DO 10 J = 1,N - PE (J) = AP (J) - LEN (J) = AP (J+1) - AP (J) -10 CONTINUE - DO 20 P = 1,NZ - IW (P) = AI (P) -20 CONTINUE - PFREE = NZ + 1 - -C order the matrix (destroys the copy of A in IW, PE, and LEN) - CALL AMD (N, PE, IW, LEN, IWLEN, PFREE, NV, NEXT, LAST, HEAD, - $ ELEN, DEGREE, NCMPA, W) - - DO 60 K = 1, N - PRINT 50, K, LAST (K) -50 FORMAT ('P (',I2,') = ', I2) -60 CONTINUE - END diff --git a/deal.II/contrib/umfpack/AMD/Demo/amd_f77simple.out b/deal.II/contrib/umfpack/AMD/Demo/amd_f77simple.out deleted file mode 100644 index c7f902e0a4..0000000000 --- a/deal.II/contrib/umfpack/AMD/Demo/amd_f77simple.out +++ /dev/null @@ -1,5 +0,0 @@ -P ( 1) = 4 -P ( 2) = 1 -P ( 3) = 3 -P ( 4) = 5 -P ( 5) = 2 diff --git a/deal.II/contrib/umfpack/AMD/Demo/amd_f77wrapper.c b/deal.II/contrib/umfpack/AMD/Demo/amd_f77wrapper.c deleted file mode 100644 index 01802b8fa7..0000000000 --- a/deal.II/contrib/umfpack/AMD/Demo/amd_f77wrapper.c +++ /dev/null @@ -1,108 +0,0 @@ -/* ========================================================================= */ -/* === amd_f77wrapper ====================================================== */ -/* ========================================================================= */ - -/* ------------------------------------------------------------------------- */ -/* AMD Version 1.1 (Jan. 21, 2004), Copyright (c) 2004 by Timothy A. Davis, */ -/* Patrick R. Amestoy, and Iain S. Duff. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ -/* web: http://www.cise.ufl.edu/research/sparse/amd */ -/* ------------------------------------------------------------------------- */ - -/* Fortran interface for the C-callable AMD library (int version only). This - * is HIGHLY non-portable. You will need to modify this depending on how your - * Fortran and C compilers behave. Two examples are provided. - * - * To avoid using I/O, and to avoid the extra porting step of a Fortran - * function, the status code is returned as the first entry in P (P [0] in C - * and P (1) in Fortran) if an error occurs. The error codes are negative - * (-1: out of memory, -2: invalid matrix). - * - * For some C and Fortran compilers, the Fortran compiler appends a single "_" - * after each routine name. C doesn't do this, so the translation is made - * here. Some Fortran compilers don't append an underscore (xlf on IBM AIX, - * for * example). - * - * Tested with the following compilers: - * Solaris with cc and f77 from Sun WorkShop 6 update 1. - * SGI Irix with MIPSpro cc and f77 compilers version 7.4 - * Linux with GNU gcc or Intel's icc, and GNU g77 Intel's ifc Fortran compiler. - * (any combination). Note that with g77, a call to amd_order in Fortran - * gets translated to a call to amd_order__, with two underscores ("_"). - * Thus, the Fortran names do not include an underscore. - */ - -#include "amd.h" -#include - -/* ------------------------------------------------------------------------- */ -/* Linux, Solaris, SGI */ -/* ------------------------------------------------------------------------- */ - -void amdorder_ (int *n, const int *Ap, const int *Ai, int *P, - double *Control, double *Info) -{ - int result = amd_order (*n, Ap, Ai, P, Control, Info) ; - if (result != AMD_OK && P) P [0] = result ; -} - -void amddefaults_ (double *Control) -{ - amd_defaults (Control) ; -} - -void amdcontrol_ (double *Control) -{ - fflush (stdout) ; - amd_control (Control) ; - fflush (stdout) ; -} - -void amdinfo_ (double *Info) -{ - fflush (stdout) ; - amd_info (Info) ; - fflush (stdout) ; -} - -void amdpreproc_ (int *n, const int *Ap, const int *Ai, int *Rp, int *Ri) -{ - int result = amd_preprocess (*n, Ap, Ai, Rp, Ri) ; - if (result != AMD_OK && Rp) Rp [0] = result ; -} - -/* ------------------------------------------------------------------------- */ -/* IBM AIX. Probably Windows, Compaq Alpha, and HP Unix as well. */ -/* ------------------------------------------------------------------------- */ - -void amdorder (int *n, const int *Ap, const int *Ai, int *P, - double *Control, double *Info) -{ - int result = amd_order (*n, Ap, Ai, P, Control, Info) ; - if (result != AMD_OK && P) P [0] = result ; -} - -void amddefaults (double *Control) -{ - amd_defaults (Control) ; -} - -void amdcontrol (double *Control) -{ - fflush (stdout) ; - amd_control (Control) ; - fflush (stdout) ; -} - -void amdinfo (double *Info) -{ - fflush (stdout) ; - amd_info (Info) ; - fflush (stdout) ; -} - -void amdpreproc (int *n, const int *Ap, const int *Ai, int *Rp, int *Ri) -{ - int result = amd_preprocess (*n, Ap, Ai, Rp, Ri) ; - if (result != AMD_OK && Rp) Rp [0] = result ; -} diff --git a/deal.II/contrib/umfpack/AMD/Demo/amd_simple.c b/deal.II/contrib/umfpack/AMD/Demo/amd_simple.c deleted file mode 100644 index 2399526f22..0000000000 --- a/deal.II/contrib/umfpack/AMD/Demo/amd_simple.c +++ /dev/null @@ -1,23 +0,0 @@ -/* ------------------------------------------------------------------------- */ -/* AMD Version 1.1 (Jan. 21, 2004), Copyright (c) 2004 by Timothy A. Davis, */ -/* Patrick R. Amestoy, and Iain S. Duff. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ -/* web: http://www.cise.ufl.edu/research/sparse/amd */ -/* ------------------------------------------------------------------------- */ - -#include -#include "amd.h" - -int n = 5 ; -int Ap [ ] = { 0, 2, 6, 10, 12, 14} ; -int Ai [ ] = { 0,1, 0,1,2,4, 1,2,3,4, 2,3, 1,4 } ; -int P [5] ; - -int main (void) -{ - int k ; - (void) amd_order (n, Ap, Ai, P, (double *) NULL, (double *) NULL) ; - for (k = 0 ; k < n ; k++) printf ("P [%d] = %d\n", k, P [k]) ; - return (0) ; -} - diff --git a/deal.II/contrib/umfpack/AMD/Demo/amd_simple.out b/deal.II/contrib/umfpack/AMD/Demo/amd_simple.out deleted file mode 100644 index 08a04e0b9f..0000000000 --- a/deal.II/contrib/umfpack/AMD/Demo/amd_simple.out +++ /dev/null @@ -1,5 +0,0 @@ -P [0] = 0 -P [1] = 3 -P [2] = 2 -P [3] = 4 -P [4] = 1 diff --git a/deal.II/contrib/umfpack/AMD/Doc/AMD_UserGuide.bib b/deal.II/contrib/umfpack/AMD/Doc/AMD_UserGuide.bib index 9584598a94..03fbfa8f76 100644 --- a/deal.II/contrib/umfpack/AMD/Doc/AMD_UserGuide.bib +++ b/deal.II/contrib/umfpack/AMD/Doc/AMD_UserGuide.bib @@ -32,6 +32,16 @@ ,pages={886-905} } +@article{AmestoyDavisDuff04, + author={Amestoy, P. R. and Davis, T. A. and Duff, I. S.}, + title={Algorithm 837: An approximate minimum degree ordering algorithm}, + journal=TOMS, + year={2004} + ,volume={30} + ,number={3} + ,pages={381-388} + } + @misc{hsl:2002, author = {HSL}, title = "{HSL} 2002: {A} collection of {F}ortran codes for large @@ -77,10 +87,12 @@ ,pages={68-84} } -@article{DavisGilbertLarimoreNg00pending, +@article{DavisGilbertLarimoreNg04, author={Davis, T. A. and Gilbert, J. R. and Larimore, S. I. and Ng, E. G.}, title={A column approximate minimum degree ordering algorithm}, journal=TOMS, - year={(to appear)} + year={2004} + ,volume={30} + ,pages={353-376} } diff --git a/deal.II/contrib/umfpack/AMD/Doc/AMD_UserGuide.pdf b/deal.II/contrib/umfpack/AMD/Doc/AMD_UserGuide.pdf index 39ca0b2abf..c6c29fe8c3 100644 Binary files a/deal.II/contrib/umfpack/AMD/Doc/AMD_UserGuide.pdf and b/deal.II/contrib/umfpack/AMD/Doc/AMD_UserGuide.pdf differ diff --git a/deal.II/contrib/umfpack/AMD/Doc/AMD_UserGuide.tex b/deal.II/contrib/umfpack/AMD/Doc/AMD_UserGuide.tex index 8e4d67b3b7..93811423a0 100644 --- a/deal.II/contrib/umfpack/AMD/Doc/AMD_UserGuide.tex +++ b/deal.II/contrib/umfpack/AMD/Doc/AMD_UserGuide.tex @@ -13,7 +13,7 @@ \begin{document} %------------------------------------------------------------------------------ -\title{AMD Version 1.1 User Guide} +\title{AMD Version 2.2 User Guide} \author{Patrick R. Amestoy\thanks{ENSEEIHT-IRIT, 2 rue Camichel 31017 Toulouse, France. email: amestoy@enseeiht.fr. http://www.enseeiht.fr/$\sim$amestoy.} @@ -34,7 +34,7 @@ http://www.numerical.rl.ac.uk/people/isd/isd.html. This work was supported by the EPSRC under grant GR/R46441. }} -\date{January 29, 2004} +\date{May 31, 2007} \maketitle %------------------------------------------------------------------------------ @@ -47,29 +47,41 @@ A MATLAB interface is included. \end{abstract} %------------------------------------------------------------------------------ -Technical report TR-04-002, CISE Department, University of Florida, -Gainesville, FL, 2004. +Technical report TR-04-002 (revised), CISE Department, University of Florida, +Gainesville, FL, 2007. -AMD Version 1.1 (Jan. 21, 2004), Copyright\copyright 2004 by Timothy A. +AMD Version 2.2, Copyright\copyright 2007 by Timothy A. Davis, Patrick R. Amestoy, and Iain S. Duff. All Rights Reserved. +AMD is available under alternate licences; contact T. Davis for details. {\bf AMD License:} Your use or distribution of AMD or any modified version of AMD 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 - uses AMD or any modified version of AMD code must cite the - Copyright, this License, the Availability note, and ``Used by permission.'' - Permission to modify the code and to distribute modified code is granted, - provided the Copyright, this License, and the Availability note are - 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. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + USA + + Permission is hereby granted to use or copy this program under the + terms of the GNU LGPL, provided that the Copyright, this License, + and the Availability of the original version is retained on all copies. + User documentation of any code that uses this code or any modified + version of this code must cite the Copyright, this License, the + Availability note, and "Used by permission." Permission to modify + the code and to distribute modified code is granted, provided the + Copyright, this License, and the Availability note are retained, + and a notice that the code was modified is included. {\bf Availability:} http://www.cise.ufl.edu/research/sparse/amd @@ -90,7 +102,8 @@ Davis, Patrick R. Amestoy, and Iain S. Duff. All Rights Reserved. AMD is a set of routines for preordering a sparse matrix prior to numerical factorization. It uses an approximate minimum degree ordering -algorithm \cite{AmestoyDavisDuff96} to find a permutation matrix $\m{P}$ +algorithm \cite{AmestoyDavisDuff96,AmestoyDavisDuff04} +to find a permutation matrix $\m{P}$ so that the Cholesky factorization $\m{PAP}\tr=\m{LL}\tr$ has fewer (often much fewer) nonzero entries than the Cholesky factorization of $\m{A}$. The algorithm is typically much faster than other ordering methods @@ -160,8 +173,8 @@ see \cite{GeorgeLiu89}. \section{Availability} %------------------------------------------------------------------------------ -In addition to appearing as a Collected Algorithm of the ACM, -AMD Version 1.1 is available at http://www.cise.ufl.edu/research/sparse. +In addition to appearing as a Collected Algorithm of the ACM, \newline +AMD is available at http://www.cise.ufl.edu/research/sparse. The Fortran version is available as the routine {\tt MC47} in HSL (formerly the Harwell Subroutine Library) \cite{hsl:2002}. @@ -169,8 +182,13 @@ The Fortran version is available as the routine {\tt MC47} in HSL \section{Using AMD in MATLAB} %------------------------------------------------------------------------------ -To use AMD in MATLAB, you must first compile the AMD mexFunction. -Just type {\tt make} in the Unix system shell, while in the {\tt AMD} +The MATLAB function {\tt amd} is now a built-in function in MATLAB 7.3 +(R2006b). The built-in {\tt amd} and the {\tt amd2} function provided here +differ in how the optional parameters are passed +(the 2nd input parameter). + +To use AMD2 in MATLAB, you must first compile the AMD2 mexFunction. +Just type {\tt make} in the Unix system shell, while in the {\tt AMD/MATLAB} directory. You can also type {\tt amd\_make} in MATLAB, while in the {\tt AMD/MATLAB} directory. Place the {\tt AMD/MATLAB} directory in your MATLAB path. This can be done on any system with MATLAB, including Windows. @@ -189,7 +207,8 @@ diagonal, such as the statement {\tt [L,U,P] = lu (A (p,p), 0.1)}. Type {\tt help lu} for more details. The statement {\tt [L,U,P,Q] = lu (A (p,p))} in MATLAB 6.5 is not suitable, however, because it uses UMFPACK Version 4.0 and thus -does not attempt to select pivots from the diagonal. UMFPACK Version 4.1 +does not attempt to select pivots from the diagonal. +UMFPACK Version 4.1 in MATLAB 7.0 and later uses several strategies, including a symmetric pivoting strategy, and will give you better results if you want to factorize an unsymmetric matrix of this type. Refer to the UMFPACK User Guide for more details, at @@ -198,7 +217,7 @@ http://www.cise.ufl.edu/research/sparse/umfpack. The AMD mexFunction is much faster than the built-in MATLAB symmetric minimum degree ordering methods, SYMAMD and SYMMMD. Its ordering quality is comparable to SYMAMD, and better than SYMMMD -\cite{DavisGilbertLarimoreNg00pending}. +\cite{DavisGilbertLarimoreNg04}. An optional input argument can be used to modify the control parameters for AMD (aggressive absorption, dense row/column handling, and printing of @@ -213,7 +232,7 @@ type {\tt help amd} in the MATLAB command window. \label{Cversion} %------------------------------------------------------------------------------ -The C-callable AMD library consists of five user-callable routines and one +The C-callable AMD library consists of seven user-callable routines and one include file. There are two versions of each of the routines, with {\tt int} and {\tt long} integers. The routines with prefix @@ -249,8 +268,11 @@ The following routines are fully described in Section~\ref{Primary}: and the number of floating-point operations required for Cholesky and LU factorizations (which are returned in the {\tt Info} array). The user's input matrix is not modified. - It returns {\tt AMD\_OK} if successful, {\tt AMD\_INVALID} if - the matrix is invalid, or {\tt AMD\_OUT\_OF\_MEMORY} if out of memory. + It returns {\tt AMD\_OK} if successful, + {\tt AMD\_OK\_BUT\_JUMBLED} if successful (but the matrix had unsorted + and/or duplicate row indices), + {\tt AMD\_INVALID} if the matrix is invalid, + {\tt AMD\_OUT\_OF\_MEMORY} if out of memory. \item {\tt amd\_defaults} ({\tt long} version: {\tt amd\_l\_defaults}) @@ -287,21 +309,34 @@ The following routines are fully described in Section~\ref{Primary}: } Prints a description of the statistics computed by AMD, and their values. -\item {\tt amd\_preprocess} -({\tt long} version: {\tt amd\_l\_info}) +\item {\tt amd\_valid} +({\tt long} version: {\tt amd\_valid}) {\footnotesize \begin{verbatim} #include "amd.h" - int n, Ap [n+1], Ai [nz], Rp [n+1], Ri [nz] ; - int result = amd_preprocess (n, Ap, Ai, Rp, Ri) ; + int n, Ap [n+1], Ai [nz] ; + int result = amd_valid (n, n, Ap, Ai) ; \end{verbatim} } - Removes duplicate entries and sorts each column of its input $\m{A}$, - and returns the nonzero pattern of the transpose, $\m{R}=\m{A}\tr$. - It returns the transpose because this is the simplest way to sort - a matrix and remove duplicate entries. Either $\m{A}$ or $\m{A}\tr$ - can be passed to {\tt amd\_order} with little effect on the - ordering (except for minor tie-breaking changes). + Returns {\tt AMD\_OK} or {\tt AMD\_OK\_BUT\_JUMBLED} + if the matrix is valid as input to {\tt amd\_order}; + the latter is returned if the matrix has unsorted and/or duplicate + row indices in one or more columns. + Returns {\tt AMD\_INVALID} if the matrix cannot be passed to + {\tt amd\_order}. + For {\tt amd\_order}, the matrix must + also be square. The first two arguments are the number of rows and the + number of columns of the matrix. For its use in AMD, these must both + equal {\tt n}. + +\item {\tt amd\_2} +({\tt long} version: {\tt amd\_l2}) + AMD ordering kernel. It is faster than {\tt amd\_order}, and + can be called by the user, but it is difficult to use. + It does not check its inputs for errors. + It does not require the columns of its input matrix to be sorted, + but it destroys the matrix on output. Additional workspace must be passed. + Refer to the source file {\tt AMD/Source/amd\_2.c} for a description. \end{itemize} @@ -312,8 +347,12 @@ representation consists of two arrays: {\tt Ap} of size {\tt n+1} and {\tt Ai} of size {\tt nz}. The row indices of entries in column {\tt j} are stored in {\tt Ai[Ap[j]} $\ldots$ {\tt Ap[j+1]-1]}. For {\tt amd\_order}, -no duplicate row indices may be present, and the row indices in any given -column must be sorted in ascending order. +if duplicate row indices are present, or if the row indices in any given +column are not sorted in ascending order, then {\tt amd\_order} creates +an internal copy of the matrix with sorted rows and no duplicate entries, +and orders the copy. This adds slightly to the time and memory usage of +{\tt amd\_order}, but is not an error condition. + The matrix is 0-based, and thus row indices must be in the range {\tt 0} to {\tt n-1}. The first entry {\tt Ap[0]} must be zero. @@ -321,29 +360,20 @@ The total number of entries in the matrix is thus {\tt nz = Ap[n]}. The matrix must be square, but it does not need to be symmetric. The {\tt amd\_order} routine constructs the nonzero pattern of -$\m{B} = \m{A}+\m{A}\tr$ (without forming $\m{A}\tr$ explicitly), +$\m{B} = \m{A}+\m{A}\tr$ (without forming $\m{A}\tr$ explicitly if +$\m{A}$ has sorted columns and no duplicate entries), and then orders the matrix $\m{B}$. Thus, either the lower triangular part of $\m{A}$, the upper triangular part, or any combination may be passed. The transpose $\m{A}\tr$ may also be passed to {\tt amd\_order}. The diagonal entries may be present, but are ignored. -The input to {\tt amd\_order} must have sorted columns because it uses -an in-place algorithm to construct $\m{A}+\m{A}\tr$ without first constructing -$\m{A}\tr$. This saves memory, but places an additional restriction on -the input. If the input matrix has columns with unsorted and/or duplicate -row indices, it is not valid as input to {\tt amd\_order}. To handle this -case, the {\tt amd\_preprocess} routine is provided. It sorts, transposes, -and removes duplicate entries from its input matrix, returning its result -as another compressed-column matrix $\m{R}$ which can then be passed to -{\tt amd\_order}. - %------------------------------------------------------------------------------ \subsection{Control parameters} \label{control_param} %------------------------------------------------------------------------------ -Control parameters are set an optional {\tt Control} array. +Control parameters are set in an optional {\tt Control} array. It is optional in the sense that if a {\tt NULL} pointer is passed for the {\tt Control} input argument, then default control parameters are used. @@ -365,7 +395,8 @@ entries are never considered ``dense.'' controls whether or not to use aggressive absorption, in which a prior element is absorbed into the current element if it is a subset of the current element, even if it is not -adjacent to the current pivot element (refer to \cite{AmestoyDavisDuff96} +adjacent to the current pivot element (refer +to \cite{AmestoyDavisDuff96,AmestoyDavisDuff04} for more details). The default value is nonzero, which means that aggressive absorption will be performed. This nearly always leads to a better ordering (because the approximate degrees are more @@ -459,13 +490,13 @@ The matrix $\m{A}$ is {\tt n}-by-{\tt n} with {\tt nz} entries. {\footnotesize \begin{verbatim} #include "amd.h" -int n, status, Ap [n+1], Ai [nz], P [n], Rp [n+1], Ri [nz] ; +int n, status, Ap [n+1], Ai [nz], P [n] ; double Control [AMD_CONTROL], Info [AMD_INFO] ; amd_defaults (Control) ; status = amd_order (n, Ap, Ai, P, Control, Info) ; amd_control (Control) ; amd_info (Info) ; -amd_preprocess (n, Ap, Ai, Rp, Ri) ; +status = amd_valid (n, n, Ap, Ai) ; \end{verbatim} } @@ -475,13 +506,13 @@ arguments become {\tt long}: {\footnotesize \begin{verbatim} #include "amd.h" -long n, status, Ap [n+1], Ai [nz], P [n], Rp [n+1], Ri [nz] ; +long n, status, Ap [n+1], Ai [nz], P [n] ; double Control [AMD_CONTROL], Info [AMD_INFO] ; amd_l_defaults (Control) ; status = amd_l_order (n, Ap, Ai, P, Control, Info) ; amd_l_control (Control) ; amd_l_info (Info) ; -amd_l_preprocess (n, Ap, Ai, Rp, Ri) ; +status = amd_l_valid (n, n, Ap, Ai) ; \end{verbatim} } @@ -659,9 +690,8 @@ primary {\tt Source} directory. The following discussion assumes you have the {\tt make} program, either in Unix, or in Windows with Cygwin. -System-dependent configurations are in the {\tt AMD/Make} -directory. You can edit the {\tt Make.include} -file in that directory to customize the compilation. The default +System-dependent configurations are in the {\tt ../UFconfig/UFconfig.mk} +file. You can edit that file to customize the compilation. The default settings will work on most systems. Sample configuration files are provided for Linux, Sun Solaris, SGI IRIX, IBM AIX, and the DEC/Compaq Alpha. @@ -669,12 +699,10 @@ for Linux, Sun Solaris, SGI IRIX, IBM AIX, and the DEC/Compaq Alpha. To compile and install the C-callable AMD library, go to the {\tt AMD} directory and type {\tt make}. The library will be placed in {\tt AMD/Lib/libamd.a}. -Two demo programs of the AMD ordering routine will be compiled and tested in +Three demo programs of the AMD ordering routine will be compiled and tested in the {\tt AMD/Demo} directory. The outputs of these demo programs will then be compared with output -files in the distribution. The AMD mexFunction for -use in MATLAB will also be compiled. If you do not have MATLAB -type {\tt make lib} instead. +files in the distribution. To compile and install the Fortran-callable AMD library, go to the {\tt AMD} directory and type {\tt make fortran}. @@ -683,33 +711,11 @@ A demo program will be compiled and tested in the {\tt AMD/Demo} directory. The output will be compared with an output file in the distribution. Typing {\tt make clean} will remove all but the final compiled libraries -and demo programs. Typing {\tt make purge} removes all files not in the -original distribution. -If you compile AMD and then later change the {\tt Make.include} -file or your system-specific configuration file such as {\tt Make.linux}, +and demo programs. Typing {\tt make purge} or {\tt make distclean} +removes all files not in the original distribution. +If you compile AMD and then later change the {\tt ../UFconfig/UFconfig.mk} file then you should type {\tt make purge} and then {\tt make} to recompile. -Here are the various parameters that you can control in your -{\tt Make.include} file: - -\begin{itemize} -\item {\tt CC = } your C compiler, such as {\tt cc}. -\item {\tt RANLIB = } your system's {\tt ranlib} program, if needed. -\item {\tt CFLAGS = } optimization flags, such as {\tt -O}. -\item {\tt LIB = } your libraries, such as {\tt -lm} or {\tt -lblas}. -\item {\tt RM =} the command to delete a file. -\item {\tt MV =} the command to rename a file. -\item {\tt MEX =} the command to compile a MATLAB mexFunction. -\item {\tt F77 =} the command to compile a Fortran program (optional). -\item {\tt F77FLAGS =} the Fortran compiler flags (optional). -\item {\tt F77LIB =} the Fortran libraries (optional). -\end{itemize} - -The {\tt Make.include} includes some definitions regarding the BLAS. -This is so that AMD and UMFPACK (which requires AMD) can share -the same configuration files. If you wish to use AMD only, then -you can ignore any references to the BLAS (the -DNBLAS compile flag). - When you compile your program that uses the C-callable AMD library, you need to add the {\tt AMD/Lib/libamd.a} library and you need to tell your compiler to look in the @@ -718,39 +724,45 @@ files. To compile a Fortran program that calls the Fortran AMD library, you need to add the {\tt AMD/Lib/libamdf77.a} library. See {\tt AMD/Demo/Makefile} for an example. -If all you want to use is the AMD mexFunction in MATLAB, you can skip +If all you want to use is the AMD2 mexFunction in MATLAB, you can skip the use of the {\tt make} command entirely. Simply type {\tt amd\_make} in MATLAB while in the {\tt AMD/MATLAB} directory. This works on any system with MATLAB, including Windows. +Alternately, type {\tt make} in the {\tt AMD/MATLAB} directory, +or just use the built-in {\tt amd} in MATLAB 7.3 or later. + +If you have MATLAB 7.2 or earlier, you must first edit UFconfig/UFconfig.h to +remove the "-largeArrayDims" option from the MEX command, prior to +{\tt make mex} or {\tt make} in the MATLAB directory +(or just use {\tt amd\_make.m} inside MATLAB. If you are including AMD as a subset of a larger library and do not want to link the C standard I/O library, or if you simply do not need to use them, you can safely remove the {\tt amd\_control.c} and {\tt amd\_info.c} files. Similarly, if you use default parameters (or define your own {\tt Control} array), then you can exclude the {\tt amd\_defaults.c} -file. The {\tt amd\_preprocess.c} file is optional as well, if you -can ensure that the input matrix to {\tt amd\_order} is always sorted -and has no duplicate entries. +file. Each of these files contains the user-callable routines of the same name. None of these auxiliary routines are directly called by {\tt amd\_order}. The {\tt amd\_dump.c} file contains debugging routines that are neither used nor compiled unless debugging is enabled. The {\tt amd\_internal.h} file must be edited to enable debugging; -refer to the instructions in that file. Thus, it too can be excluded -if compiled into a larger production program or library. +refer to the instructions in that file. The bare minimum files required to use just {\tt amd\_order} are -{\tt amd.h} in the {\tt Include} directory, +{\tt amd.h} and {\tt amd\_internal.h} +in the {\tt Include} directory, and {\tt amd\_1.c}, {\tt amd\_2.c}, {\tt amd\_aat.c}, +{\tt amd\_global.c}, {\tt and\_order.c}, {\tt amd\_postorder.c}, {\tt amd\_post\_tree.c}, -{\tt amd\_valid.c}, +{\tt amd\_preprocess.c}, and -{\tt amd\_internal.h}, +{\tt amd\_valid.c} in the {\tt Source} directory. %------------------------------------------------------------------------------ @@ -765,14 +777,15 @@ and gives details on their use. {\footnotesize \begin{verbatim} + /* ========================================================================= */ /* === AMD: approximate minimum degree ordering =========================== */ /* ========================================================================= */ /* ------------------------------------------------------------------------- */ -/* AMD Version 1.1 (Jan. 21, 2004), Copyright (c) 2004 by Timothy A. Davis, */ -/* Patrick R. Amestoy, and Iain S. Duff. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* AMD Version 2.2, Copyright (c) 2007 by Timothy A. Davis, */ +/* Patrick R. Amestoy, and Iain S. Duff. See ../README.txt for License. */ +/* email: davis at cise.ufl.edu CISE Department, Univ. of Florida. */ /* web: http://www.cise.ufl.edu/research/sparse/amd */ /* ------------------------------------------------------------------------- */ @@ -780,7 +793,7 @@ and gives details on their use. * factorization of P*A*P' has fewer nonzeros and takes less work than the * Cholesky factorization of A. If A is not symmetric, then it performs its * ordering on the matrix A+A'. Two sets of user-callable routines are - * provided, one for "int" integers and the other for "long" integers. + * provided, one for int integers and the other for UF_long integers. * * The method is based on the approximate minimum degree algorithm, discussed * in Amestoy, Davis, and Duff, "An approximate degree ordering algorithm", @@ -803,7 +816,20 @@ and gives details on their use. #ifndef AMD_H #define AMD_H -int amd_order ( /* returns 0 if OK, negative value if error */ +/* make it easy for C++ programs to include AMD */ +#ifdef __cplusplus +extern "C" { +#endif + +/* get the definition of size_t: */ +#include + +/* define UF_long */ +#include "UFconfig.h" + +int amd_order /* returns AMD_OK, AMD_OK_BUT_JUMBLED, + * AMD_INVALID, or AMD_OUT_OF_MEMORY */ +( int n, /* A is n-by-n. n must be >= 0. */ const int Ap [ ], /* column pointers for A, of size n+1 */ const int Ai [ ], /* row indices of A, of size nz = Ap [n] */ @@ -812,11 +838,12 @@ int amd_order ( /* returns 0 if OK, negative value if error */ double Info [ ] /* output Info statistics, of size AMD_INFO */ ) ; -long amd_l_order ( /* see above for description of arguments */ - long n, - const long Ap [ ], - const long Ai [ ], - long P [ ], +UF_long amd_l_order /* see above for description of arguments */ +( + UF_long n, + const UF_long Ap [ ], + const UF_long Ai [ ], + UF_long P [ ], double Control [ ], double Info [ ] ) ; @@ -824,15 +851,15 @@ long amd_l_order ( /* see above for description of arguments */ /* Input arguments (not modified): * * n: the matrix A is n-by-n. - * Ap: an int/long array of size n+1, containing the column pointers of A. - * Ai: an int/long array of size nz, containing the row indices of A, + * Ap: an int/UF_long array of size n+1, containing column pointers of A. + * Ai: an int/UF_long array of size nz, containing the row indices of A, * where nz = Ap [n]. * Control: a double array of size AMD_CONTROL, containing control * parameters. Defaults are used if Control is NULL. * * Output arguments (not defined on input): * - * P: an int/long array of size n, containing the output permutation. If + * P: an int/UF_long array of size n, containing the output permutation. If * row i is the kth pivot row, then P [k] = i. In MATLAB notation, * the reordered matrix is A (P,P). * Info: a double array of size AMD_INFO, containing statistical @@ -840,8 +867,15 @@ long amd_l_order ( /* see above for description of arguments */ * * On input, the matrix A is stored in column-oriented form. The row indices * of nonzero entries in column j are stored in Ai [Ap [j] ... Ap [j+1]-1]. - * The row indices must appear in ascending order in each column, and there - * must not be any duplicate entries. Row indices must be in the range 0 to + * + * If the row indices appear in ascending order in each column, and there + * are no duplicate entries, then amd_order is slightly more efficient in + * terms of time and memory usage. If this condition does not hold, a copy + * of the matrix is created (where these conditions do hold), and the copy is + * ordered. This feature is new to v2.0 (v1.2 and earlier required this + * condition to hold for the input matrix). + * + * Row indices must be in the range 0 to * n-1. Ap [0] must be zero, and thus nz = Ap [n] is the number of nonzeros * in A. The array Ap is of size n+1, and the array Ai is of size nz = Ap [n]. * The matrix does not need to be symmetric, and the diagonal does not need to @@ -851,17 +885,12 @@ long amd_l_order ( /* see above for description of arguments */ * pattern of the matrix A is the same as that used internally by MATLAB. * If you wish to use a more flexible input structure, please see the * umfpack_*_triplet_to_col routines in the UMFPACK package, at - * http://www.cise.ufl.edu/research/sparse/umfpack, or use the amd_preprocess - * routine discussed below. + * http://www.cise.ufl.edu/research/sparse/umfpack. * * Restrictions: n >= 0. Ap [0] = 0. Ap [j] <= Ap [j+1] for all j in the - * range 0 to n-1. nz = Ap [n] >= 0. For all j in the range 0 to n-1, - * and for all p in the range Ap [j] to Ap [j+1]-2, Ai [p] < Ai [p+1] must - * hold. Ai [0..nz-1] must be in the range 0 to n-1. To avoid integer - * overflow, (2.4*nz + 8*n) < INT_MAX / sizeof (int) for must hold for the - * "int" version. (2.4*nz + 8*n) < LONG_MAX / sizeof (long) must hold - * for the "long" version. Finally, Ai, Ap, and P must not be NULL. If - * any of these restrictions are not met, AMD returns AMD_INVALID. + * range 0 to n-1. nz = Ap [n] >= 0. Ai [0..nz-1] must be in the range 0 + * to n-1. Finally, Ai, Ap, and P must not be NULL. If any of these + * restrictions are not met, AMD returns AMD_INVALID. * * AMD returns: * @@ -873,6 +902,9 @@ long amd_l_order ( /* see above for description of arguments */ * AMD_INVALID if the input arguments n, Ap, Ai are invalid, or if P is * NULL. * + * AMD_OK_BUT_JUMBLED if the matrix had unsorted columns, and/or duplicate + * entries, but was otherwise valid. + * * The AMD routine first forms the pattern of the matrix A+A', and then * computes a fill-reducing ordering, P. If P [k] = i, then row/column i of * the original is the kth pivotal row. In MATLAB notation, the permuted @@ -911,7 +943,7 @@ long amd_l_order ( /* see above for description of arguments */ * condition. * * Info [AMD_STATUS]: the return value of AMD, either AMD_OK, - * AMD_OUT_OF_MEMORY, or AMD_INVALID. + * AMD_OK_BUT_JUMBLED, AMD_OUT_OF_MEMORY, or AMD_INVALID. * * Info [AMD_N]: n, the size of the input matrix * @@ -973,105 +1005,102 @@ long amd_l_order ( /* see above for description of arguments */ */ /* ------------------------------------------------------------------------- */ -/* AMD preprocess */ +/* direct interface to AMD */ /* ------------------------------------------------------------------------- */ -/* amd_preprocess: sorts, removes duplicate entries, and transposes the - * nonzero pattern of a column-form matrix A, to obtain the matrix R. - * - * Alternatively, you can consider this routine as constructing a row-form - * matrix from a column-form matrix. Duplicate entries are allowed in A (and - * removed in R). The columns of R are sorted. Checks its input A for errors. - * - * On input, A can have unsorted columns, and can have duplicate entries. - * Ap [0] must still be zero, and Ap must be monotonically nondecreasing. - * Row indices must be in the range 0 to n-1. - * - * On output, if this routine returns AMD_OK, then the matrix R is a valid - * input matrix for AMD_order. It has sorted columns, with no duplicate - * entries in each column. Since AMD_order operates on the matrix A+A', it - * can just as easily use A or A', so the transpose has no significant effect - * (except for minor tie-breaking, which can lead to a minor effect in the - * quality of the ordering). As an example, compare the output of amd_demo.c - * and amd_demo2.c. - * - * This routine transposes A to get R because that's the simplest way to - * sort and remove duplicate entries from a matrix. - * - * Allocates 2*n integer work arrays, and free's them when done. - * - * If you wish to call amd_order, but do not know if your matrix has unsorted - * columns or duplicate entries, then you can use the following code, which is - * fairly efficient. amd_order will not allocate any internal matrix until - * it checks that the input matrix is valid, so the method below is memory- - * efficient as well. This code snippet assumes that Rp and Ri are already - * allocated, and are the same size as Ap and Ai respectively. - - result = amd_order (n, p, Ap, Ai, Control, Info) ; - if (result == AMD_INVALID) - { - if (amd_preprocess (n, Ap, Ai, Rp, Ri) == AMD_OK) - { - result = amd_order (n, p, Rp, Ri, Control, Info) ; - } - } - - * amd_preprocess will still return AMD_INVALID if any row index in Ai is out - * of range or if the Ap array is invalid. These errors are not corrected by - * amd_preprocess since they represent a more serious error that should be - * flagged with the AMD_INVALID error code. - */ +/* amd_2 is the primary AMD ordering routine. It is not meant to be + * user-callable because of its restrictive inputs and because it destroys + * the user's input matrix. It does not check its inputs for errors, either. + * However, if you can work with these restrictions it can be faster than + * amd_order and use less memory (assuming that you can create your own copy + * of the matrix for AMD to destroy). Refer to AMD/Source/amd_2.c for a + * description of each parameter. */ -int amd_preprocess +void amd_2 ( int n, - const int Ap [ ], - const int Ai [ ], - int Rp [ ], - int Ri [ ] + int Pe [ ], + int Iw [ ], + int Len [ ], + int iwlen, + int pfree, + int Nv [ ], + int Next [ ], + int Last [ ], + int Head [ ], + int Elen [ ], + int Degree [ ], + int W [ ], + double Control [ ], + double Info [ ] ) ; -long amd_l_preprocess +void amd_l2 ( - long n, - const long Ap [ ], - const long Ai [ ], - long Rp [ ], - long Ri [ ] + UF_long n, + UF_long Pe [ ], + UF_long Iw [ ], + UF_long Len [ ], + UF_long iwlen, + UF_long pfree, + UF_long Nv [ ], + UF_long Next [ ], + UF_long Last [ ], + UF_long Head [ ], + UF_long Elen [ ], + UF_long Degree [ ], + UF_long W [ ], + double Control [ ], + double Info [ ] ) ; -/* Input arguments (not modified): - * - * n: the matrix A is n-by-n. - * Ap: an int/long array of size n+1, containing the column pointers of A. - * Ai: an int/long array of size nz, containing the row indices of A, - * where nz = Ap [n]. - * The nonzero pattern of column j of A is in Ai [Ap [j] ... Ap [j+1]-1]. - * Ap [0] must be zero, and Ap [j] <= Ap [j+1] must hold for all j in the - * range 0 to n-1. Row indices in Ai must be in the range 0 to n-1. - * The row indices in any one column need not be sorted, and duplicates - * may exist. - * - * Output arguments (not defined on input): - * - * Rp: an int/long array of size n+1, containing the column pointers of R. - * Ri: an int/long array of size rnz, containing the row indices of R, - * where rnz = Rp [n]. Note that Rp [n] will be less than Ap [n] if - * duplicates appear in A. In general, Rp [n] <= Ap [n]. - * The data structure for R is the same as A, except that each column of - * R contains sorted row indices, and no duplicates appear in any column. - * - * amd_preprocess returns: - * - * AMD_OK if the matrix A is valid and sufficient memory can be allocated - * to perform the preprocessing. - * - * AMD_OUT_OF_MEMORY if not enough memory can be allocated. +/* ------------------------------------------------------------------------- */ +/* amd_valid */ +/* ------------------------------------------------------------------------- */ + +/* Returns AMD_OK or AMD_OK_BUT_JUMBLED if the matrix is valid as input to + * amd_order; the latter is returned if the matrix has unsorted and/or + * duplicate row indices in one or more columns. Returns AMD_INVALID if the + * matrix cannot be passed to amd_order. For amd_order, the matrix must also + * be square. The first two arguments are the number of rows and the number + * of columns of the matrix. For its use in AMD, these must both equal n. * - * AMD_INVALID if the input arguments n, Ap, Ai are invalid, or if Rp or - * Ri are NULL. + * NOTE: this routine returned TRUE/FALSE in v1.2 and earlier. */ +int amd_valid +( + int n_row, /* # of rows */ + int n_col, /* # of columns */ + const int Ap [ ], /* column pointers, of size n_col+1 */ + const int Ai [ ] /* row indices, of size Ap [n_col] */ +) ; + +UF_long amd_l_valid +( + UF_long n_row, + UF_long n_col, + const UF_long Ap [ ], + const UF_long Ai [ ] +) ; + +/* ------------------------------------------------------------------------- */ +/* AMD memory manager and printf routines */ +/* ------------------------------------------------------------------------- */ + +/* The user can redefine these to change the malloc, free, and printf routines + * that AMD uses. */ + +#ifndef EXTERN +#define EXTERN extern +#endif + +EXTERN void *(*amd_malloc) (size_t) ; /* pointer to malloc */ +EXTERN void (*amd_free) (void *) ; /* pointer to free */ +EXTERN void *(*amd_realloc) (void *, size_t) ; /* pointer to realloc */ +EXTERN void *(*amd_calloc) (size_t, size_t) ; /* pointer to calloc */ +EXTERN int (*amd_printf) (const char *, ...) ; /* pointer to printf */ + /* ------------------------------------------------------------------------- */ /* AMD Control and Info arrays */ /* ------------------------------------------------------------------------- */ @@ -1120,13 +1149,52 @@ void amd_l_info (double Info [ ]) ; /* ------------------------------------------------------------------------- */ #define AMD_OK 0 /* success */ -#define AMD_OUT_OF_MEMORY -1 /* malloc failed */ +#define AMD_OUT_OF_MEMORY -1 /* malloc failed, or problem too large */ #define AMD_INVALID -2 /* input arguments are not valid */ +#define AMD_OK_BUT_JUMBLED 1 /* input matrix is OK for amd_order, but + * columns were not sorted, and/or duplicate entries were present. AMD had + * to do extra work before ordering the matrix. This is a warning, not an + * error. */ + +/* ========================================================================== */ +/* === AMD version ========================================================== */ +/* ========================================================================== */ + +/* AMD Version 1.2 and later include the following definitions. + * As an example, to test if the version you are using is 1.2 or later: + * + * #ifdef AMD_VERSION + * if (AMD_VERSION >= AMD_VERSION_CODE (1,2)) ... + * #endif + * + * This also works during compile-time: + * + * #if defined(AMD_VERSION) && (AMD_VERSION >= AMD_VERSION_CODE (1,2)) + * printf ("This is version 1.2 or later\n") ; + * #else + * printf ("This is an early version\n") ; + * #endif + * + * Versions 1.1 and earlier of AMD do not include a #define'd version number. + */ +#define AMD_DATE "May 31, 2007" +#define AMD_VERSION_CODE(main,sub) ((main) * 1000 + (sub)) +#define AMD_MAIN_VERSION 2 +#define AMD_SUB_VERSION 2 +#define AMD_SUBSUB_VERSION 0 +#define AMD_VERSION AMD_VERSION_CODE(AMD_MAIN_VERSION,AMD_SUB_VERSION) + +#ifdef __cplusplus +} +#endif + +#endif #endif \end{verbatim} } + %------------------------------------------------------------------------------ \newpage % References diff --git a/deal.II/contrib/umfpack/AMD/Doc/ChangeLog b/deal.II/contrib/umfpack/AMD/Doc/ChangeLog index 69c1806d0d..9b98e38ec0 100644 --- a/deal.II/contrib/umfpack/AMD/Doc/ChangeLog +++ b/deal.II/contrib/umfpack/AMD/Doc/ChangeLog @@ -1,3 +1,95 @@ +May 31, 2007: version 2.2.0 + + * port to 64-bit MATLAB + + * Makefile moved from Source/ to Lib/ + + * minor changes to printing routines (amd_control.c, amd_info.c) + +Dec 12, 2006, version 2.0.4 + + * minor MATLAB code cleanup + +Nov 29, 2006, version 2.0.3 + + * changed MATLAB function name to amd2, so as not to conflict with + the now built-in version of AMD in MATLAB (which is the same thing + as the AMD here...). + +Sept 28, 2006, version 2.0.2 + + * #define SIZE_T_MAX not done if already defined (Mac OSX). + +Aug 31, 2006: + + * trivial change to comments in amd.m + +Apr 30, 2006: AMD Version 2.0: + + * long integer redefined as UF_long, controlled by UFconfig.h. + + * amd_order no longer requires its input to have sorted columns. It can + also tolerate duplicate entries in each column. If these conditions + hold, but the matrix is otherwise valid, amd_order returns + AMD_OK_BUT_JUMBLED (a warning, not an error). + + * amd_preprocess no longer deemed user-callable, since it is no longer + needed (it was used to ensure the input matrix had sorted columns with + no duplicate entries). It still exists, with additional parameters, + and is called by amd_order if necessary. amd_wpreprocess and + amd_preprocess_valid removed. Fortran interface routine amdpreproc + removed. + + * Integer overflow computations modified, to extend the size of problem + that the "int" version can solve when used in an LP64 compilation. + + * amd_demo2.c simplified (it tests AMD with a jumbled matrix). + + * amd_valid returned TRUE/FALSE in v1.2. It now returns AMD_OK, + AMD_OK_BUT_JUMBLED, or AMD_INVALID. Only in the latter case is the + matrix unsuitable as input to amd_order. + + * amd_internal.h include file moved from AMD/Source to AMD/Include. + +Nov 15, 2005: + + * minor editting of comments; version number (1.2) unchanged. + +Aug. 30, 2005: AMD Version 1.2 + + * AMD v1.2 is upward compatible with v1.1 and v1.0, except that v1.2 no + longer includes the compile-time redefinition of malloc and free. + + * Makefile modified to use UFconfig.mk. "Make" directory removed. + + * License changed to GNU LGPL. + + * Easier inclusion in C++ programs. + + * option to allow compile-time redefinition of malloc and free + (added to v1.1) removed for v1.2. Replaced with a run-time + redefinition. AMD includes function pointers for malloc, free, + calloc, realloc, and printf, so that all those routines can be + redefined at compile time. These function pointers are global + variables, and so are not technically thread-safe, unless you + use defaults and don't need to change them (the common case) + or if you change them in one thread before using them in other + threads. + + * added #define'd version number + + * minor modification to AMD_2 to ensure all lines can be tested, without + conditional compilation. + + * moved the prototype for AMD_2 from amd_internal.h to amd.h + + * moved the prototype for AMD_valid from amd_internal.h to amd.h + + * MATLAB mexFunction uses libamd.a (compiled with cc) instead of compiling + each AMD source file with the mex command + + * long demo (amd_l_demo.c) added. + Jan. 21, 2004: AMD Version 1.1 * No bugs found or fixed - new features added, only diff --git a/deal.II/contrib/umfpack/AMD/Doc/License b/deal.II/contrib/umfpack/AMD/Doc/License index ed8f2ab901..b01008a9a6 100644 --- a/deal.II/contrib/umfpack/AMD/Doc/License +++ b/deal.II/contrib/umfpack/AMD/Doc/License @@ -1,25 +1,39 @@ -AMD Version 1.1 (Jan. 21, 2004), Copyright (c) 2004 by Timothy A. -Davis, Patrick R. Amestoy, and Iain S. Duff. All Rights Reserved. +AMD, Copyright (c) by Timothy A. Davis, +Patrick R. Amestoy, and Iain S. Duff. All Rights Reserved. +AMD is available under alternate licenses, contact T. Davis for details. AMD License: Your use or distribution of AMD or any modified version of AMD 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. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. - 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 - uses AMD or any modified version of AMD code must cite the - Copyright, this License, the Availability note, and "Used by permission." - Permission to modify the code and to distribute modified code is granted, - provided the Copyright, this License, and the Availability note are - 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. + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + USA + + Permission is hereby granted to use or copy this program under the + terms of the GNU LGPL, provided that the Copyright, this License, + and the Availability of the original version is retained on all copies. + User documentation of any code that uses this code or any modified + version of this code must cite the Copyright, this License, the + Availability note, and "Used by permission." Permission to modify + the code and to distribute modified code is granted, provided the + Copyright, this License, and the Availability note are retained, + and a notice that the code was modified is included. Availability: http://www.cise.ufl.edu/research/sparse/amd + +------------------------------------------------------------------------------- diff --git a/deal.II/contrib/umfpack/AMD/Doc/Makefile b/deal.II/contrib/umfpack/AMD/Doc/Makefile index c0cf976c74..8b593fa73b 100644 --- a/deal.II/contrib/umfpack/AMD/Doc/Makefile +++ b/deal.II/contrib/umfpack/AMD/Doc/Makefile @@ -2,15 +2,20 @@ # AMD Makefile for compiling on Unix systems (for GNU or original make) #------------------------------------------------------------------------------ -all: dist +default: dist -include ../Make/Make.include +include ../../UFconfig/UFconfig.mk #------------------------------------------------------------------------------ # Remove all but the files in the original distribution #------------------------------------------------------------------------------ -purge: clean +clean: + - $(RM) $(CLEAN) + +purge: distclean + +distclean: clean - $(RM) *.aux *.bbl *.blg *.log *.toc #------------------------------------------------------------------------------ diff --git a/deal.II/contrib/umfpack/AMD/Doc/lesser.txt b/deal.II/contrib/umfpack/AMD/Doc/lesser.txt new file mode 100644 index 0000000000..8add30ad59 --- /dev/null +++ b/deal.II/contrib/umfpack/AMD/Doc/lesser.txt @@ -0,0 +1,504 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/deal.II/contrib/umfpack/AMD/Include/UFconfig.h b/deal.II/contrib/umfpack/AMD/Include/UFconfig.h new file mode 100644 index 0000000000..91bbeac32c --- /dev/null +++ b/deal.II/contrib/umfpack/AMD/Include/UFconfig.h @@ -0,0 +1,113 @@ +/* ========================================================================== */ +/* === UFconfig.h =========================================================== */ +/* ========================================================================== */ + +/* Configuration file for SuiteSparse: a Suite of Sparse matrix packages + * (AMD, COLAMD, CCOLAMD, CAMD, CHOLMOD, UMFPACK, CXSparse, and others). + * + * UFconfig.h provides the definition of the long integer. On most systems, + * a C program can be compiled in LP64 mode, in which long's and pointers are + * both 64-bits, and int's are 32-bits. Windows 64, however, uses the LLP64 + * model, in which int's and long's are 32-bits, and long long's and pointers + * are 64-bits. + * + * SuiteSparse packages that include long integer versions are + * intended for the LP64 mode. However, as a workaround for Windows 64 + * (and perhaps other systems), the long integer can be redefined. + * + * If _WIN64 is defined, then the __int64 type is used instead of long. + * + * The long integer can also be defined at compile time. For example, this + * could be added to UFconfig.mk: + * + * CFLAGS = -O -D'UF_long=long long' -D'UF_long_max=9223372036854775801' \ + * -D'UF_long_id="%lld"' + * + * This file defines UF_long as either long (on all but _WIN64) or + * __int64 on Windows 64. The intent is that a UF_long is always a 64-bit + * integer in a 64-bit code. ptrdiff_t might be a better choice than long; + * it is always the same size as a pointer. + * + * This file also defines the SUITESPARSE_VERSION and related definitions. + * + * Copyright (c) 2007, University of Florida. No licensing restrictions + * apply to this file or to the UFconfig directory. Author: Timothy A. Davis. + */ + +#ifndef _UFCONFIG_H +#define _UFCONFIG_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +/* ========================================================================== */ +/* === UF_long ============================================================== */ +/* ========================================================================== */ + +#ifndef UF_long + +#ifdef _WIN64 + +#define UF_long __int64 +#define UF_long_max _I64_MAX +#define UF_long_id "%I64d" + +#else + +#define UF_long long +#define UF_long_max LONG_MAX +#define UF_long_id "%ld" + +#endif +#endif + +/* ========================================================================== */ +/* === SuiteSparse version ================================================== */ +/* ========================================================================== */ + +/* SuiteSparse is not a package itself, but a collection of packages, some of + * which must be used together (UMFPACK requires AMD, CHOLMOD requires AMD, + * COLAMD, CAMD, and CCOLAMD, etc). A version number is provided here for the + * collection itself. The versions of packages within each version of + * SuiteSparse are meant to work together. Combining one packge from one + * version of SuiteSparse, with another package from another version of + * SuiteSparse, may or may not work. + * + * SuiteSparse Version 3.0.0 contains the following packages: + * + * AMD version 2.2.0 + * CAMD version 2.2.0 + * COLAMD version 2.7.0 + * CCOLAMD version 2.7.0 + * CHOLMOD version 1.5.0 + * CSparse version 2.2.0 + * CXSparse version 2.2.0 + * KLU version 1.0.0 + * BTF version 1.0.0 + * LDL version 2.0.0 + * UFconfig version number is the same as SuiteSparse + * UMFPACK version 5.1.0 + * RBio version 1.1.0 + * UFcollection version 1.1.0 + * + * Other package dependencies: + * BLAS required by CHOLMOD and UMFPACK + * LAPACK required by CHOLMOD + * METIS 4.0.1 required by CHOLMOD (optional) and KLU (optional) + */ + +#define SUITESPARSE_DATE "May 31, 2007" +#define SUITESPARSE_VER_CODE(main,sub) ((main) * 1000 + (sub)) +#define SUITESPARSE_MAIN_VERSION 3 +#define SUITESPARSE_SUB_VERSION 0 +#define SUITESPARSE_SUBSUB_VERSION 0 +#define SUITESPARSE_VERSION \ + SUITESPARSE_VER_CODE(SUITESPARSE_MAIN_VERSION,SUITESPARSE_SUB_VERSION) + +#ifdef __cplusplus +} +#endif +#endif diff --git a/deal.II/contrib/umfpack/AMD/Include/amd.h b/deal.II/contrib/umfpack/AMD/Include/amd.h index d23c0bbe36..e4fd47ec67 100644 --- a/deal.II/contrib/umfpack/AMD/Include/amd.h +++ b/deal.II/contrib/umfpack/AMD/Include/amd.h @@ -3,9 +3,9 @@ /* ========================================================================= */ /* ------------------------------------------------------------------------- */ -/* AMD Version 1.1 (Jan. 21, 2004), Copyright (c) 2004 by Timothy A. Davis, */ -/* Patrick R. Amestoy, and Iain S. Duff. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* AMD Version 2.2, Copyright (c) 2007 by Timothy A. Davis, */ +/* Patrick R. Amestoy, and Iain S. Duff. See ../README.txt for License. */ +/* email: davis at cise.ufl.edu CISE Department, Univ. of Florida. */ /* web: http://www.cise.ufl.edu/research/sparse/amd */ /* ------------------------------------------------------------------------- */ @@ -13,7 +13,7 @@ * factorization of P*A*P' has fewer nonzeros and takes less work than the * Cholesky factorization of A. If A is not symmetric, then it performs its * ordering on the matrix A+A'. Two sets of user-callable routines are - * provided, one for "int" integers and the other for "long" integers. + * provided, one for int integers and the other for UF_long integers. * * The method is based on the approximate minimum degree algorithm, discussed * in Amestoy, Davis, and Duff, "An approximate degree ordering algorithm", @@ -36,7 +36,20 @@ #ifndef AMD_H #define AMD_H -int amd_order ( /* returns 0 if OK, negative value if error */ +/* make it easy for C++ programs to include AMD */ +#ifdef __cplusplus +extern "C" { +#endif + +/* get the definition of size_t: */ +#include + +/* define UF_long */ +#include "UFconfig.h" + +int amd_order /* returns AMD_OK, AMD_OK_BUT_JUMBLED, + * AMD_INVALID, or AMD_OUT_OF_MEMORY */ +( int n, /* A is n-by-n. n must be >= 0. */ const int Ap [ ], /* column pointers for A, of size n+1 */ const int Ai [ ], /* row indices of A, of size nz = Ap [n] */ @@ -45,11 +58,12 @@ int amd_order ( /* returns 0 if OK, negative value if error */ double Info [ ] /* output Info statistics, of size AMD_INFO */ ) ; -long amd_l_order ( /* see above for description of arguments */ - long n, - const long Ap [ ], - const long Ai [ ], - long P [ ], +UF_long amd_l_order /* see above for description of arguments */ +( + UF_long n, + const UF_long Ap [ ], + const UF_long Ai [ ], + UF_long P [ ], double Control [ ], double Info [ ] ) ; @@ -57,15 +71,15 @@ long amd_l_order ( /* see above for description of arguments */ /* Input arguments (not modified): * * n: the matrix A is n-by-n. - * Ap: an int/long array of size n+1, containing the column pointers of A. - * Ai: an int/long array of size nz, containing the row indices of A, + * Ap: an int/UF_long array of size n+1, containing column pointers of A. + * Ai: an int/UF_long array of size nz, containing the row indices of A, * where nz = Ap [n]. * Control: a double array of size AMD_CONTROL, containing control * parameters. Defaults are used if Control is NULL. * * Output arguments (not defined on input): * - * P: an int/long array of size n, containing the output permutation. If + * P: an int/UF_long array of size n, containing the output permutation. If * row i is the kth pivot row, then P [k] = i. In MATLAB notation, * the reordered matrix is A (P,P). * Info: a double array of size AMD_INFO, containing statistical @@ -73,8 +87,15 @@ long amd_l_order ( /* see above for description of arguments */ * * On input, the matrix A is stored in column-oriented form. The row indices * of nonzero entries in column j are stored in Ai [Ap [j] ... Ap [j+1]-1]. - * The row indices must appear in ascending order in each column, and there - * must not be any duplicate entries. Row indices must be in the range 0 to + * + * If the row indices appear in ascending order in each column, and there + * are no duplicate entries, then amd_order is slightly more efficient in + * terms of time and memory usage. If this condition does not hold, a copy + * of the matrix is created (where these conditions do hold), and the copy is + * ordered. This feature is new to v2.0 (v1.2 and earlier required this + * condition to hold for the input matrix). + * + * Row indices must be in the range 0 to * n-1. Ap [0] must be zero, and thus nz = Ap [n] is the number of nonzeros * in A. The array Ap is of size n+1, and the array Ai is of size nz = Ap [n]. * The matrix does not need to be symmetric, and the diagonal does not need to @@ -84,17 +105,12 @@ long amd_l_order ( /* see above for description of arguments */ * pattern of the matrix A is the same as that used internally by MATLAB. * If you wish to use a more flexible input structure, please see the * umfpack_*_triplet_to_col routines in the UMFPACK package, at - * http://www.cise.ufl.edu/research/sparse/umfpack, or use the amd_preprocess - * routine discussed below. + * http://www.cise.ufl.edu/research/sparse/umfpack. * * Restrictions: n >= 0. Ap [0] = 0. Ap [j] <= Ap [j+1] for all j in the - * range 0 to n-1. nz = Ap [n] >= 0. For all j in the range 0 to n-1, - * and for all p in the range Ap [j] to Ap [j+1]-2, Ai [p] < Ai [p+1] must - * hold. Ai [0..nz-1] must be in the range 0 to n-1. To avoid integer - * overflow, (2.4*nz + 8*n) < INT_MAX / sizeof (int) for must hold for the - * "int" version. (2.4*nz + 8*n) < LONG_MAX / sizeof (long) must hold - * for the "long" version. Finally, Ai, Ap, and P must not be NULL. If - * any of these restrictions are not met, AMD returns AMD_INVALID. + * range 0 to n-1. nz = Ap [n] >= 0. Ai [0..nz-1] must be in the range 0 + * to n-1. Finally, Ai, Ap, and P must not be NULL. If any of these + * restrictions are not met, AMD returns AMD_INVALID. * * AMD returns: * @@ -106,6 +122,9 @@ long amd_l_order ( /* see above for description of arguments */ * AMD_INVALID if the input arguments n, Ap, Ai are invalid, or if P is * NULL. * + * AMD_OK_BUT_JUMBLED if the matrix had unsorted columns, and/or duplicate + * entries, but was otherwise valid. + * * The AMD routine first forms the pattern of the matrix A+A', and then * computes a fill-reducing ordering, P. If P [k] = i, then row/column i of * the original is the kth pivotal row. In MATLAB notation, the permuted @@ -144,7 +163,7 @@ long amd_l_order ( /* see above for description of arguments */ * condition. * * Info [AMD_STATUS]: the return value of AMD, either AMD_OK, - * AMD_OUT_OF_MEMORY, or AMD_INVALID. + * AMD_OK_BUT_JUMBLED, AMD_OUT_OF_MEMORY, or AMD_INVALID. * * Info [AMD_N]: n, the size of the input matrix * @@ -206,105 +225,102 @@ long amd_l_order ( /* see above for description of arguments */ */ /* ------------------------------------------------------------------------- */ -/* AMD preprocess */ +/* direct interface to AMD */ /* ------------------------------------------------------------------------- */ -/* amd_preprocess: sorts, removes duplicate entries, and transposes the - * nonzero pattern of a column-form matrix A, to obtain the matrix R. - * - * Alternatively, you can consider this routine as constructing a row-form - * matrix from a column-form matrix. Duplicate entries are allowed in A (and - * removed in R). The columns of R are sorted. Checks its input A for errors. - * - * On input, A can have unsorted columns, and can have duplicate entries. - * Ap [0] must still be zero, and Ap must be monotonically nondecreasing. - * Row indices must be in the range 0 to n-1. - * - * On output, if this routine returns AMD_OK, then the matrix R is a valid - * input matrix for AMD_order. It has sorted columns, with no duplicate - * entries in each column. Since AMD_order operates on the matrix A+A', it - * can just as easily use A or A', so the transpose has no significant effect - * (except for minor tie-breaking, which can lead to a minor effect in the - * quality of the ordering). As an example, compare the output of amd_demo.c - * and amd_demo2.c. - * - * This routine transposes A to get R because that's the simplest way to - * sort and remove duplicate entries from a matrix. - * - * Allocates 2*n integer work arrays, and free's them when done. - * - * If you wish to call amd_order, but do not know if your matrix has unsorted - * columns or duplicate entries, then you can use the following code, which is - * fairly efficient. amd_order will not allocate any internal matrix until - * it checks that the input matrix is valid, so the method below is memory- - * efficient as well. This code snippet assumes that Rp and Ri are already - * allocated, and are the same size as Ap and Ai respectively. - - result = amd_order (n, p, Ap, Ai, Control, Info) ; - if (result == AMD_INVALID) - { - if (amd_preprocess (n, Ap, Ai, Rp, Ri) == AMD_OK) - { - result = amd_order (n, p, Rp, Ri, Control, Info) ; - } - } - - * amd_preprocess will still return AMD_INVALID if any row index in Ai is out - * of range or if the Ap array is invalid. These errors are not corrected by - * amd_preprocess since they represent a more serious error that should be - * flagged with the AMD_INVALID error code. - */ - -int amd_preprocess +/* amd_2 is the primary AMD ordering routine. It is not meant to be + * user-callable because of its restrictive inputs and because it destroys + * the user's input matrix. It does not check its inputs for errors, either. + * However, if you can work with these restrictions it can be faster than + * amd_order and use less memory (assuming that you can create your own copy + * of the matrix for AMD to destroy). Refer to AMD/Source/amd_2.c for a + * description of each parameter. */ + +void amd_2 ( int n, - const int Ap [ ], - const int Ai [ ], - int Rp [ ], - int Ri [ ] + int Pe [ ], + int Iw [ ], + int Len [ ], + int iwlen, + int pfree, + int Nv [ ], + int Next [ ], + int Last [ ], + int Head [ ], + int Elen [ ], + int Degree [ ], + int W [ ], + double Control [ ], + double Info [ ] ) ; -long amd_l_preprocess +void amd_l2 ( - long n, - const long Ap [ ], - const long Ai [ ], - long Rp [ ], - long Ri [ ] + UF_long n, + UF_long Pe [ ], + UF_long Iw [ ], + UF_long Len [ ], + UF_long iwlen, + UF_long pfree, + UF_long Nv [ ], + UF_long Next [ ], + UF_long Last [ ], + UF_long Head [ ], + UF_long Elen [ ], + UF_long Degree [ ], + UF_long W [ ], + double Control [ ], + double Info [ ] ) ; -/* Input arguments (not modified): - * - * n: the matrix A is n-by-n. - * Ap: an int/long array of size n+1, containing the column pointers of A. - * Ai: an int/long array of size nz, containing the row indices of A, - * where nz = Ap [n]. - * The nonzero pattern of column j of A is in Ai [Ap [j] ... Ap [j+1]-1]. - * Ap [0] must be zero, and Ap [j] <= Ap [j+1] must hold for all j in the - * range 0 to n-1. Row indices in Ai must be in the range 0 to n-1. - * The row indices in any one column need not be sorted, and duplicates - * may exist. - * - * Output arguments (not defined on input): - * - * Rp: an int/long array of size n+1, containing the column pointers of R. - * Ri: an int/long array of size rnz, containing the row indices of R, - * where rnz = Rp [n]. Note that Rp [n] will be less than Ap [n] if - * duplicates appear in A. In general, Rp [n] <= Ap [n]. - * The data structure for R is the same as A, except that each column of - * R contains sorted row indices, and no duplicates appear in any column. - * - * amd_preprocess returns: - * - * AMD_OK if the matrix A is valid and sufficient memory can be allocated - * to perform the preprocessing. - * - * AMD_OUT_OF_MEMORY if not enough memory can be allocated. - * - * AMD_INVALID if the input arguments n, Ap, Ai are invalid, or if Rp or - * Ri are NULL. +/* ------------------------------------------------------------------------- */ +/* amd_valid */ +/* ------------------------------------------------------------------------- */ + +/* Returns AMD_OK or AMD_OK_BUT_JUMBLED if the matrix is valid as input to + * amd_order; the latter is returned if the matrix has unsorted and/or + * duplicate row indices in one or more columns. Returns AMD_INVALID if the + * matrix cannot be passed to amd_order. For amd_order, the matrix must also + * be square. The first two arguments are the number of rows and the number + * of columns of the matrix. For its use in AMD, these must both equal n. + * + * NOTE: this routine returned TRUE/FALSE in v1.2 and earlier. */ +int amd_valid +( + int n_row, /* # of rows */ + int n_col, /* # of columns */ + const int Ap [ ], /* column pointers, of size n_col+1 */ + const int Ai [ ] /* row indices, of size Ap [n_col] */ +) ; + +UF_long amd_l_valid +( + UF_long n_row, + UF_long n_col, + const UF_long Ap [ ], + const UF_long Ai [ ] +) ; + +/* ------------------------------------------------------------------------- */ +/* AMD memory manager and printf routines */ +/* ------------------------------------------------------------------------- */ + +/* The user can redefine these to change the malloc, free, and printf routines + * that AMD uses. */ + +#ifndef EXTERN +#define EXTERN extern +#endif + +EXTERN void *(*amd_malloc) (size_t) ; /* pointer to malloc */ +EXTERN void (*amd_free) (void *) ; /* pointer to free */ +EXTERN void *(*amd_realloc) (void *, size_t) ; /* pointer to realloc */ +EXTERN void *(*amd_calloc) (size_t, size_t) ; /* pointer to calloc */ +EXTERN int (*amd_printf) (const char *, ...) ; /* pointer to printf */ + /* ------------------------------------------------------------------------- */ /* AMD Control and Info arrays */ /* ------------------------------------------------------------------------- */ @@ -353,7 +369,44 @@ void amd_l_info (double Info [ ]) ; /* ------------------------------------------------------------------------- */ #define AMD_OK 0 /* success */ -#define AMD_OUT_OF_MEMORY -1 /* malloc failed */ +#define AMD_OUT_OF_MEMORY -1 /* malloc failed, or problem too large */ #define AMD_INVALID -2 /* input arguments are not valid */ +#define AMD_OK_BUT_JUMBLED 1 /* input matrix is OK for amd_order, but + * columns were not sorted, and/or duplicate entries were present. AMD had + * to do extra work before ordering the matrix. This is a warning, not an + * error. */ + +/* ========================================================================== */ +/* === AMD version ========================================================== */ +/* ========================================================================== */ + +/* AMD Version 1.2 and later include the following definitions. + * As an example, to test if the version you are using is 1.2 or later: + * + * #ifdef AMD_VERSION + * if (AMD_VERSION >= AMD_VERSION_CODE (1,2)) ... + * #endif + * + * This also works during compile-time: + * + * #if defined(AMD_VERSION) && (AMD_VERSION >= AMD_VERSION_CODE (1,2)) + * printf ("This is version 1.2 or later\n") ; + * #else + * printf ("This is an early version\n") ; + * #endif + * + * Versions 1.1 and earlier of AMD do not include a #define'd version number. + */ + +#define AMD_DATE "May 31, 2007" +#define AMD_VERSION_CODE(main,sub) ((main) * 1000 + (sub)) +#define AMD_MAIN_VERSION 2 +#define AMD_SUB_VERSION 2 +#define AMD_SUBSUB_VERSION 0 +#define AMD_VERSION AMD_VERSION_CODE(AMD_MAIN_VERSION,AMD_SUB_VERSION) + +#ifdef __cplusplus +} +#endif #endif diff --git a/deal.II/contrib/umfpack/AMD/Source/amd_internal.h b/deal.II/contrib/umfpack/AMD/Include/amd_internal.h similarity index 65% rename from deal.II/contrib/umfpack/AMD/Source/amd_internal.h rename to deal.II/contrib/umfpack/AMD/Include/amd_internal.h index e1ec500bd3..d515b64e24 100644 --- a/deal.II/contrib/umfpack/AMD/Source/amd_internal.h +++ b/deal.II/contrib/umfpack/AMD/Include/amd_internal.h @@ -3,54 +3,47 @@ /* ========================================================================= */ /* ------------------------------------------------------------------------- */ -/* AMD Version 1.1 (Jan. 21, 2004), Copyright (c) 2004 by Timothy A. Davis, */ -/* Patrick R. Amestoy, and Iain S. Duff. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* AMD, Copyright (c) Timothy A. Davis, */ +/* Patrick R. Amestoy, and Iain S. Duff. See ../README.txt for License. */ +/* email: davis at cise.ufl.edu CISE Department, Univ. of Florida. */ /* web: http://www.cise.ufl.edu/research/sparse/amd */ /* ------------------------------------------------------------------------- */ /* This file is for internal use in AMD itself, and does not normally need to - * be included in user code. Use amd.h instead. + * be included in user code (it is included in UMFPACK, however). All others + * should use amd.h instead. * * The following compile-time definitions affect how AMD is compiled. * - * -DMATLAB_MEX_FILE + * -DNPRINT * - * This flag is turned on when compiling the amd mexFunction for - * use in MATLAB. + * Disable all printing. stdio.h will not be included. Printing can + * be re-enabled at run-time by setting the global pointer amd_printf + * to printf (or mexPrintf for a MATLAB mexFunction). * - * -DMATHWORKS + * -DNMALLOC * - * This flag is turned on when compiling amd as a built-in routine - * in MATLAB. Internal routines utMalloc, utFree, utRealloc, and - * utPrintf are used, and the MathWorks "util.h" file is included. - * This option is intended for use by The MathWorks, Inc., only. - * - * -DNDEBUG - * - * Debugging mode (if NDEBUG is not defined). The default, of course, - * is no debugging. Turning on debugging takes some work (see below). - * If you do not edit this file, then debugging is turned off anyway, - * regardless of whether or not -DNDEBUG is specified in your compiler - * options. - * - * -DALLOCATE=allocation_routine - * -DFREE=free_routine - * - * If you do not wish to use malloc or free, you can define the - * routines to be used here. You must specify both of them, or - * neither. - * - * -DPRINTF=printf_routine - * - * If you wish to use a routine other than printf, you can define it - * with -DPRINTF= followed by the name of the printf replacement. + * No memory manager is defined at compile-time. You MUST define the + * function pointers amd_malloc, amd_free, amd_realloc, and + * amd_calloc at run-time for AMD to work properly. */ /* ========================================================================= */ /* === NDEBUG ============================================================== */ /* ========================================================================= */ +/* + * Turning on debugging takes some work (see below). If you do not edit this + * file, then debugging is always turned off, regardless of whether or not + * -DNDEBUG is specified in your compiler options. + * + * If AMD is being compiled as a mexFunction, then MATLAB_MEX_FILE is defined, + * and mxAssert is used instead of assert. If debugging is not enabled, no + * MATLAB include files or functions are used. Thus, the AMD library libamd.a + * can be safely used in either a stand-alone C program or in another + * mexFunction, without any change. + */ + /* AMD will be exceedingly slow when running in debug mode. The next three lines ensure that debugging is turned off. @@ -68,11 +61,14 @@ /* ANSI include files */ /* ------------------------------------------------------------------------- */ -/* from stdlib.h: malloc, free, realloc (when not compiling for MATLAB) */ +/* from stdlib.h: size_t, malloc, free, realloc, and calloc */ #include -/* from stdio.h: printf. When in debug mode: fopen, fscanf */ +#if !defined(NPRINT) || !defined(NDEBUG) +/* from stdio.h: printf. Not included if NPRINT is defined at compile time. + * fopen and fscanf are used when debugging. */ #include +#endif /* from limits.h: INT_MAX and LONG_MAX */ #include @@ -84,10 +80,6 @@ /* MATLAB include files (only if being used in or via MATLAB) */ /* ------------------------------------------------------------------------- */ -#ifdef MATHWORKS -#include "util.h" -#endif - #ifdef MATLAB_MEX_FILE #include "matrix.h" #include "mex.h" @@ -160,16 +152,23 @@ #define NULL 0 +/* largest value of size_t */ +#ifndef SIZE_T_MAX +#define SIZE_T_MAX ((size_t) (-1)) +#endif + /* ------------------------------------------------------------------------- */ -/* integer type for AMD: int or long */ +/* integer type for AMD: int or UF_long */ /* ------------------------------------------------------------------------- */ +/* define UF_long */ +#include "UFconfig.h" + #if defined (DLONG) || defined (ZLONG) -#define Int long -#define ID "%ld" -#define Int_MAX LONG_MAX -#define Int_MIN LONG_MIN +#define Int UF_long +#define ID UF_long_id +#define Int_MAX UF_long_max #define AMD_order amd_l_order #define AMD_defaults amd_l_defaults @@ -184,16 +183,13 @@ #define AMD_dump amd_l_dump #define AMD_debug amd_l_debug #define AMD_debug_init amd_l_debug_init -#define AMD_wpreprocess amd_l_wpreprocess #define AMD_preprocess amd_l_preprocess -#define AMD_preprocess_valid amd_l_preprocess_valid #else #define Int int #define ID "%d" #define Int_MAX INT_MAX -#define Int_MIN INT_MIN #define AMD_order amd_order #define AMD_defaults amd_defaults @@ -208,55 +204,16 @@ #define AMD_dump amd_dump #define AMD_debug amd_debug #define AMD_debug_init amd_debug_init -#define AMD_wpreprocess amd_wpreprocess #define AMD_preprocess amd_preprocess -#define AMD_preprocess_valid amd_preprocess_valid #endif -/* ========================================================================= */ -/* === Memory allocator ==================================================== */ -/* ========================================================================= */ - -/* The MATLAB mexFunction uses MATLAB's memory manager, while the C-callable */ -/* AMD routine uses the ANSI C malloc, free, and realloc routines. */ - -#ifndef ALLOCATE -#ifdef MATLAB_MEX_FILE -#define ALLOCATE mxMalloc -#define FREE mxFree -#else -#ifdef MATHWORKS -/* Compiling as a built-in routine. Since out-of-memory conditions are checked - * after every allocation, we can use ut* routines here. */ -#define ALLOCATE utMalloc -#define FREE utFree -#else -/* use the ANSI C memory allocation routines */ -#define ALLOCATE malloc -#define FREE free -#endif -#endif -#endif - - /* ========================================================================= */ /* === PRINTF macro ======================================================== */ /* ========================================================================= */ /* All output goes through the PRINTF macro. */ - -#ifndef PRINTF -#ifdef MATLAB_MEX_FILE -#define PRINTF(params) { (void) mexPrintf params ; } -#else -#ifdef MATHWORKS -#define PRINTF(params) { (void) utPrintf params ; } -#else -#define PRINTF(params) { (void) printf params ; } -#endif -#endif -#endif +#define PRINTF(params) { if (amd_printf != NULL) (void) amd_printf params ; } /* ------------------------------------------------------------------------- */ /* AMD routine definitions (user-callable) */ @@ -268,21 +225,13 @@ /* AMD routine definitions (not user-callable) */ /* ------------------------------------------------------------------------- */ -GLOBAL Int AMD_valid -( - Int n_row, - Int n_col, - const Int Ap [ ], - const Int Ai [ ] -) ; - -GLOBAL Int AMD_aat +GLOBAL size_t AMD_aat ( Int n, const Int Ap [ ], const Int Ai [ ], Int Len [ ], - Int Tp [ ], + Int Tp [ ], double Info [ ] ) ; @@ -300,24 +249,6 @@ GLOBAL void AMD_1 double Info [ ] ) ; -GLOBAL void AMD_2 ( - Int n, - Int Pe [ ], - Int Iw [ ], - Int Len [ ], - Int iwlen, - Int pfree, - Int Nv [ ], - Int Next [ ], - Int Last [ ], - Int Head [ ], - Int Elen [ ], - Int Degree [ ], - Int W [ ], - double Control [ ], - double Info [ ] -) ; - GLOBAL void AMD_postorder ( Int nn, @@ -343,7 +274,7 @@ GLOBAL Int AMD_post_tree #endif ) ; -GLOBAL void AMD_wpreprocess +GLOBAL void AMD_preprocess ( Int n, const Int Ap [ ], @@ -354,29 +285,25 @@ GLOBAL void AMD_wpreprocess Int Flag [ ] ) ; -GLOBAL Int AMD_preprocess_valid -( - Int n, - const Int Ap [ ], - const Int Ai [ ] -) ; - /* ------------------------------------------------------------------------- */ /* debugging definitions */ /* ------------------------------------------------------------------------- */ +#ifndef NDEBUG + /* from assert.h: assert macro */ -#if !defined (MATHWORKS) && !defined (MATLAB_MEX_FILE) #include -#endif -#ifndef NDEBUG +#ifndef EXTERN +#define EXTERN extern +#endif -GLOBAL Int AMD_debug ; +EXTERN Int AMD_debug ; GLOBAL void AMD_debug_init ( char *s ) ; -GLOBAL void AMD_dump ( +GLOBAL void AMD_dump +( Int n, Int Pe [ ], Int Iw [ ], @@ -397,15 +324,12 @@ GLOBAL void AMD_dump ( #undef ASSERT #endif +/* Use mxAssert if AMD is compiled into a mexFunction */ #ifdef MATLAB_MEX_FILE #define ASSERT(expression) (mxAssert ((expression), "")) #else -#ifdef MATHWORKS -#define ASSERT(expression) (utAssert (expression)) -#else #define ASSERT(expression) (assert (expression)) #endif -#endif /* MATLAB_MEX_FILE */ #define AMD_DEBUG0(params) { PRINTF (params) ; } #define AMD_DEBUG1(params) { if (AMD_debug >= 1) PRINTF (params) ; } @@ -415,12 +339,12 @@ GLOBAL void AMD_dump ( #else +/* no debugging */ +#define ASSERT(expression) #define AMD_DEBUG0(params) #define AMD_DEBUG1(params) #define AMD_DEBUG2(params) #define AMD_DEBUG3(params) #define AMD_DEBUG4(params) -#define ASSERT(expression) - #endif diff --git a/deal.II/contrib/umfpack/AMD/README.txt b/deal.II/contrib/umfpack/AMD/README.txt index e47f18e60a..c6fd2e0a4b 100644 --- a/deal.II/contrib/umfpack/AMD/README.txt +++ b/deal.II/contrib/umfpack/AMD/README.txt @@ -1,46 +1,63 @@ -AMD version 1.1: a set of routines for permuting sparse matrices prior to +AMD Version 2.2, Copyright (c) 2007 by Timothy A. +Davis, Patrick R. Amestoy, and Iain S. Duff. All Rights Reserved. +AMD is available under alternate licences; contact T. Davis for details. + +AMD: a set of routines for permuting sparse matrices prior to factorization. Includes a version in C, a version in Fortran, and a MATLAB mexFunction. +Requires UFconfig, in the ../UFconfig directory relative to this directory. + Quick start (Unix, or Windows with Cygwin): To compile, test, and install AMD, you may wish to first configure the - installation by editting the AMD/Make/Make.include file. Next, cd to this + installation by editting the ../UFconfig/UFconfig.mk file. Next, cd to this directory (AMD) and type "make" (or "make lib" if you do not have MATLAB). To compile and run a demo program for the Fortran version, type "make fortran". When done, type "make clean" to remove unused *.o files (keeps the compiled libraries and demo programs). See the User Guide - (Doc/AMD_UserGuide.pdf), or AMD/Make/Make.include, for more details. + (Doc/AMD_UserGuide.pdf), or ../UFconfig/UFconfig.mk for more details. Quick start (for MATLAB users); To compile, test, and install the AMD mexFunction, cd to the AMD/MATLAB directory and type amd_make at the MATLAB prompt. - This works on any system supported by MATLAB. -------------------------------------------------------------------------------- +If you have MATLAB 7.2 or earlier and use "make mex", you must first edit +UFconfig/UFconfig.h to remove the "-largeArrayDims" option from the MEX command +(or just use amd_make.m inside MATLAB). -AMD Version 1.1 (Jan. 21, 2004), Copyright (c) 2004 by Timothy A. -Davis, Patrick R. Amestoy, and Iain S. Duff. All Rights Reserved. +------------------------------------------------------------------------------- AMD License: Your use or distribution of AMD or any modified version of AMD 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 - uses AMD or any modified version of AMD code must cite the - Copyright, this License, the Availability note, and "Used by permission." - Permission to modify the code and to distribute modified code is granted, - provided the Copyright, this License, and the Availability note are - 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. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + USA + + Permission is hereby granted to use or copy this program under the + terms of the GNU LGPL, provided that the Copyright, this License, + and the Availability of the original version is retained on all copies. + User documentation of any code that uses this code or any modified + version of this code must cite the Copyright, this License, the + Availability note, and "Used by permission." Permission to modify + the code and to distribute modified code is granted, provided the + Copyright, this License, and the Availability note are retained, + and a notice that the code was modified is included. Availability: @@ -48,8 +65,9 @@ Availability: ------------------------------------------------------------------------------- -This is the AMD Version 1.1 README file. It is a terse overview of AMD. -Refer to the User Guide (Doc/AMD_UserGuide.pdf) for how to install and use AMD. +This is the AMD README file. It is a terse overview of AMD. +Refer to the User Guide (Doc/AMD_UserGuide.pdf) for how to install +and use AMD. Description: @@ -60,7 +78,7 @@ Description: Authors: - Timothy A. Davis (davis@cise.ufl.edu), University of Florida. + Timothy A. Davis (davis at cise.ufl.edu), University of Florida. Patrick R. Amestory, ENSEEIHT, Toulouse, France. Iain S. Duff, Rutherford Appleton Laboratory, UK. @@ -75,7 +93,7 @@ Acknowledgements: for making this sabbatical possible. ------------------------------------------------------------------------------- -Files and directories in the AMD v1.0 distribution: +Files and directories in the AMD distribution: ------------------------------------------------------------------------------- --------------------------------------------------------------------------- @@ -83,7 +101,6 @@ Files and directories in the AMD v1.0 distribution: --------------------------------------------------------------------------- Doc documentation - Make for compiling AMD Source primary source code Include include file for use in your code that calls AMD Demo demo programs. also serves as test of the AMD installation. @@ -98,7 +115,7 @@ Files and directories in the AMD v1.0 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 @@ -109,42 +126,28 @@ Files and directories in the AMD v1.0 distribution: Makefile for creating the documentation AMD_UserGuide.bib AMD User Guide (references) AMD_UserGuide.tex AMD User Guide (LaTeX) - AMD_UserGuide.pdf AmD User Guide (PDF) - - --------------------------------------------------------------------------- - Make directory: for compiling AMD (Lib/libamd.a and Lib/libamdf77.a) - --------------------------------------------------------------------------- - - Make.include overall configurations. Can use one of: - Make.alpha Makefile additions for Compaq Alpha - Make.linux Makefile additions for Linux - Make.rs6000 Makefile additions for RS 6000 - Make.sgi Makefile additions for SGI - Make.solaris Makefile additions for Solaris + AMD_UserGuide.pdf AMD User Guide (PDF) + lesser.txt the GNU LGPL license --------------------------------------------------------------------------- Source directory: --------------------------------------------------------------------------- - GNUmakefile a nice Makefile, for GNU make - Makefile an ugly Unix Makefile (for older make's) - amd_order.c user-callable, primary AMD ordering routine amd_control.c user-callable, prints the control parameters amd_defaults.c user-callable, sets default control parameters amd_info.c user-callable, prints the statistics from AMD amd_1.c non-user-callable, construct A+A' - amd_2.c non-user-callable, primary ordering kernel + amd_2.c user-callable, primary ordering kernel (a C version of amd.f and amdbar.f, with post-ordering added) amd_aat.c non-user-callable, computes nnz (A+A') amd_dump.c non-user-callable, debugging routines - amd_internal.h non-user-callable, include file for AMD - amd_mex.c non-user-callable, MATLAB mexFunction amd_postorder.c non-user-callable, postorder amd_post_tree.c non-user-callable, postorder just one tree amd_valid.c non-user-callable, verifies a matrix + amd_preprocess.c non-user-callable, computes A', removes duplic amd.f user-callable Fortran 77 version amdbar.f user-callable Fortran 77 version @@ -154,6 +157,7 @@ Files and directories in the AMD v1.0 distribution: --------------------------------------------------------------------------- amd.h include file for C programs that use AMD + amd_internal.h non-user-callable, include file for AMD --------------------------------------------------------------------------- Demo directory: @@ -164,6 +168,12 @@ Files and directories in the AMD v1.0 distribution: amd_demo.c C demo program for AMD amd_demo.out output of amd_demo.c + amd_demo2.c C demo program for AMD, jumbled matrix + amd_demo2.out output of amd_demo2.c + + amd_l_demo.c C demo program for AMD (UF_long version) + amd_l_demo.out output of amd_l_demo.c + amd_simple.c simple C demo program for AMD amd_simple.out output of amd_simple.c @@ -184,10 +194,11 @@ Files and directories in the AMD v1.0 distribution: GNUmakefile a nice Makefile, for GNU make Makefile an ugly Unix Makefile (for older make's) - Contents.m for "help amd" listing of toolbox contents + Contents.m for "help amd2" listing of toolbox contents - amd.m MATLAB help file for AMD + amd2.m MATLAB help file for AMD amd_make.m MATLAB m-file for compiling AMD mexFunction + amd_install.m compile and install the AMD mexFunction amd_mex.c AMD mexFunction for MATLAB @@ -199,4 +210,6 @@ Files and directories in the AMD v1.0 distribution: Lib directory: libamd.a and libamdf77.a libraries placed here --------------------------------------------------------------------------- + GNUmakefile a nice Makefile, for GNU make + Makefile an ugly Unix Makefile (for older make's) libamd.def AMD definitions for Windows diff --git a/deal.II/contrib/umfpack/AMD/Source/Makefile b/deal.II/contrib/umfpack/AMD/Source/Makefile index 43f8aa6af9..63d45e000a 100644 --- a/deal.II/contrib/umfpack/AMD/Source/Makefile +++ b/deal.II/contrib/umfpack/AMD/Source/Makefile @@ -11,7 +11,7 @@ include ../../../../common/Make.global_options 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_preprocess -INC = ../Include/amd.h amd_internal.h +INC = ../Include/amd.h #------------------------------------------------------------------------------- # object files for each version @@ -32,4 +32,9 @@ $D/lib/contrib/umfpack/amd_l_%.$(OBJEXT): amd_%.c $(INC) @echo =====umfpack==========optimized====== $(= wbig) + { + for (x = 0 ; x < n ; x++) + { + if (W [x] != 0) W [x] = 1 ; + } + wflg = 2 ; + } + /* at this point, W [0..n-1] < wflg holds */ + return (wflg) ; +} + + +/* ========================================================================= */ +/* === AMD_2 =============================================================== */ +/* ========================================================================= */ + GLOBAL void AMD_2 ( Int n, /* A is n-by-n, where n > 0 */ @@ -42,7 +66,7 @@ GLOBAL void AMD_2 { /* - * Given a representation of the nonzero pattern of a symmetric matrix, A, + * Given a representation of the nonzero pattern of a symmetric matrix, A, * (excluding the diagonal) perform an approximate minimum (UMFPACK/MA38-style) * degree ordering to compute a pivot order such that the introduction of * nonzeros (fill-in) in the Cholesky factors A = LL' is kept low. At each @@ -50,15 +74,15 @@ GLOBAL void AMD_2 * upper-bound on the external degree. This routine can optionally perform * aggresive absorption (as done by MC47B in the Harwell Subroutine * Library). - * + * * The approximate degree algorithm implemented here is the symmetric analog of * the degree update algorithm in MA38 and UMFPACK (the Unsymmetric-pattern * MultiFrontal PACKage, both by Davis and Duff). The routine is based on the * MA27 minimum degree ordering algorithm by Iain Duff and John Reid. - * + * * This routine is a translation of the original AMDBAR and MC47B routines, * in Fortran, with the following modifications: - * + * * (1) dense rows/columns are removed prior to ordering the matrix, and placed * last in the output order. The presence of a dense row/column can * increase the ordering time by up to O(n^2), unless they are removed @@ -96,8 +120,8 @@ GLOBAL void AMD_2 * ouput. Many of these functions are also provided by the Fortran * Harwell Subroutine Library routine MC47A. * - * (6) both "int" and "long" versions are provided. In the descriptions below - * and integer is and "int" or "long", depending on which version is + * (6) both int and UF_long versions are provided. In the descriptions below + * and integer is and int or UF_long depending on which version is * being used. ********************************************************************** @@ -172,7 +196,7 @@ GLOBAL void AMD_2 * ---------------------------------------------------------------------------- * INPUT ARGUMENTS (unaltered): * ---------------------------------------------------------------------------- - + * n: The matrix order. Restriction: n >= 1. * * iwlen: The size of the Iw array. On input, the matrix is stored in @@ -436,7 +460,7 @@ GLOBAL void AMD_2 Int deg, degme, dext, lemax, e, elenme, eln, i, ilast, inext, j, jlast, jnext, k, knt1, knt2, knt3, lenj, ln, me, mindeg, nel, nleft, - nvi, nvj, nvpiv, slenme, wbig, we, wflg, wnvi, x, ok, ndense, ncmpa, + nvi, nvj, nvpiv, slenme, wbig, we, wflg, wnvi, ok, ndense, ncmpa, dense, aggressive ; unsigned Int hash ; /* unsigned, so that hash % n is well defined.*/ @@ -471,8 +495,8 @@ GLOBAL void AMD_2 * nvj: the number of variables in a supervariable j (= Nv [j]) * nvpiv: number of pivots in current element * slenme: number of variables in variable list of pivotal variable - * wbig: = INT_MAX - n for the "int" version, LONG_MAX - n for the - * "long" version. wflg is not allowed to be >= wbig. + * wbig: = INT_MAX - n for the int version, UF_long_max - n for the + * UF_long version. wflg is not allowed to be >= wbig. * we: W [e] * wflg: used for flagging the W array. See description of Iw. * wnvi: wflg - Nv [i] @@ -552,19 +576,10 @@ GLOBAL void AMD_2 dmax = 1 ; me = EMPTY ; - wflg = 2 ; mindeg = 0 ; ncmpa = 0 ; nel = 0 ; - lemax = 0 ; /* this is called dmax in the Fortran version */ - -#ifdef TEST_FOR_INTEGER_OVERFLOW - /* for testing only */ - wbig = 3*n ; -#else - /* normal operation */ - wbig = Int_MAX - n ; -#endif + lemax = 0 ; /* get control parameters */ if (Control != (double *) NULL) @@ -577,10 +592,11 @@ GLOBAL void AMD_2 alpha = AMD_DEFAULT_DENSE ; aggressive = AMD_DEFAULT_AGGRESSIVE ; } + /* Note: if alpha is NaN, this is undefined: */ if (alpha < 0) { - /* no dense rows/columns */ - dense = n ; + /* only remove completely dense rows/columns */ + dense = n-2 ; } else { @@ -588,14 +604,15 @@ GLOBAL void AMD_2 } dense = MAX (16, dense) ; dense = MIN (n, dense) ; - AMD_DEBUG1 (("AMD (debug), alpha %g, aggr. "ID"\n", alpha, aggressive)) ; + AMD_DEBUG1 (("\n\nAMD (debug), alpha %g, aggr. "ID"\n", + alpha, aggressive)) ; for (i = 0 ; i < n ; i++) { Last [i] = EMPTY ; Head [i] = EMPTY ; Next [i] = EMPTY ; - /* if seperate Hhead array is used for hash buckets: * + /* if separate Hhead array is used for hash buckets: * Hhead [i] = EMPTY ; */ Nv [i] = 1 ; @@ -605,18 +622,21 @@ GLOBAL void AMD_2 } #ifndef NDEBUG - AMD_DEBUG1 (("\n======Nel "ID"\n", nel)) ; + AMD_DEBUG1 (("\n======Nel "ID" initial\n", nel)) ; AMD_dump (n, Pe, Iw, Len, iwlen, pfree, Nv, Next, Last, Head, Elen, Degree, W, -1) ; #endif + /* initialize wflg */ + wbig = Int_MAX - n ; + wflg = clear_flag (0, wbig, W, n) ; + /* --------------------------------------------------------------------- */ /* initialize degree lists and eliminate dense and empty rows */ /* --------------------------------------------------------------------- */ ndense = 0 ; - /* for (i = n-1 ; i >= 0 ; i--) */ for (i = 0 ; i < n ; i++) { deg = Degree [i] ; @@ -680,8 +700,11 @@ GLOBAL void AMD_2 #ifndef NDEBUG AMD_DEBUG1 (("\n======Nel "ID"\n", nel)) ; - if (AMD_debug >= 2) AMD_dump (n, Pe, Iw, Len, iwlen, pfree, Nv, Next, - Last, Head, Elen, Degree, W, nel) ; + if (AMD_debug >= 2) + { + AMD_dump (n, Pe, Iw, Len, iwlen, pfree, Nv, Next, + Last, Head, Elen, Degree, W, nel) ; + } #endif /* ========================================================================= */ @@ -761,7 +784,7 @@ GLOBAL void AMD_2 /* store i in new list */ /* ----------------------------------------------------- */ - /* flag i as being in Lme by negating Nv [i] */ + /* flag i as being in Lme by negating Nv [i] */ degme += nvi ; Nv [i] = -nvi ; Iw [++pme2] = i ; @@ -781,7 +804,7 @@ GLOBAL void AMD_2 } else { - /* i is at the head of the degree list */ + /* i is at the head of the degree list */ ASSERT (Degree [i] >= 0 && Degree [i] < n) ; Head [Degree [i]] = inext ; } @@ -812,7 +835,7 @@ GLOBAL void AMD_2 } else { - /* search the elements in me. */ + /* search the elements in me. */ e = Iw [p++] ; ASSERT (e >= 0 && e < n) ; pj = Pe [e] ; @@ -856,17 +879,17 @@ GLOBAL void AMD_2 Pe [me] = p ; Len [me] -= knt1 ; - /* check if nothing left of supervariable me */ + /* check if nothing left of supervariable me */ if (Len [me] == 0) Pe [me] = EMPTY ; Pe [e] = pj ; Len [e] = ln - knt2 ; - /* nothing left of element e */ + /* nothing left of element e */ if (Len [e] == 0) Pe [e] = EMPTY ; ncmpa++ ; /* one more garbage collection */ - /* store first entry of each object in Pe */ - /* FLIP the first entry in each object */ + /* store first entry of each object in Pe */ + /* FLIP the first entry in each object */ for (j = 0 ; j < n ; j++) { pn = Pe [j] ; @@ -878,7 +901,7 @@ GLOBAL void AMD_2 } } - /* psrc/pdst point to source/destination */ + /* psrc/pdst point to source/destination */ psrc = 0 ; pdst = 0 ; pend = pme1 - 1 ; @@ -901,7 +924,7 @@ GLOBAL void AMD_2 } } - /* move the new partially-constructed element */ + /* move the new partially-constructed element */ p1 = pdst ; for (psrc = pme1 ; psrc <= pfree-1 ; psrc++) { @@ -919,7 +942,7 @@ GLOBAL void AMD_2 /* store i in new list */ /* ------------------------------------------------- */ - /* flag i as being in Lme by negating Nv [i] */ + /* flag i as being in Lme by negating Nv [i] */ degme += nvi ; Nv [i] = -nvi ; Iw [pfree++] = i ; @@ -940,7 +963,7 @@ GLOBAL void AMD_2 } else { - /* i is at the head of the degree list */ + /* i is at the head of the degree list */ ASSERT (Degree [i] >= 0 && Degree [i] < n) ; Head [Degree [i]] = inext ; } @@ -949,8 +972,8 @@ GLOBAL void AMD_2 if (e != me) { - /* set tree pointer and flag to indicate element e is - * absorbed into new element me (the parent of e is me) */ + /* set tree pointer and flag to indicate element e is + * absorbed into new element me (the parent of e is me) */ AMD_DEBUG1 ((" Element "ID" => "ID"\n", e, me)) ; Pe [e] = FLIP (me) ; W [e] = 0 ; @@ -964,14 +987,14 @@ GLOBAL void AMD_2 /* me has now been converted into an element in Iw [pme1..pme2] */ /* ----------------------------------------------------------------- */ - /* degme holds the external degree of new element */ + /* degme holds the external degree of new element */ Degree [me] = degme ; Pe [me] = pme1 ; Len [me] = pme2 - pme1 + 1 ; ASSERT (Pe [me] >= 0 && Pe [me] < iwlen) ; Elen [me] = FLIP (nvpiv + degme) ; - /* FLIP (Elen (me)) is now the degree of pivot (including + /* FLIP (Elen (me)) is now the degree of pivot (including * diagonal part). */ #ifndef NDEBUG @@ -987,14 +1010,7 @@ GLOBAL void AMD_2 /* With the current value of wflg, wflg+n must not cause integer * overflow */ - if (wflg >= wbig) - { - for (x = 0 ; x < n ; x++) - { - if (W [x] != 0) W [x] = 1 ; - } - wflg = 2 ; - } + wflg = clear_flag (wflg, wbig, W, n) ; /* ========================================================================= */ /* COMPUTE (W [e] - wflg) = |Le\Lme| FOR ALL ELEMENTS */ @@ -1007,7 +1023,7 @@ GLOBAL void AMD_2 * for each element e that appears in any supervariable in Lme. The * notation Le refers to the pattern (list of supervariables) of a * previous element e, where e is not yet absorbed, stored in - * Iw [Pe [e] + 1 ... Pe [e] + Iw [Pe [e]]]. The notation Lme + * Iw [Pe [e] + 1 ... Pe [e] + Len [e]]. The notation Lme * refers to the pattern of the current element (stored in * Iw [pme1..pme2]). If aggressive absorption is enabled, and * (W [e] - wflg) becomes zero, then the element e will be absorbed @@ -1023,7 +1039,7 @@ GLOBAL void AMD_2 AMD_DEBUG3 ((""ID" Elen "ID": \n", i, eln)) ; if (eln > 0) { - /* note that Nv [i] has been negated to denote i in Lme: */ + /* note that Nv [i] has been negated to denote i in Lme: */ nvi = -Nv [i] ; ASSERT (nvi > 0 && Pe [i] >= 0 && Pe [i] < iwlen) ; wnvi = wflg - nvi ; @@ -1035,14 +1051,14 @@ GLOBAL void AMD_2 AMD_DEBUG4 ((" e "ID" we "ID" ", e, we)) ; if (we >= wflg) { - /* unabsorbed element e has been seen in this loop */ + /* unabsorbed element e has been seen in this loop */ AMD_DEBUG4 ((" unabsorbed, first time seen")) ; we -= nvi ; } else if (we != 0) { - /* e is an unabsorbed element */ - /* this is the first we have seen e in all of Scan 1 */ + /* e is an unabsorbed element */ + /* this is the first we have seen e in all of Scan 1 */ AMD_DEBUG4 ((" unabsorbed")) ; we = Degree [e] + wnvi ; } @@ -1080,7 +1096,7 @@ GLOBAL void AMD_2 /* scan the element list associated with supervariable i */ /* ------------------------------------------------------------- */ - /* UMFPACK/MA38-style approximate degree: */ + /* UMFPACK/MA38-style approximate degree: */ if (aggressive) { for (p = p1 ; p <= p2 ; p++) @@ -1132,7 +1148,7 @@ GLOBAL void AMD_2 } } - /* count the number of elements in i (including me): */ + /* count the number of elements in i (including me): */ Elen [i] = pn - p1 + 1 ; /* ------------------------------------------------------------- */ @@ -1151,8 +1167,8 @@ GLOBAL void AMD_2 nvj = Nv [j] ; if (nvj > 0) { - /* j is unabsorbed, and not in Lme. */ - /* add to degree and add to new list */ + /* j is unabsorbed, and not in Lme. */ + /* add to degree and add to new list */ deg += nvj ; Iw [pn++] = j ; hash += j ; @@ -1165,7 +1181,7 @@ GLOBAL void AMD_2 /* update the degree and check for mass elimination */ /* ------------------------------------------------------------- */ - /* with aggressive absorption, deg==0 is identical to the + /* with aggressive absorption, deg==0 is identical to the * Elen [i] == 1 && p3 == pn test, below. */ ASSERT (IMPLIES (aggressive, (deg==0) == (Elen[i]==1 && p3==pn))) ; @@ -1173,7 +1189,7 @@ GLOBAL void AMD_2 { /* --------------------------------------------------------- */ - /* mass elimination */ + /* mass elimination */ /* --------------------------------------------------------- */ /* There is nothing left of this node except for an edge to @@ -1213,8 +1229,8 @@ GLOBAL void AMD_2 /* update the upper-bound degree of i */ /* --------------------------------------------------------- */ - /* the following degree does not yet include the size - * of the current element, which is added later: */ + /* the following degree does not yet include the size + * of the current element, which is added later: */ Degree [i] = MIN (Degree [i], deg) ; @@ -1222,13 +1238,13 @@ GLOBAL void AMD_2 /* add me to the list for i */ /* --------------------------------------------------------- */ - /* move first supervariable to end of list */ + /* move first supervariable to end of list */ Iw [pn] = Iw [p3] ; - /* move first element to end of element part of list */ + /* move first element to end of element part of list */ Iw [p3] = Iw [p1] ; - /* add new element, me, to front of list. */ + /* add new element, me, to front of list. */ Iw [p1] = me ; - /* store the new length of the list in Len [i] */ + /* store the new length of the list in Len [i] */ Len [i] = pn - p1 + 1 ; /* --------------------------------------------------------- */ @@ -1258,7 +1274,7 @@ GLOBAL void AMD_2 Last [j] = i ; } - /* if a seperate Hhead array is used: * + /* if a separate Hhead array is used: * Next [i] = Hhead [hash] ; Hhead [hash] = i ; */ @@ -1273,18 +1289,11 @@ GLOBAL void AMD_2 /* Clear the counter array, W [...], by incrementing wflg. */ /* ----------------------------------------------------------------- */ - /* make sure that wflg+n does not cause integer overflow */ + /* make sure that wflg+n does not cause integer overflow */ lemax = MAX (lemax, degme) ; wflg += lemax ; - if (wflg >= wbig) - { - for (x = 0 ; x < n ; x++) - { - if (W [x] != 0) W [x] = 1 ; - } - wflg = 2 ; - } - /* at this point, W [0..n-1] < wflg holds */ + wflg = clear_flag (wflg, wbig, W, n) ; + /* at this point, W [0..n-1] < wflg holds */ /* ========================================================================= */ /* SUPERVARIABLE DETECTION */ @@ -1298,7 +1307,7 @@ GLOBAL void AMD_2 AMD_DEBUG2 (("Consider i "ID" nv "ID"\n", i, Nv [i])) ; if (Nv [i] < 0) { - /* i is a principal variable in Lme */ + /* i is a principal variable in Lme */ /* --------------------------------------------------------- * examine all hash buckets with 2 or more variables. We do @@ -1306,7 +1315,7 @@ GLOBAL void AMD_2 * the pattern Lme of the current element, me * --------------------------------------------------------- */ - /* let i = head of hash bucket, and empty the hash bucket */ + /* let i = head of hash bucket, and empty the hash bucket */ ASSERT (Last [i] >= 0 && Last [i] < n) ; hash = Last [i] ; @@ -1330,7 +1339,7 @@ GLOBAL void AMD_2 Last [j] = EMPTY ; } - /* if seperate Hhead array is used: * + /* if separate Hhead array is used: * i = Hhead [hash] ; Hhead [hash] = EMPTY ; */ @@ -1351,7 +1360,7 @@ GLOBAL void AMD_2 eln = Elen [i] ; ASSERT (ln >= 0 && eln >= 0) ; ASSERT (Pe [i] >= 0 && Pe [i] < iwlen) ; - /* do not flag the first element in the list (me) */ + /* do not flag the first element in the list (me) */ for (p = Pe [i] + 1 ; p <= Pe [i] + ln - 1 ; p++) { ASSERT (Iw [p] >= 0 && Iw [p] < n) ; @@ -1378,7 +1387,7 @@ GLOBAL void AMD_2 ASSERT (Len [j] >= 0 && Elen [j] >= 0) ; ASSERT (Pe [j] >= 0 && Pe [j] < iwlen) ; ok = (Len [j] == ln) && (Elen [j] == eln) ; - /* skop the first element in the list (me) */ + /* skip the first element in the list (me) */ for (p = Pe [j] + 1 ; ok && p <= Pe [j] + ln - 1 ; p++) { ASSERT (Iw [p] >= 0 && Iw [p] < n) ; @@ -1442,8 +1451,8 @@ GLOBAL void AMD_2 AMD_DEBUG3 (("Restore i "ID" "ID"\n", i, nvi)) ; if (nvi > 0) { - /* i is a principal variable in Lme */ - /* restore Nv [i] to signify that i is principal */ + /* i is a principal variable in Lme */ + /* restore Nv [i] to signify that i is principal */ Nv [i] = nvi ; /* --------------------------------------------------------- */ @@ -1488,11 +1497,11 @@ GLOBAL void AMD_2 AMD_DEBUG2 (("ME = "ID" DONE\n", me)) ; Nv [me] = nvpiv ; - /* save the length of the list for the new element me */ + /* save the length of the list for the new element me */ Len [me] = p - pme1 ; if (Len [me] == 0) { - /* there is nothing left of the current pivot element */ + /* there is nothing left of the current pivot element */ /* it is a root of the assembly tree */ Pe [me] = EMPTY ; W [me] = 0 ; @@ -1593,6 +1602,10 @@ GLOBAL void AMD_2 Info [AMD_STATUS] = AMD_OK ; } +/* ========================================================================= */ +/* POST-ORDERING */ +/* ========================================================================= */ + /* ------------------------------------------------------------------------- * Variables at this point: * @@ -1617,9 +1630,15 @@ GLOBAL void AMD_2 * No other scalars needed (pfree, iwlen, etc.) * ------------------------------------------------------------------------- */ + /* restore Pe */ for (i = 0 ; i < n ; i++) { Pe [i] = FLIP (Pe [i]) ; + } + + /* restore Elen, for output information, and for postordering */ + for (i = 0 ; i < n ; i++) + { Elen [i] = FLIP (Elen [i]) ; } @@ -1810,7 +1829,7 @@ GLOBAL void AMD_2 } } } - ASSERT (nel == n) ; + ASSERT (nel == n) ; AMD_DEBUG2 (("\n\nPerm:\n")) ; for (i = 0 ; i < n ; i++) diff --git a/deal.II/contrib/umfpack/AMD/Source/amd_aat.c b/deal.II/contrib/umfpack/AMD/Source/amd_aat.c index 3de1e2446a..4f02b755fb 100644 --- a/deal.II/contrib/umfpack/AMD/Source/amd_aat.c +++ b/deal.II/contrib/umfpack/AMD/Source/amd_aat.c @@ -3,20 +3,22 @@ /* ========================================================================= */ /* ------------------------------------------------------------------------- */ -/* AMD Version 1.1 (Jan. 21, 2004), Copyright (c) 2004 by Timothy A. Davis, */ -/* Patrick R. Amestoy, and Iain S. Duff. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* AMD, Copyright (c) Timothy A. Davis, */ +/* Patrick R. Amestoy, and Iain S. Duff. See ../README.txt for License. */ +/* email: davis at cise.ufl.edu CISE Department, Univ. of Florida. */ /* web: http://www.cise.ufl.edu/research/sparse/amd */ /* ------------------------------------------------------------------------- */ /* AMD_aat: compute the symmetry of the pattern of A, and count the number of - * nonzeros each column of A+A' (excluding the diagonal). Assume the input - * matrix has no errors. + * nonzeros each column of A+A' (excluding the diagonal). Assumes the input + * matrix has no errors, with sorted columns and no duplicates + * (AMD_valid (n, n, Ap, Ai) must be AMD_OK, but this condition is not + * checked). */ #include "amd_internal.h" -GLOBAL Int AMD_aat /* returns nz in A+A' */ +GLOBAL size_t AMD_aat /* returns nz in A+A' */ ( Int n, const Int Ap [ ], @@ -24,15 +26,16 @@ GLOBAL Int AMD_aat /* returns nz in A+A' */ Int Len [ ], /* Len [j]: length of column j of A+A', excl diagonal*/ Int Tp [ ], /* workspace of size n */ double Info [ ] -) +) { - Int p1, p2, p, i, j, pj, pj2, k, nzdiag, nzboth, nz, nzaat ; + Int p1, p2, p, i, j, pj, pj2, k, nzdiag, nzboth, nz ; double sym ; + size_t nzaat ; #ifndef NDEBUG AMD_debug_init ("AMD AAT") ; for (k = 0 ; k < n ; k++) Tp [k] = EMPTY ; - ASSERT (AMD_valid (n, n, Ap, Ai)) ; + ASSERT (AMD_valid (n, n, Ap, Ai) == AMD_OK) ; #endif if (Info != (double *) NULL) @@ -154,7 +157,7 @@ GLOBAL Int AMD_aat /* returns nz in A+A' */ } else { - sym = ((double) (2 * nzboth)) / ((double) (nz - nzdiag)) ; + sym = (2 * (double) nzboth) / ((double) (nz - nzdiag)) ; } nzaat = 0 ; @@ -162,7 +165,9 @@ GLOBAL Int AMD_aat /* returns nz in A+A' */ { nzaat += Len [k] ; } - AMD_DEBUG1 (("AMD nz in A+A', excluding diagonal (nzaat) = "ID"\n",nzaat)); + + AMD_DEBUG1 (("AMD nz in A+A', excluding diagonal (nzaat) = %g\n", + (double) nzaat)) ; AMD_DEBUG1 ((" nzboth: "ID" nz: "ID" nzdiag: "ID" symmetry: %g\n", nzboth, nz, nzdiag, sym)) ; diff --git a/deal.II/contrib/umfpack/AMD/Source/amd_control.c b/deal.II/contrib/umfpack/AMD/Source/amd_control.c index 6fc8f9f475..c2aec9f0bf 100644 --- a/deal.II/contrib/umfpack/AMD/Source/amd_control.c +++ b/deal.II/contrib/umfpack/AMD/Source/amd_control.c @@ -3,9 +3,9 @@ /* ========================================================================= */ /* ------------------------------------------------------------------------- */ -/* AMD Version 1.1 (Jan. 21, 2004), Copyright (c) 2004 by Timothy A. Davis, */ -/* Patrick R. Amestoy, and Iain S. Duff. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* AMD, Copyright (c) Timothy A. Davis, */ +/* Patrick R. Amestoy, and Iain S. Duff. See ../README.txt for License. */ +/* email: davis at cise.ufl.edu CISE Department, Univ. of Florida. */ /* web: http://www.cise.ufl.edu/research/sparse/amd */ /* ------------------------------------------------------------------------- */ @@ -35,8 +35,9 @@ GLOBAL void AMD_control aggressive = AMD_DEFAULT_AGGRESSIVE ; } - PRINTF (("\namd: approximate minimum degree ordering, parameters:\n" - " dense row parameter: %g\n", alpha)) ; + PRINTF (("\nAMD version %d.%d.%d, %s: approximate minimum degree ordering\n" + " dense row parameter: %g\n", AMD_MAIN_VERSION, AMD_SUB_VERSION, + AMD_SUBSUB_VERSION, AMD_DATE, alpha)) ; if (alpha < 0) { @@ -52,10 +53,12 @@ GLOBAL void AMD_control if (aggressive) { - PRINTF ((" aggressive absorption: yes\n\n")) ; + PRINTF ((" aggressive absorption: yes\n")) ; } else { - PRINTF ((" aggressive absorption: no\n\n")) ; + PRINTF ((" aggressive absorption: no\n")) ; } + + PRINTF ((" size of AMD integer: %d\n\n", sizeof (Int))) ; } diff --git a/deal.II/contrib/umfpack/AMD/Source/amd_defaults.c b/deal.II/contrib/umfpack/AMD/Source/amd_defaults.c index d0737f4fab..ffe3f4bd53 100644 --- a/deal.II/contrib/umfpack/AMD/Source/amd_defaults.c +++ b/deal.II/contrib/umfpack/AMD/Source/amd_defaults.c @@ -3,9 +3,9 @@ /* ========================================================================= */ /* ------------------------------------------------------------------------- */ -/* AMD Version 1.1 (Jan. 21, 2004), Copyright (c) 2004 by Timothy A. Davis, */ -/* Patrick R. Amestoy, and Iain S. Duff. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* AMD, Copyright (c) Timothy A. Davis, */ +/* Patrick R. Amestoy, and Iain S. Duff. See ../README.txt for License. */ +/* email: davis at cise.ufl.edu CISE Department, Univ. of Florida. */ /* web: http://www.cise.ufl.edu/research/sparse/amd */ /* ------------------------------------------------------------------------- */ @@ -15,12 +15,17 @@ #include "amd_internal.h" +/* ========================================================================= */ +/* === AMD defaults ======================================================== */ +/* ========================================================================= */ + GLOBAL void AMD_defaults ( double Control [ ] ) { Int i ; + if (Control != (double *) NULL) { for (i = 0 ; i < AMD_CONTROL ; i++) diff --git a/deal.II/contrib/umfpack/AMD/Source/amd_dump.c b/deal.II/contrib/umfpack/AMD/Source/amd_dump.c index c526007fe7..89d67b875f 100644 --- a/deal.II/contrib/umfpack/AMD/Source/amd_dump.c +++ b/deal.II/contrib/umfpack/AMD/Source/amd_dump.c @@ -3,9 +3,9 @@ /* ========================================================================= */ /* ------------------------------------------------------------------------- */ -/* AMD Version 1.1 (Jan. 21, 2004), Copyright (c) 2004 by Timothy A. Davis, */ -/* Patrick R. Amestoy, and Iain S. Duff. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* AMD, Copyright (c) Timothy A. Davis, */ +/* Patrick R. Amestoy, and Iain S. Duff. See ../README.txt for License. */ +/* email: davis at cise.ufl.edu CISE Department, Univ. of Florida. */ /* web: http://www.cise.ufl.edu/research/sparse/amd */ /* ------------------------------------------------------------------------- */ @@ -40,7 +40,10 @@ GLOBAL void AMD_debug_init ( char *s ) fscanf (f, ID, &AMD_debug) ; fclose (f) ; } - if (AMD_debug >= 0) printf ("%s: AMD_debug_init, D= "ID"\n", s, AMD_debug); + if (AMD_debug >= 0) + { + printf ("%s: AMD_debug_init, D= "ID"\n", s, AMD_debug) ; + } } /* ========================================================================= */ @@ -73,6 +76,7 @@ GLOBAL void AMD_dump ( if (AMD_debug < 0) return ; ASSERT (pfree <= iwlen) ; + AMD_DEBUG3 (("\nAMD dump, pfree: "ID"\n", pfree)) ; for (i = 0 ; i < n ; i++) { pe = Pe [i] ; @@ -107,7 +111,7 @@ GLOBAL void AMD_dump ( p = pe ; AMD_DEBUG3 ((" e/s: ")) ; if (elen == 0) AMD_DEBUG3 ((" : ")) ; - ASSERT (pe < pfree) ; + ASSERT (pe + len <= pfree) ; for (k = 0 ; k < len ; k++) { j = Iw [p] ; @@ -134,7 +138,7 @@ GLOBAL void AMD_dump ( ASSERT (nv > 0 && pe >= 0) ; p = pe ; AMD_DEBUG3 ((" : ")) ; - ASSERT (pe < pfree) ; + ASSERT (pe + len <= pfree) ; for (k = 0 ; k < len ; k++) { j = Iw [p] ; @@ -156,10 +160,10 @@ GLOBAL void AMD_dump ( { if (Head [deg] == EMPTY) continue ; ilast = EMPTY ; - AMD_DEBUG3 ((ID": ", deg)) ; + AMD_DEBUG3 ((ID": \n", deg)) ; for (i = Head [deg] ; i != EMPTY ; i = Next [i]) { - AMD_DEBUG3 ((" "ID" : next "ID" last "ID" deg "ID"\n", + AMD_DEBUG3 ((" "ID" : next "ID" last "ID" deg "ID"\n", i, Next [i], Last [i], Degree [i])) ; ASSERT (i >= 0 && i < n && ilast == Last [i] && deg == Degree [i]) ; diff --git a/deal.II/contrib/umfpack/AMD/Source/amd_global.c b/deal.II/contrib/umfpack/AMD/Source/amd_global.c new file mode 100644 index 0000000000..93f2b45187 --- /dev/null +++ b/deal.II/contrib/umfpack/AMD/Source/amd_global.c @@ -0,0 +1,84 @@ +/* ========================================================================= */ +/* === amd_global ========================================================== */ +/* ========================================================================= */ + +/* ------------------------------------------------------------------------- */ +/* AMD, Copyright (c) Timothy A. Davis, */ +/* Patrick R. Amestoy, and Iain S. Duff. See ../README.txt for License. */ +/* email: davis at cise.ufl.edu CISE Department, Univ. of Florida. */ +/* web: http://www.cise.ufl.edu/research/sparse/amd */ +/* ------------------------------------------------------------------------- */ + +#include + +#ifdef MATLAB_MEX_FILE +#include "mex.h" +#include "matrix.h" +#endif + +#ifndef NULL +#define NULL 0 +#endif + +/* ========================================================================= */ +/* === Default AMD memory manager ========================================== */ +/* ========================================================================= */ + +/* The user can redefine these global pointers at run-time to change the memory + * manager used by AMD. AMD only uses malloc and free; realloc and calloc are + * include for completeness, in case another package wants to use the same + * memory manager as AMD. + * + * If compiling as a MATLAB mexFunction, the default memory manager is mxMalloc. + * You can also compile AMD as a standard ANSI-C library and link a mexFunction + * against it, and then redefine these pointers at run-time, in your + * mexFunction. + * + * If -DNMALLOC is defined at compile-time, no memory manager is specified at + * compile-time. You must then define these functions at run-time, before + * calling AMD, for AMD to work properly. + */ + +#ifndef NMALLOC +#ifdef MATLAB_MEX_FILE +/* MATLAB mexFunction: */ +void *(*amd_malloc) (size_t) = mxMalloc ; +void (*amd_free) (void *) = mxFree ; +void *(*amd_realloc) (void *, size_t) = mxRealloc ; +void *(*amd_calloc) (size_t, size_t) = mxCalloc ; +#else +/* standard ANSI-C: */ +void *(*amd_malloc) (size_t) = malloc ; +void (*amd_free) (void *) = free ; +void *(*amd_realloc) (void *, size_t) = realloc ; +void *(*amd_calloc) (size_t, size_t) = calloc ; +#endif +#else +/* no memory manager defined at compile-time; you MUST define one at run-time */ +void *(*amd_malloc) (size_t) = NULL ; +void (*amd_free) (void *) = NULL ; +void *(*amd_realloc) (void *, size_t) = NULL ; +void *(*amd_calloc) (size_t, size_t) = NULL ; +#endif + +/* ========================================================================= */ +/* === Default AMD printf routine ========================================== */ +/* ========================================================================= */ + +/* The user can redefine this global pointer at run-time to change the printf + * routine used by AMD. If NULL, no printing occurs. + * + * If -DNPRINT is defined at compile-time, stdio.h is not included. Printing + * can then be enabled at run-time by setting amd_printf to a non-NULL function. + */ + +#ifndef NPRINT +#ifdef MATLAB_MEX_FILE +int (*amd_printf) (const char *, ...) = mexPrintf ; +#else +#include +int (*amd_printf) (const char *, ...) = printf ; +#endif +#else +int (*amd_printf) (const char *, ...) = NULL ; +#endif diff --git a/deal.II/contrib/umfpack/AMD/Source/amd_info.c b/deal.II/contrib/umfpack/AMD/Source/amd_info.c index 1cc8968f98..0a842adf04 100644 --- a/deal.II/contrib/umfpack/AMD/Source/amd_info.c +++ b/deal.II/contrib/umfpack/AMD/Source/amd_info.c @@ -3,9 +3,9 @@ /* ========================================================================= */ /* ------------------------------------------------------------------------- */ -/* AMD Version 1.1 (Jan. 21, 2004), Copyright (c) 2004 by Timothy A. Davis, */ -/* Patrick R. Amestoy, and Iain S. Duff. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* AMD, Copyright (c) Timothy A. Davis, */ +/* Patrick R. Amestoy, and Iain S. Duff. See ../README.txt for License. */ +/* email: davis at cise.ufl.edu CISE Department, Univ. of Florida. */ /* web: http://www.cise.ufl.edu/research/sparse/amd */ /* ------------------------------------------------------------------------- */ @@ -24,6 +24,9 @@ GLOBAL void AMD_info { double n, ndiv, nmultsubs_ldl, nmultsubs_lu, lnz, lnzd ; + PRINTF (("\nAMD version %d.%d.%d, %s, results:\n", + AMD_MAIN_VERSION, AMD_SUB_VERSION, AMD_SUBSUB_VERSION, AMD_DATE)) ; + if (!Info) { return ; @@ -37,9 +40,7 @@ GLOBAL void AMD_info lnzd = (n >= 0 && lnz >= 0) ? (n + lnz) : (-1) ; /* AMD return status */ - PRINTF (( - "\namd: approximate minimum degree ordering, results:\n" - " status: ")) ; + PRINTF ((" status: ")) ; if (Info [AMD_STATUS] == AMD_OK) { PRINTF (("OK\n")) ; @@ -52,6 +53,10 @@ GLOBAL void AMD_info { PRINTF (("invalid matrix\n")) ; } + else if (Info [AMD_STATUS] == AMD_OK_BUT_JUMBLED) + { + PRINTF (("OK, but jumbled\n")) ; + } else { PRINTF (("unknown\n")) ; diff --git a/deal.II/contrib/umfpack/AMD/Source/amd_order.c b/deal.II/contrib/umfpack/AMD/Source/amd_order.c index eac5471a0b..d3f6853d16 100644 --- a/deal.II/contrib/umfpack/AMD/Source/amd_order.c +++ b/deal.II/contrib/umfpack/AMD/Source/amd_order.c @@ -3,9 +3,9 @@ /* ========================================================================= */ /* ------------------------------------------------------------------------- */ -/* AMD Version 1.1 (Jan. 21, 2004), Copyright (c) 2004 by Timothy A. Davis, */ -/* Patrick R. Amestoy, and Iain S. Duff. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* AMD, Copyright (c) Timothy A. Davis, */ +/* Patrick R. Amestoy, and Iain S. Duff. See ../README.txt for License. */ +/* email: davis at cise.ufl.edu CISE Department, Univ. of Florida. */ /* web: http://www.cise.ufl.edu/research/sparse/amd */ /* ------------------------------------------------------------------------- */ @@ -15,6 +15,10 @@ #include "amd_internal.h" +/* ========================================================================= */ +/* === AMD_order =========================================================== */ +/* ========================================================================= */ + GLOBAL Int AMD_order ( Int n, @@ -25,7 +29,9 @@ GLOBAL Int AMD_order double Info [ ] ) { - Int slen, *Len, *S, nz, nzaat, i, *Pinv, info ; + Int *Len, *S, nz, i, *Pinv, info, status, *Rp, *Ri, *Cp, *Ci, ok ; + size_t nzaat, slen ; + double mem = 0 ; #ifndef NDEBUG AMD_debug_init ("amd") ; @@ -66,74 +72,129 @@ GLOBAL Int AMD_order return (AMD_INVALID) ; } - /* Avoid integer overflow in memory size calculations. The space required - * by AMD is at most 2.4nz + 8n for S, and n for Len. - * Note nz - n <= nzaat <= 2*nz, below. */ - if ((2.4 * (double) nz + 8 * (double) n) > (double) Int_MAX / sizeof (Int)) + /* check if n or nz will cause size_t overflow */ + if (((size_t) n) >= SIZE_T_MAX / sizeof (Int) + || ((size_t) nz) >= SIZE_T_MAX / sizeof (Int)) { - /* :: int overflow :: */ if (info) Info [AMD_STATUS] = AMD_OUT_OF_MEMORY ; - return (AMD_OUT_OF_MEMORY) ; + return (AMD_OUT_OF_MEMORY) ; /* problem too large */ } - if (!AMD_valid (n, n, Ap, Ai)) + /* check the input matrix: AMD_OK, AMD_INVALID, or AMD_OK_BUT_JUMBLED */ + status = AMD_valid (n, n, Ap, Ai) ; + + if (status == AMD_INVALID) { if (info) Info [AMD_STATUS] = AMD_INVALID ; return (AMD_INVALID) ; /* matrix is invalid */ } - /* --------------------------------------------------------------------- */ - /* determine the symmetry and count off-diagonal nonzeros in A+A' */ - /* --------------------------------------------------------------------- */ - - /* allocate size-n integer workspace */ - Len = (Int *) ALLOCATE (n * sizeof (Int)) ; - if (!Len) + /* allocate two size-n integer workspaces */ + Len = amd_malloc (n * sizeof (Int)) ; + Pinv = amd_malloc (n * sizeof (Int)) ; + mem += n ; + mem += n ; + if (!Len || !Pinv) { /* :: out of memory :: */ + amd_free (Len) ; + amd_free (Pinv) ; if (info) Info [AMD_STATUS] = AMD_OUT_OF_MEMORY ; return (AMD_OUT_OF_MEMORY) ; } - nzaat = AMD_aat (n, Ap, Ai, Len, P, Info) ; - AMD_DEBUG1 (("nzaat: "ID"\n", nzaat)) ; - ASSERT (nz-n <= nzaat && nzaat <= 2*nz) ; + + if (status == AMD_OK_BUT_JUMBLED) + { + /* sort the input matrix and remove duplicate entries */ + AMD_DEBUG1 (("Matrix is jumbled\n")) ; + Rp = amd_malloc ((n+1) * sizeof (Int)) ; + Ri = amd_malloc (MAX (nz,1) * sizeof (Int)) ; + mem += (n+1) ; + mem += MAX (nz,1) ; + if (!Rp || !Ri) + { + /* :: out of memory :: */ + amd_free (Rp) ; + amd_free (Ri) ; + amd_free (Len) ; + amd_free (Pinv) ; + if (info) Info [AMD_STATUS] = AMD_OUT_OF_MEMORY ; + return (AMD_OUT_OF_MEMORY) ; + } + /* use Len and Pinv as workspace to create R = A' */ + AMD_preprocess (n, Ap, Ai, Rp, Ri, Len, Pinv) ; + Cp = Rp ; + Ci = Ri ; + } + else + { + /* order the input matrix as-is. No need to compute R = A' first */ + Rp = NULL ; + Ri = NULL ; + Cp = (Int *) Ap ; + Ci = (Int *) Ai ; + } /* --------------------------------------------------------------------- */ - /* allocate workspace for matrix, elbow room, and 7 size-n vectors */ + /* determine the symmetry and count off-diagonal nonzeros in A+A' */ /* --------------------------------------------------------------------- */ - slen = (nzaat + nzaat/5 + n) + 7*n ; - if (info) + nzaat = AMD_aat (n, Cp, Ci, Len, P, Info) ; + AMD_DEBUG1 (("nzaat: %g\n", (double) nzaat)) ; + ASSERT ((MAX (nz-n, 0) <= nzaat) && (nzaat <= 2 * (size_t) nz)) ; + + /* --------------------------------------------------------------------- */ + /* allocate workspace for matrix, elbow room, and 6 size-n vectors */ + /* --------------------------------------------------------------------- */ + + S = NULL ; + slen = nzaat ; /* space for matrix */ + ok = ((slen + nzaat/5) >= slen) ; /* check for size_t overflow */ + slen += nzaat/5 ; /* add elbow room */ + for (i = 0 ; ok && i < 7 ; i++) { - /* memory usage (Len and S), in bytes. */ - Info [AMD_MEMORY] = ((double) slen + n) * sizeof (Int) ; + ok = ((slen + n) > slen) ; /* check for size_t overflow */ + slen += n ; /* size-n elbow room, 6 size-n work */ } - S = (Int *) ALLOCATE (slen * sizeof (Int)) ; - AMD_DEBUG1 ((" S "ID" Len "ID" n "ID" nzaat "ID" slen "ID"\n", - (Int) S, (Int) Len, n, nzaat, slen)) ; - if (S == (Int *) NULL) + mem += slen ; + ok = ok && (slen < SIZE_T_MAX / sizeof (Int)) ; /* check for overflow */ + ok = ok && (slen < Int_MAX) ; /* S[i] for Int i must be OK */ + if (ok) { - /* :: out of memory :: */ - FREE (Len) ; - if (Info != (double *) NULL) Info [AMD_STATUS] = AMD_OUT_OF_MEMORY ; + S = amd_malloc (slen * sizeof (Int)) ; + } + AMD_DEBUG1 (("slen %g\n", (double) slen)) ; + if (!S) + { + /* :: out of memory :: (or problem too large) */ + amd_free (Rp) ; + amd_free (Ri) ; + amd_free (Len) ; + amd_free (Pinv) ; + if (info) Info [AMD_STATUS] = AMD_OUT_OF_MEMORY ; return (AMD_OUT_OF_MEMORY) ; } - - /* allocate space from S for Pinv */ - Pinv = S + slen - n ; - slen -= n ; + if (info) + { + /* memory usage, in bytes. */ + Info [AMD_MEMORY] = mem * sizeof (Int) ; + } /* --------------------------------------------------------------------- */ /* order the matrix */ /* --------------------------------------------------------------------- */ - AMD_1 (n, Ap, Ai, P, Pinv, Len, slen, S, Control, Info) ; + AMD_1 (n, Cp, Ci, P, Pinv, Len, slen, S, Control, Info) ; /* --------------------------------------------------------------------- */ /* free the workspace */ /* --------------------------------------------------------------------- */ - FREE (Len) ; - FREE (S) ; - return (AMD_OK) ; /* successful ordering */ + amd_free (Rp) ; + amd_free (Ri) ; + amd_free (Len) ; + amd_free (Pinv) ; + amd_free (S) ; + if (info) Info [AMD_STATUS] = status ; + return (status) ; /* successful ordering */ } diff --git a/deal.II/contrib/umfpack/AMD/Source/amd_post_tree.c b/deal.II/contrib/umfpack/AMD/Source/amd_post_tree.c index 3928925457..b4e063d52b 100644 --- a/deal.II/contrib/umfpack/AMD/Source/amd_post_tree.c +++ b/deal.II/contrib/umfpack/AMD/Source/amd_post_tree.c @@ -3,9 +3,9 @@ /* ========================================================================= */ /* ------------------------------------------------------------------------- */ -/* AMD Version 1.1 (Jan. 21, 2004), Copyright (c) 2004 by Timothy A. Davis, */ -/* Patrick R. Amestoy, and Iain S. Duff. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* AMD, Copyright (c) Timothy A. Davis, */ +/* Patrick R. Amestoy, and Iain S. Duff. See ../README.txt for License. */ +/* email: davis at cise.ufl.edu CISE Department, Univ. of Florida. */ /* web: http://www.cise.ufl.edu/research/sparse/amd */ /* ------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/AMD/Source/amd_postorder.c b/deal.II/contrib/umfpack/AMD/Source/amd_postorder.c index 2b1bcd6893..4adcea3c02 100644 --- a/deal.II/contrib/umfpack/AMD/Source/amd_postorder.c +++ b/deal.II/contrib/umfpack/AMD/Source/amd_postorder.c @@ -3,9 +3,9 @@ /* ========================================================================= */ /* ------------------------------------------------------------------------- */ -/* AMD Version 1.1 (Jan. 21, 2004), Copyright (c) 2004 by Timothy A. Davis, */ -/* Patrick R. Amestoy, and Iain S. Duff. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* AMD, Copyright (c) Timothy A. Davis, */ +/* Patrick R. Amestoy, and Iain S. Duff. See ../README.txt for License. */ +/* email: davis at cise.ufl.edu CISE Department, Univ. of Florida. */ /* web: http://www.cise.ufl.edu/research/sparse/amd */ /* ------------------------------------------------------------------------- */ diff --git a/deal.II/contrib/umfpack/AMD/Source/amd_preprocess.c b/deal.II/contrib/umfpack/AMD/Source/amd_preprocess.c index db635e2d0d..86ea07f869 100644 --- a/deal.II/contrib/umfpack/AMD/Source/amd_preprocess.c +++ b/deal.II/contrib/umfpack/AMD/Source/amd_preprocess.c @@ -3,88 +3,31 @@ /* ========================================================================= */ /* ------------------------------------------------------------------------- */ -/* AMD Version 1.1 (Jan. 21, 2004), Copyright (c) 2004 by Timothy A. Davis, */ -/* Patrick R. Amestoy, and Iain S. Duff. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* AMD, Copyright (c) Timothy A. Davis, */ +/* Patrick R. Amestoy, and Iain S. Duff. See ../README.txt for License. */ +/* email: davis at cise.ufl.edu CISE Department, Univ. of Florida. */ /* web: http://www.cise.ufl.edu/research/sparse/amd */ /* ------------------------------------------------------------------------- */ /* Sorts, removes duplicate entries, and transposes from the nonzero pattern of - * a column-form matrix A, to obtain the matrix R. - * See amd.h for a complete description of AMD_preprocess + * a column-form matrix A, to obtain the matrix R. The input matrix can have + * duplicate entries and/or unsorted columns (AMD_valid (n,Ap,Ai) must not be + * AMD_INVALID). + * + * This input condition is NOT checked. This routine is not user-callable. */ #include "amd_internal.h" -GLOBAL Int AMD_preprocess /* returns AMD_OK if input is OK, AMD_INVALID - * if the matrix is invalid, or AMD_OUT_OF_MEMORY - * if out of memory for the 2n workspace. */ -( - Int n, /* input matrix: A is n-by-n */ - const Int Ap [ ], /* size n+1 */ - const Int Ai [ ], /* size nz = Ap [n] */ - - /* output matrix R: */ - Int Rp [ ], /* size n+1 */ - Int Ri [ ] /* size nz (or less, if duplicates present) */ -) -{ - /* --------------------------------------------------------------------- */ - /* local variables */ - /* --------------------------------------------------------------------- */ - - Int *Flag, *W ; - - /* --------------------------------------------------------------------- */ - /* check inputs (note: fewer restrictions than AMD_order) */ - /* --------------------------------------------------------------------- */ - - if (!AMD_preprocess_valid (n, Ap, Ai) || !Ri || !Rp) - { - return (AMD_INVALID) ; - } - - /* --------------------------------------------------------------------- */ - /* allocate workspace */ - /* --------------------------------------------------------------------- */ - - W = (Int *) ALLOCATE (MAX (n,1) * sizeof (Int)) ; - if (!W) - { - return (AMD_OUT_OF_MEMORY) ; - } - Flag = (Int *) ALLOCATE (MAX (n,1) * sizeof (Int)) ; - if (!Flag) - { - FREE (W) ; - return (AMD_OUT_OF_MEMORY) ; - } - - /* --------------------------------------------------------------------- */ - /* preprocess the matrix: sort, remove duplicates, and transpose */ - /* --------------------------------------------------------------------- */ - - AMD_wpreprocess (n, Ap, Ai, Rp, Ri, W, Flag) ; - - /* --------------------------------------------------------------------- */ - /* free the workspace */ - /* --------------------------------------------------------------------- */ - - FREE (W) ; - FREE (Flag) ; - return (AMD_OK) ; -} - - /* ========================================================================= */ -/* === AMD_wpreprocess ===================================================== */ +/* === AMD_preprocess ====================================================== */ /* ========================================================================= */ -/* The AMD_wpreprocess routine is not user-callable. It does not check its - * input for errors or allocate workspace (that is done by the user-callable - * AMD_preprocess routine). It does handle the n=0 case. */ +/* AMD_preprocess does not check its input for errors or allocate workspace. + * On input, the condition (AMD_valid (n,n,Ap,Ai) != AMD_INVALID) must hold. + */ -GLOBAL void AMD_wpreprocess +GLOBAL void AMD_preprocess ( Int n, /* input matrix: A is n-by-n */ const Int Ap [ ], /* size n+1 */ @@ -105,6 +48,8 @@ GLOBAL void AMD_wpreprocess Int i, j, p, p2 ; + ASSERT (AMD_valid (n, n, Ap, Ai) != AMD_INVALID) ; + /* --------------------------------------------------------------------- */ /* count the entries in each row of A (excluding duplicates) */ /* --------------------------------------------------------------------- */ @@ -165,61 +110,10 @@ GLOBAL void AMD_wpreprocess } #ifndef NDEBUG + ASSERT (AMD_valid (n, n, Rp, Ri) == AMD_OK) ; for (j = 0 ; j < n ; j++) { ASSERT (W [j] == Rp [j+1]) ; } - ASSERT (AMD_valid (n, n, Rp, Ri)) ; #endif } - - -/* ========================================================================= */ -/* === AMD_preprocess_valid ================================================ */ -/* ========================================================================= */ - -/* Not user-callable. Checks a matrix and returns TRUE if it is valid as input - * to AMD_wpreprocess, FALSE otherwise. */ - -GLOBAL Int AMD_preprocess_valid -( - Int n, - const Int Ap [ ], - const Int Ai [ ] -) -{ - Int i, j, p, nz ; - - if (n < 0 || !Ai || !Ap) - { - return (FALSE) ; - } - nz = Ap [n] ; - if (Ap [0] != 0 || nz < 0) - { - /* column pointers must start at Ap [0] = 0, and Ap [n] must be >= 0 */ - AMD_DEBUG0 (("column 0 pointer bad or nz < 0\n")) ; - return (FALSE) ; - } - for (j = 0 ; j < n ; j++) - { - if (Ap [j] > Ap [j+1]) - { - /* column pointers must be ascending */ - AMD_DEBUG0 (("column "ID" pointer bad\n", j)) ; - return (FALSE) ; - } - } - for (p = 0 ; p < nz ; p++) - { - i = Ai [p] ; - AMD_DEBUG3 (("row: "ID"\n", i)) ; - if (i < 0 || i >= n) - { - /* row index out of range */ - AMD_DEBUG0 (("index out of range, col "ID" row "ID"\n", j, i)) ; - return (FALSE) ; - } - } - return (TRUE) ; -} diff --git a/deal.II/contrib/umfpack/AMD/Source/amd_valid.c b/deal.II/contrib/umfpack/AMD/Source/amd_valid.c index 77e3dea68c..4d05925c21 100644 --- a/deal.II/contrib/umfpack/AMD/Source/amd_valid.c +++ b/deal.II/contrib/umfpack/AMD/Source/amd_valid.c @@ -3,9 +3,9 @@ /* ========================================================================= */ /* ------------------------------------------------------------------------- */ -/* AMD Version 1.1 (Jan. 21, 2004), Copyright (c) 2004 by Timothy A. Davis, */ -/* Patrick R. Amestoy, and Iain S. Duff. See ../README for License. */ -/* email: davis@cise.ufl.edu CISE Department, Univ. of Florida. */ +/* AMD, Copyright (c) Timothy A. Davis, */ +/* Patrick R. Amestoy, and Iain S. Duff. See ../README.txt for License. */ +/* email: davis at cise.ufl.edu CISE Department, Univ. of Florida. */ /* web: http://www.cise.ufl.edu/research/sparse/amd */ /* ------------------------------------------------------------------------- */ @@ -18,11 +18,20 @@ * nz = Ap [n_col] >= 0 number of entries in the matrix * Ap [0] == 0 * Ap [j] <= Ap [j+1] for all j in the range 0 to n_col. - * row indices in Ai [Ap [j] ... Ap [j+1]-1] must be sorted in ascending - * order, must be in the range 0 to n_row-1, and no duplicate entries - * can exist. + * Ai [0 ... nz-1] must be in the range 0 to n_row-1. * - * Not user-callable. + * If any of the above conditions hold, AMD_INVALID is returned. If the + * following condition holds, AMD_OK_BUT_JUMBLED is returned (a warning, + * not an error): + * + * row indices in Ai [Ap [j] ... Ap [j+1]-1] are not sorted in ascending + * order, and/or duplicate entries exist. + * + * Otherwise, AMD_OK is returned. + * + * In v1.2 and earlier, this function returned TRUE if the matrix was valid + * (now returns AMD_OK), or FALSE otherwise (now returns AMD_INVALID or + * AMD_OK_BUT_JUMBLED). */ #include "amd_internal.h" @@ -36,18 +45,18 @@ GLOBAL Int AMD_valid const Int Ai [ ] /* row indices of A, of size nz = Ap [n_col] */ ) { - Int nz, j, p1, p2, ilast, i, p ; - if (n_row < 0 || n_col < 0) + Int nz, j, p1, p2, ilast, i, p, result = AMD_OK ; + + if (n_row < 0 || n_col < 0 || Ap == NULL || Ai == NULL) { - AMD_DEBUG0 (("n must be >= 0: "ID" "ID"\n", n_row, n_col)) ; - return (FALSE) ; + return (AMD_INVALID) ; } nz = Ap [n_col] ; if (Ap [0] != 0 || nz < 0) { /* column pointers must start at Ap [0] = 0, and Ap [n] must be >= 0 */ AMD_DEBUG0 (("column 0 pointer bad or nz < 0\n")) ; - return (FALSE) ; + return (AMD_INVALID) ; } for (j = 0 ; j < n_col ; j++) { @@ -58,21 +67,27 @@ GLOBAL Int AMD_valid { /* column pointers must be ascending */ AMD_DEBUG0 (("column "ID" pointer bad\n", j)) ; - return (FALSE) ; + return (AMD_INVALID) ; } ilast = EMPTY ; for (p = p1 ; p < p2 ; p++) { i = Ai [p] ; AMD_DEBUG3 (("row: "ID"\n", i)) ; - if (i <= ilast || i >= n_row) + if (i < 0 || i >= n_row) { - /* row index out of range, or unsorted */ + /* row index out of range */ AMD_DEBUG0 (("index out of range, col "ID" row "ID"\n", j, i)); - return (FALSE) ; + return (AMD_INVALID) ; + } + if (i <= ilast) + { + /* row index unsorted, or duplicate entry present */ + AMD_DEBUG1 (("index unsorted/dupl col "ID" row "ID"\n", j, i)); + result = AMD_OK_BUT_JUMBLED ; } ilast = i ; } } - return (TRUE) ; + return (result) ; } diff --git a/deal.II/contrib/umfpack/README.deal.II b/deal.II/contrib/umfpack/README.deal.II index b2d3beade0..27b46ce5bb 100644 --- a/deal.II/contrib/umfpack/README.deal.II +++ b/deal.II/contrib/umfpack/README.deal.II @@ -1,11 +1,11 @@ -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 -get rid of the AMD/Make and UMFPACK/Make subdirectories, since they -did by hand what we do more elegantly using autoconf and friends. -Finally, I removed the UMFPACK/Demo directory, since it is rather -big. I assume that people using UMFPACK from inside deal.II are not +This directory is an almost identical copy of the UMFPACK 5.1 release, +together with the AMD 2.2 and UFconfig 3.0 packages. 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 get rid of the AMD/Make and UMFPACK/Make +subdirectories, since they did by hand what we do more elegantly using +autoconf and friends. Finally, I removed the UMFPACK/Demo directory, since it +is rather big. I assume that people using UMFPACK from inside deal.II are not interested in this, but they can of course download the full UMFPACK distribution if they want these files. diff --git a/deal.II/contrib/umfpack/UMFPACK/Doc/ChangeLog b/deal.II/contrib/umfpack/UMFPACK/Doc/ChangeLog index 1dd8c66b8c..c2e258b87e 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Doc/ChangeLog +++ b/deal.II/contrib/umfpack/UMFPACK/Doc/ChangeLog @@ -1,3 +1,79 @@ +May 31, 2007, version 5.1.0 + + * port to 64-bit MATLAB + + * Makefiles updated to reflect directory changes to AMD (UMFPACK v5.1.0 + requires AMD v2.2.0) + + * Source/Makefile and GNUMakefile moved to Lib/ + +Dec 12, 2006: version 5.0.3 + + * minor MATLAB cleanup. Renamed umfpack mexFunction to umfpack2, to avoid + filename clash with the built-in version of umfpack. + +Dec 2, 2006, version 5.0.2 + + * minor change to umfpack_report_info: does not print timings less + than 0.001 seconds. + + * bug fix for complex case when using a non-gcc compiler (simplified the + scaling of the pivot column). Does not affect the use of UMFPACK in + MATLAB. + +Aug 31, 2006, version 5.0.1 + + * Minor correction to comments in umfpack_get_numeric.h. + +May 5, 2006, version 5.0 + + * Tcov subdirectory added. This has existed since the first C version of + UMFPACK, but is only now included in the released version. It provides + a near 100% test coverage for UMFPACK. The code isn't pretty, but it + works. + + * now uses CHOLMOD's method for interfacing to the BLAS, including the + BLAS_INT definition. This way, the UF_long version of UMFPACK can + call the int BLAS. + + * revised to use AMD v2.0 + +Apr 7, 2006 + + * Minor correction to UMFPACK/Source/Makefile, for those who + do not have GNU make. No change to version number, because + no code was modified. + +Oct 10, 2005, version 4.6 + + * umf_solve.c modified for the complex case. A, X, and b can be + split complex or unsplit. Prior version required the form of + A, X, and B to be identical (all split or all unsplit). + (Thanks to David Bateman). + + * added Cygwin to architecture detection. + + * added UMFPACK_SUBSUB_VERSION + +Aug. 30, 2005: v4.5 released + + * License changed to GNU LGPL. + + * The Make/ directory removed; configurations are now in ../UFconfig. + + * requires AMD v1.2 or later + + * added UMFPACK_MAIN_VERSION and UMFPACK_SUB_VERSION, defined as 4 and 5, + respectively, for version 4.5. These macros will be updated for all + future versions. See Include/umfpack.h for details. + + * function pointers used for malloc, free, calloc, realloc, printf, + hypot, and complex divide. Defined in AMD/Source/amd_global.c, + AMD/Source/amd_internal.h, UMFPACK/Source/umfpack_global.c, + and UMFPACK/Include/umfpack_global.h. + Compile-time dependence on The MathWorks "util.h", ut* routines + and ut* macros removed. + Jan. 28, 2005: v4.4 released * bug fix: when Qinit is provided to umfpack_*_qsymbolic, @@ -9,7 +85,7 @@ Jan. 28, 2005: v4.4 released ordering and can use all 4 strategies (auto, symmetric, unsymmetric, and 2-by-2). - * umfpack_get_determinant added. + * umfpack_get_determinant added. (Thanks to David Bateman). * packed complex case added for all routines (previously only used in umfpack_report_vector). This allows arrays of ANSI C/C++ complex @@ -344,7 +420,7 @@ May 4, 2001: April 30, 2001: UMFPACK Version 3.0 released. Changes since 3.0Beta release: - * Long integer version added (umfpack_l_* user-callable routines). + * 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, diff --git a/deal.II/contrib/umfpack/UMFPACK/Doc/License b/deal.II/contrib/umfpack/UMFPACK/Doc/License index 2347e22ff6..3ee02fd2a0 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Doc/License +++ b/deal.II/contrib/umfpack/UMFPACK/Doc/License @@ -1,53 +1,38 @@ -UMFPACK Version 4.4 (Jan. 28, 2005), Copyright (c) 2005 by Timothy A. -Davis. All Rights Reserved. +UMFPACK Version 5.0, Copyright 1995-2006 by Timothy A. Davis. +All Rights Reserved. +UMFPACK is available under alternate licenses, contact T. Davis for details. 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 - uses UMFPACK or any modified version of UMFPACK code must cite the - Copyright, this License, the Availability note, and "Used by permission." - Permission to modify the code and to distribute modified code is granted, - provided the Copyright, this License, and the Availability note are - 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. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + USA + + Permission is hereby granted to use or copy this program under the + terms of the GNU LGPL, provided that the Copyright, this License, + and the Availability of the original version is retained on all copies. + User documentation of any code that uses this code or any modified + version of this code must cite the Copyright, this License, the + Availability note, and "Used by permission." Permission to modify + the code and to distribute modified code is granted, provided the + Copyright, this License, and the Availability note are retained, + and a notice that the code was modified is included. Availability: http://www.cise.ufl.edu/research/sparse/umfpack --------------------------------------------------------------------------------- - -AMD Version 1.1 (Jan. 10, 2004), Copyright (c) 2004 by Timothy A. -Davis, Patrick R. Amestoy, and Iain S. Duff. All Rights Reserved. - -AMD License: - - Your use or distribution of AMD or any modified version of - AMD 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 - uses AMD or any modified version of AMD code must cite the - Copyright, this License, the Availability note, and "Used by permission." - Permission to modify the code and to distribute modified code is granted, - provided the Copyright, this License, and the Availability note are - 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/amd diff --git a/deal.II/contrib/umfpack/UMFPACK/Doc/Makefile b/deal.II/contrib/umfpack/UMFPACK/Doc/Makefile index f4d62abbee..41cf07e4c7 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Doc/Makefile +++ b/deal.II/contrib/umfpack/UMFPACK/Doc/Makefile @@ -5,9 +5,9 @@ # UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. # All Rights Reserved. See ../Doc/License for License. -all: dist +default: dist -include ../Make/Make.include +include ../../UFconfig/UFconfig.mk #------------------------------------------------------------------------------- # Remove all but the files in the original distribution @@ -19,6 +19,9 @@ purge: clean - $(RM) *.aux *.bbl *.blg *.log *.toc - $(RM) UserGuide.tex +clean: + - $(RM) $(CLEAN) + #------------------------------------------------------------------------------- # Create the User Guide and Quick Start Guide #------------------------------------------------------------------------------- @@ -39,7 +42,7 @@ USER = $(UMFPACKW) $(UMFPACK) SRC = $(addprefix ../Include/, $(addsuffix .h,$(USER))) ../Demo/umfpack_simple.c -UserGuide.pdf: UserGuide.stex UserGuide.sed1 UserGuide.sed2 $(SRC) +UserGuide.pdf: UserGuide.stex UserGuide.sed1 UserGuide.sed2 $(SRC) UserGuide.bib sed -f UserGuide.sed1 < UserGuide.stex | sed -f UserGuide.sed2 \ | expand -8 > UserGuide.tex pdflatex UserGuide diff --git a/deal.II/contrib/umfpack/UMFPACK/Doc/QuickStart.pdf b/deal.II/contrib/umfpack/UMFPACK/Doc/QuickStart.pdf index db89a759ad..ffb85e2132 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 12974e1d7f..61846a2c77 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.4 Quick Start Guide} -\date{Jan. 28, 2005} +\title{UMFPACK Version 5.1 Quick Start Guide} +\date{May 31, 2007} \maketitle %------------------------------------------------------------------------------- @@ -35,8 +35,8 @@ Univ. of Florida, Gainesville, FL} \end{abstract} %------------------------------------------------------------------------------- -UMFPACK Version 4.4 (Jan. 28, 2005), Copyright\copyright 2005 by Timothy A. -Davis. All Rights Reserved. Refer to the UMFPACK User Guide +UMFPACK Version 5.1, Copyright\copyright 1995-2006 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 for the code and full documentation. @@ -52,8 +52,8 @@ 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.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. +UMFPACK is a built-in routine in MATLAB used by the forward and +backslash operator, and the {\tt lu} routine. The following is a short introduction to Unix users of the C interface of UMFPACK. @@ -234,19 +234,17 @@ for more details. \label{Install} %------------------------------------------------------------------------------- -You will need to install both UMFPACK v4.4 and AMD v1.1 (or AMD v1.0) to use UMFPACK. +You will need to install both UMFPACK v5.1 and AMD v2.2 to use UMFPACK. +Note that UMFPACK v5.1 cannot use AMD v1.2 or earlier. 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 -(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 +System-dependent configurations are in the {\tt UFconfig/UFconfig.mk} +file. The default +settings will work on most systems, except for the BLAS definition. +Sample configurations are provided for Linux, Sun Solaris, SGI IRIX, IBM AIX, and the DEC/Compaq Alpha. To compile and install both packages, @@ -258,23 +256,29 @@ compiled and tested in the {\tt UMFPACK/Demo} directory. The outputs of these demo programs will then be compared with output files in the distribution. Expect to see a few differences, such as residual norms, compile-time control settings, and perhaps memory usage -differences. The AMD and MATLAB mexFunctions for -use in MATLAB will also be compiled. If you do not have MATLAB, -type {\tt make lib} instead. - -If you compile UMFPACK and AMD and then later change the {\tt Make.include} -file or your system-specific configuration file such as {\tt Make.linux}, +differences. + +To use {\tt make} to compile the MATLAB mexFunctions for MATLAB +and AMD, you can either type {\tt make mex} in the UMFPACK directory. +You may first need to edit the {\tt UFconfig/UFconfig.mk} file to +modify the definition of the {\tt MEX}, if you have a version of MATLAB +older than Version 7.2. Remove the {\tt -largeArrayDims} definition. +If you use the MATLAB command {\tt umfpack\_make} in the MATLAB directory, +then this case is handled for you automatically. + +If you compile UMFPACK and AMD and then later change the +{\tt UFconfig/UFconfig.mk} file then you should type {\tt make purge} and then {\tt make} to recompile. Here are the various parameters that you can control in your -{\tt Make.include} file: +{\tt UFconfig/UFconfig.mk} file: \begin{itemize} \item {\tt CC = } your C compiler, such as {\tt cc}. \item {\tt RANLIB = } your system's {\tt ranlib} program, if needed. \item {\tt CFLAGS = } optimization flags, such as {\tt -O}. -\item {\tt CONFIG = } configuration settings, for the BLAS, memory allocation - routines, and timing routines. +\item {\tt UMFPACK\_CONFIG = } configuration settings, for the BLAS, + memory allocation routines, and timing routines. \item {\tt LIB = } your libraries, such as {\tt -lm} or {\tt -lblas}. \item {\tt RM =} the command to delete a file. \item {\tt MV =} the command to rename a file. @@ -284,29 +288,22 @@ Here are the various parameters that you can control in your \item {\tt F77LIB =} the Fortran libraries (optional). \end{itemize} -The {\tt CONFIG} string can include combinations of the following; +The {\tt UMFPACK\_CONFIG} string can include combinations of the following; most deal with how the BLAS are called: \begin{itemize} \item {\tt -DNBLAS} if you do not have any BLAS at all. -\item {\tt -DCBLAS} if you have the C-BLAS. \item {\tt -DNSUNPERF} if you are on Solaris but do not have the Sun Performance Library. -\item {\tt -DNSCSL} if you on SGI IRIX but do not have the SCSL BLAS library. -\item {\tt -DLONGBLAS} if your BLAS can take {\tt long} integer input - arguments. -\item Options for controlling how C calls the Fortran BLAS: - {\tt -DBLAS\_BY\_VALUE}, {\tt -DBLAS\_NO\_UNDERSCORE}, - and {\tt -DBLAS\_CHAR\_ARG}. These are set automatically for Windows, +\item {\tt -DLONGBLAS} if your BLAS takes non-{\tt int} integer arguments. +\item {\tt -DBLAS\_INT = } the integer used by the BLAS. + +\item {\tt -DBLAS\_NO\_UNDERSCORE} + for controlling how C calls the Fortran BLAS. + This is set automatically for Windows, Sun Solaris, SGI Irix, Red Hat Linux, Compaq Alpha, and AIX (the IBM RS 6000). + \item {\tt -DGETRUSAGE} if you have the {\tt getrusage} function. -\item {\tt -DLP64} if you are compiling in the LP64 model (32 bit {\tt int}'s, - 64 bit {\tt long}'s, and 64 bit pointers). -\item {\tt -DNUTIL} if you wish to compile the MATLAB-callable - UMFPACK mexFunction with the {\tt mxMalloc}, {\tt mxRealloc} - and {\tt mxFree} routines, instead of the undocumented (but - superior) {\tt utMalloc}, {\tt utRealloc}, and {\tt utFree} - routines. \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. @@ -369,12 +366,12 @@ Returns: Arguments: - Int n_row ; Input argument, not modified. - Int n_col ; Input argument, not modified. + int n_row ; Input argument, not modified. + int n_col ; Input argument, not modified. A is an n_row-by-n_col matrix. Restriction: n_row > 0 and n_col > 0. - Int Ap [n_col+1] ; Input argument, not modified. + int Ap [n_col+1] ; Input argument, not modified. Ap is an integer array of size n_col+1. On input, it holds the "pointers" for the column form of the sparse matrix A. Column j of @@ -384,7 +381,7 @@ Arguments: total number of entries in the pattern of the matrix A. nz must be greater than or equal to zero. - Int Ai [nz] ; Input argument, not modified, of size nz = Ap [n_col]. + int Ai [nz] ; Input argument, not modified, of size nz = Ap [n_col]. The nonzero pattern (row indices) for column j is stored in Ai [(Ap [j]) ... (Ap [j+1]-1)]. The row indices in a given column j @@ -611,13 +608,13 @@ Returns: Arguments: - Int Ap [n_col+1] ; Input argument, not modified. + int Ap [n_col+1] ; Input argument, not modified. This must be identical to the Ap array passed to umfpack_di_symbolic. The value of n_col is what was passed to umfpack_di_symbolic (this is held in the Symbolic object). - Int Ai [nz] ; Input argument, not modified, of size nz = Ap [n_col]. + int Ai [nz] ; Input argument, not modified, of size nz = Ap [n_col]. This must be identical to the Ai array passed to umfpack_di_symbolic. @@ -840,7 +837,7 @@ Returns: Arguments: - Int sys ; Input argument, not modified. + int sys ; Input argument, not modified. Defines which system to solve. (') is the linear algebraic transpose. @@ -866,8 +863,8 @@ Arguments: For the other values of the sys argument, iterative refinement is not performed (Control [UMFPACK_IRSTEP], Ap, Ai, and Ax are ignored). - Int Ap [n+1] ; Input argument, not modified. - Int Ai [nz] ; Input argument, not modified. + int Ap [n+1] ; Input argument, not modified. + int Ai [nz] ; Input argument, not modified. double Ax [nz] ; Input argument, not modified. If iterative refinement is requested (Control [UMFPACK_IRSTEP] >= 1, diff --git a/deal.II/contrib/umfpack/UMFPACK/Doc/UserGuide.bib b/deal.II/contrib/umfpack/UMFPACK/Doc/UserGuide.bib index a84b90d7b2..540f12ed63 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Doc/UserGuide.bib +++ b/deal.II/contrib/umfpack/UMFPACK/Doc/UserGuide.bib @@ -54,20 +54,20 @@ @techreport{Davis03_umf, author={Davis, T. A.}, - title={{UMFPACK} Version 4.4 User Guide}, + title={{UMFPACK} User Guide}, institution={Univ. of Florida, CISE Dept.}, - year={2004} - ,number={TR-04-003} + year={2005} + ,number={TR-04-003 (revised)} ,address={Gainesville, FL} ,note={(www.cise.ufl.edu/tech-reports)} } @techreport{Davis03_umfquick, author={Davis, T. A.}, - title={{UMFPACK} Version 4.4 Quick Start Guide}, + title={{UMFPACK} Quick Start Guide}, institution={Univ. of Florida, CISE Dept.}, - year={2004} - ,number={TR-04-005} + year={2005} + ,number={TR-04-005 (revised)} ,address={Gainesville, FL} ,note={(www.cise.ufl.edu/tech-reports)} } diff --git a/deal.II/contrib/umfpack/UMFPACK/Doc/UserGuide.pdf b/deal.II/contrib/umfpack/UMFPACK/Doc/UserGuide.pdf index 3509a087aa..5fa49191f7 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.stex b/deal.II/contrib/umfpack/UMFPACK/Doc/UserGuide.stex index 4c45880bca..8cf79f18b3 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.4 User Guide} -\date{Jan. 28, 2005} +\title{UMFPACK Version 5.1 User Guide} +\date{May 31, 2007} \maketitle %------------------------------------------------------------------------------- @@ -38,26 +38,38 @@ Univ. of Florida, Gainesville, FL} Technical Report TR-04-003 (revised) -UMFPACK Version 4.4 (Jan. 28, 2005), Copyright\copyright 2005 by Timothy A. -Davis. All Rights Reserved. +UMFPACK Version 5.1, Copyright\copyright 1995-2006 by Timothy A. Davis. +All Rights Reserved. +UMFPACK is available under alternate licences; contact T. Davis for details. {\bf 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 - uses UMFPACK or any modified version of UMFPACK code must cite the - Copyright, this License, the Availability note, and ``Used by permission.'' - Permission to modify the code and to distribute modified code is granted, - provided the Copyright, this License, and the Availability note are - 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. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + USA + + Permission is hereby granted to use or copy this program under the + terms of the GNU LGPL, provided that the Copyright, this License, + and the Availability of the original version is retained on all copies. + User documentation of any code that uses this code or any modified + version of this code must cite the Copyright, this License, the + Availability note, and "Used by permission." Permission to modify + the code and to distribute modified code is granted, provided the + Copyright, this License, and the Availability note are retained, + and a notice that the code was modified is included. {\bf Availability:} http://www.cise.ufl.edu/research/sparse/umfpack @@ -83,7 +95,7 @@ Davis. All Rights Reserved. %------------------------------------------------------------------------------- UMFPACK\footnote{Pronounced with two syllables: umph-pack} -Version 4.4 is a set of routines for solving systems of linear +Version 5.0 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 @@ -257,13 +269,13 @@ http://www.cise.ufl.edu/tech-reports. %------------------------------------------------------------------------------- In addition to appearing as a Collected Algorithm of the ACM, -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) +UMFPACK is available at http://www.cise.ufl.edu/research/sparse. +It is included as a built-in routine in MATLAB. +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.4 (and v4.3 through v4.1) tend to be much faster than Version 4.0, +Versions 5.0 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 @@ -284,6 +296,43 @@ Subroutine Library. A detailed list of changes is in the {\tt ChangeLog} file. +%------------------------------------------------------------------------------- +\subsection{Version 5.1.0} +%------------------------------------------------------------------------------- + +Port of MATLAB interface to 64-bit MATLAB. + +%------------------------------------------------------------------------------- +\subsection{Version 5.0.3} +%------------------------------------------------------------------------------- + +Renamed the MATLAB function to {\tt umfpack2}, so as not to confict with +itself (the MATLAB built-in version of UMFPACK). + +%------------------------------------------------------------------------------- +\subsection{Version 5.0} +%------------------------------------------------------------------------------- + +Changed {\tt long} to {\tt UF\_long}, controlled by the {\tt UFconfig.h} +file. A {\tt UF\_long} is normally just {\tt long}, except on the Windows 64 +(WIN64) platform. In that case, it becomes {\tt \_\_int64}. + +%------------------------------------------------------------------------------- +\subsection{Version 4.6} +%------------------------------------------------------------------------------- + +Added additional options to {\tt umf\_solve.c}. + +%------------------------------------------------------------------------------- +\subsection{Version 4.5} +%------------------------------------------------------------------------------- + +Added function pointers for malloc, calloc, realloc, free, printf, hypot, +and complex divisiion, so that these functions can be redefined at run-time. +Added a version number so you can determine the +version of UMFPACK at run time or compile time. UMFPACK requires AMD v2.0 +or later. + %------------------------------------------------------------------------------- \subsection{Version 4.4} %------------------------------------------------------------------------------- @@ -382,7 +431,7 @@ or MATLAB user: %------------------------------------------------------------------------------- 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 +routine in MATLAB 7.0.4, 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}. @@ -621,14 +670,7 @@ and uses less memory. If the space is not large enough during factorization, it is increased via {\tt mxRealloc}. However, {\tt mxMalloc} and {\tt mxRealloc} abort the {\tt umfpack} mexFunction -if they fail, so this strategy does not work in MATLAB. The strategy works fine -when {\tt malloc} or the internal memory allocator {\tt utMalloc} are used -instead, since those routines return {\tt NULL} on failure, and do not terminate -the mexFunction. The {\tt umfpack} mexFunction can be compiled to use -{\tt utMalloc}, but this is an internal undocumented utility routine in MATLAB, -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. +if they fail, so this strategy does not work in MATLAB. To compute the determinant with UMFPACK: @@ -651,9 +693,9 @@ 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. -\item {\tt umfpack\_dl\_*}: real double precision, {\tt long} integers. +\item {\tt umfpack\_dl\_*}: real double precision, {\tt UF\_long} integers. \item {\tt umfpack\_zi\_*}: complex double precision, {\tt int} integers. -\item {\tt umfpack\_zl\_*}: complex double precision, {\tt long} integers. +\item {\tt umfpack\_zl\_*}: complex double precision, {\tt UF\_long} integers. \end{enumerate} where {\tt *} denotes the specific name of one of the routines. Routine names beginning with {\tt umf\_} are internal to the package, @@ -663,7 +705,7 @@ The other three routines are the same for all four versions. In addition, the C-callable AMD library distributed with UMFPACK includes 4 user-callable routines (in two versions with {\tt int} and -{\tt long} integers) and one include file. Refer to the AMD documentation +{\tt UF\_long} integers) and one include file. Refer to the AMD documentation for more details. Use only one version for any one problem; do not attempt to use one version @@ -672,7 +714,7 @@ to analyze the matrix and another version to factorize the matrix, for example. 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 +(real/complex, int/UF\_long) of a single operation (in this case numeric factorization). %------------------------------------------------------------------------------- @@ -681,7 +723,7 @@ for the real double precision and {\tt int} integer case. The notation The {\tt umfpack\_di\_*} and {\tt umfpack\_zi\_*} routines use {\tt int} integer arguments; those starting with {\tt umfpack\_dl\_} or {\tt umfpack\_zl\_} -use {\tt long} integer arguments. If you compile UMFPACK in the standard +use {\tt UF\_long} integer arguments. If you compile UMFPACK in the standard ILP32 mode (32-bit {\tt int}'s, {\tt long}'s, and pointers) then the versions are essentially identical. You will be able to solve problems using up to 2GB of memory. If you compile UMFPACK in the standard LP64 mode, the size of an @@ -696,7 +738,7 @@ architectures, and are not portable. UMFPACK and AMD should be compiled in the same mode. If you compile UMFPACK and AMD in the LP64 mode, be sure to add {\tt -DLP64} to the compilation command. See the examples in -{\tt Make.alpha}, {\tt Make.sgi}, and {\tt Make.solaris}. +the {\tt UFconfig/UFconfig.mk} file. %------------------------------------------------------------------------------- \subsection{Real and complex floating-point} @@ -794,12 +836,12 @@ with {\tt nz} entries. For the {\tt int} version of UMFPACK: \end{verbatim} } -For the {\tt long} version of UMFPACK: +For the {\tt UF\_long} version of UMFPACK: {\footnotesize \begin{verbatim} - long Ap [n+1] ; - long Ai [nz] ; + UF_long Ap [n+1] ; + UF_long Ai [nz] ; double Ax [nz] ; \end{verbatim} } @@ -973,12 +1015,12 @@ four arrays. For the {\tt int} version of UMFPACK: \end{verbatim} } -For the {\tt long} version: +For the {\tt UF\_long} version: {\footnotesize \begin{verbatim} - long Ti [nz] ; - long Tj [nz] ; + UF_long Ti [nz] ; + UF_long Tj [nz] ; double Tx [nz] ; \end{verbatim} } @@ -1057,10 +1099,9 @@ 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 +The CHOLMOD provides many of these matrix operations, which can then be used in conjunction with UMFPACK. -Watch my web page for details. +See my web page for details. %------------------------------------------------------------------------------- \subsection{Getting the contents of opaque objects} @@ -1255,7 +1296,7 @@ Two new timing routines are provided in UMFPACK Version 4.1 and following, {\tt sysconf} and {\tt times} routines to find both the CPU time and wallclock time. These three routines are the only user-callable -routine that is identical in all four {\tt int}/{\tt long}, real/complex +routine that is identical in all four {\tt int}/{\tt UF\_long}, real/complex versions (there is no {\tt umfpack\_di\_timer} routine, for example). %------------------------------------------------------------------------------- @@ -1465,7 +1506,7 @@ In this case, no {\tt Symbolic} or {\tt Numeric} object was created. \item {\tt UMFPACK\_ERROR\_internal\_error}, (-911): An internal error has occurred, of unknown cause. This is either a bug in UMFPACK, or the result of a memory overrun from your program. - Try modifying the file {\tt AMD/Source/amd\_internal.h} and adding + Try modifying the file {\tt AMD/Include/amd\_internal.h} and adding the statement {\tt \#undef NDEBUG}, to enable the debugging mode. Recompile UMFPACK and rerun your program. A failed assertion might occur which @@ -1514,13 +1555,15 @@ values, and calling sequences of the routines in one category. Variables with the same name as those already listed in a prior category have the same size and type. -The real, {\tt long} integer {\tt umfpack\_dl\_*} routines are +The real, {\tt UF\_long} integer {\tt umfpack\_dl\_*} routines are identical to the real, {\tt int} routines, except that {\tt \_di\_} is replaced -with {\tt \_dl\_} in the name, and all {\tt int} arguments become {\tt long}. -Similarly, the complex, {\tt long} integer {\tt umfpack\_zl\_*} routines are +with {\tt \_dl\_} in the name, and all {\tt int} arguments become +{\tt UF\_long}. +Similarly, the complex, {\tt UF\_long} integer {\tt umfpack\_zl\_*} routines are identical to the complex, {\tt int} routines, except that {\tt \_zi\_} is replaced -with {\tt \_zl\_} in the name, and all {\tt int} arguments become {\tt long}. +with {\tt \_zl\_} in the name, and all {\tt int} arguments become +{\tt UF\_long}. Only the real and complex {\tt int} versions are listed in the synopsis below. The matrix $\m{A}$ is {\tt m}-by-{\tt n} with {\tt nz} entries. @@ -1806,7 +1849,7 @@ UMFPACK makes use of the AMD ordering package for its symmetric ordering strategy. You may also use these four user-callable routines in your own C programs. You need to include the {\tt amd.h} file only if you make direct calls to the AMD routines themselves. The {\tt int} versions are summarized -below; {\tt long} versions are also available. Refer to the AMD User Guide +below; {\tt UF\_long} versions are also available. Refer to the AMD User Guide for more information, or to the file {\tt amd.h} which documents these routines. {\footnotesize @@ -1955,7 +1998,7 @@ Access to the complex routines in UMFPACK is provided by the interface routines in {\tt umf4\_f77zwrapper.c}. The following is a synopsis of each routine. All the arguments are the same as the real versions, except {\tt Az}, {\tt xz}, and {\tt bz} are the imaginary parts of -the matrix, solution, and right-hand-side, respectively. The +the matrix, solution, and right-hand side, respectively. The {\tt Ax}, {\tt x}, and {\tt b} are the real parts. {\footnotesize @@ -1993,23 +2036,17 @@ 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.4 and AMD v1.1 (or AMD v1.0) to use UMFPACK. +You will need to install both UMFPACK v5.0 and AMD v2.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 BLAS \cite{DaydeDuff99,ACM679a,ATLAS,GotoVandeGeijn02}, 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 (the \newline -{\tt UMFPACK/Make} directory is actually -just a symbolic link to {\tt AMD/Make}\footnote{Windows might not extract -the symbolic link {\tt UMFPACK/Make} correctly. If it doesn't, simply -create the {\tt UMFPACK/Make} folder by copying it from {\tt AMD/Make}.}). -You can edit the {\tt Make.include} -files in either of those directories to customize the compilation. The default +System-dependent configurations are in the {\tt UFconfig/UFconfig.mk} +file. 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 +that it does not use the BLAS. Sample configurations are provided for Linux, Sun Solaris, SGI IRIX, IBM AIX, and the DEC/Compaq Alpha. To compile and install both packages, @@ -2021,74 +2058,67 @@ compiled and tested in the {\tt UMFPACK/Demo} directory. The outputs of these demo programs will then be compared with output files in the distribution. Expect to see a few differences, such as residual norms, compile-time control settings, and perhaps memory usage -differences. The AMD and UMFPACK mexFunctions for -use in MATLAB will also be compiled. If you do not have MATLAB 6.0 or -later, type {\tt make lib} instead. +differences. + +To use {\tt make} to compile the MATLAB mexFunctions for MATLAB +and AMD, you can either type {\tt make mex} in the UMFPACK directory. +You may first need to edit the {\tt UFconfig/UFconfig.mk} file to +modify the definition of the {\tt MEX}, if you have a version of MATLAB +older than Version 7.2. Remove the {\tt -largeArrayDims} definition. +If you use the MATLAB command {\tt umfpack\_make} in the MATLAB directory, +then this case is handled for you automatically. -If you have the GNU version of {\tt make}, the {\tt Source/GNUmakefile} and +If you have the GNU version of {\tt make}, the {\tt Lib/GNUmakefile} and {\tt MATLAB/GNUmakefile} files are used. These are much more concise than what the ``old'' version of {\tt make} can handle. If you do not have -GNU {\tt make}, the {\tt Source/Makefile} and {\tt MATLAB/Makefile} files +GNU {\tt make}, the {\tt Lib/Makefile} and {\tt MATLAB/Makefile} files are used instead. Each UMFPACK source file is compiled into four -versions ({\tt double} / complex, and {\tt int} / {\tt long}). A proper +versions ({\tt double} / complex, and {\tt int} / {\tt UF\_long}). A proper old-style {\tt Makefile} is cumbersome in this case, so these two {\tt Makefile}'s have been constructed by brute force. They ignore dependencies, and simply compile everything. I highly recommend using GNU {\tt make} if you wish to modify UMFPACK. -If you compile UMFPACK and AMD and then later change the {\tt Make.include} -file or your system-specific configuration file such as {\tt Make.linux}, +If you compile UMFPACK and AMD and then later change the +{\tt UFconfig/UFconfig.mk} file then you should type {\tt make purge} and then {\tt make} to recompile. Here are the various parameters that you can control in your -{\tt Make.include} file: +{\tt UFconfig/UFconfig.mk} file: \begin{itemize} \item {\tt CC = } your C compiler, such as {\tt cc}. \item {\tt RANLIB = } your system's {\tt ranlib} program, if needed. \item {\tt CFLAGS = } optimization flags, such as {\tt -O}. - Add {\tt -DLP64} if you are compiling in 64-bit mode - (32 bit {\tt int}'s, 64 bit {\tt long}'s, and 64 bit pointers). -\item {\tt CONFIG = } configuration settings for the BLAS, memory allocation - routines, and timing routines. +\item {\tt UMFPACK\_CONFIG = } configuration settings for the BLAS, + memory allocation routines, and timing routines. \item {\tt LIB = } your libraries, such as {\tt -lm} or {\tt -lblas}. \item {\tt RM =} the command to delete a file. \item {\tt MV =} the command to rename a file. \item {\tt MEX =} the command to compile a MATLAB mexFunction. If you are using MATLAB 5, you need to add {\tt -DNBLAS} and - {\tt -DNUTIL} to this command. An example is provided in - the {\tt Make/Make.include} file. + {\tt -DNUTIL} to this command. \item {\tt F77 =} the command to compile a Fortran program (optional). \item {\tt F77FLAGS =} the Fortran compiler flags (optional). \item {\tt F77LIB =} the Fortran libraries (optional). \end{itemize} -The {\tt CONFIG} string can include combinations of the following; +The {\tt UMFPACK\_CONFIG} string can include combinations of the following; most deal with how the BLAS are called: \begin{itemize} \item {\tt -DNBLAS} if you do not have any BLAS at all. -\item {\tt -DCBLAS} if you have the C-BLAS \cite{ATLAS}. \item {\tt -DNSUNPERF} if you are on Solaris but do not have the Sun Performance Library (for the BLAS). -\item {\tt -DNSCSL} if you on SGI IRIX but do not have the SCSL BLAS library. -\item {\tt -DLONGBLAS} if your BLAS can take {\tt long} integer input - arguments. If not defined, then the {\tt umfpack\_*l\_*} versions of - UMFPACK that use {\tt long} integers do not call the BLAS. - This flag is set internally when using the Sun Performance BLAS - or SGI's SCSL BLAS (both have 64-bit versions of the BLAS). -\item Options for controlling how C calls the Fortran BLAS: - {\tt -DBLAS\_BY\_VALUE}, {\tt -DBLAS\_NO\_UNDERSCORE}, - and {\tt -DBLAS\_CHAR\_ARG}. These are set automatically for Windows, +\item {\tt -DLONGBLAS} if your BLAS takes non-{\tt int} integer arguments. +\item {\tt -DBLAS\_INT = } the integer used by the BLAS. + +\item {\tt -DBLAS\_NO\_UNDERSCORE} + for controlling how C calls the Fortran BLAS. + This is set automatically for Windows, Sun Solaris, SGI Irix, Red Hat Linux, Compaq Alpha, and - AIX (the IBM RS 6000). They are ignored if you are using - the C-BLAS interface to the BLAS. + AIX (the IBM RS 6000). + \item {\tt -DGETRUSAGE} if you have the {\tt getrusage} function. -\item {\tt -DNUTIL} if you wish to compile the MATLAB-callable - UMFPACK mexFunction with the {\tt mxMalloc}, {\tt mxRealloc} - and {\tt mxFree} routines, instead of the undocumented (but - superior) {\tt utMalloc}, {\tt utRealloc}, and {\tt utFree} - routines. The default is to use the {\tt ut*} routines on - Unix, and the {\tt mx*} routines on Windows. \item {\tt -DNPOSIX} if you do not have the POSIX-compliant {\tt sysconf} and {\tt times} routines used by {\tt umfpack\_tic} and {\tt umfpack\_toc}. @@ -2150,11 +2180,12 @@ program, unless you directly call AMD routines. You only need the statement, as described in Section~\ref{Synopsis}. If you would like to compile both 32-bit and 64-bit versions of the libraries, -you will need to do it in two steps. Modify your {\tt Make/Make.} +you will need to do it in two steps. Modify your {\tt UFconfig/UFconfig.mk} file, and select the 32-bit option. Type {\tt make} in the {\tt UMFPACK} directory, which creates the {\tt UMFPACK/Lib/libumfpack.a} and {\tt AMD/Lib/libamd.a} libraries. Rename those two files. Edit your -{\tt Make/Make.} and select the 64-bit option. Type {\tt make purge}, +{\tt UFconfig/UFconfig.mk} file and select the 64-bit option. +Type {\tt make purge}, and then {\tt make}, and you will create the 64-bit libraries. You can use the same {\tt umfpack.h} include file for both 32-bit and 64-bit versions. Simply link your program with the appropriate 32-bit @@ -2181,13 +2212,13 @@ 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. -You will be prompted to select several configuration options, including -whether or not to use the BLAS. -MATLAB 5.3 (or earlier) does not include the BLAS, so you either have to -compile UMFPACK without the BLAS (UMFPACK will be slow), or modify your -{\tt /bin/mexopts.sh} by adding your BLAS library -to the {\tt CLIBS} string, -where {\tt } is the directory in which MATLAB is installed. +% You will be prompted to select several configuration options, including +% whether or not to use the BLAS. +% MATLAB 5.3 (or earlier) does not include the BLAS, so you either have to +% compile UMFPACK without the BLAS (UMFPACK will be slow), or modify your +% {\tt /bin/mexopts.sh} by adding your BLAS library +% to the {\tt CLIBS} string, +% where {\tt } is the directory in which MATLAB is installed. If you are using Windows and the {\tt lcc} compiler bundled with MATLAB 6.1, then you may need to copy the @@ -2264,12 +2295,16 @@ all of these warnings. \label{Future} %------------------------------------------------------------------------------- -Here are a few features that are not in UMFPACK Version 4.4, in no particular +Here are a few features that are not in the current version of UMFPACK, +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: \begin{enumerate} +\item Remove the restriction that the column-oriented form be given with + sorted columns. This has already been done in AMD Version 2.0. + \item Future versions may have different default {\tt Control} parameters. Future versions may return more statistics in the {\tt Info} array, and they may use more entries in the {\tt Control} array. @@ -2286,10 +2321,12 @@ let me know and I could consider including them: solver that could be used to write a MATLAB mexFunction {\tt x = lu\_refine (A, b, L, U, P, Q, R)} that gives MATLAB access to the iterative refinement algorithm with sparse backward error - analysis. It would also be easier to handle sparse right-hand-sides + analysis. It would also be easier to handle sparse right-hand sides in this data structure, and end up with good asymptotic run-time in this case (particularly for $\m{Lx}=\m{b}$; see \cite{GilbertPeierls88}). + See also CSparse and + CXSparse for software for handling sparse right-hand sides. \item Complex absolute value computations could be based on FDLIBM (see \newline @@ -2302,6 +2339,8 @@ let me know and I could consider including them: \item The solve routines could handle multiple right-hand sides, and sparse right-hand sides. See {\tt umfpack\_solve} for the MATLAB version of this feature. + See also CSparse and + CXSparse for software for handling sparse right-hand sides. \item An option to redirect the error and diagnostic output. @@ -2312,15 +2351,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. 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 - few calls to these routines. You can do this at compile-time by - modifying the definitions of {\tt ALLOCATE}, {\tt FREE}, and - {\tt REALLOCATE} in the file {\tt umf\_internal.h}. Be sure to document - your changes carefully when you change UMFPACK source code. + version of this feature. KLU includes this feature. + See also {\tt cs\_dmperm} in CSparse and CXSparse. \item The ability to use user-provided work arrays, so that {\tt malloc}, {\tt free}, and {\tt realloc} realloc are not called. The @@ -2334,6 +2366,8 @@ let me know and I could consider including them: time proportional to the number of nonzeros in the upper bound of $\m{U}$. The method used in UMFPACK exploits super-columns, however, so this bound is rarely reached. + See {\tt cs\_counts} in CSparse and CXSparse, + and {\tt cholmod\_analyze} in CHOLMOD. \item Other basic sparse matrix operations, such as sparse matrix multiplication, could be included. @@ -2356,7 +2390,7 @@ let me know and I could consider including them: The include files are the same for all four versions of UMFPACK. The generic integer type is {\tt Int}, which is an {\tt int} or -{\tt long}, depending on which version of UMFPACK you are using. +{\tt UF\_long}, depending on which version of UMFPACK you are using. \subsection{umfpack\_*\_symbolic} diff --git a/deal.II/contrib/umfpack/UMFPACK/Doc/lesser.txt b/deal.II/contrib/umfpack/UMFPACK/Doc/lesser.txt new file mode 100644 index 0000000000..8add30ad59 --- /dev/null +++ b/deal.II/contrib/umfpack/UMFPACK/Doc/lesser.txt @@ -0,0 +1,504 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/deal.II/contrib/umfpack/UMFPACK/Include/UFconfig.h b/deal.II/contrib/umfpack/UMFPACK/Include/UFconfig.h new file mode 100644 index 0000000000..91bbeac32c --- /dev/null +++ b/deal.II/contrib/umfpack/UMFPACK/Include/UFconfig.h @@ -0,0 +1,113 @@ +/* ========================================================================== */ +/* === UFconfig.h =========================================================== */ +/* ========================================================================== */ + +/* Configuration file for SuiteSparse: a Suite of Sparse matrix packages + * (AMD, COLAMD, CCOLAMD, CAMD, CHOLMOD, UMFPACK, CXSparse, and others). + * + * UFconfig.h provides the definition of the long integer. On most systems, + * a C program can be compiled in LP64 mode, in which long's and pointers are + * both 64-bits, and int's are 32-bits. Windows 64, however, uses the LLP64 + * model, in which int's and long's are 32-bits, and long long's and pointers + * are 64-bits. + * + * SuiteSparse packages that include long integer versions are + * intended for the LP64 mode. However, as a workaround for Windows 64 + * (and perhaps other systems), the long integer can be redefined. + * + * If _WIN64 is defined, then the __int64 type is used instead of long. + * + * The long integer can also be defined at compile time. For example, this + * could be added to UFconfig.mk: + * + * CFLAGS = -O -D'UF_long=long long' -D'UF_long_max=9223372036854775801' \ + * -D'UF_long_id="%lld"' + * + * This file defines UF_long as either long (on all but _WIN64) or + * __int64 on Windows 64. The intent is that a UF_long is always a 64-bit + * integer in a 64-bit code. ptrdiff_t might be a better choice than long; + * it is always the same size as a pointer. + * + * This file also defines the SUITESPARSE_VERSION and related definitions. + * + * Copyright (c) 2007, University of Florida. No licensing restrictions + * apply to this file or to the UFconfig directory. Author: Timothy A. Davis. + */ + +#ifndef _UFCONFIG_H +#define _UFCONFIG_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +/* ========================================================================== */ +/* === UF_long ============================================================== */ +/* ========================================================================== */ + +#ifndef UF_long + +#ifdef _WIN64 + +#define UF_long __int64 +#define UF_long_max _I64_MAX +#define UF_long_id "%I64d" + +#else + +#define UF_long long +#define UF_long_max LONG_MAX +#define UF_long_id "%ld" + +#endif +#endif + +/* ========================================================================== */ +/* === SuiteSparse version ================================================== */ +/* ========================================================================== */ + +/* SuiteSparse is not a package itself, but a collection of packages, some of + * which must be used together (UMFPACK requires AMD, CHOLMOD requires AMD, + * COLAMD, CAMD, and CCOLAMD, etc). A version number is provided here for the + * collection itself. The versions of packages within each version of + * SuiteSparse are meant to work together. Combining one packge from one + * version of SuiteSparse, with another package from another version of + * SuiteSparse, may or may not work. + * + * SuiteSparse Version 3.0.0 contains the following packages: + * + * AMD version 2.2.0 + * CAMD version 2.2.0 + * COLAMD version 2.7.0 + * CCOLAMD version 2.7.0 + * CHOLMOD version 1.5.0 + * CSparse version 2.2.0 + * CXSparse version 2.2.0 + * KLU version 1.0.0 + * BTF version 1.0.0 + * LDL version 2.0.0 + * UFconfig version number is the same as SuiteSparse + * UMFPACK version 5.1.0 + * RBio version 1.1.0 + * UFcollection version 1.1.0 + * + * Other package dependencies: + * BLAS required by CHOLMOD and UMFPACK + * LAPACK required by CHOLMOD + * METIS 4.0.1 required by CHOLMOD (optional) and KLU (optional) + */ + +#define SUITESPARSE_DATE "May 31, 2007" +#define SUITESPARSE_VER_CODE(main,sub) ((main) * 1000 + (sub)) +#define SUITESPARSE_MAIN_VERSION 3 +#define SUITESPARSE_SUB_VERSION 0 +#define SUITESPARSE_SUBSUB_VERSION 0 +#define SUITESPARSE_VERSION \ + SUITESPARSE_VER_CODE(SUITESPARSE_MAIN_VERSION,SUITESPARSE_SUB_VERSION) + +#ifdef __cplusplus +} +#endif +#endif diff --git a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack.h b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack.h index d41f1b34b4..d972559b94 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack.h @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -19,6 +19,17 @@ #ifndef UMFPACK_H #define UMFPACK_H +/* -------------------------------------------------------------------------- */ +/* Make it easy for C++ programs to include UMFPACK */ +/* -------------------------------------------------------------------------- */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* define UF_long */ +#include "UFconfig.h" + /* -------------------------------------------------------------------------- */ /* size of Info and Control arrays */ /* -------------------------------------------------------------------------- */ @@ -76,40 +87,89 @@ #include "umfpack_timer.h" #include "umfpack_tictoc.h" +/* AMD */ +#include "../../AMD/Include/amd.h" + +/* global function pointers */ +#include "umfpack_global.h" + /* -------------------------------------------------------------------------- */ /* Version, copyright, and license */ /* -------------------------------------------------------------------------- */ -#define UMFPACK_VERSION "UMFPACK V4.4 (Jan. 28, 2005)" +#define UMFPACK_VERSION "UMFPACK V5.1.0 (May 31, 2007)" #define UMFPACK_COPYRIGHT \ -"UMFPACK: Copyright (c) 2005 by Timothy A. Davis. All Rights Reserved.\n" +"UMFPACK: Copyright (c) 2005-2006 by Timothy A. Davis. All Rights Reserved.\n" #define UMFPACK_LICENSE_PART1 \ "\nUMFPACK License:\n" \ "\n" \ +" UMFPACK is available under alternate licenses,\n" \ +" contact T. Davis for details.\n" \ +"\n" \ " Your use or distribution of UMFPACK or any modified version of\n" \ " UMFPACK implies that you agree to this License.\n" \ "\n" \ -" THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY\n" \ -" EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.\n" +" This library is free software; you can redistribute it and/or\n" \ +" modify it under the terms of the GNU Lesser General Public\n" \ +" License as published by the Free Software Foundation; either\n" \ +" version 2.1 of the License, or (at your option) any later version.\n" \ +"\n" \ +" This library is distributed in the hope that it will be useful,\n" \ +" but WITHOUT ANY WARRANTY; without even the implied warranty of\n" \ +" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n" \ +" Lesser General Public License for more details.\n" \ +"\n" \ +" You should have received a copy of the GNU Lesser General Public\n" \ +" License along with this library; if not, write to the Free Software\n" \ +" Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301\n" \ +" USA\n" \ + #define UMFPACK_LICENSE_PART2 \ "\n" \ -" Permission is hereby granted to use or copy this program, provided\n" \ -" that the Copyright, this License, and the Availability of the original\n" \ -" version is retained on all copies. User documentation of any code that\n" \ -" uses UMFPACK or any modified version of UMFPACK code must cite the\n" \ -" Copyright, this License, the Availability note, and \"Used by permission.\"\n" +" Permission is hereby granted to use or copy this program under the\n" \ +" terms of the GNU LGPL, provided that the Copyright, this License,\n" \ +" and the Availability of the original version is retained on all copies.\n" \ +" User documentation of any code that uses this code or any modified\n" \ +" version of this code must cite the Copyright, this License, the\n" \ +" Availability note, and \"Used by permission.\" Permission to modify\n" \ +" the code and to distribute modified code is granted, provided the\n" \ +" Copyright, this License, and the Availability note are retained,\n" \ +" and a notice that the code was modified is included.\n" + #define UMFPACK_LICENSE_PART3 \ -" Permission to modify the code and to distribute modified code is granted,\n" \ -" provided the Copyright, this License, and the Availability note are\n" \ -" retained, and a notice that the code was modified is included. This\n" \ -" software was developed with support from the National Science Foundation,\n" \ -" and is provided to you free of charge.\n" \ "\n" \ "Availability: http://www.cise.ufl.edu/research/sparse/umfpack\n" \ "\n" +/* UMFPACK Version 4.5 and later will include the following definitions. + * As an example, to test if the version you are using is 4.5 or later: + * + * #ifdef UMFPACK_VER + * if (UMFPACK_VER >= UMFPACK_VER_CODE (4,5)) ... + * #endif + * + * This also works during compile-time: + * + * #if defined(UMFPACK_VER) && (UMFPACK >= UMFPACK_VER_CODE (4,5)) + * printf ("This is version 4.5 or later\n") ; + * #else + * printf ("This is an early version\n") ; + * #endif + * + * Versions 4.4 and earlier of UMFPACK do not include a #define'd version + * number, although they do include the UMFPACK_VERSION string, defined + * above. + */ + +#define UMFPACK_DATE "May 31, 2007" +#define UMFPACK_VER_CODE(main,sub) ((main) * 1000 + (sub)) +#define UMFPACK_MAIN_VERSION 5 +#define UMFPACK_SUB_VERSION 1 +#define UMFPACK_SUBSUB_VERSION 0 +#define UMFPACK_VER UMFPACK_VER_CODE(UMFPACK_MAIN_VERSION,UMFPACK_SUB_VERSION) + /* -------------------------------------------------------------------------- */ /* contents of Info */ /* -------------------------------------------------------------------------- */ @@ -128,7 +188,7 @@ /* computed in UMFPACK_*symbolic: */ #define UMFPACK_SIZE_OF_INT 4 /* sizeof (int) */ -#define UMFPACK_SIZE_OF_LONG 5 /* sizeof (long) */ +#define UMFPACK_SIZE_OF_LONG 5 /* sizeof (UF_long) */ #define UMFPACK_SIZE_OF_POINTER 6 /* sizeof (void *) */ #define UMFPACK_SIZE_OF_ENTRY 7 /* sizeof (Entry), real or complex */ #define UMFPACK_NDENSE_ROW 8 /* number of dense rows */ @@ -371,4 +431,8 @@ /* Integer constants are used for status and solve codes instead of enum */ /* to make it easier for a Fortran code to call UMFPACK. */ +#ifdef __cplusplus +} +#endif + #endif /* UMFPACK_H */ 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 fdfde6e6d1..948a65ecf8 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,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -15,11 +15,11 @@ int umfpack_di_col_to_triplet int Tj [ ] ) ; -long umfpack_dl_col_to_triplet +UF_long umfpack_dl_col_to_triplet ( - long n_col, - const long Ap [ ], - long Tj [ ] + UF_long n_col, + const UF_long Ap [ ], + UF_long Tj [ ] ) ; int umfpack_zi_col_to_triplet @@ -29,11 +29,11 @@ int umfpack_zi_col_to_triplet int Tj [ ] ) ; -long umfpack_zl_col_to_triplet +UF_long umfpack_zl_col_to_triplet ( - long n_col, - const long Ap [ ], - long Tj [ ] + UF_long n_col, + const UF_long Ap [ ], + UF_long Tj [ ] ) ; /* @@ -43,10 +43,10 @@ double int Syntax: int n_col, *Tj, *Ap, status ; status = umfpack_di_col_to_triplet (n_col, Ap, Tj) ; -double long Syntax: +double UF_long Syntax: #include "umfpack.h" - long n_col, *Tj, *Ap, status ; + UF_long n_col, *Tj, *Ap, status ; status = umfpack_dl_col_to_triplet (n_col, Ap, Tj) ; complex int Syntax: @@ -55,10 +55,10 @@ complex int Syntax: int n_col, *Tj, *Ap, status ; status = umfpack_zi_col_to_triplet (n_col, Ap, Tj) ; -complex long Syntax: +complex UF_long Syntax: #include "umfpack.h" - long n_col, *Tj, *Ap, status ; + UF_long n_col, *Tj, *Ap, status ; status = umfpack_zl_col_to_triplet (n_col, Ap, Tj) ; Purpose: diff --git a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_defaults.h b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_defaults.h index 8f3ff5ee4c..a588d4f652 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_defaults.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_defaults.h @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -35,7 +35,7 @@ double int Syntax: double Control [UMFPACK_CONTROL] ; umfpack_di_defaults (Control) ; -double long Syntax: +double UF_long Syntax: #include "umfpack.h" double Control [UMFPACK_CONTROL] ; @@ -47,7 +47,7 @@ complex int Syntax: double Control [UMFPACK_CONTROL] ; umfpack_zi_defaults (Control) ; -complex long Syntax: +complex UF_long Syntax: #include "umfpack.h" double Control [UMFPACK_CONTROL] ; 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 e1d81163ed..986a6ab0d9 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_free_numeric.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_free_numeric.h @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -35,7 +35,7 @@ double int Syntax: void *Numeric ; umfpack_di_free_numeric (&Numeric) ; -double long Syntax: +double UF_long Syntax: #include "umfpack.h" void *Numeric ; @@ -47,7 +47,7 @@ complex int Syntax: void *Numeric ; umfpack_zi_free_numeric (&Numeric) ; -complex long Syntax: +complex UF_long Syntax: #include "umfpack.h" void *Numeric ; 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 c9806e528b..ad3aeb6072 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_free_symbolic.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_free_symbolic.h @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -35,7 +35,7 @@ double int Syntax: void *Symbolic ; umfpack_di_free_symbolic (&Symbolic) ; -double long Syntax: +double UF_long Syntax: #include "umfpack.h" void *Symbolic ; @@ -47,7 +47,7 @@ complex int Syntax: void *Symbolic ; umfpack_zi_free_symbolic (&Symbolic) ; -complex long Syntax: +complex UF_long Syntax: #include "umfpack.h" void *Symbolic ; diff --git a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_get_determinant.h b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_get_determinant.h index e568674dfd..702c1f17bf 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_get_determinant.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_get_determinant.h @@ -3,9 +3,10 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ +/* UMFPACK_get_determinant contributed by David Bateman, Motorola, Paris. */ /* -------------------------------------------------------------------------- */ int umfpack_di_get_determinant @@ -16,7 +17,7 @@ int umfpack_di_get_determinant double User_Info [UMFPACK_INFO] ) ; -long umfpack_dl_get_determinant +UF_long umfpack_dl_get_determinant ( double *Mx, double *Ex, @@ -33,7 +34,7 @@ int umfpack_zi_get_determinant double User_Info [UMFPACK_INFO] ) ; -long umfpack_zl_get_determinant +UF_long umfpack_zl_get_determinant ( double *Mx, double *Mz, @@ -51,11 +52,11 @@ double int Syntax: double Mx, Ex, Info [UMFPACK_INFO] ; status = umfpack_di_get_determinant (&Mx, &Ex, Numeric, Info) ; -double long Syntax: +double UF_long Syntax: #include "umfpack.h" void *Numeric ; - long status ; + UF_long status ; double Mx, Ex, Info [UMFPACK_INFO] ; status = umfpack_dl_get_determinant (&Mx, &Ex, Numeric, Info) ; @@ -71,7 +72,7 @@ complex int Syntax: #include "umfpack.h" void *Numeric ; - long status ; + UF_long status ; double *Mx, *Mz, *Ex, Info [UMFPACK_INFO] ; status = umfpack_zl_get_determinant (&Mx, &Mz, &Ex, Numeric, Info) ; @@ -79,6 +80,8 @@ packed complex int Syntax: Same as above, except Mz is NULL. +Author: Contributed by David Bateman, Motorola, Paris + Purpose: Using the LU factors and the permutation vectors contained in the Numeric @@ -189,4 +192,5 @@ Arguments: 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 62381e52ed..512cffa973 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_get_lunz.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_get_lunz.h @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -18,13 +18,13 @@ int umfpack_di_get_lunz void *Numeric ) ; -long umfpack_dl_get_lunz +UF_long umfpack_dl_get_lunz ( - long *lnz, - long *unz, - long *n_row, - long *n_col, - long *nz_udiag, + UF_long *lnz, + UF_long *unz, + UF_long *n_row, + UF_long *n_col, + UF_long *nz_udiag, void *Numeric ) ; @@ -38,13 +38,13 @@ int umfpack_zi_get_lunz void *Numeric ) ; -long umfpack_zl_get_lunz +UF_long umfpack_zl_get_lunz ( - long *lnz, - long *unz, - long *n_row, - long *n_col, - long *nz_udiag, + UF_long *lnz, + UF_long *unz, + UF_long *n_row, + UF_long *n_col, + UF_long *nz_udiag, void *Numeric ) ; @@ -53,29 +53,33 @@ double int Syntax: #include "umfpack.h" void *Numeric ; - int status, lnz, unz, n_row, n_col ; - status = umfpack_di_get_lunz (&lnz, &unz, &n_row, &n_col, Numeric) ; + int status, lnz, unz, n_row, n_col, nz_udiag ; + status = umfpack_di_get_lunz (&lnz, &unz, &n_row, &n_col, &nz_udiag, + Numeric) ; -double long Syntax: +double UF_long Syntax: #include "umfpack.h" void *Numeric ; - long status, lnz, unz, n_row, n_col ; - status = umfpack_dl_get_lunz (&lnz, &unz, &n_row, &n_col, Numeric) ; + UF_long status, lnz, unz, n_row, n_col, nz_udiag ; + status = umfpack_dl_get_lunz (&lnz, &unz, &n_row, &n_col, &nz_udiag, + Numeric) ; complex int Syntax: #include "umfpack.h" void *Numeric ; - int status, lnz, unz, n_row, n_col ; - status = umfpack_zi_get_lunz (&lnz, &unz, &n_row, &n_col, Numeric) ; + int status, lnz, unz, n_row, n_col, nz_udiag ; + status = umfpack_zi_get_lunz (&lnz, &unz, &n_row, &n_col, &nz_udiag, + Numeric) ; -complex long Syntax: +complex UF_long Syntax: #include "umfpack.h" void *Numeric ; - long status, lnz, unz, n_row, n_col ; - status = umfpack_zl_get_lunz (&lnz, &unz, &n_row, &n_col, Numeric) ; + UF_long status, lnz, unz, n_row, n_col, nz_udiag ; + status = umfpack_zl_get_lunz (&lnz, &unz, &n_row, &n_col, &nz_udiag, + Numeric) ; Purpose: 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 f071f2375f..45ba0e6218 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_get_numeric.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_get_numeric.h @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -24,18 +24,18 @@ int umfpack_di_get_numeric void *Numeric ) ; -long umfpack_dl_get_numeric +UF_long umfpack_dl_get_numeric ( - long Lp [ ], - long Lj [ ], + UF_long Lp [ ], + UF_long Lj [ ], double Lx [ ], - long Up [ ], - long Ui [ ], + UF_long Up [ ], + UF_long Ui [ ], double Ux [ ], - long P [ ], - long Q [ ], + UF_long P [ ], + UF_long Q [ ], double Dx [ ], - long *do_recip, + UF_long *do_recip, double Rs [ ], void *Numeric ) ; @@ -56,18 +56,18 @@ int umfpack_zi_get_numeric void *Numeric ) ; -long umfpack_zl_get_numeric +UF_long umfpack_zl_get_numeric ( - long Lp [ ], - long Lj [ ], + UF_long Lp [ ], + UF_long Lj [ ], double Lx [ ], double Lz [ ], - long Up [ ], - long Ui [ ], + UF_long Up [ ], + UF_long Ui [ ], double Ux [ ], double Uz [ ], - long P [ ], - long Q [ ], + UF_long P [ ], + UF_long Q [ ], double Dx [ ], double Dz [ ], - long *do_recip, + UF_long *do_recip, double Rs [ ], void *Numeric ) ; @@ -82,11 +82,11 @@ double int Syntax: status = umfpack_di_get_numeric (Lp, Lj, Lx, Up, Ui, Ux, P, Q, Dx, &do_recip, Rs, Numeric) ; -double long Syntax: +double UF_long Syntax: #include "umfpack.h" void *Numeric ; - long *Lp, *Lj, *Up, *Ui, *P, *Q, status, do_recip ; + UF_long *Lp, *Lj, *Up, *Ui, *P, *Q, status, do_recip ; double *Lx, *Ux, *Dx, *Rs ; status = umfpack_dl_get_numeric (Lp, Lj, Lx, Up, Ui, Ux, P, Q, Dx, &do_recip, Rs, Numeric) ; @@ -100,16 +100,16 @@ complex int Syntax: status = umfpack_zi_get_numeric (Lp, Lj, Lx, Lz, Up, Ui, Ux, Uz, P, Q, Dx, Dz, &do_recip, Rs, Numeric) ; -complex long Syntax: +complex UF_long Syntax: #include "umfpack.h" void *Numeric ; - long *Lp, *Lj, *Up, *Ui, *P, *Q, status, do_recip ; + UF_long *Lp, *Lj, *Up, *Ui, *P, *Q, status, do_recip ; double *Lx, *Lz, *Ux, *Uz, *Dx, *Dz, *Rs ; status = umfpack_zl_get_numeric (Lp, Lj, Lx, Lz, Up, Ui, Ux, Uz, P, Q, Dx, Dz, &do_recip, Rs, Numeric) ; -packed complex int/long Syntax: +packed complex int/UF_long Syntax: Same as above, except Lz, Uz, and Dz are all NULL. @@ -226,13 +226,15 @@ Arguments: Int *do_recip ; Output argument. - If do_recip is returned as zero (false), then the scale factors Rs [i] - are to be used by multiplying row i by Rs [i]. Otherwise, the entries - in row i are to be divided by Rs [i]. + This argument defines how the scale factors Rs are to be interpretted. + + If do_recip is TRUE (one), then the scale factors Rs [i] are to be used + by multiplying row i by Rs [i]. Otherwise, the entries in row i are to + be divided by Rs [i]. If UMFPACK has been compiled with gcc, or for MATLAB as either a built-in routine or as a mexFunction, then the NRECIPROCAL flag is - set, and do_recip will always be zero (false). + set, and do_recip will always be FALSE (zero). double Rs [n_row] ; Output argument. 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 d509e1ecb8..21b7cc2531 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_get_symbolic.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_get_symbolic.h @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -28,23 +28,23 @@ int umfpack_di_get_symbolic void *Symbolic ) ; -long umfpack_dl_get_symbolic +UF_long umfpack_dl_get_symbolic ( - long *n_row, - long *n_col, - long *n1, - long *nz, - long *nfr, - long *nchains, - long P [ ], - long Q [ ], - long Front_npivcol [ ], - long Front_parent [ ], - long Front_1strow [ ], - long Front_leftmostdesc [ ], - long Chain_start [ ], - long Chain_maxrows [ ], - long Chain_maxcols [ ], + UF_long *n_row, + UF_long *n_col, + UF_long *n1, + UF_long *nz, + UF_long *nfr, + UF_long *nchains, + UF_long P [ ], + UF_long Q [ ], + UF_long Front_npivcol [ ], + UF_long Front_parent [ ], + UF_long Front_1strow [ ], + UF_long Front_leftmostdesc [ ], + UF_long Chain_start [ ], + UF_long Chain_maxrows [ ], + UF_long Chain_maxcols [ ], void *Symbolic ) ; @@ -68,23 +68,23 @@ int umfpack_zi_get_symbolic void *Symbolic ) ; -long umfpack_zl_get_symbolic +UF_long umfpack_zl_get_symbolic ( - long *n_row, - long *n_col, - long *n1, - long *nz, - long *nfr, - long *nchains, - long P [ ], - long Q [ ], - long Front_npivcol [ ], - long Front_parent [ ], - long Front_1strow [ ], - long Front_leftmostdesc [ ], - long Chain_start [ ], - long Chain_maxrows [ ], - long Chain_maxcols [ ], + UF_long *n_row, + UF_long *n_col, + UF_long *n1, + UF_long *nz, + UF_long *nfr, + UF_long *nchains, + UF_long P [ ], + UF_long Q [ ], + UF_long Front_npivcol [ ], + UF_long Front_parent [ ], + UF_long Front_1strow [ ], + UF_long Front_leftmostdesc [ ], + UF_long Chain_start [ ], + UF_long Chain_maxrows [ ], + UF_long Chain_maxcols [ ], void *Symbolic ) ; @@ -102,10 +102,10 @@ double int Syntax: Front_leftmostdesc, Chain_start, Chain_maxrows, Chain_maxcols, Symbolic) ; -double long Syntax: +double UF_long Syntax: #include "umfpack.h" - long status, n_row, n_col, nz, nfr, nchains, *P, *Q, + UF_long status, n_row, n_col, nz, nfr, nchains, *P, *Q, *Front_npivcol, *Front_parent, *Front_1strow, *Front_leftmostdesc, *Chain_start, *Chain_maxrows, *Chain_maxcols ; void *Symbolic ; @@ -126,10 +126,10 @@ complex int Syntax: Front_leftmostdesc, Chain_start, Chain_maxrows, Chain_maxcols, Symbolic) ; -complex long Syntax: +complex UF_long Syntax: #include "umfpack.h" - long status, n_row, n_col, nz, nfr, nchains, *P, *Q, + UF_long status, n_row, n_col, nz, nfr, nchains, *P, *Q, *Front_npivcol, *Front_parent, *Front_1strow, *Front_leftmostdesc, *Chain_start, *Chain_maxrows, *Chain_maxcols ; void *Symbolic ; diff --git a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_global.h b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_global.h new file mode 100644 index 0000000000..51c64dd304 --- /dev/null +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_global.h @@ -0,0 +1,22 @@ +/* ========================================================================== */ +/* === umfpack_global ======================================================= */ +/* ========================================================================== */ + +/* -------------------------------------------------------------------------- */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ +/* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ +/* web: http://www.cise.ufl.edu/research/sparse/umfpack */ +/* -------------------------------------------------------------------------- */ + +/* prototypes for global variables, and basic operators for complex values */ + +#ifndef EXTERN +#define EXTERN extern +#endif + +EXTERN double (*umfpack_hypot) (double, double) ; +EXTERN int (*umfpack_divcomplex) (double, double, double, double, double *, double *) ; + +double umf_hypot (double x, double y) ; +int umf_divcomplex (double, double, double, double, double *, double *) ; + 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 29d65963eb..0b84c99978 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_load_numeric.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_load_numeric.h @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -14,7 +14,7 @@ int umfpack_di_load_numeric char *filename ) ; -long umfpack_dl_load_numeric +UF_long umfpack_dl_load_numeric ( void **Numeric, char *filename @@ -26,7 +26,7 @@ int umfpack_zi_load_numeric char *filename ) ; -long umfpack_zl_load_numeric +UF_long umfpack_zl_load_numeric ( void **Numeric, char *filename @@ -41,10 +41,10 @@ double int Syntax: void *Numeric ; status = umfpack_di_load_numeric (&Numeric, filename) ; -double long Syntax: +double UF_long Syntax: #include "umfpack.h" - long status ; + UF_long status ; char *filename ; void *Numeric ; status = umfpack_dl_load_numeric (&Numeric, filename) ; @@ -57,10 +57,10 @@ complex int Syntax: void *Numeric ; status = umfpack_zi_load_numeric (&Numeric, filename) ; -complex long Syntax: +complex UF_long Syntax: #include "umfpack.h" - long status ; + UF_long status ; char *filename ; void *Numeric ; status = umfpack_zl_load_numeric (&Numeric, filename) ; 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 fe70ecfb3b..8bd572894e 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_load_symbolic.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_load_symbolic.h @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -14,7 +14,7 @@ int umfpack_di_load_symbolic char *filename ) ; -long umfpack_dl_load_symbolic +UF_long umfpack_dl_load_symbolic ( void **Symbolic, char *filename @@ -26,7 +26,7 @@ int umfpack_zi_load_symbolic char *filename ) ; -long umfpack_zl_load_symbolic +UF_long umfpack_zl_load_symbolic ( void **Symbolic, char *filename @@ -41,10 +41,10 @@ double int Syntax: void *Symbolic ; status = umfpack_di_load_symbolic (&Symbolic, filename) ; -double long Syntax: +double UF_long Syntax: #include "umfpack.h" - long status ; + UF_long status ; char *filename ; void *Symbolic ; status = umfpack_dl_load_symbolic (&Symbolic, filename) ; @@ -57,10 +57,10 @@ complex int Syntax: void *Symbolic ; status = umfpack_zi_load_symbolic (&Symbolic, filename) ; -complex long Syntax: +complex UF_long Syntax: #include "umfpack.h" - long status ; + UF_long status ; char *filename ; void *Symbolic ; status = umfpack_zl_load_symbolic (&Symbolic, filename) ; diff --git a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_numeric.h b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_numeric.h index f97d68396b..d871ef18e2 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_numeric.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_numeric.h @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -19,10 +19,10 @@ int umfpack_di_numeric double Info [UMFPACK_INFO] ) ; -long umfpack_dl_numeric +UF_long umfpack_dl_numeric ( - const long Ap [ ], - const long Ai [ ], + const UF_long Ap [ ], + const UF_long Ai [ ], const double Ax [ ], void *Symbolic, void **Numeric, @@ -41,10 +41,10 @@ int umfpack_zi_numeric double Info [UMFPACK_INFO] ) ; -long umfpack_zl_numeric +UF_long umfpack_zl_numeric ( - const long Ap [ ], - const long Ai [ ], + const UF_long Ap [ ], + const UF_long Ai [ ], const double Ax [ ], const double Az [ ], void *Symbolic, void **Numeric, @@ -61,11 +61,11 @@ double int Syntax: double *Ax, Control [UMFPACK_CONTROL], Info [UMFPACK_INFO] ; status = umfpack_di_numeric (Ap, Ai, Ax, Symbolic, &Numeric, Control, Info); -double long Syntax: +double UF_long Syntax: #include "umfpack.h" void *Symbolic, *Numeric ; - long *Ap, *Ai, status ; + UF_long *Ap, *Ai, status ; double *Ax, Control [UMFPACK_CONTROL], Info [UMFPACK_INFO] ; status = umfpack_dl_numeric (Ap, Ai, Ax, Symbolic, &Numeric, Control, Info); @@ -78,11 +78,11 @@ complex int Syntax: status = umfpack_zi_numeric (Ap, Ai, Ax, Az, Symbolic, &Numeric, Control, Info) ; -complex long Syntax: +complex UF_long Syntax: #include "umfpack.h" void *Symbolic, *Numeric ; - long *Ap, *Ai, status ; + UF_long *Ap, *Ai, status ; double *Ax, *Az, Control [UMFPACK_CONTROL], Info [UMFPACK_INFO] ; status = umfpack_zl_numeric (Ap, Ai, Ax, Az, Symbolic, &Numeric, Control, Info) ; @@ -281,13 +281,10 @@ Arguments: collection then occurs. 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 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 - doesn't work, then compile it with -DNUTIL instead. + re-trying with a smaller space, may not work when UMFPACK is used + as a mexFunction MATLAB, since mxMalloc aborts the mexFunction if it + fails. This issue does not affect the use of UMFPACK as a part of + the built-in x=A\b in MATLAB 6.5 and later. If you are using the umfpack mexFunction, decrease the magnitude of Control [UMFPACK_ALLOC_INIT] if you run out of memory in MATLAB. diff --git a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_qsymbolic.h b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_qsymbolic.h index f93de8589e..00f9cd44d1 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_qsymbolic.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_qsymbolic.h @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -21,14 +21,14 @@ int umfpack_di_qsymbolic double Info [UMFPACK_INFO] ) ; -long umfpack_dl_qsymbolic +UF_long umfpack_dl_qsymbolic ( - long n_row, - long n_col, - const long Ap [ ], - const long Ai [ ], + UF_long n_row, + UF_long n_col, + const UF_long Ap [ ], + const UF_long Ai [ ], const double Ax [ ], - const long Qinit [ ], + const UF_long Qinit [ ], void **Symbolic, const double Control [UMFPACK_CONTROL], double Info [UMFPACK_INFO] @@ -47,14 +47,14 @@ int umfpack_zi_qsymbolic double Info [UMFPACK_INFO] ) ; -long umfpack_zl_qsymbolic +UF_long umfpack_zl_qsymbolic ( - long n_row, - long n_col, - const long Ap [ ], - const long Ai [ ], + UF_long n_row, + UF_long n_col, + const UF_long Ap [ ], + const UF_long Ai [ ], const double Ax [ ], const double Az [ ], - const long Qinit [ ], + const UF_long Qinit [ ], void **Symbolic, const double Control [UMFPACK_CONTROL], double Info [UMFPACK_INFO] @@ -70,11 +70,11 @@ double int Syntax: status = umfpack_di_qsymbolic (n_row, n_col, Ap, Ai, Ax, Qinit, &Symbolic, Control, Info) ; -double long Syntax: +double UF_long Syntax: #include "umfpack.h" void *Symbolic ; - long n_row, n_col, *Ap, *Ai, *Qinit, status ; + UF_long n_row, n_col, *Ap, *Ai, *Qinit, status ; double Control [UMFPACK_CONTROL], Info [UMFPACK_INFO], *Ax ; status = umfpack_dl_qsymbolic (n_row, n_col, Ap, Ai, Ax, Qinit, &Symbolic, Control, Info) ; @@ -88,11 +88,11 @@ complex int Syntax: status = umfpack_zi_qsymbolic (n_row, n_col, Ap, Ai, Ax, Az, Qinit, &Symbolic, Control, Info) ; -complex long Syntax: +complex UF_long Syntax: #include "umfpack.h" void *Symbolic ; - long n_row, n_col, *Ap, *Ai, *Qinit, status ; + UF_long n_row, n_col, *Ap, *Ai, *Qinit, status ; double Control [UMFPACK_CONTROL], Info [UMFPACK_INFO], *Ax, *Az ; status = umfpack_zl_qsymbolic (n_row, n_col, Ap, Ai, Ax, Az, Qinit, &Symbolic, Control, Info) ; 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 607185c1a6..361a353d87 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_control.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_control.h @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -35,7 +35,7 @@ double int Syntax: double Control [UMFPACK_CONTROL] ; umfpack_di_report_control (Control) ; -double long Syntax: +double UF_long Syntax: #include "umfpack.h" double Control [UMFPACK_CONTROL] ; @@ -47,7 +47,7 @@ complex int Syntax: double Control [UMFPACK_CONTROL] ; umfpack_zi_report_control (Control) ; -double long Syntax: +double UF_long Syntax: #include "umfpack.h" double Control [UMFPACK_CONTROL] ; 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 0f7970903a..5822721eb5 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_info.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_info.h @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -39,7 +39,7 @@ double int Syntax: double Control [UMFPACK_CONTROL], Info [UMFPACK_INFO] ; umfpack_di_report_info (Control, Info) ; -double long Syntax: +double UF_long Syntax: #include "umfpack.h" double Control [UMFPACK_CONTROL], Info [UMFPACK_INFO] ; @@ -51,7 +51,7 @@ complex int Syntax: double Control [UMFPACK_CONTROL], Info [UMFPACK_INFO] ; umfpack_zi_report_info (Control, Info) ; -complex long Syntax: +complex UF_long Syntax: #include "umfpack.h" double Control [UMFPACK_CONTROL], Info [UMFPACK_INFO] ; 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 831d32ca34..0d17e2df3c 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_matrix.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_matrix.h @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -19,14 +19,14 @@ int umfpack_di_report_matrix const double Control [UMFPACK_CONTROL] ) ; -long umfpack_dl_report_matrix +UF_long umfpack_dl_report_matrix ( - long n_row, - long n_col, - const long Ap [ ], - const long Ai [ ], + UF_long n_row, + UF_long n_col, + const UF_long Ap [ ], + const UF_long Ai [ ], const double Ax [ ], - long col_form, + UF_long col_form, const double Control [UMFPACK_CONTROL] ) ; @@ -41,14 +41,14 @@ int umfpack_zi_report_matrix const double Control [UMFPACK_CONTROL] ) ; -long umfpack_zl_report_matrix +UF_long umfpack_zl_report_matrix ( - long n_row, - long n_col, - const long Ap [ ], - const long Ai [ ], + UF_long n_row, + UF_long n_col, + const UF_long Ap [ ], + const UF_long Ai [ ], const double Ax [ ], const double Az [ ], - long col_form, + UF_long col_form, const double Control [UMFPACK_CONTROL] ) ; @@ -62,10 +62,10 @@ double int Syntax: or: status = umfpack_di_report_matrix (n_row, n_col, Ap, Ai, Ax, 0, Control) ; -double long Syntax: +double UF_long Syntax: #include "umfpack.h" - long n_row, n_col, *Ap, *Ai, status ; + UF_long n_row, n_col, *Ap, *Ai, status ; double *Ax, Control [UMFPACK_CONTROL] ; status = umfpack_dl_report_matrix (n_row, n_col, Ap, Ai, Ax, 1, Control) ; or: @@ -82,10 +82,10 @@ or: status = umfpack_zi_report_matrix (n_row, n_col, Ap, Ai, Ax, Az, 0, Control) ; -complex long Syntax: +complex UF_long Syntax: #include "umfpack.h" - long n_row, n_col, *Ap, *Ai, status ; + UF_long n_row, n_col, *Ap, *Ai, status ; double *Ax, Control [UMFPACK_CONTROL] ; status = umfpack_zl_report_matrix (n_row, n_col, Ap, Ai, Ax, Az, 1, Control) ; 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 28bad670bb..ff4eb117a0 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_numeric.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_numeric.h @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -14,7 +14,7 @@ int umfpack_di_report_numeric const double Control [UMFPACK_CONTROL] ) ; -long umfpack_dl_report_numeric +UF_long umfpack_dl_report_numeric ( void *Numeric, const double Control [UMFPACK_CONTROL] @@ -26,7 +26,7 @@ int umfpack_zi_report_numeric const double Control [UMFPACK_CONTROL] ) ; -long umfpack_zl_report_numeric +UF_long umfpack_zl_report_numeric ( void *Numeric, const double Control [UMFPACK_CONTROL] @@ -41,12 +41,12 @@ double int Syntax: int status ; status = umfpack_di_report_numeric (Numeric, Control) ; -double long Syntax: +double UF_long Syntax: #include "umfpack.h" void *Numeric ; double Control [UMFPACK_CONTROL] ; - long status ; + UF_long status ; status = umfpack_dl_report_numeric (Numeric, Control) ; complex int Syntax: @@ -57,12 +57,12 @@ complex int Syntax: int status ; status = umfpack_zi_report_numeric (Numeric, Control) ; -complex long Syntax: +complex UF_long Syntax: #include "umfpack.h" void *Numeric ; double Control [UMFPACK_CONTROL] ; - long status ; + UF_long status ; status = umfpack_zl_report_numeric (Numeric, Control) ; Purpose: 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 cffab230e6..4810e32f79 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_perm.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_perm.h @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -15,10 +15,10 @@ int umfpack_di_report_perm const double Control [UMFPACK_CONTROL] ) ; -long umfpack_dl_report_perm +UF_long umfpack_dl_report_perm ( - long np, - const long Perm [ ], + UF_long np, + const UF_long Perm [ ], const double Control [UMFPACK_CONTROL] ) ; @@ -29,10 +29,10 @@ int umfpack_zi_report_perm const double Control [UMFPACK_CONTROL] ) ; -long umfpack_zl_report_perm +UF_long umfpack_zl_report_perm ( - long np, - const long Perm [ ], + UF_long np, + const UF_long Perm [ ], const double Control [UMFPACK_CONTROL] ) ; @@ -44,10 +44,10 @@ double int Syntax: double Control [UMFPACK_CONTROL] ; status = umfpack_di_report_perm (np, Perm, Control) ; -double long Syntax: +double UF_long Syntax: #include "umfpack.h" - long np, *Perm, status ; + UF_long np, *Perm, status ; double Control [UMFPACK_CONTROL] ; status = umfpack_dl_report_perm (np, Perm, Control) ; @@ -58,10 +58,10 @@ complex int Syntax: double Control [UMFPACK_CONTROL] ; status = umfpack_zi_report_perm (np, Perm, Control) ; -complex long Syntax: +complex UF_long Syntax: #include "umfpack.h" - long np, *Perm, status ; + UF_long np, *Perm, status ; double Control [UMFPACK_CONTROL] ; status = umfpack_zl_report_perm (np, Perm, Control) ; 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 3d1e9e0d82..24376ae72f 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_status.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_status.h @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -17,7 +17,7 @@ void umfpack_di_report_status void umfpack_dl_report_status ( const double Control [UMFPACK_CONTROL], - long status + UF_long status ) ; void umfpack_zi_report_status @@ -29,7 +29,7 @@ void umfpack_zi_report_status void umfpack_zl_report_status ( const double Control [UMFPACK_CONTROL], - long status + UF_long status ) ; /* @@ -40,11 +40,11 @@ double int Syntax: int status ; umfpack_di_report_status (Control, status) ; -double long Syntax: +double UF_long Syntax: #include "umfpack.h" double Control [UMFPACK_CONTROL] ; - long status ; + UF_long status ; umfpack_dl_report_status (Control, status) ; complex int Syntax: @@ -54,11 +54,11 @@ complex int Syntax: int status ; umfpack_zi_report_status (Control, status) ; -complex long Syntax: +complex UF_long Syntax: #include "umfpack.h" double Control [UMFPACK_CONTROL] ; - long status ; + UF_long status ; umfpack_zl_report_status (Control, status) ; Purpose: 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 4218dfccd1..eb61182839 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_symbolic.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_symbolic.h @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -14,7 +14,7 @@ int umfpack_di_report_symbolic const double Control [UMFPACK_CONTROL] ) ; -long umfpack_dl_report_symbolic +UF_long umfpack_dl_report_symbolic ( void *Symbolic, const double Control [UMFPACK_CONTROL] @@ -26,7 +26,7 @@ int umfpack_zi_report_symbolic const double Control [UMFPACK_CONTROL] ) ; -long umfpack_zl_report_symbolic +UF_long umfpack_zl_report_symbolic ( void *Symbolic, const double Control [UMFPACK_CONTROL] @@ -41,12 +41,12 @@ double int Syntax: int status ; status = umfpack_di_report_symbolic (Symbolic, Control) ; -double long Syntax: +double UF_long Syntax: #include "umfpack.h" void *Symbolic ; double Control [UMFPACK_CONTROL] ; - long status ; + UF_long status ; status = umfpack_dl_report_symbolic (Symbolic, Control) ; complex int Syntax: @@ -57,12 +57,12 @@ complex int Syntax: int status ; status = umfpack_zi_report_symbolic (Symbolic, Control) ; -complex long Syntax: +complex UF_long Syntax: #include "umfpack.h" void *Symbolic ; double Control [UMFPACK_CONTROL] ; - long status ; + UF_long status ; status = umfpack_zl_report_symbolic (Symbolic, Control) ; Purpose: 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 f3da629d7a..4e7a605b8a 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_triplet.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_triplet.h @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -19,13 +19,13 @@ int umfpack_di_report_triplet const double Control [UMFPACK_CONTROL] ) ; -long umfpack_dl_report_triplet +UF_long umfpack_dl_report_triplet ( - long n_row, - long n_col, - long nz, - const long Ti [ ], - const long Tj [ ], + UF_long n_row, + UF_long n_col, + UF_long nz, + const UF_long Ti [ ], + const UF_long Tj [ ], const double Tx [ ], const double Control [UMFPACK_CONTROL] ) ; @@ -41,13 +41,13 @@ int umfpack_zi_report_triplet const double Control [UMFPACK_CONTROL] ) ; -long umfpack_zl_report_triplet +UF_long umfpack_zl_report_triplet ( - long n_row, - long n_col, - long nz, - const long Ti [ ], - const long Tj [ ], + UF_long n_row, + UF_long n_col, + UF_long nz, + const UF_long Ti [ ], + const UF_long Tj [ ], const double Tx [ ], const double Tz [ ], const double Control [UMFPACK_CONTROL] ) ; @@ -60,10 +60,10 @@ double int Syntax: double *Tx, Control [UMFPACK_CONTROL] ; status = umfpack_di_report_triplet (n_row, n_col, nz, Ti, Tj, Tx, Control) ; -double long Syntax: +double UF_long Syntax: #include "umfpack.h" - long n_row, n_col, nz, *Ti, *Tj, status ; + UF_long n_row, n_col, nz, *Ti, *Tj, status ; double *Tx, Control [UMFPACK_CONTROL] ; status = umfpack_dl_report_triplet (n_row, n_col, nz, Ti, Tj, Tx, Control) ; @@ -75,10 +75,10 @@ complex int Syntax: status = umfpack_zi_report_triplet (n_row, n_col, nz, Ti, Tj, Tx, Tz, Control) ; -complex long Syntax: +complex UF_long Syntax: #include "umfpack.h" - long n_row, n_col, nz, *Ti, *Tj, status ; + UF_long n_row, n_col, nz, *Ti, *Tj, status ; double *Tx, *Tz, Control [UMFPACK_CONTROL] ; status = umfpack_zl_report_triplet (n_row, n_col, nz, Ti, Tj, Tx, Tz, Control) ; 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 1bae66ab7b..2c4c386e0d 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_vector.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_report_vector.h @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -15,9 +15,9 @@ int umfpack_di_report_vector const double Control [UMFPACK_CONTROL] ) ; -long umfpack_dl_report_vector +UF_long umfpack_dl_report_vector ( - long n, + UF_long n, const double X [ ], const double Control [UMFPACK_CONTROL] ) ; @@ -29,9 +29,9 @@ int umfpack_zi_report_vector const double Control [UMFPACK_CONTROL] ) ; -long umfpack_zl_report_vector +UF_long umfpack_zl_report_vector ( - long n, + UF_long n, const double Xx [ ], const double Xz [ ], const double Control [UMFPACK_CONTROL] ) ; @@ -44,10 +44,10 @@ double int Syntax: double *X, Control [UMFPACK_CONTROL] ; status = umfpack_di_report_vector (n, X, Control) ; -double long Syntax: +double UF_long Syntax: #include "umfpack.h" - long n, status ; + UF_long n, status ; double *X, Control [UMFPACK_CONTROL] ; status = umfpack_dl_report_vector (n, X, Control) ; @@ -58,10 +58,10 @@ complex int Syntax: double *Xx, *Xz, Control [UMFPACK_CONTROL] ; status = umfpack_zi_report_vector (n, Xx, Xz, Control) ; -complex long Syntax: +complex UF_long Syntax: #include "umfpack.h" - long n, status ; + UF_long n, status ; double *Xx, *Xz, Control [UMFPACK_CONTROL] ; status = umfpack_zl_report_vector (n, Xx, Xz, Control) ; @@ -107,7 +107,7 @@ Arguments: when passed to umfpack_*_report_vector (this is untested, however). This is the "merged" form of the complex vector X. - Note that all complex routines in UMFPACK V4.4 use this same + Note that all complex routines in UMFPACK V4.4 and later 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 packed format is compatible with the intrinsic double _Complex 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 9eeb4be6e4..708e5819ad 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_save_numeric.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_save_numeric.h @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -14,7 +14,7 @@ int umfpack_di_save_numeric char *filename ) ; -long umfpack_dl_save_numeric +UF_long umfpack_dl_save_numeric ( void *Numeric, char *filename @@ -26,7 +26,7 @@ int umfpack_zi_save_numeric char *filename ) ; -long umfpack_zl_save_numeric +UF_long umfpack_zl_save_numeric ( void *Numeric, char *filename @@ -41,10 +41,10 @@ double int Syntax: void *Numeric ; status = umfpack_di_save_numeric (Numeric, filename) ; -double long Syntax: +double UF_long Syntax: #include "umfpack.h" - long status ; + UF_long status ; char *filename ; void *Numeric ; status = umfpack_dl_save_numeric (Numeric, filename) ; @@ -57,10 +57,10 @@ complex int Syntax: void *Numeric ; status = umfpack_zi_save_numeric (Numeric, filename) ; -complex long Syntax: +complex UF_long Syntax: #include "umfpack.h" - long status ; + UF_long status ; char *filename ; void *Numeric ; status = umfpack_zl_save_numeric (Numeric, filename) ; 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 26eab600b1..2dffdd64e6 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_save_symbolic.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_save_symbolic.h @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -14,7 +14,7 @@ int umfpack_di_save_symbolic char *filename ) ; -long umfpack_dl_save_symbolic +UF_long umfpack_dl_save_symbolic ( void *Symbolic, char *filename @@ -26,7 +26,7 @@ int umfpack_zi_save_symbolic char *filename ) ; -long umfpack_zl_save_symbolic +UF_long umfpack_zl_save_symbolic ( void *Symbolic, char *filename @@ -41,10 +41,10 @@ double int Syntax: void *Symbolic ; status = umfpack_di_save_symbolic (Symbolic, filename) ; -double long Syntax: +double UF_long Syntax: #include "umfpack.h" - long status ; + UF_long status ; char *filename ; void *Symbolic ; status = umfpack_dl_save_symbolic (Symbolic, filename) ; @@ -57,10 +57,10 @@ complex int Syntax: void *Symbolic ; status = umfpack_zi_save_symbolic (Symbolic, filename) ; -complex long Syntax: +complex UF_long Syntax: #include "umfpack.h" - long status ; + UF_long status ; char *filename ; void *Symbolic ; status = umfpack_zl_save_symbolic (Symbolic, filename) ; diff --git a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_scale.h b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_scale.h index 11138aa48d..62fc32a85f 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_scale.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_scale.h @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -15,7 +15,7 @@ int umfpack_di_scale void *Numeric ) ; -long umfpack_dl_scale +UF_long umfpack_dl_scale ( double X [ ], const double B [ ], @@ -29,7 +29,7 @@ int umfpack_zi_scale void *Numeric ) ; -long umfpack_zl_scale +UF_long umfpack_zl_scale ( double Xx [ ], double Xz [ ], const double Bx [ ], const double Bz [ ], @@ -44,7 +44,7 @@ double int Syntax: double *B, *X ; status = umfpack_di_scale (X, B, Numeric) ; -double long Syntax: +double UF_long Syntax: #include "umfpack.h" void *Numeric ; @@ -58,7 +58,7 @@ complex int Syntax: double *Bx, *Bz, *Xx, *Xz ; status = umfpack_zi_scale (Xx, Xz, Bx, Bz, Numeric) ; -complex long Syntax: +complex UF_long Syntax: #include "umfpack.h" void *Numeric ; diff --git a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_solve.h b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_solve.h index 6bbce1c3c6..09320914cc 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_solve.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_solve.h @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -21,11 +21,11 @@ int umfpack_di_solve double Info [UMFPACK_INFO] ) ; -long umfpack_dl_solve +UF_long umfpack_dl_solve ( - long sys, - const long Ap [ ], - const long Ai [ ], + UF_long sys, + const UF_long Ap [ ], + const UF_long Ai [ ], const double Ax [ ], double X [ ], const double B [ ], @@ -47,11 +47,11 @@ int umfpack_zi_solve double Info [UMFPACK_INFO] ) ; -long umfpack_zl_solve +UF_long umfpack_zl_solve ( - long sys, - const long Ap [ ], - const long Ai [ ], + UF_long sys, + const UF_long Ap [ ], + const UF_long Ai [ ], const double Ax [ ], const double Az [ ], double Xx [ ], double Xz [ ], const double Bx [ ], const double Bz [ ], @@ -69,11 +69,11 @@ double int Syntax: double *B, *X, *Ax, Info [UMFPACK_INFO], Control [UMFPACK_CONTROL] ; status = umfpack_di_solve (sys, Ap, Ai, Ax, X, B, Numeric, Control, Info) ; -double long Syntax: +double UF_long Syntax: #include "umfpack.h" void *Numeric ; - long status, *Ap, *Ai, sys ; + UF_long status, *Ap, *Ai, sys ; double *B, *X, *Ax, Info [UMFPACK_INFO], Control [UMFPACK_CONTROL] ; status = umfpack_dl_solve (sys, Ap, Ai, Ax, X, B, Numeric, Control, Info) ; @@ -87,11 +87,11 @@ complex int Syntax: status = umfpack_zi_solve (sys, Ap, Ai, Ax, Az, Xx, Xz, Bx, Bz, Numeric, Control, Info) ; -complex long Syntax: +complex UF_long Syntax: #include "umfpack.h" void *Numeric ; - long status, *Ap, *Ai, sys ; + UF_long status, *Ap, *Ai, sys ; double *Bx, *Bz, *Xx, *Xz, *Ax, *Az, Info [UMFPACK_INFO], Control [UMFPACK_CONTROL] ; status = umfpack_zl_solve (sys, Ap, Ai, Ax, Az, Xx, Xz, Bx, Bz, Numeric, diff --git a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_symbolic.h b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_symbolic.h index 3ee4ffa5f1..1deacc2582 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_symbolic.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_symbolic.h @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -20,12 +20,12 @@ int umfpack_di_symbolic double Info [UMFPACK_INFO] ) ; -long umfpack_dl_symbolic +UF_long umfpack_dl_symbolic ( - long n_row, - long n_col, - const long Ap [ ], - const long Ai [ ], + UF_long n_row, + UF_long n_col, + const UF_long Ap [ ], + const UF_long Ai [ ], const double Ax [ ], void **Symbolic, const double Control [UMFPACK_CONTROL], @@ -44,12 +44,12 @@ int umfpack_zi_symbolic double Info [UMFPACK_INFO] ) ; -long umfpack_zl_symbolic +UF_long umfpack_zl_symbolic ( - long n_row, - long n_col, - const long Ap [ ], - const long Ai [ ], + UF_long n_row, + UF_long n_col, + const UF_long Ap [ ], + const UF_long Ai [ ], const double Ax [ ], const double Az [ ], void **Symbolic, const double Control [UMFPACK_CONTROL], @@ -66,11 +66,11 @@ double int Syntax: status = umfpack_di_symbolic (n_row, n_col, Ap, Ai, Ax, &Symbolic, Control, Info) ; -double long Syntax: +double UF_long Syntax: #include "umfpack.h" void *Symbolic ; - long n_row, n_col, *Ap, *Ai, status ; + UF_long n_row, n_col, *Ap, *Ai, status ; double Control [UMFPACK_CONTROL], Info [UMFPACK_INFO], *Ax ; status = umfpack_dl_symbolic (n_row, n_col, Ap, Ai, Ax, &Symbolic, Control, Info) ; @@ -84,11 +84,11 @@ complex int Syntax: status = umfpack_zi_symbolic (n_row, n_col, Ap, Ai, Ax, Az, &Symbolic, Control, Info) ; -complex long Syntax: +complex UF_long Syntax: #include "umfpack.h" void *Symbolic ; - long n_row, n_col, *Ap, *Ai, status ; + UF_long n_row, n_col, *Ap, *Ai, status ; double Control [UMFPACK_CONTROL], Info [UMFPACK_INFO], *Ax, *Az ; status = umfpack_zl_symbolic (n_row, n_col, Ap, Ai, Ax, Az, &Symbolic, Control, Info) ; @@ -252,7 +252,7 @@ Arguments: A value less than 1 is treated as 1. Default: 32. Modifying this 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 + Assuming the block size is large enough (8 or so), this parameter has a modest effect on performance. Control [UMFPACK_2BY2_TOLERANCE]: a diagonal entry S (k,k) is @@ -328,7 +328,7 @@ Arguments: Info [UMFPACK_SIZE_OF_INT]: the number of bytes in an int. - Info [UMFPACK_SIZE_OF_LONG]: the number of bytes in a long. + Info [UMFPACK_SIZE_OF_LONG]: the number of bytes in a UF_long. Info [UMFPACK_SIZE_OF_POINTER]: the number of bytes in a void * pointer. diff --git a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_tictoc.h b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_tictoc.h index 121755895a..da10426b77 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_tictoc.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_tictoc.h @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 8d8d8cf10c..413a1779c2 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_timer.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_timer.h @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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_transpose.h b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_transpose.h index 5f2fa92c7d..b12bb0bd8f 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_transpose.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_transpose.h @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -22,17 +22,17 @@ int umfpack_di_transpose double Rx [ ] ) ; -long umfpack_dl_transpose +UF_long umfpack_dl_transpose ( - long n_row, - long n_col, - const long Ap [ ], - const long Ai [ ], + UF_long n_row, + UF_long n_col, + const UF_long Ap [ ], + const UF_long Ai [ ], const double Ax [ ], - const long P [ ], - const long Q [ ], - long Rp [ ], - long Ri [ ], + const UF_long P [ ], + const UF_long Q [ ], + UF_long Rp [ ], + UF_long Ri [ ], double Rx [ ] ) ; @@ -51,19 +51,19 @@ int umfpack_zi_transpose int do_conjugate ) ; -long umfpack_zl_transpose +UF_long umfpack_zl_transpose ( - long n_row, - long n_col, - const long Ap [ ], - const long Ai [ ], + UF_long n_row, + UF_long n_col, + const UF_long Ap [ ], + const UF_long Ai [ ], const double Ax [ ], const double Az [ ], - const long P [ ], - const long Q [ ], - long Rp [ ], - long Ri [ ], + const UF_long P [ ], + const UF_long Q [ ], + UF_long Rp [ ], + UF_long Ri [ ], double Rx [ ], double Rz [ ], - long do_conjugate + UF_long do_conjugate ) ; /* @@ -74,10 +74,10 @@ double int Syntax: double *Ax, *Rx ; status = umfpack_di_transpose (n_row, n_col, Ap, Ai, Ax, P, Q, Rp, Ri, Rx) ; -double long Syntax: +double UF_long Syntax: #include "umfpack.h" - long n_row, n_col, status, *Ap, *Ai, *P, *Q, *Rp, *Ri ; + UF_long n_row, n_col, status, *Ap, *Ai, *P, *Q, *Rp, *Ri ; double *Ax, *Rx ; status = umfpack_dl_transpose (n_row, n_col, Ap, Ai, Ax, P, Q, Rp, Ri, Rx) ; @@ -89,10 +89,10 @@ complex int Syntax: status = umfpack_zi_transpose (n_row, n_col, Ap, Ai, Ax, Az, P, Q, Rp, Ri, Rx, Rz, do_conjugate) ; -complex long Syntax: +complex UF_long Syntax: #include "umfpack.h" - long n_row, n_col, status, *Ap, *Ai, *P, *Q, *Rp, *Ri, do_conjugate ; + UF_long n_row, n_col, status, *Ap, *Ai, *P, *Q, *Rp, *Ri, do_conjugate ; double *Ax, *Az, *Rx, *Rz ; status = umfpack_zl_transpose (n_row, n_col, Ap, Ai, Ax, Az, P, Q, Rp, Ri, Rx, Rz, do_conjugate) ; 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 abeee030d8..cb45278e18 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,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -22,18 +22,18 @@ int umfpack_di_triplet_to_col int Map [ ] ) ; -long umfpack_dl_triplet_to_col +UF_long umfpack_dl_triplet_to_col ( - long n_row, - long n_col, - long nz, - const long Ti [ ], - const long Tj [ ], + UF_long n_row, + UF_long n_col, + UF_long nz, + const UF_long Ti [ ], + const UF_long Tj [ ], const double Tx [ ], - long Ap [ ], - long Ai [ ], + UF_long Ap [ ], + UF_long Ai [ ], double Ax [ ], - long Map [ ] + UF_long Map [ ] ) ; int umfpack_zi_triplet_to_col @@ -50,18 +50,18 @@ int umfpack_zi_triplet_to_col int Map [ ] ) ; -long umfpack_zl_triplet_to_col +UF_long umfpack_zl_triplet_to_col ( - long n_row, - long n_col, - long nz, - const long Ti [ ], - const long Tj [ ], + UF_long n_row, + UF_long n_col, + UF_long nz, + const UF_long Ti [ ], + const UF_long Tj [ ], const double Tx [ ], const double Tz [ ], - long Ap [ ], - long Ai [ ], + UF_long Ap [ ], + UF_long Ai [ ], double Ax [ ], double Az [ ], - long Map [ ] + UF_long Map [ ] ) ; /* @@ -73,10 +73,10 @@ double int Syntax: status = umfpack_di_triplet_to_col (n_row, n_col, nz, Ti, Tj, Tx, Ap, Ai, Ax, Map) ; -double long Syntax: +double UF_long Syntax: #include "umfpack.h" - long n_row, n_col, nz, *Ti, *Tj, *Ap, *Ai, status, *Map ; + UF_long n_row, n_col, nz, *Ti, *Tj, *Ap, *Ai, status, *Map ; double *Tx, *Ax ; status = umfpack_dl_triplet_to_col (n_row, n_col, nz, Ti, Tj, Tx, Ap, Ai, Ax, Map) ; @@ -89,10 +89,10 @@ complex int Syntax: status = umfpack_zi_triplet_to_col (n_row, n_col, nz, Ti, Tj, Tx, Tz, Ap, Ai, Ax, Az, Map) ; -long Syntax: +UF_long Syntax: #include "umfpack.h" - long n_row, n_col, nz, *Ti, *Tj, *Ap, *Ai, status, *Map ; + UF_long n_row, n_col, nz, *Ti, *Tj, *Ap, *Ai, status, *Map ; double *Tx, *Tz, *Ax, *Az ; status = umfpack_zl_triplet_to_col (n_row, n_col, nz, Ti, Tj, Tx, Tz, Ap, Ai, Ax, Az, Map) ; diff --git a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_wsolve.h b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_wsolve.h index b537221cb7..38d15baee0 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_wsolve.h +++ b/deal.II/contrib/umfpack/UMFPACK/Include/umfpack_wsolve.h @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -23,18 +23,18 @@ int umfpack_di_wsolve double W [ ] ) ; -long umfpack_dl_wsolve +UF_long umfpack_dl_wsolve ( - long sys, - const long Ap [ ], - const long Ai [ ], + UF_long sys, + const UF_long Ap [ ], + const UF_long Ai [ ], const double Ax [ ], double X [ ], const double B [ ], void *Numeric, const double Control [UMFPACK_CONTROL], double Info [UMFPACK_INFO], - long Wi [ ], + UF_long Wi [ ], double W [ ] ) ; @@ -53,18 +53,18 @@ int umfpack_zi_wsolve double W [ ] ) ; -long umfpack_zl_wsolve +UF_long umfpack_zl_wsolve ( - long sys, - const long Ap [ ], - const long Ai [ ], + UF_long sys, + const UF_long Ap [ ], + const UF_long Ai [ ], const double Ax [ ], const double Az [ ], double Xx [ ], double Xz [ ], const double Bx [ ], const double Bz [ ], void *Numeric, const double Control [UMFPACK_CONTROL], double Info [UMFPACK_INFO], - long Wi [ ], + UF_long Wi [ ], double W [ ] ) ; @@ -78,11 +78,11 @@ double int Syntax: status = umfpack_di_wsolve (sys, Ap, Ai, Ax, X, B, Numeric, Control, Info, Wi, W) ; -double long Syntax: +double UF_long Syntax: #include "umfpack.h" void *Numeric ; - long status, *Ap, *Ai, *Wi, sys ; + UF_long status, *Ap, *Ai, *Wi, sys ; double *B, *X, *Ax, *W, Info [UMFPACK_INFO], Control [UMFPACK_CONTROL] ; status = umfpack_dl_wsolve (sys, Ap, Ai, Ax, X, B, Numeric, Control, Info, Wi, W) ; @@ -97,11 +97,11 @@ complex int Syntax: status = umfpack_zi_wsolve (sys, Ap, Ai, Ax, Az, Xx, Xz, Bx, Bz, Numeric, Control, Info, Wi, W) ; -complex long Syntax: +complex UF_long Syntax: #include "umfpack.h" void *Numeric ; - long status, *Ap, *Ai, *Wi, sys ; + UF_long status, *Ap, *Ai, *Wi, sys ; double *Bx, *Bz, *Xx, *Xz, *Ax, *Az, *W, Info [UMFPACK_INFO], Control [UMFPACK_CONTROL] ; status = umfpack_zl_wsolve (sys, Ap, Ai, Ax, Az, Xx, Xz, Bx, Bz, Numeric, diff --git a/deal.II/contrib/umfpack/UMFPACK/MATLAB/Contents.m b/deal.II/contrib/umfpack/UMFPACK/MATLAB/Contents.m index 8514438b17..b936449122 100644 --- a/deal.II/contrib/umfpack/UMFPACK/MATLAB/Contents.m +++ b/deal.II/contrib/umfpack/UMFPACK/MATLAB/Contents.m @@ -1,24 +1,32 @@ %Contents of the UMFPACK sparse matrix toolbox: % -% umfpack computes x=A\b, x=A/b, or lu (A) for a sparse matrix A -% umfpack_make to compile umfpack for use in MATLAB -% umfpack_details details on all the options for using umfpack in MATLAB -% umfpack_report prints optional control settings and statistics -% 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 -% 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) +% umfpack2 - computes x=A\b, x=A/b, or lu (A) for a sparse matrix A +% umfpack_make - to compile umfpack2 for use in MATLAB +% umfpack_install - to compile and install umfpack2 and amd2 for use in MATLAB +% umfpack_details - details on all the options for using umfpack2 in MATLAB +% umfpack_report - prints optional control settings and statistics +% umfpack_demo - a lenghty demo +% umfpack_simple - a simple demo +% umfpack_btf - factorize A using a block triangular form +% 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 umfpack2 (requires UFget) % -% See also: -% amd symmetric minimum degree ordering +% Example: +% x = umfpack2 (A, '\', b) ; % same as x = A\b, if A square and unsymmetric +% +% See also these built-in functions: +% umfpack the built-in version of UMFPACK +% amd symmetric minimum degree ordering % colamd unsymmetric column approx minimum degree ordering % symamd symmetric approx minimum degree ordering, based on colamd % -% UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. +% NOTE: UMFPACK is a built-in function in MATLAB, used in x=A\b. This is the +% source code for the built-in umfpack, but the MATLAB function has been renamed +% here to umfpack2, to avoid a filename clash with itself. +% +% Copyright 1995-2007 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 20bdee5e60..b6e7ad1c19 100644 --- a/deal.II/contrib/umfpack/UMFPACK/MATLAB/GNUmakefile +++ b/deal.II/contrib/umfpack/UMFPACK/MATLAB/GNUmakefile @@ -2,11 +2,14 @@ # UMFPACK GNUmakefile for the UMFPACK MATLAB mexFunction (GNU "make" only) #------------------------------------------------------------------------------- -all: umfpack luflop +default: umfpack2 luflop -include ../Make/Make.include +include ../../UFconfig/UFconfig.mk -MX = $(MEX) -I../Include -I../Source -I../../AMD/Include -I../../AMD/Source +I = -I../Include -I../Source -I../../AMD/Include -I../../UFconfig + +MX = $(MEX) $(I) + #------------------------------------------------------------------------------- # source files @@ -28,25 +31,25 @@ UMFCH = umf_assemble umf_blas3_update \ umf_valid_symbolic umf_grow_front umf_start_front umf_2by2 \ umf_store_lu umf_scale -# non-user-callable umf_*.[ch] files, int/long versions only (no real/complex): +# non-user-callable umf_*.[ch] files, int/UF_long versions only (no real/complex): UMFINT = umf_analyze umf_apply_order umf_colamd umf_free umf_fsize \ umf_is_permutation umf_malloc umf_realloc umf_report_perm \ umf_singletons -# non-user-callable and user-callable amd_*.[ch] files (int/long versions only): +# non-user-callable and user-callable amd_*.[ch] files (int/UF_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_preprocess + amd_order amd_control amd_info amd_valid amd_preprocess amd_global # 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: +# umf_triplet.c, and umf_assemble.c , with int/UF_long and real/complex versions: UMF_CREATED = umf_lhsolve umf_uhsolve umf_triplet_map_nox \ umf_triplet_nomap_x umf_triplet_nomap_nox umf_triplet_map_x \ umf_assemble_fixq umf_store_lu_drop -# non-user-callable, int/long and real/complex versions: +# non-user-callable, int/UF_long and real/complex versions: UMF = $(UMF_CREATED) $(UMFCH) -# user-callable umfpack_*.[ch] files (int/long and real/complex): +# user-callable umfpack_*.[ch] files (int/UF_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_get_determinant umfpack_numeric \ @@ -59,19 +62,20 @@ UMFPACK = umfpack_col_to_triplet umfpack_defaults umfpack_free_numeric \ umfpack_load_symbolic umfpack_save_symbolic # user-callable, created from umfpack_solve.c (umfpack_wsolve.h exists, though): -# with int/long and real/complex versions: +# with int/UF_long and real/complex versions: UMFPACKW = umfpack_wsolve USER = $(UMFPACKW) $(UMFPACK) -# user-callable, only one version for int/long, real/complex, *.[ch] files: -GENERIC = umfpack_timer umfpack_tictoc +# user-callable, only one version for int/UF_long, real/complex, *.[ch] files: +GENERIC = umfpack_timer umfpack_tictoc umfpack_global #------------------------------------------------------------------------------- # include files: #------------------------------------------------------------------------------- -AMDH = ../../AMD/Source/amd_internal.h ../../AMD/Include/amd.h +AMDH = ../../AMD/Include/amd_internal.h ../../AMD/Include/amd.h \ + ../../UFconfig/UFconfig.h INC1 = umf_config.h umf_version.h umf_internal.h umf_triplet.h @@ -97,18 +101,18 @@ MEXUMFPACK = $(MEXI) $(MEXDI) $(MEXZI) $(MEXGN) # Note that mex has no "-o" option, thus the need for $(MV) commands. # If it did, then the rules would be much simpler: -# $(MX) -DDINT -c $< -o $@ +# $(MX) -DDLONG -c $< -o $@ #---------------------------------------- # integer-only routines (no real/complex): #---------------------------------------- amd_m_%.o: ../../AMD/Source/amd_%.c $(AMDH) - $(MX) -DDINT -c $< + $(MX) -DDLONG -c $< - $(MV) amd_$*.o $@ umf_m_%.o: ../Source/umf_%.c $(INC) - $(MX) -DDINT -c $< + $(MX) -DDLONG -c $< - $(MV) umf_$*.o $@ #---------------------------------------- @@ -116,43 +120,43 @@ umf_m_%.o: ../Source/umf_%.c $(INC) #---------------------------------------- umf_md_%.o: ../Source/umf_%.c $(INC) - $(MX) -DDINT -c $< + $(MX) -DDLONG -c $< - $(MV) umf_$*.o $@ umf_md_%hsolve.o: ../Source/umf_%tsolve.c $(INC) - $(MX) -DDINT -DCONJUGATE_SOLVE -c $< + $(MX) -DDLONG -DCONJUGATE_SOLVE -c $< - $(MV) umf_$*tsolve.o $@ umf_md_triplet_map_x.o: ../Source/umf_triplet.c $(INC) - $(MX) -DDINT -DDO_MAP -DDO_VALUES -c $< + $(MX) -DDLONG -DDO_MAP -DDO_VALUES -c $< - $(MV) umf_triplet.o $@ umf_md_triplet_map_nox.o: ../Source/umf_triplet.c $(INC) - $(MX) -DDINT -DDO_MAP -c $< + $(MX) -DDLONG -DDO_MAP -c $< - $(MV) umf_triplet.o $@ umf_md_triplet_nomap_x.o: ../Source/umf_triplet.c $(INC) - $(MX) -DDINT -DDO_VALUES -c $< + $(MX) -DDLONG -DDO_VALUES -c $< - $(MV) umf_triplet.o $@ umf_md_triplet_nomap_nox.o: ../Source/umf_triplet.c $(INC) - $(MX) -DDINT -c $< + $(MX) -DDLONG -c $< - $(MV) umf_triplet.o $@ umf_md_assemble_fixq.o: ../Source/umf_assemble.c $(INC) - $(MX) -DDINT -DFIXQ -c $< + $(MX) -DDLONG -DFIXQ -c $< - $(MV) umf_assemble.o $@ umf_md_store_lu_drop.o: ../Source/umf_store_lu.c $(INC) - $(MX) -DDINT -DDROP -c $< + $(MX) -DDLONG -DDROP -c $< - $(MV) umf_store_lu.o $@ umfpack_md_wsolve.o: ../Source/umfpack_solve.c $(INC) - $(MX) -DDINT -DWSOLVE -c $< + $(MX) -DDLONG -DWSOLVE -c $< - $(MV) umfpack_solve.o $@ umfpack_md_%.o: ../Source/umfpack_%.c $(INC) - $(MX) -DDINT -c $< + $(MX) -DDLONG -c $< - $(MV) umfpack_$*.o $@ #---------------------------------------- @@ -160,43 +164,43 @@ umfpack_md_%.o: ../Source/umfpack_%.c $(INC) #---------------------------------------- umf_mz_%.o: ../Source/umf_%.c $(INC) - $(MX) -DZINT -c $< + $(MX) -DZLONG -c $< - $(MV) umf_$*.o $@ umf_mz_%hsolve.o: ../Source/umf_%tsolve.c $(INC) - $(MX) -DZINT -DCONJUGATE_SOLVE -c $< + $(MX) -DZLONG -DCONJUGATE_SOLVE -c $< - $(MV) umf_$*tsolve.o $@ umf_mz_triplet_map_x.o: ../Source/umf_triplet.c $(INC) - $(MX) -DZINT -DDO_MAP -DDO_VALUES -c $< + $(MX) -DZLONG -DDO_MAP -DDO_VALUES -c $< - $(MV) umf_triplet.o $@ umf_mz_triplet_map_nox.o: ../Source/umf_triplet.c $(INC) - $(MX) -DZINT -DDO_MAP -c $< + $(MX) -DZLONG -DDO_MAP -c $< - $(MV) umf_triplet.o $@ umf_mz_triplet_nomap_x.o: ../Source/umf_triplet.c $(INC) - $(MX) -DZINT -DDO_VALUES -c $< + $(MX) -DZLONG -DDO_VALUES -c $< - $(MV) umf_triplet.o $@ umf_mz_triplet_nomap_nox.o: ../Source/umf_triplet.c $(INC) - $(MX) -DZINT -c $< + $(MX) -DZLONG -c $< - $(MV) umf_triplet.o $@ umf_mz_assemble_fixq.o: ../Source/umf_assemble.c $(INC) - $(MX) -DZINT -DFIXQ -c $< + $(MX) -DZLONG -DFIXQ -c $< - $(MV) umf_assemble.o $@ umf_mz_store_lu_drop.o: ../Source/umf_store_lu.c $(INC) - $(MX) -DZINT -DDROP -c $< + $(MX) -DZLONG -DDROP -c $< - $(MV) umf_store_lu.o $@ umfpack_mz_wsolve.o: ../Source/umfpack_solve.c $(INC) - $(MX) -DZINT -DWSOLVE -c $< + $(MX) -DZLONG -DWSOLVE -c $< - $(MV) umfpack_solve.o $@ umfpack_mz_%.o: ../Source/umfpack_%.c $(INC) - $(MX) -DZINT -c $< + $(MX) -DZLONG -c $< - $(MV) umfpack_$*.o $@ #---------------------------------------- @@ -211,12 +215,16 @@ umfpack_m_tictoc.o: ../Source/umfpack_tictoc.c $(INC) $(MX) -c $< - $(MV) umfpack_tictoc.o $@ +umfpack_m_global.o: ../Source/umfpack_global.c $(INC) + $(MX) -c $< + - $(MV) umfpack_global.o $@ + #---------------------------------------- # umfpack mexFunction #---------------------------------------- -umfpack: umfpackmex.c $(MEXUMFPACK) $(MEXAMD) - $(MX) -output umfpack umfpackmex.c $(MEXUMFPACK) $(MEXAMD) +umfpack2: umfpackmex.c $(MEXUMFPACK) $(MEXAMD) + $(MX) -output umfpack2 umfpackmex.c $(MEXUMFPACK) $(MEXAMD) luflop: luflopmex.c $(MX) -output luflop luflopmex.c @@ -226,4 +234,7 @@ luflop: luflopmex.c #------------------------------------------------------------------------------- purge: clean - - $(RM) *.mex* *.dll + - $(RM) *.mex* + +clean: + - $(RM) $(CLEAN) diff --git a/deal.II/contrib/umfpack/UMFPACK/MATLAB/Makefile b/deal.II/contrib/umfpack/UMFPACK/MATLAB/Makefile index 91b56a6960..4eab588f00 100644 --- a/deal.II/contrib/umfpack/UMFPACK/MATLAB/Makefile +++ b/deal.II/contrib/umfpack/UMFPACK/MATLAB/Makefile @@ -4,360 +4,362 @@ # 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 -# automatically, via make -n using the GNUmakefile. That way, I don't have -# maintain two Makefiles. +# dependency checking and just compiles everything. -all: umfpack luflop +default: umfpack luflop -include ../Make/Make.include +include ../../UFconfig/UFconfig.mk -MX = $(MEX) -I../Include -I../Source -I../../AMD/Include -I../../AMD/Source +MX = $(MEX) -I../Include -I../Source -I../../AMD/Include -I../../UFconfig umfpack: - $(MX) -DDINT -c ../Source/umf_analyze.c + $(MX) -c ../Source/umfpack_global.c + $(MV) -f umfpack_global.o umfpack_m_global.o + $(MX) -DDLONG -c ../Source/umf_analyze.c $(MV) -f umf_analyze.o umf_m_analyze.o - $(MX) -DDINT -c ../Source/umf_apply_order.c + $(MX) -DDLONG -c ../Source/umf_apply_order.c $(MV) -f umf_apply_order.o umf_m_apply_order.o - $(MX) -DDINT -c ../Source/umf_colamd.c + $(MX) -DDLONG -c ../Source/umf_colamd.c $(MV) -f umf_colamd.o umf_m_colamd.o - $(MX) -DDINT -c ../Source/umf_free.c + $(MX) -DDLONG -c ../Source/umf_free.c $(MV) -f umf_free.o umf_m_free.o - $(MX) -DDINT -c ../Source/umf_fsize.c + $(MX) -DDLONG -c ../Source/umf_fsize.c $(MV) -f umf_fsize.o umf_m_fsize.o - $(MX) -DDINT -c ../Source/umf_is_permutation.c + $(MX) -DDLONG -c ../Source/umf_is_permutation.c $(MV) -f umf_is_permutation.o umf_m_is_permutation.o - $(MX) -DDINT -c ../Source/umf_malloc.c + $(MX) -DDLONG -c ../Source/umf_malloc.c $(MV) -f umf_malloc.o umf_m_malloc.o - $(MX) -DDINT -c ../Source/umf_realloc.c + $(MX) -DDLONG -c ../Source/umf_realloc.c $(MV) -f umf_realloc.o umf_m_realloc.o - $(MX) -DDINT -c ../Source/umf_report_perm.c + $(MX) -DDLONG -c ../Source/umf_report_perm.c $(MV) -f umf_report_perm.o umf_m_report_perm.o - $(MX) -DDINT -c ../Source/umf_singletons.c + $(MX) -DDLONG -c ../Source/umf_singletons.c $(MV) -f umf_singletons.o umf_m_singletons.o - $(MX) -DDINT -DCONJUGATE_SOLVE -c ../Source/umf_ltsolve.c + $(MX) -DDLONG -DCONJUGATE_SOLVE -c ../Source/umf_ltsolve.c $(MV) -f umf_ltsolve.o umf_md_lhsolve.o - $(MX) -DDINT -DCONJUGATE_SOLVE -c ../Source/umf_utsolve.c + $(MX) -DDLONG -DCONJUGATE_SOLVE -c ../Source/umf_utsolve.c $(MV) -f umf_utsolve.o umf_md_uhsolve.o - $(MX) -DDINT -DDO_MAP -c ../Source/umf_triplet.c + $(MX) -DDLONG -DDO_MAP -c ../Source/umf_triplet.c $(MV) -f umf_triplet.o umf_md_triplet_map_nox.o - $(MX) -DDINT -DDO_VALUES -c ../Source/umf_triplet.c + $(MX) -DDLONG -DDO_VALUES -c ../Source/umf_triplet.c $(MV) -f umf_triplet.o umf_md_triplet_nomap_x.o - $(MX) -DDINT -c ../Source/umf_triplet.c + $(MX) -DDLONG -c ../Source/umf_triplet.c $(MV) -f umf_triplet.o umf_md_triplet_nomap_nox.o - $(MX) -DDINT -DDO_MAP -DDO_VALUES -c ../Source/umf_triplet.c + $(MX) -DDLONG -DDO_MAP -DDO_VALUES -c ../Source/umf_triplet.c $(MV) -f umf_triplet.o umf_md_triplet_map_x.o - $(MX) -DDINT -DFIXQ -c ../Source/umf_assemble.c + $(MX) -DDLONG -DFIXQ -c ../Source/umf_assemble.c $(MV) -f umf_assemble.o umf_md_assemble_fixq.o - $(MX) -DDINT -DDROP -c ../Source/umf_store_lu.c + $(MX) -DDLONG -DDROP -c ../Source/umf_store_lu.c $(MV) -f umf_store_lu.o umf_md_store_lu_drop.o - $(MX) -DDINT -c ../Source/umf_assemble.c + $(MX) -DDLONG -c ../Source/umf_assemble.c $(MV) -f umf_assemble.o umf_md_assemble.o - $(MX) -DDINT -c ../Source/umf_blas3_update.c + $(MX) -DDLONG -c ../Source/umf_blas3_update.c $(MV) -f umf_blas3_update.o umf_md_blas3_update.o - $(MX) -DDINT -c ../Source/umf_build_tuples.c + $(MX) -DDLONG -c ../Source/umf_build_tuples.c $(MV) -f umf_build_tuples.o umf_md_build_tuples.o - $(MX) -DDINT -c ../Source/umf_create_element.c + $(MX) -DDLONG -c ../Source/umf_create_element.c $(MV) -f umf_create_element.o umf_md_create_element.o - $(MX) -DDINT -c ../Source/umf_dump.c + $(MX) -DDLONG -c ../Source/umf_dump.c $(MV) -f umf_dump.o umf_md_dump.o - $(MX) -DDINT -c ../Source/umf_extend_front.c + $(MX) -DDLONG -c ../Source/umf_extend_front.c $(MV) -f umf_extend_front.o umf_md_extend_front.o - $(MX) -DDINT -c ../Source/umf_garbage_collection.c + $(MX) -DDLONG -c ../Source/umf_garbage_collection.c $(MV) -f umf_garbage_collection.o umf_md_garbage_collection.o - $(MX) -DDINT -c ../Source/umf_get_memory.c + $(MX) -DDLONG -c ../Source/umf_get_memory.c $(MV) -f umf_get_memory.o umf_md_get_memory.o - $(MX) -DDINT -c ../Source/umf_init_front.c + $(MX) -DDLONG -c ../Source/umf_init_front.c $(MV) -f umf_init_front.o umf_md_init_front.o - $(MX) -DDINT -c ../Source/umf_kernel.c + $(MX) -DDLONG -c ../Source/umf_kernel.c $(MV) -f umf_kernel.o umf_md_kernel.o - $(MX) -DDINT -c ../Source/umf_kernel_init.c + $(MX) -DDLONG -c ../Source/umf_kernel_init.c $(MV) -f umf_kernel_init.o umf_md_kernel_init.o - $(MX) -DDINT -c ../Source/umf_kernel_wrapup.c + $(MX) -DDLONG -c ../Source/umf_kernel_wrapup.c $(MV) -f umf_kernel_wrapup.o umf_md_kernel_wrapup.o - $(MX) -DDINT -c ../Source/umf_local_search.c + $(MX) -DDLONG -c ../Source/umf_local_search.c $(MV) -f umf_local_search.o umf_md_local_search.o - $(MX) -DDINT -c ../Source/umf_lsolve.c + $(MX) -DDLONG -c ../Source/umf_lsolve.c $(MV) -f umf_lsolve.o umf_md_lsolve.o - $(MX) -DDINT -c ../Source/umf_ltsolve.c + $(MX) -DDLONG -c ../Source/umf_ltsolve.c $(MV) -f umf_ltsolve.o umf_md_ltsolve.o - $(MX) -DDINT -c ../Source/umf_mem_alloc_element.c + $(MX) -DDLONG -c ../Source/umf_mem_alloc_element.c $(MV) -f umf_mem_alloc_element.o umf_md_mem_alloc_element.o - $(MX) -DDINT -c ../Source/umf_mem_alloc_head_block.c + $(MX) -DDLONG -c ../Source/umf_mem_alloc_head_block.c $(MV) -f umf_mem_alloc_head_block.o umf_md_mem_alloc_head_block.o - $(MX) -DDINT -c ../Source/umf_mem_alloc_tail_block.c + $(MX) -DDLONG -c ../Source/umf_mem_alloc_tail_block.c $(MV) -f umf_mem_alloc_tail_block.o umf_md_mem_alloc_tail_block.o - $(MX) -DDINT -c ../Source/umf_mem_free_tail_block.c + $(MX) -DDLONG -c ../Source/umf_mem_free_tail_block.c $(MV) -f umf_mem_free_tail_block.o umf_md_mem_free_tail_block.o - $(MX) -DDINT -c ../Source/umf_mem_init_memoryspace.c + $(MX) -DDLONG -c ../Source/umf_mem_init_memoryspace.c $(MV) -f umf_mem_init_memoryspace.o umf_md_mem_init_memoryspace.o - $(MX) -DDINT -c ../Source/umf_report_vector.c + $(MX) -DDLONG -c ../Source/umf_report_vector.c $(MV) -f umf_report_vector.o umf_md_report_vector.o - $(MX) -DDINT -c ../Source/umf_row_search.c + $(MX) -DDLONG -c ../Source/umf_row_search.c $(MV) -f umf_row_search.o umf_md_row_search.o - $(MX) -DDINT -c ../Source/umf_scale_column.c + $(MX) -DDLONG -c ../Source/umf_scale_column.c $(MV) -f umf_scale_column.o umf_md_scale_column.o - $(MX) -DDINT -c ../Source/umf_set_stats.c + $(MX) -DDLONG -c ../Source/umf_set_stats.c $(MV) -f umf_set_stats.o umf_md_set_stats.o - $(MX) -DDINT -c ../Source/umf_solve.c + $(MX) -DDLONG -c ../Source/umf_solve.c $(MV) -f umf_solve.o umf_md_solve.o - $(MX) -DDINT -c ../Source/umf_symbolic_usage.c + $(MX) -DDLONG -c ../Source/umf_symbolic_usage.c $(MV) -f umf_symbolic_usage.o umf_md_symbolic_usage.o - $(MX) -DDINT -c ../Source/umf_transpose.c + $(MX) -DDLONG -c ../Source/umf_transpose.c $(MV) -f umf_transpose.o umf_md_transpose.o - $(MX) -DDINT -c ../Source/umf_tuple_lengths.c + $(MX) -DDLONG -c ../Source/umf_tuple_lengths.c $(MV) -f umf_tuple_lengths.o umf_md_tuple_lengths.o - $(MX) -DDINT -c ../Source/umf_usolve.c + $(MX) -DDLONG -c ../Source/umf_usolve.c $(MV) -f umf_usolve.o umf_md_usolve.o - $(MX) -DDINT -c ../Source/umf_utsolve.c + $(MX) -DDLONG -c ../Source/umf_utsolve.c $(MV) -f umf_utsolve.o umf_md_utsolve.o - $(MX) -DDINT -c ../Source/umf_valid_numeric.c + $(MX) -DDLONG -c ../Source/umf_valid_numeric.c $(MV) -f umf_valid_numeric.o umf_md_valid_numeric.o - $(MX) -DDINT -c ../Source/umf_valid_symbolic.c + $(MX) -DDLONG -c ../Source/umf_valid_symbolic.c $(MV) -f umf_valid_symbolic.o umf_md_valid_symbolic.o - $(MX) -DDINT -c ../Source/umf_grow_front.c + $(MX) -DDLONG -c ../Source/umf_grow_front.c $(MV) -f umf_grow_front.o umf_md_grow_front.o - $(MX) -DDINT -c ../Source/umf_start_front.c + $(MX) -DDLONG -c ../Source/umf_start_front.c $(MV) -f umf_start_front.o umf_md_start_front.o - $(MX) -DDINT -c ../Source/umf_2by2.c + $(MX) -DDLONG -c ../Source/umf_2by2.c $(MV) -f umf_2by2.o umf_md_2by2.o - $(MX) -DDINT -c ../Source/umf_store_lu.c + $(MX) -DDLONG -c ../Source/umf_store_lu.c $(MV) -f umf_store_lu.o umf_md_store_lu.o - $(MX) -DDINT -c ../Source/umf_scale.c + $(MX) -DDLONG -c ../Source/umf_scale.c $(MV) -f umf_scale.o umf_md_scale.o - $(MX) -DDINT -DWSOLVE -c ../Source/umfpack_solve.c + $(MX) -DDLONG -DWSOLVE -c ../Source/umfpack_solve.c $(MV) -f umfpack_solve.o umfpack_md_wsolve.o - $(MX) -DDINT -c ../Source/umfpack_col_to_triplet.c + $(MX) -DDLONG -c ../Source/umfpack_col_to_triplet.c $(MV) -f umfpack_col_to_triplet.o umfpack_md_col_to_triplet.o - $(MX) -DDINT -c ../Source/umfpack_defaults.c + $(MX) -DDLONG -c ../Source/umfpack_defaults.c $(MV) -f umfpack_defaults.o umfpack_md_defaults.o - $(MX) -DDINT -c ../Source/umfpack_free_numeric.c + $(MX) -DDLONG -c ../Source/umfpack_free_numeric.c $(MV) -f umfpack_free_numeric.o umfpack_md_free_numeric.o - $(MX) -DDINT -c ../Source/umfpack_free_symbolic.c + $(MX) -DDLONG -c ../Source/umfpack_free_symbolic.c $(MV) -f umfpack_free_symbolic.o umfpack_md_free_symbolic.o - $(MX) -DDINT -c ../Source/umfpack_get_numeric.c + $(MX) -DDLONG -c ../Source/umfpack_get_numeric.c $(MV) -f umfpack_get_numeric.o umfpack_md_get_numeric.o - $(MX) -DDINT -c ../Source/umfpack_get_lunz.c + $(MX) -DDLONG -c ../Source/umfpack_get_lunz.c $(MV) -f umfpack_get_lunz.o umfpack_md_get_lunz.o - $(MX) -DDINT -c ../Source/umfpack_get_symbolic.c + $(MX) -DDLONG -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 + $(MX) -DDLONG -c ../Source/umfpack_get_determinant.c $(MV) -f umfpack_get_determinant.o umfpack_md_get_determinant.o - $(MX) -DDINT -c ../Source/umfpack_numeric.c + $(MX) -DDLONG -c ../Source/umfpack_numeric.c $(MV) -f umfpack_numeric.o umfpack_md_numeric.o - $(MX) -DDINT -c ../Source/umfpack_qsymbolic.c + $(MX) -DDLONG -c ../Source/umfpack_qsymbolic.c $(MV) -f umfpack_qsymbolic.o umfpack_md_qsymbolic.o - $(MX) -DDINT -c ../Source/umfpack_report_control.c + $(MX) -DDLONG -c ../Source/umfpack_report_control.c $(MV) -f umfpack_report_control.o umfpack_md_report_control.o - $(MX) -DDINT -c ../Source/umfpack_report_info.c + $(MX) -DDLONG -c ../Source/umfpack_report_info.c $(MV) -f umfpack_report_info.o umfpack_md_report_info.o - $(MX) -DDINT -c ../Source/umfpack_report_matrix.c + $(MX) -DDLONG -c ../Source/umfpack_report_matrix.c $(MV) -f umfpack_report_matrix.o umfpack_md_report_matrix.o - $(MX) -DDINT -c ../Source/umfpack_report_numeric.c + $(MX) -DDLONG -c ../Source/umfpack_report_numeric.c $(MV) -f umfpack_report_numeric.o umfpack_md_report_numeric.o - $(MX) -DDINT -c ../Source/umfpack_report_perm.c + $(MX) -DDLONG -c ../Source/umfpack_report_perm.c $(MV) -f umfpack_report_perm.o umfpack_md_report_perm.o - $(MX) -DDINT -c ../Source/umfpack_report_status.c + $(MX) -DDLONG -c ../Source/umfpack_report_status.c $(MV) -f umfpack_report_status.o umfpack_md_report_status.o - $(MX) -DDINT -c ../Source/umfpack_report_symbolic.c + $(MX) -DDLONG -c ../Source/umfpack_report_symbolic.c $(MV) -f umfpack_report_symbolic.o umfpack_md_report_symbolic.o - $(MX) -DDINT -c ../Source/umfpack_report_triplet.c + $(MX) -DDLONG -c ../Source/umfpack_report_triplet.c $(MV) -f umfpack_report_triplet.o umfpack_md_report_triplet.o - $(MX) -DDINT -c ../Source/umfpack_report_vector.c + $(MX) -DDLONG -c ../Source/umfpack_report_vector.c $(MV) -f umfpack_report_vector.o umfpack_md_report_vector.o - $(MX) -DDINT -c ../Source/umfpack_solve.c + $(MX) -DDLONG -c ../Source/umfpack_solve.c $(MV) -f umfpack_solve.o umfpack_md_solve.o - $(MX) -DDINT -c ../Source/umfpack_symbolic.c + $(MX) -DDLONG -c ../Source/umfpack_symbolic.c $(MV) -f umfpack_symbolic.o umfpack_md_symbolic.o - $(MX) -DDINT -c ../Source/umfpack_transpose.c + $(MX) -DDLONG -c ../Source/umfpack_transpose.c $(MV) -f umfpack_transpose.o umfpack_md_transpose.o - $(MX) -DDINT -c ../Source/umfpack_triplet_to_col.c + $(MX) -DDLONG -c ../Source/umfpack_triplet_to_col.c $(MV) -f umfpack_triplet_to_col.o umfpack_md_triplet_to_col.o - $(MX) -DDINT -c ../Source/umfpack_scale.c + $(MX) -DDLONG -c ../Source/umfpack_scale.c $(MV) -f umfpack_scale.o umfpack_md_scale.o - $(MX) -DDINT -c ../Source/umfpack_load_numeric.c + $(MX) -DDLONG -c ../Source/umfpack_load_numeric.c $(MV) -f umfpack_load_numeric.o umfpack_md_load_numeric.o - $(MX) -DDINT -c ../Source/umfpack_save_numeric.c + $(MX) -DDLONG -c ../Source/umfpack_save_numeric.c $(MV) -f umfpack_save_numeric.o umfpack_md_save_numeric.o - $(MX) -DDINT -c ../Source/umfpack_load_symbolic.c + $(MX) -DDLONG -c ../Source/umfpack_load_symbolic.c $(MV) -f umfpack_load_symbolic.o umfpack_md_load_symbolic.o - $(MX) -DDINT -c ../Source/umfpack_save_symbolic.c + $(MX) -DDLONG -c ../Source/umfpack_save_symbolic.c $(MV) -f umfpack_save_symbolic.o umfpack_md_save_symbolic.o - $(MX) -DZINT -DCONJUGATE_SOLVE -c ../Source/umf_ltsolve.c + $(MX) -DZLONG -DCONJUGATE_SOLVE -c ../Source/umf_ltsolve.c $(MV) -f umf_ltsolve.o umf_mz_lhsolve.o - $(MX) -DZINT -DCONJUGATE_SOLVE -c ../Source/umf_utsolve.c + $(MX) -DZLONG -DCONJUGATE_SOLVE -c ../Source/umf_utsolve.c $(MV) -f umf_utsolve.o umf_mz_uhsolve.o - $(MX) -DZINT -DDO_MAP -c ../Source/umf_triplet.c + $(MX) -DZLONG -DDO_MAP -c ../Source/umf_triplet.c $(MV) -f umf_triplet.o umf_mz_triplet_map_nox.o - $(MX) -DZINT -DDO_VALUES -c ../Source/umf_triplet.c + $(MX) -DZLONG -DDO_VALUES -c ../Source/umf_triplet.c $(MV) -f umf_triplet.o umf_mz_triplet_nomap_x.o - $(MX) -DZINT -c ../Source/umf_triplet.c + $(MX) -DZLONG -c ../Source/umf_triplet.c $(MV) -f umf_triplet.o umf_mz_triplet_nomap_nox.o - $(MX) -DZINT -DDO_MAP -DDO_VALUES -c ../Source/umf_triplet.c + $(MX) -DZLONG -DDO_MAP -DDO_VALUES -c ../Source/umf_triplet.c $(MV) -f umf_triplet.o umf_mz_triplet_map_x.o - $(MX) -DZINT -DFIXQ -c ../Source/umf_assemble.c + $(MX) -DZLONG -DFIXQ -c ../Source/umf_assemble.c $(MV) -f umf_assemble.o umf_mz_assemble_fixq.o - $(MX) -DZINT -DDROP -c ../Source/umf_store_lu.c + $(MX) -DZLONG -DDROP -c ../Source/umf_store_lu.c $(MV) -f umf_store_lu.o umf_mz_store_lu_drop.o - $(MX) -DZINT -c ../Source/umf_assemble.c + $(MX) -DZLONG -c ../Source/umf_assemble.c $(MV) -f umf_assemble.o umf_mz_assemble.o - $(MX) -DZINT -c ../Source/umf_blas3_update.c + $(MX) -DZLONG -c ../Source/umf_blas3_update.c $(MV) -f umf_blas3_update.o umf_mz_blas3_update.o - $(MX) -DZINT -c ../Source/umf_build_tuples.c + $(MX) -DZLONG -c ../Source/umf_build_tuples.c $(MV) -f umf_build_tuples.o umf_mz_build_tuples.o - $(MX) -DZINT -c ../Source/umf_create_element.c + $(MX) -DZLONG -c ../Source/umf_create_element.c $(MV) -f umf_create_element.o umf_mz_create_element.o - $(MX) -DZINT -c ../Source/umf_dump.c + $(MX) -DZLONG -c ../Source/umf_dump.c $(MV) -f umf_dump.o umf_mz_dump.o - $(MX) -DZINT -c ../Source/umf_extend_front.c + $(MX) -DZLONG -c ../Source/umf_extend_front.c $(MV) -f umf_extend_front.o umf_mz_extend_front.o - $(MX) -DZINT -c ../Source/umf_garbage_collection.c + $(MX) -DZLONG -c ../Source/umf_garbage_collection.c $(MV) -f umf_garbage_collection.o umf_mz_garbage_collection.o - $(MX) -DZINT -c ../Source/umf_get_memory.c + $(MX) -DZLONG -c ../Source/umf_get_memory.c $(MV) -f umf_get_memory.o umf_mz_get_memory.o - $(MX) -DZINT -c ../Source/umf_init_front.c + $(MX) -DZLONG -c ../Source/umf_init_front.c $(MV) -f umf_init_front.o umf_mz_init_front.o - $(MX) -DZINT -c ../Source/umf_kernel.c + $(MX) -DZLONG -c ../Source/umf_kernel.c $(MV) -f umf_kernel.o umf_mz_kernel.o - $(MX) -DZINT -c ../Source/umf_kernel_init.c + $(MX) -DZLONG -c ../Source/umf_kernel_init.c $(MV) -f umf_kernel_init.o umf_mz_kernel_init.o - $(MX) -DZINT -c ../Source/umf_kernel_wrapup.c + $(MX) -DZLONG -c ../Source/umf_kernel_wrapup.c $(MV) -f umf_kernel_wrapup.o umf_mz_kernel_wrapup.o - $(MX) -DZINT -c ../Source/umf_local_search.c + $(MX) -DZLONG -c ../Source/umf_local_search.c $(MV) -f umf_local_search.o umf_mz_local_search.o - $(MX) -DZINT -c ../Source/umf_lsolve.c + $(MX) -DZLONG -c ../Source/umf_lsolve.c $(MV) -f umf_lsolve.o umf_mz_lsolve.o - $(MX) -DZINT -c ../Source/umf_ltsolve.c + $(MX) -DZLONG -c ../Source/umf_ltsolve.c $(MV) -f umf_ltsolve.o umf_mz_ltsolve.o - $(MX) -DZINT -c ../Source/umf_mem_alloc_element.c + $(MX) -DZLONG -c ../Source/umf_mem_alloc_element.c $(MV) -f umf_mem_alloc_element.o umf_mz_mem_alloc_element.o - $(MX) -DZINT -c ../Source/umf_mem_alloc_head_block.c + $(MX) -DZLONG -c ../Source/umf_mem_alloc_head_block.c $(MV) -f umf_mem_alloc_head_block.o umf_mz_mem_alloc_head_block.o - $(MX) -DZINT -c ../Source/umf_mem_alloc_tail_block.c + $(MX) -DZLONG -c ../Source/umf_mem_alloc_tail_block.c $(MV) -f umf_mem_alloc_tail_block.o umf_mz_mem_alloc_tail_block.o - $(MX) -DZINT -c ../Source/umf_mem_free_tail_block.c + $(MX) -DZLONG -c ../Source/umf_mem_free_tail_block.c $(MV) -f umf_mem_free_tail_block.o umf_mz_mem_free_tail_block.o - $(MX) -DZINT -c ../Source/umf_mem_init_memoryspace.c + $(MX) -DZLONG -c ../Source/umf_mem_init_memoryspace.c $(MV) -f umf_mem_init_memoryspace.o umf_mz_mem_init_memoryspace.o - $(MX) -DZINT -c ../Source/umf_report_vector.c + $(MX) -DZLONG -c ../Source/umf_report_vector.c $(MV) -f umf_report_vector.o umf_mz_report_vector.o - $(MX) -DZINT -c ../Source/umf_row_search.c + $(MX) -DZLONG -c ../Source/umf_row_search.c $(MV) -f umf_row_search.o umf_mz_row_search.o - $(MX) -DZINT -c ../Source/umf_scale_column.c + $(MX) -DZLONG -c ../Source/umf_scale_column.c $(MV) -f umf_scale_column.o umf_mz_scale_column.o - $(MX) -DZINT -c ../Source/umf_set_stats.c + $(MX) -DZLONG -c ../Source/umf_set_stats.c $(MV) -f umf_set_stats.o umf_mz_set_stats.o - $(MX) -DZINT -c ../Source/umf_solve.c + $(MX) -DZLONG -c ../Source/umf_solve.c $(MV) -f umf_solve.o umf_mz_solve.o - $(MX) -DZINT -c ../Source/umf_symbolic_usage.c + $(MX) -DZLONG -c ../Source/umf_symbolic_usage.c $(MV) -f umf_symbolic_usage.o umf_mz_symbolic_usage.o - $(MX) -DZINT -c ../Source/umf_transpose.c + $(MX) -DZLONG -c ../Source/umf_transpose.c $(MV) -f umf_transpose.o umf_mz_transpose.o - $(MX) -DZINT -c ../Source/umf_tuple_lengths.c + $(MX) -DZLONG -c ../Source/umf_tuple_lengths.c $(MV) -f umf_tuple_lengths.o umf_mz_tuple_lengths.o - $(MX) -DZINT -c ../Source/umf_usolve.c + $(MX) -DZLONG -c ../Source/umf_usolve.c $(MV) -f umf_usolve.o umf_mz_usolve.o - $(MX) -DZINT -c ../Source/umf_utsolve.c + $(MX) -DZLONG -c ../Source/umf_utsolve.c $(MV) -f umf_utsolve.o umf_mz_utsolve.o - $(MX) -DZINT -c ../Source/umf_valid_numeric.c + $(MX) -DZLONG -c ../Source/umf_valid_numeric.c $(MV) -f umf_valid_numeric.o umf_mz_valid_numeric.o - $(MX) -DZINT -c ../Source/umf_valid_symbolic.c + $(MX) -DZLONG -c ../Source/umf_valid_symbolic.c $(MV) -f umf_valid_symbolic.o umf_mz_valid_symbolic.o - $(MX) -DZINT -c ../Source/umf_grow_front.c + $(MX) -DZLONG -c ../Source/umf_grow_front.c $(MV) -f umf_grow_front.o umf_mz_grow_front.o - $(MX) -DZINT -c ../Source/umf_start_front.c + $(MX) -DZLONG -c ../Source/umf_start_front.c $(MV) -f umf_start_front.o umf_mz_start_front.o - $(MX) -DZINT -c ../Source/umf_2by2.c + $(MX) -DZLONG -c ../Source/umf_2by2.c $(MV) -f umf_2by2.o umf_mz_2by2.o - $(MX) -DZINT -c ../Source/umf_store_lu.c + $(MX) -DZLONG -c ../Source/umf_store_lu.c $(MV) -f umf_store_lu.o umf_mz_store_lu.o - $(MX) -DZINT -c ../Source/umf_scale.c + $(MX) -DZLONG -c ../Source/umf_scale.c $(MV) -f umf_scale.o umf_mz_scale.o - $(MX) -DZINT -DWSOLVE -c ../Source/umfpack_solve.c + $(MX) -DZLONG -DWSOLVE -c ../Source/umfpack_solve.c $(MV) -f umfpack_solve.o umfpack_mz_wsolve.o - $(MX) -DZINT -c ../Source/umfpack_col_to_triplet.c + $(MX) -DZLONG -c ../Source/umfpack_col_to_triplet.c $(MV) -f umfpack_col_to_triplet.o umfpack_mz_col_to_triplet.o - $(MX) -DZINT -c ../Source/umfpack_defaults.c + $(MX) -DZLONG -c ../Source/umfpack_defaults.c $(MV) -f umfpack_defaults.o umfpack_mz_defaults.o - $(MX) -DZINT -c ../Source/umfpack_free_numeric.c + $(MX) -DZLONG -c ../Source/umfpack_free_numeric.c $(MV) -f umfpack_free_numeric.o umfpack_mz_free_numeric.o - $(MX) -DZINT -c ../Source/umfpack_free_symbolic.c + $(MX) -DZLONG -c ../Source/umfpack_free_symbolic.c $(MV) -f umfpack_free_symbolic.o umfpack_mz_free_symbolic.o - $(MX) -DZINT -c ../Source/umfpack_get_numeric.c + $(MX) -DZLONG -c ../Source/umfpack_get_numeric.c $(MV) -f umfpack_get_numeric.o umfpack_mz_get_numeric.o - $(MX) -DZINT -c ../Source/umfpack_get_lunz.c + $(MX) -DZLONG -c ../Source/umfpack_get_lunz.c $(MV) -f umfpack_get_lunz.o umfpack_mz_get_lunz.o - $(MX) -DZINT -c ../Source/umfpack_get_symbolic.c + $(MX) -DZLONG -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 + $(MX) -DZLONG -c ../Source/umfpack_get_determinant.c $(MV) -f umfpack_get_determinant.o umfpack_mz_get_determinant.o - $(MX) -DZINT -c ../Source/umfpack_numeric.c + $(MX) -DZLONG -c ../Source/umfpack_numeric.c $(MV) -f umfpack_numeric.o umfpack_mz_numeric.o - $(MX) -DZINT -c ../Source/umfpack_qsymbolic.c + $(MX) -DZLONG -c ../Source/umfpack_qsymbolic.c $(MV) -f umfpack_qsymbolic.o umfpack_mz_qsymbolic.o - $(MX) -DZINT -c ../Source/umfpack_report_control.c + $(MX) -DZLONG -c ../Source/umfpack_report_control.c $(MV) -f umfpack_report_control.o umfpack_mz_report_control.o - $(MX) -DZINT -c ../Source/umfpack_report_info.c + $(MX) -DZLONG -c ../Source/umfpack_report_info.c $(MV) -f umfpack_report_info.o umfpack_mz_report_info.o - $(MX) -DZINT -c ../Source/umfpack_report_matrix.c + $(MX) -DZLONG -c ../Source/umfpack_report_matrix.c $(MV) -f umfpack_report_matrix.o umfpack_mz_report_matrix.o - $(MX) -DZINT -c ../Source/umfpack_report_numeric.c + $(MX) -DZLONG -c ../Source/umfpack_report_numeric.c $(MV) -f umfpack_report_numeric.o umfpack_mz_report_numeric.o - $(MX) -DZINT -c ../Source/umfpack_report_perm.c + $(MX) -DZLONG -c ../Source/umfpack_report_perm.c $(MV) -f umfpack_report_perm.o umfpack_mz_report_perm.o - $(MX) -DZINT -c ../Source/umfpack_report_status.c + $(MX) -DZLONG -c ../Source/umfpack_report_status.c $(MV) -f umfpack_report_status.o umfpack_mz_report_status.o - $(MX) -DZINT -c ../Source/umfpack_report_symbolic.c + $(MX) -DZLONG -c ../Source/umfpack_report_symbolic.c $(MV) -f umfpack_report_symbolic.o umfpack_mz_report_symbolic.o - $(MX) -DZINT -c ../Source/umfpack_report_triplet.c + $(MX) -DZLONG -c ../Source/umfpack_report_triplet.c $(MV) -f umfpack_report_triplet.o umfpack_mz_report_triplet.o - $(MX) -DZINT -c ../Source/umfpack_report_vector.c + $(MX) -DZLONG -c ../Source/umfpack_report_vector.c $(MV) -f umfpack_report_vector.o umfpack_mz_report_vector.o - $(MX) -DZINT -c ../Source/umfpack_solve.c + $(MX) -DZLONG -c ../Source/umfpack_solve.c $(MV) -f umfpack_solve.o umfpack_mz_solve.o - $(MX) -DZINT -c ../Source/umfpack_symbolic.c + $(MX) -DZLONG -c ../Source/umfpack_symbolic.c $(MV) -f umfpack_symbolic.o umfpack_mz_symbolic.o - $(MX) -DZINT -c ../Source/umfpack_transpose.c + $(MX) -DZLONG -c ../Source/umfpack_transpose.c $(MV) -f umfpack_transpose.o umfpack_mz_transpose.o - $(MX) -DZINT -c ../Source/umfpack_triplet_to_col.c + $(MX) -DZLONG -c ../Source/umfpack_triplet_to_col.c $(MV) -f umfpack_triplet_to_col.o umfpack_mz_triplet_to_col.o - $(MX) -DZINT -c ../Source/umfpack_scale.c + $(MX) -DZLONG -c ../Source/umfpack_scale.c $(MV) -f umfpack_scale.o umfpack_mz_scale.o - $(MX) -DZINT -c ../Source/umfpack_load_numeric.c + $(MX) -DZLONG -c ../Source/umfpack_load_numeric.c $(MV) -f umfpack_load_numeric.o umfpack_mz_load_numeric.o - $(MX) -DZINT -c ../Source/umfpack_save_numeric.c + $(MX) -DZLONG -c ../Source/umfpack_save_numeric.c $(MV) -f umfpack_save_numeric.o umfpack_mz_save_numeric.o - $(MX) -DZINT -c ../Source/umfpack_load_symbolic.c + $(MX) -DZLONG -c ../Source/umfpack_load_symbolic.c $(MV) -f umfpack_load_symbolic.o umfpack_mz_load_symbolic.o - $(MX) -DZINT -c ../Source/umfpack_save_symbolic.c + $(MX) -DZLONG -c ../Source/umfpack_save_symbolic.c $(MV) -f umfpack_save_symbolic.o umfpack_mz_save_symbolic.o $(MX) -c ../Source/umfpack_timer.c $(MV) -f umfpack_timer.o umfpack_m_timer.o $(MX) -c ../Source/umfpack_tictoc.c $(MV) -f umfpack_tictoc.o umfpack_m_tictoc.o - $(MX) -DDINT -c ../../AMD/Source/amd_aat.c + $(MX) -DDLONG -c ../../AMD/Source/amd_global.c + $(MV) -f amd_global.o amd_m_global.o + $(MX) -DDLONG -c ../../AMD/Source/amd_aat.c $(MV) -f amd_aat.o amd_m_aat.o - $(MX) -DDINT -c ../../AMD/Source/amd_1.c + $(MX) -DDLONG -c ../../AMD/Source/amd_1.c $(MV) -f amd_1.o amd_m_1.o - $(MX) -DDINT -c ../../AMD/Source/amd_2.c + $(MX) -DDLONG -c ../../AMD/Source/amd_2.c $(MV) -f amd_2.o amd_m_2.o - $(MX) -DDINT -c ../../AMD/Source/amd_dump.c + $(MX) -DDLONG -c ../../AMD/Source/amd_dump.c $(MV) -f amd_dump.o amd_m_dump.o - $(MX) -DDINT -c ../../AMD/Source/amd_postorder.c + $(MX) -DDLONG -c ../../AMD/Source/amd_postorder.c $(MV) -f amd_postorder.o amd_m_postorder.o - $(MX) -DDINT -c ../../AMD/Source/amd_post_tree.c + $(MX) -DDLONG -c ../../AMD/Source/amd_post_tree.c $(MV) -f amd_post_tree.o amd_m_post_tree.o - $(MX) -DDINT -c ../../AMD/Source/amd_defaults.c + $(MX) -DDLONG -c ../../AMD/Source/amd_defaults.c $(MV) -f amd_defaults.o amd_m_defaults.o - $(MX) -DDINT -c ../../AMD/Source/amd_order.c + $(MX) -DDLONG -c ../../AMD/Source/amd_order.c $(MV) -f amd_order.o amd_m_order.o - $(MX) -DDINT -c ../../AMD/Source/amd_control.c + $(MX) -DDLONG -c ../../AMD/Source/amd_control.c $(MV) -f amd_control.o amd_m_control.o - $(MX) -DDINT -c ../../AMD/Source/amd_info.c + $(MX) -DDLONG -c ../../AMD/Source/amd_info.c $(MV) -f amd_info.o amd_m_info.o - $(MX) -DDINT -c ../../AMD/Source/amd_valid.c + $(MX) -DDLONG -c ../../AMD/Source/amd_valid.c $(MV) -f amd_valid.o amd_m_valid.o - $(MX) -output umfpack umfpackmex.c \ + $(MX) -output umfpack2 umfpackmex.c \ umf_m_analyze.o umf_m_apply_order.o umf_m_colamd.o umf_m_free.o \ umf_m_fsize.o umf_m_is_permutation.o umf_m_malloc.o \ umf_m_realloc.o umf_m_report_perm.o umf_m_singletons.o \ @@ -423,7 +425,8 @@ umfpack: umfpack_mz_triplet_to_col.o umfpack_mz_scale.o \ umfpack_mz_load_numeric.o umfpack_mz_save_numeric.o \ umfpack_mz_load_symbolic.o umfpack_mz_save_symbolic.o \ - umfpack_m_timer.o umfpack_m_tictoc.o \ + umfpack_m_timer.o umfpack_m_tictoc.o umfpack_m_global.o \ + amd_m_global.o \ amd_m_aat.o amd_m_1.o amd_m_2.o amd_m_dump.o \ amd_m_postorder.o amd_m_post_tree.o amd_m_defaults.o amd_m_order.o \ amd_m_control.o amd_m_info.o amd_m_valid.o @@ -436,4 +439,7 @@ luflop: luflopmex.c #------------------------------------------------------------------------------- purge: clean - - $(RM) *.mex* *.dll + - $(RM) *.mex* + +clean: + - $(RM) $(CLEAN) diff --git a/deal.II/contrib/umfpack/UMFPACK/MATLAB/lcc_lib/lapacksyms.def b/deal.II/contrib/umfpack/UMFPACK/MATLAB/lcc_lib/lapacksyms.def new file mode 100644 index 0000000000..7f8563c553 --- /dev/null +++ b/deal.II/contrib/umfpack/UMFPACK/MATLAB/lcc_lib/lapacksyms.def @@ -0,0 +1,718 @@ +LIBRARY liblapack.dll +EXPORTS +dasum +daxpy +dbdsdc +dbdsqr +dcopy +ddisna +ddot +dgbbrd +dgbcon +dgbequ +dgbmv +dgbrfs +dgbsv +dgbsvx +dgbtf2 +dgbtrf +dgbtrs +dgebak +dgebal +dgebd2 +dgebrd +dgecon +dgeequ +dgees +dgeesx +dgeev +dgeevx +dgegs +dgegv +dgehd2 +dgehrd +dgelq2 +dgelqf +dgels +dgelsd +dgelss +dgelsx +dgelsy +dgemm +dgemv +dgeql2 +dgeqlf +dgeqp3 +dgeqpf +dgeqr2 +dgeqrf +dger +dgerfs +dgerq2 +dgerqf +dgesc2 +dgesdd +dgesv +dgesvd +dgesvx +dgetc2 +dgetf2 +dgetrf +dgetri +dgetrs +dggbak +dggbal +dgges +dggesx +dggev +dggevx +dggglm +dgghrd +dgglse +dggqrf +dggrqf +dggsvd +dggsvp +dgtcon +dgtrfs +dgtsv +dgtsvx +dgttrf +dgttrs +dgtts2 +dhgeqz +dhsein +dhseqr +dlabad +dlabrd +dlacon +dlacpy +dladiv +dlae2 +dlaebz +dlaed0 +dlaed1 +dlaed2 +dlaed3 +dlaed4 +dlaed5 +dlaed6 +dlaed7 +dlaed8 +dlaed9 +dlaeda +dlaein +dlaev2 +dlaexc +dlag2 +dlags2 +dlagtf +dlagtm +dlagts +dlagv2 +dlahqr +dlahrd +dlaic1 +dlaln2 +dlals0 +dlalsa +dlalsd +dlamch +dlamrg +dlangb +dlange +dlangt +dlanhs +dlansb +dlansp +dlanst +dlansy +dlantb +dlantp +dlantr +dlanv2 +dlapll +dlapmt +dlapy2 +dlapy3 +dlaqgb +dlaqge +dlaqp2 +dlaqps +dlaqsb +dlaqsp +dlaqsy +dlaqtr +dlar1v +dlar2v +dlarf +dlarfb +dlarfg +dlarft +dlarfx +dlargv +dlarnv +dlarrb +dlarre +dlarrf +dlarrv +dlartg +dlartv +dlaruv +dlarz +dlarzb +dlarzt +dlas2 +dlascl +dlasd0 +dlasd1 +dlasd2 +dlasd3 +dlasd4 +dlasd5 +dlasd6 +dlasd7 +dlasd8 +dlasd9 +dlasda +dlasdq +dlasdt +dlaset +dlasq1 +dlasq2 +dlasq3 +dlasq4 +dlasq5 +dlasq6 +dlasr +dlasrt +dlassq +dlasv2 +dlaswp +dlasy2 +dlasyf +dlatbs +dlatdf +dlatps +dlatrd +dlatrs +dlatrz +dlatzm +dlauu2 +dlauum +dnrm2 +dopgtr +dopmtr +dorg2l +dorg2r +dorgbr +dorghr +dorgl2 +dorglq +dorgql +dorgqr +dorgr2 +dorgrq +dorgtr +dorm2l +dorm2r +dormbr +dormhr +dorml2 +dormlq +dormql +dormqr +dormr2 +dormr3 +dormrq +dormrz +dormtr +dpbcon +dpbequ +dpbrfs +dpbstf +dpbsv +dpbsvx +dpbtf2 +dpbtrf +dpbtrs +dpocon +dpoequ +dporfs +dposv +dposvx +dpotf2 +dpotrf +dpotri +dpotrs +dppcon +dppequ +dpprfs +dppsv +dppsvx +dpptrf +dpptri +dpptrs +dptcon +dpteqr +dptrfs +dptsv +dptsvx +dpttrf +dpttrs +dptts2 +drot +drotg +drscl +dsbev +dsbevd +dsbevx +dsbgst +dsbgv +dsbgvd +dsbgvx +dsbmv +dsbtrd +dscal +dspcon +dspev +dspevd +dspevx +dspgst +dspgv +dspgvd +dspgvx +dspmv +dspr +dspr2 +dsprfs +dspsv +dspsvx +dsptrd +dsptrf +dsptri +dsptrs +dstebz +dstedc +dstegr +dstein +dsteqr +dsterf +dstev +dstevd +dstevr +dstevx +dswap +dsycon +dsyev +dsyevd +dsyevr +dsyevx +dsygs2 +dsygst +dsygv +dsygvd +dsygvx +dsymm +dsymv +dsyr +dsyr2 +dsyr2k +dsyrfs +dsyrk +dsysv +dsysvx +dsytd2 +dsytf2 +dsytrd +dsytrf +dsytri +dsytrs +dtbcon +dtbmv +dtbrfs +dtbsv +dtbtrs +dtgevc +dtgex2 +dtgexc +dtgsen +dtgsja +dtgsna +dtgsy2 +dtgsyl +dtpcon +dtpmv +dtprfs +dtpsv +dtptri +dtptrs +dtrcon +dtrevc +dtrexc +dtrmm +dtrmv +dtrrfs +dtrsen +dtrsm +dtrsna +dtrsv +dtrsyl +dtrti2 +dtrtri +dtrtrs +dtzrqf +dtzrzf +dzasum +dznrm2 +dzsum1 +idamax +ieeeck +ilaenv +izamax +izmax1 +lsame +lsamen +xerbla +zaxpy +zbdsqr +zcopy +zdotc +zdotu +zdrot +zdrscl +zdscal +zgbbrd +zgbcon +zgbequ +zgbmv +zgbrfs +zgbsv +zgbsvx +zgbtf2 +zgbtrf +zgbtrs +zgebak +zgebal +zgebd2 +zgebrd +zgecon +zgeequ +zgees +zgeesx +zgeev +zgeevx +zgegs +zgegv +zgehd2 +zgehrd +zgelq2 +zgelqf +zgels +zgelsd +zgelss +zgelsx +zgelsy +zgemm +zgemv +zgeql2 +zgeqlf +zgeqp3 +zgeqpf +zgeqr2 +zgeqrf +zgerc +zgerfs +zgerq2 +zgerqf +zgeru +zgesc2 +zgesdd +zgesv +zgesvd +zgesvx +zgetc2 +zgetf2 +zgetrf +zgetri +zgetrs +zggbak +zggbal +zgges +zggesx +zggev +zggevx +zggglm +zgghrd +zgglse +zggqrf +zggrqf +zggsvd +zggsvp +zgtcon +zgtrfs +zgtsv +zgtsvx +zgttrf +zgttrs +zgtts2 +zhbev +zhbevd +zhbevx +zhbgst +zhbgv +zhbgvd +zhbgvx +zhbmv +zhbtrd +zhecon +zheev +zheevd +zheevr +zheevx +zhegs2 +zhegst +zhegv +zhegvd +zhegvx +zhemm +zhemv +zher +zher2 +zher2k +zherfs +zherk +zhesv +zhesvx +zhetd2 +zhetf2 +zhetrd +zhetrf +zhetri +zhetrs +zhgeqz +zhpcon +zhpev +zhpevd +zhpevx +zhpgst +zhpgv +zhpgvd +zhpgvx +zhpmv +zhpr +zhpr2 +zhprfs +zhpsv +zhpsvx +zhptrd +zhptrf +zhptri +zhptrs +zhsein +zhseqr +zlabrd +zlacgv +zlacon +zlacp2 +zlacpy +zlacrm +zlacrt +zladiv +zlaed0 +zlaed7 +zlaed8 +zlaein +zlaesy +zlaev2 +zlags2 +zlagtm +zlahef +zlahqr +zlahrd +zlaic1 +zlals0 +zlalsa +zlalsd +zlangb +zlange +zlangt +zlanhb +zlanhe +zlanhp +zlanhs +zlanht +zlansb +zlansp +zlansy +zlantb +zlantp +zlantr +zlapll +zlapmt +zlaqgb +zlaqge +zlaqhb +zlaqhe +zlaqhp +zlaqp2 +zlaqps +zlaqsb +zlaqsp +zlaqsy +zlar1v +zlar2v +zlarcm +zlarf +zlarfb +zlarfg +zlarft +zlarfx +zlargv +zlarnv +zlarrv +zlartg +zlartv +zlarz +zlarzb +zlarzt +zlascl +zlaset +zlasr +zlassq +zlaswp +zlasyf +zlatbs +zlatdf +zlatps +zlatrd +zlatrs +zlatrz +zlatzm +zlauu2 +zlauum +zpbcon +zpbequ +zpbrfs +zpbstf +zpbsv +zpbsvx +zpbtf2 +zpbtrf +zpbtrs +zpocon +zpoequ +zporfs +zposv +zposvx +zpotf2 +zpotrf +zpotri +zpotrs +zppcon +zppequ +zpprfs +zppsv +zppsvx +zpptrf +zpptri +zpptrs +zptcon +zpteqr +zptrfs +zptsv +zptsvx +zpttrf +zpttrs +zptts2 +zrot +zrotg +zscal +zspcon +zspmv +zspr +zsprfs +zspsv +zspsvx +zsptrf +zsptri +zsptrs +zstedc +zstegr +zstein +zsteqr +zswap +zsycon +zsymm +zsymv +zsyr +zsyr2k +zsyrfs +zsyrk +zsysv +zsysvx +zsytf2 +zsytrf +zsytri +zsytrs +ztbcon +ztbmv +ztbrfs +ztbsv +ztbtrs +ztgevc +ztgex2 +ztgexc +ztgsen +ztgsja +ztgsna +ztgsy2 +ztgsyl +ztpcon +ztpmv +ztprfs +ztpsv +ztptri +ztptrs +ztrcon +ztrevc +ztrexc +ztrmm +ztrmv +ztrrfs +ztrsen +ztrsm +ztrsna +ztrsv +ztrsyl +ztrti2 +ztrtri +ztrtrs +ztzrqf +ztzrzf +zung2l +zung2r +zungbr +zunghr +zungl2 +zunglq +zungql +zungqr +zungr2 +zungrq +zungtr +zunm2l +zunm2r +zunmbr +zunmhr +zunml2 +zunmlq +zunmql +zunmqr +zunmr2 +zunmr3 +zunmrq +zunmrz +zunmtr +zupgtr +zupmtr diff --git a/deal.II/contrib/umfpack/UMFPACK/MATLAB/lcc_lib/libmwlapack.lib b/deal.II/contrib/umfpack/UMFPACK/MATLAB/lcc_lib/libmwlapack.lib new file mode 100644 index 0000000000..ba94c1bae4 Binary files /dev/null and b/deal.II/contrib/umfpack/UMFPACK/MATLAB/lcc_lib/libmwlapack.lib differ diff --git a/deal.II/contrib/umfpack/UMFPACK/MATLAB/lu_normest.m b/deal.II/contrib/umfpack/UMFPACK/MATLAB/lu_normest.m index 23731effee..e170817cf0 100644 --- a/deal.II/contrib/umfpack/UMFPACK/MATLAB/lu_normest.m +++ b/deal.II/contrib/umfpack/UMFPACK/MATLAB/lu_normest.m @@ -1,7 +1,7 @@ function rho = lu_normest (A, L, U) -% LU_NORMEST: estimate the 1-norm of A-L*U without computing L*U +%LU_NORMEST estimates norm (L*U-A, 1) without forming L*U-A % -% Usage: +% Example: % % rho = lu_normest (A, L, U) % @@ -30,10 +30,14 @@ function rho = lu_normest (A, L, U) % For a detailed description, see Davis, T. A. and Hager, W. W., % Modifying a sparse Cholesky factorization, SIAM J. Matrix Analysis and % Applications, 1999, vol. 20, no. 3, 606-627. +% +% See also normest % The three places that the matrix-vector multiply E*x is used are highlighted. % Note that E is never formed explicity. +% Copyright 1995-2007 by William W. Hager and Timothy A. Davis + [m n] = size (A) ; if (m ~= n) @@ -49,14 +53,11 @@ if (m ~= n) end end -[m n] = size (A) ; +[m n] = size (A) ; %#ok notvisited = ones (m, 1) ; % nonvisited(j) is zero if j is visited, 1 otherwise rho = 0 ; % the global rho -At = A' ; -Lt = L' ; - for trial = 1:3 % { x = notvisited ./ sum (notvisited) ; diff --git a/deal.II/contrib/umfpack/UMFPACK/MATLAB/luflop.m b/deal.II/contrib/umfpack/UMFPACK/MATLAB/luflop.m index 2abda1e341..4a871ed3c0 100644 --- a/deal.II/contrib/umfpack/UMFPACK/MATLAB/luflop.m +++ b/deal.II/contrib/umfpack/UMFPACK/MATLAB/luflop.m @@ -1,6 +1,7 @@ -function f = luflop (L, U) -%LUFLOP +function f = luflop (L, U) %#ok +%LUFLOP given L and U, computes # of flops required to compute them % +% Example: % f = luflop (L, U) % % Given an LU factorization, compute how many flops took to compute it. This @@ -16,9 +17,10 @@ function f = luflop (L, U) % Note: the above expression has a subtle undercount when exact numerical % cancelation occurs. Try [L,U,P] = lu (sparse (ones (10))) and then % luflop (L,U). +% +% See also LU -% UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. -% All Rights Reserved. Type umfpack_details for License. +% Copyright 1995-2007 by Timothy A. Davis. 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 10a26c5021..e85b95ebb7 100644 --- a/deal.II/contrib/umfpack/UMFPACK/MATLAB/luflopmex.c +++ b/deal.II/contrib/umfpack/UMFPACK/MATLAB/luflopmex.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -19,10 +19,11 @@ without allocating O (lunz) space. + v5.1: port to 64-bit MATLAB */ #include "mex.h" -#include "matrix.h" +#include "UFconfig.h" #ifndef TRUE #define TRUE (1) @@ -46,7 +47,7 @@ void mexFunction double flop_count ; double *pflop ; - int *Lp, *Li, *Up, *Ui, *Unz, n, k, row, col, p, Lnz_k, Unz_k ; + UF_long *Lp, *Li, *Up, *Ui, *Unz, n, k, row, col, p, Lnz_k, Unz_k ; mxArray *Lmatrix, *Umatrix ; /* ---------------------------------------------------------------------- */ @@ -72,13 +73,13 @@ void mexFunction mexErrMsgTxt ("Usage: f = luflop (L, U) ; L and U must be sparse") ; } - Lp = mxGetJc (Lmatrix) ; - Li = mxGetIr (Lmatrix) ; + Lp = (UF_long *) mxGetJc (Lmatrix) ; + Li = (UF_long *) mxGetIr (Lmatrix) ; - Up = mxGetJc (Umatrix) ; - Ui = mxGetIr (Umatrix) ; + Up = (UF_long *) mxGetJc (Umatrix) ; + Ui = (UF_long *) mxGetIr (Umatrix) ; - Unz = (int *) mxMalloc (n * sizeof (int)) ; + Unz = (UF_long *) mxMalloc (n * sizeof (UF_long)) ; /* ---------------------------------------------------------------------- */ /* count the nonzeros in each row of U */ @@ -118,4 +119,3 @@ void mexFunction pflop = mxGetPr (plhs [0]) ; pflop [0] = flop_count ; } - diff --git a/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack.m b/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack2.m similarity index 63% rename from deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack.m rename to deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack2.m index a86bfbd6c7..91e407d571 100644 --- a/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack.m +++ b/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack2.m @@ -1,18 +1,21 @@ -function [out1, out2, out3, out4, out5] = umfpack (in1, in2, in3, in4, in5) -% UMFPACK v4.4 is a MATLAB mexFunction for solving sparse linear systems. +function [out1, out2, out3, out4, out5] = umfpack2(in1, in2, in3, in4, in5) %#ok +%UMFPACK2 computes x=A\b, x=A/b, or lu (A) for a sparse matrix A +% It is also a built-in function in MATLAB, used in x=A\b. % -% UMFPACK v4.4: | MATLAB approximate equivalent: +% Example: +% +% UMFPACK: | MATLAB approximate equivalent: % --------------------------------------------------------------------- -% x = umfpack (A, '\', b) ; | x = A \ b +% x = umfpack2 (A, '\', b) ; | x = A \ b % | -% x = umfpack (b, '/', A) ; | x = b / A +% x = umfpack2 (b, '/', A) ; | x = b / A % | -% [L,U,P,Q] = umfpack (A) ; | [m,n] = size (A) ; +% [L,U,P,Q] = umfpack2 (A) ; | [m,n] = size (A) ; % | I = speye (n) ; % | Q = I (:, colamd (A)) ; % | [L,U,P] = lu (A*Q) ; % | -% [L,U,P,Q,R] = umfpack (A) ; | [m,n] = size (A) ; +% [L,U,P,Q,R] = umfpack2 (A) ; | [m,n] = size (A) ; % | I = speye (n) ; % | Q = I (:, colamd (A)) ; % | r = full (sum (abs (A), 2)) ; @@ -20,7 +23,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] = umfpack2 (A, 'symbolic')| [m,n] = size (A) ; % | I = speye (n) ; % | Q = I (:, colamd (A)) ; % | [count,h,parent,post] = ... @@ -28,17 +31,16 @@ function [out1, out2, out3, out4, out5] = umfpack (in1, in2, in3, in4, in5) % % A must be sparse. It can be complex, singular, and/or rectangular. A must be % square for '/' or '\'. b must be a full real or complex vector. For -% [L,U,P,Q,R] = umfpack (A), the factorization is L*U = P*(R\A)*Q. If A has a +% [L,U,P,Q,R] = umfpack2 (A), the factorization is L*U = P*(R\A)*Q. If A has a % mostly symmetric nonzero pattern, then replace "colamd" with "amd" in the % MATLAB-equivalent column in the table above. Type umfpack_details for more % information. % -% See also: lu_normest, colamd, amd. +% See also: lu_normest, colamd, amd, umfpack. % To use UMFPACK for an arbitrary b, see umfpack_solve. -% UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. -% All Rights Reserved. Type umfpack_details for License. +% Copyright 1995-2007 by Timothy A. Davis. -help umfpack -error ('umfpack mexFunction not found! Use umfpack_make to compile umfpack.') ; +help umfpack2 +error ('umfpack2 mexFunction not found') ; diff --git a/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_btf.m b/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_btf.m index 2efb865d68..e2d3e73634 100644 --- a/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_btf.m +++ b/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_btf.m @@ -1,7 +1,8 @@ function x = umfpack_btf (A, b, Control) -% UMFPACK_BTF +%UMFPACK_BTF factorize A using a block triangular form % -% x = umfpack_btf (A, b, Control) +% Example: +% x = umfpack_btf (A, b, Control) % % solve Ax=b by first permuting the matrix A to block triangular form via dmperm % and then using UMFPACK to factorize each diagonal block. Adjacent 1-by-1 @@ -9,10 +10,9 @@ function x = umfpack_btf (A, b, Control) % MATLAB's \ operator. The Control parameter is optional (Type umfpack_details % and umfpack_report for details on its use). A must be square. % -% See also: umfpack, umfpack_factorize, umfpack_details, dmperm +% See also umfpack, umfpack2, umfpack_details, dmperm -% UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. -% All Rights Reserved. Type umfpack_details for License. +% Copyright 1995-2007 by Timothy A. Davis. if (nargin < 2) help umfpack_btf @@ -24,14 +24,14 @@ if (m ~= n) help umfpack_btf error ('umfpack_btf: A must be square') ; end -[m1 n1] = size (b) ; +m1 = size (b,1) ; if (m1 ~= n) help umfpack_btf error ('umfpack_btf: b has the wrong dimensions') ; end if (nargin < 3) - Control = umfpack ; + Control = umfpack2 ; end %------------------------------------------------------------------------------- @@ -45,7 +45,7 @@ nblocks = length (r) - 1 ; % solve the system %------------------------------------------------------------------------------- -if (nblocks == 1 | sprank (A) < n) +if (nblocks == 1 | sprank (A) < n) %#ok %--------------------------------------------------------------------------- % matrix is irreducible or structurally singular diff --git a/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_demo.m b/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_demo.m index 8a7bd1477f..7c4c182a50 100644 --- a/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_demo.m +++ b/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_demo.m @@ -1,22 +1,27 @@ -function umfpack_demo -% UMFPACK DEMO +function umfpack_demo (c) +%UMFPACK_DEMO a lenghty demo % % A demo of UMFPACK for MATLAB. % -% See also umfpack, umfpack_make, umfpack_details, umfpack_report, +% Example: +% umfpack_demo +% +% See also umfpack, umfpack2, umfpack_make, umfpack_details, umfpack_report, % and umfpack_simple. -% UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. -% All Rights Reserved. Type umfpack_details for License. +% Copyright 1995-2007 by Timothy A. Davis. %------------------------------------------------------------------------------- % get default control parameters %------------------------------------------------------------------------------- -control = umfpack ; -fprintf ('\nEnter the printing level for UMFPACK''s output statistics:\n') ; -fprintf ('0: none, 1: errors only, 2: statistics, 4: print some of outputs\n') ; -c = input ('5: print all output [default is 1]: ') ; +control = umfpack2 ; +if (nargin < 1) + fprintf ('\nEnter the printing level for UMFPACK''s output statistics:\n') ; + fprintf ('0: none, 1: errors only, 2: statistics, 4: print some outputs\n'); + c = input ('5: print all output [default is 1]: ', 's') ; + c = str2double (c) ; +end if (isempty (c)) c = 1 ; end @@ -33,17 +38,16 @@ if (control (1) > 1) end load west0067 -A = Problem.A ; +A = spconvert (west0067) ; + n = size (A, 1) ; b = rand (n, 1) ; fprintf ('Solving Ax=b via UMFPACK:\n') ; -[xu, info] = umfpack (A, '\', b, control) ; -x = xu ; +xu = umfpack2 (A, '\', b, control) ; fprintf ('Solving Ax=b via MATLAB:\n') ; xm = A\b ; -x = xm ; fprintf ('Difference between UMFPACK and MATLAB solution: %g\n', ... norm (xu - xm, Inf)) ; @@ -60,7 +64,7 @@ spy (A) title ('The matrix A') ; subplot (2,3,2) -[P1, Q1, Fr, Ch, Info] = umfpack (A, 'symbolic') ; +[P1, Q1, Fr, Ch, Info] = umfpack2 (A, 'symbolic') ; %#ok treeplot (Fr (1:end-1,2)') ; title ('Supernodal column elimination tree') ; @@ -70,8 +74,8 @@ title ('A, with initial row and column order') ; subplot (2,3,4) fprintf ('\n--------------------------------------------------------------\n') ; -fprintf ('\nFactorizing [L, U, P, Q, R] = umfpack (A)\n') ; -[L, U, P, Q, R] = umfpack (A) ; +fprintf ('\nFactorizing [L, U, P, Q, R] = umfpack2 (A)\n') ; +[L, U, P, Q, R] = umfpack2 (A) ; spy (P*A*Q) title ('A, with final row/column order') ; @@ -82,7 +86,6 @@ fprintf ('norm (P*(R\\A)*Q - L*U, 1) = %g (exact) %g (estimated)\n', ... fprintf ('\nSolution to Ax=b via UMFPACK factorization:\n') ; fprintf ('x = Q * (U \\ (L \\ (P * (R \\ b))))\n') ; xu = Q * (U \ (L \ (P * (R \ b)))) ; -x = xu ; fprintf ('\nUMFPACK flop count: %d\n', luflop (L, U)) ; @@ -125,12 +128,11 @@ fprintf ('\n--------------------------------------------------------------\n') ; fprintf ('Solve A''x=b:\n') ; fprintf ('Solving A''x=b via UMFPACK:\n') ; -[xu, info] = umfpack (b', '/', A, control) ; +xu = umfpack2 (b', '/', A, control) ; xu = xu' ; fprintf ('Solving A''x=b via MATLAB:\n') ; xm = (b'/A)' ; -x = xm ; fprintf ('Difference between UMFPACK and MATLAB solution: %g\n', ... norm (xu - xm, Inf)) ; @@ -148,7 +150,7 @@ fprintf ('same as the solution to Ax=b for the original A.\n'); C = A' ; % factorize C (P,Q) = L*U -[L, U, P, Q, R, info] = umfpack (C, control) ; +[L, U, P, Q, R, info] = umfpack2 (C, control) ; %#ok fprintf ('\nP * (R\\C) * Q - L*U should be zero:\n') ; fprintf ('norm (P*(R\\C)*Q - L*U, 1) = %g (exact) %g (estimated)\n', ... @@ -157,11 +159,9 @@ fprintf ('norm (P*(R\\C)*Q - L*U, 1) = %g (exact) %g (estimated)\n', ... fprintf ('\nSolution to Ax=b via UMFPACK, using the factors of C:\n') ; fprintf ('x = R \\ (P'' * (L'' \\ (U'' \\ (Q'' * b)))) ;\n') ; xu = R \ (P' * (L' \ (U' \ (Q' * b)))) ; -x = xu ; fprintf ('Solution to Ax=b via MATLAB:\n') ; xm = A\b ; -x = xm ; fprintf ('Difference between UMFPACK and MATLAB solution: %g\n', ... norm (xu - xm, Inf)) ; @@ -199,4 +199,4 @@ fprintf ('Difference between UMFPACK and MATLAB solution: %g\n', ... %------------------------------------------------------------------------------- fprintf ('\n--------------------------------------------------------------\n') ; -fprintf ('det(A): %g UMFPACK determinant: %g\n', det (A), umfpack (A, 'det')) ; +fprintf ('det(A): %g UMFPACK determinant: %g\n', det (A), umfpack2 (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 cab2e0f0d0..c0c60ba9cc 100644 --- a/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_demo.m.out +++ b/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_demo.m.out @@ -1,7 +1,7 @@ ->> umfpack_demo +umfpack_demo Enter the printing level for UMFPACK's output statistics: -0: none, 1: errors only, 2: statistics, 4: print some of outputs +0: none, 1: errors only, 2: statistics, 4: print some outputs 5: print all output [default is 1]: -------------------------------------------------------------- @@ -12,15 +12,15 @@ Difference between UMFPACK and MATLAB solution: 0 -------------------------------------------------------------- -Factorizing [L, U, P, Q, R] = umfpack (A) +Factorizing [L, U, P, Q, R] = umfpack2 (A) P * (R\A) * Q - L*U should be zero: -norm (P*(R\A)*Q - L*U, 1) = 6.80012e-16 (exact) 6.80012e-16 (estimated) +norm (P*(R\A)*Q - L*U, 1) = 2.77556e-16 (exact) 1.21864e-16 (estimated) Solution to Ax=b via UMFPACK factorization: x = Q * (U \ (L \ (P * (R \ b)))) -UMFPACK flop count: 2354 +UMFPACK flop count: 2453 Factorizing [L, U, P] = lu (A (:, q)) If you are using a version of MATLAB prior to V6.0, then the @@ -31,15 +31,15 @@ q = colmmd (A) ; Solution to Ax=b via MATLAB factorization: x = U \ (L \ (P * b)) ; x (q) = x ; -Difference between UMFPACK and MATLAB solution: 7.10543e-15 +Difference between UMFPACK and MATLAB solution: 5.55112e-15 -MATLAB LU flop count: 3164 +MATLAB LU flop count: 3160 -------------------------------------------------------------- Solve A'x=b: Solving A'x=b via UMFPACK: Solving A'x=b via MATLAB: -Difference between UMFPACK and MATLAB solution: 2.66454e-15 +Difference between UMFPACK and MATLAB solution: 1.77636e-15 -------------------------------------------------------------- Compute C = A', and compute the LU factorization of C. @@ -48,29 +48,28 @@ 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.94289e-16 (exact) 5.55112e-17 (estimated) +norm (P*(R\C)*Q - L*U, 1) = 1.17961e-16 (exact) 5.60533e-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: 7.10543e-15 +Difference between UMFPACK and MATLAB solution: 3.55271e-15 -------------------------------------------------------------- Solve AX=B, where B is n-by-10, and sparse -Difference between UMFPACK and MATLAB solution: 6.72949e-14 +Difference between UMFPACK and MATLAB solution: 6.3926e-14 -------------------------------------------------------------- Solve AX=B, where B is n-by-10, and sparse, using umfpack_btf -Difference between UMFPACK and MATLAB solution: 8.51541e-14 +Difference between UMFPACK and MATLAB solution: 4.41347e-14 -------------------------------------------------------------- Solve A'X=B, where B is n-by-10, and sparse -Difference between UMFPACK and MATLAB solution: 7.99291e-14 +Difference between UMFPACK and MATLAB solution: 8.90054e-14 -------------------------------------------------------------- det(A): -4.07453e-05 UMFPACK determinant: -4.07453e-05 ->> ->> diary off +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 2039abed09..4306fe9862 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.4: details on each usage. +function umfpack_details +%UMFPACK_DETAILS details on all the options for using umfpack2 in MATLAB % % 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. @@ -13,72 +13,72 @@ function [out1, out2, out3, out4, out5] = umfpack (in1, in2, in3, in4, in5) % submatrix S is then analyzed, based on the symmetry of the nonzero pattern of % the submatrix and the values on the diagaonal. The strategies include: % -% (1) unsymmetric: use a COLAMD pre-ordering, a column elimination tree -% post-ordering, refine the column ordering during factorization, -% and make no effort at selecting pivots on the diagonal. -% (2) 2-by-2: like the symmetric strategy (see below), except that local -% row permutations are first made to attempt to place large entries -% on the diagonal. -% (3) symmetric: use an AMD pre-ordering on the matrix S+S', an -% elimination tree post-ordering, do not refine the column ordering -% during factorization, and attempt to select pivots on the diagonal. -% -% Each of the following uses of umfpack (except for "Control = umfpack") is -% stand-alone. That is, no call to umfpack is required for any subsequent +% (1) unsymmetric: use a COLAMD pre-ordering, a column elimination tree +% post-ordering, refine the column ordering during factorization, +% and make no effort at selecting pivots on the diagonal. +% (2) 2-by-2: like the symmetric strategy (see below), except that local +% row permutations are first made to attempt to place large entries +% on the diagonal. +% (3) symmetric: use an AMD pre-ordering on the matrix S+S', an +% elimination tree post-ordering, do not refine the column ordering +% during factorization, and attempt to select pivots on the diagonal. +% +% Each of the following uses of umfpack2 (except for "Control = umfpack2") is +% stand-alone. That is, no call to umfpack2 is required for any subsequent % call. In each usage, the Info output argument is optional. % -% Usage: +% Example: % -% [x, Info] = umfpack (A, '\', b) ; -% [x, Info] = umfpack (A, '\', b, Control) ; -% [x, Info] = umfpack (A, Qinit, '\', b, Control) ; -% [x, Info] = umfpack (A, Qinit, '\', b) ; +% [x, Info] = umfpack2 (A, '\', b) ; +% [x, Info] = umfpack2 (A, '\', b, Control) ; +% [x, Info] = umfpack2 (A, Qinit, '\', b, Control) ; +% [x, Info] = umfpack2 (A, Qinit, '\', b) ; % % Solves Ax=b (similar to x = A\b in MATLAB). % -% [x, Info] = umfpack (b, '/', A) ; -% [x, Info] = umfpack (b, '/', A, Control) ; -% [x, Info] = umfpack (b, '/', A, Qinit) ; -% [x, Info] = umfpack (b, '/', A, Qinit, Control) ; +% [x, Info] = umfpack2 (b, '/', A) ; +% [x, Info] = umfpack2 (b, '/', A, Control) ; +% [x, Info] = umfpack2 (b, '/', A, Qinit) ; +% [x, Info] = umfpack2 (b, '/', A, Qinit, Control) ; % % Solves A'x'=b' (similar to x = b/A in MATLAB). % -% [L, U, P, Q, R, Info] = umfpack (A) ; -% [L, U, P, Q, R, Info] = umfpack (A, Control) ; -% [L, U, P, Q, R, Info] = umfpack (A, Qinit) ; -% [L, U, P, Q, R, Info] = umfpack (A, Qinit, Control) ; +% [L, U, P, Q, R, Info] = umfpack2 (A) ; +% [L, U, P, Q, R, Info] = umfpack2 (A, Control) ; +% [L, U, P, Q, R, Info] = umfpack2 (A, Qinit) ; +% [L, U, P, Q, R, Info] = umfpack2 (A, Qinit, Control) ; % % Returns the LU factorization of A. P and Q are returned as permutation % matrices. R is a diagonal sparse matrix of scale factors for the rows -% of A, L is lower triangular, and U is upper triangular. The -% factorization is L*U = P*(R\A)*Q. You can turn off scaling by setting -% Control (17) to zero (in which case R = speye (m)), or by using the -% following syntaxes (in which case Control (17) is ignored): +% of A, L is lower triangular, and U is upper triangular. The +% factorization is L*U = P*(R\A)*Q. You can turn off scaling by setting +% Control (17) to zero (in which case R = speye (m)), or by using the +% following syntaxes (in which case Control (17) is ignored): % -% [L, U, P, Q] = umfpack (A) ; -% [L, U, P, Q] = umfpack (A, Control) ; -% [L, U, P, Q] = umfpack (A, Qinit) ; -% [L, U, P, Q] = umfpack (A, Qinit, Control) ; +% [L, U, P, Q] = umfpack2 (A) ; +% [L, U, P, Q] = umfpack2 (A, Control) ; +% [L, U, P, Q] = umfpack2 (A, Qinit) ; +% [L, U, P, Q] = umfpack2 (A, Qinit, Control) ; % % Same as above, except that no row scaling is performed. The Info array -% is not returned, either. +% is not returned, either. % -% [P1, Q1, Fr, Ch, Info] = umfpack (A, 'symbolic') ; -% [P1, Q1, Fr, Ch, Info] = umfpack (A, 'symbolic', Control) ; -% [P1, Q1, Fr, Ch, Info] = umfpack (A, Qinit, 'symbolic') ; -% [P1, Q1, Fr, Ch, Info] = umfpack (A, Qinit, 'symbolic', Control); +% [P1, Q1, Fr, Ch, Info] = umfpack2 (A, 'symbolic') ; +% [P1, Q1, Fr, Ch, Info] = umfpack2 (A, 'symbolic', Control) ; +% [P1, Q1, Fr, Ch, Info] = umfpack2 (A, Qinit, 'symbolic') ; +% [P1, Q1, Fr, Ch, Info] = umfpack2 (A, Qinit, 'symbolic', Control); % % Performs only the fill-reducing column pre-ordering (including the % elimination tree post-ordering) and symbolic factorization. Q1 is the -% initial column permutation (either from colamd, amd, or the input -% ordering Qinit), possibly followed by a column elimination tree post- -% ordering or a symmetric elimination tree post-ordering, depending on -% the strategy used. +% initial column permutation (either from colamd, amd, or the input +% ordering Qinit), possibly followed by a column elimination tree post- +% ordering or a symmetric elimination tree post-ordering, depending on +% the strategy used. % -% For the unsymmetric strategy, P1 is the row ordering induced by Q1 -% (row-merge order). For the 2-by-2 strategy, P1 is the row ordering that -% places large entries on the diagonal of P1*A*Q1. For the symmetric -% strategy, P1 = Q1. +% For the unsymmetric strategy, P1 is the row ordering induced by Q1 +% (row-merge order). For the 2-by-2 strategy, P1 is the row ordering that +% places large entries on the diagonal of P1*A*Q1. For the symmetric +% strategy, P1 = Q1. % % Fr is a (nfr+1)-by-4 array containing information about each frontal % matrix, where nfr <= n is the number of frontal matrices. Fr (:,1) is @@ -88,14 +88,14 @@ function [out1, out2, out3, out4, out5] = umfpack (in1, in2, in3, in4, in5) % columns for the first front, the next Fr (2,1) columns of P1*A*Q1 % are the pivot columns for the second front, and so on. % -% For the unsymmetric strategy, Fr (:,3) is the row index of the first -% row in P1*A*Q1 whose leftmost nonzero entry is in a pivot column for -% the kth front. Fr (:,4) is the leftmost descendent of the kth front. -% Rows in the range Fr (Fr (k,4),3) to Fr (k+1,3)-1 form the entire set -% of candidate pivot rows for the kth front (some of these will typically -% have been selected as pivot rows of fronts Fr (k,3) to k-1, before the -% factorization reaches the kth front. If front k is a leaf node, then -% Fr (k,4) is k. +% For the unsymmetric strategy, Fr (:,3) is the row index of the first +% row in P1*A*Q1 whose leftmost nonzero entry is in a pivot column for +% the kth front. Fr (:,4) is the leftmost descendent of the kth front. +% Rows in the range Fr (Fr (k,4),3) to Fr (k+1,3)-1 form the entire set +% of candidate pivot rows for the kth front (some of these will typically +% have been selected as pivot rows of fronts Fr (k,3) to k-1, before the +% factorization reaches the kth front. If front k is a leaf node, then +% Fr (k,4) is k. % % Ch is a (nchains+1)-by-3 array containing information about each "chain" % (unifrontal sequence) of frontal matrices, and where nchains <= nfr @@ -103,26 +103,26 @@ function [out1, out2, out3, out4, out5] = umfpack (in1, in2, in3, in4, in5) % Chain (i,1) to Chain (i+1,1)-1, and the largest front in chain i is % Chain (i,2)-by-Chain (i,3). % -% This use of umfpack is not required to factor or solve a linear system +% This use of umfpack2 is not required to factor or solve a linear system % in MATLAB. It analyzes the matrix A and provides information only. % The MATLAB statement "treeplot (Fr (:,2)')" plots the column elimination % tree. % -% Control = umfpack ; +% Control = umfpack2 ; % -% Returns a 20-by-1 vector of default parameter settings for umfpack. +% Returns a 20-by-1 vector of default parameter settings for umfpack2. % % umfpack_report (Control, Info) ; % % Prints the current Control settings, and Info % -% det = umfpack (A, 'det') ; -% [det dexp] = umfpack (A, 'det') ; +% det = umfpack2 (A, 'det') ; +% [det dexp] = umfpack2 (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. +% 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 @@ -131,31 +131,43 @@ function [out1, out2, out3, out4, out5] = umfpack (in1, in2, in3, in4, in5) % are used. If a Control entry is NaN, then the default is used for that entry. % % -% UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. -% All Rights Reserved. Type umfpack_details for License. +% Copyright 1995-2007 by Timothy A. Davis, University of Florida. +% All Rights Reserved. +% UMFPACK is available under alternate licenses, contact T. Davis for details. % % 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 -% uses UMFPACK or any modified version of UMFPACK code must cite the -% Copyright, this License, the Availability note, and "Used by permission." -% Permission to modify the code and to distribute modified code is granted, -% provided the Copyright, this License, and the Availability note are -% 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. +% Your use or distribution of UMFPACK or any modified version of +% UMFPACK implies that you agree to this License. +% +% This library is free software; you can redistribute it and/or +% modify it under the terms of the GNU Lesser General Public +% License as published by the Free Software Foundation; either +% version 2.1 of the License, or (at your option) any later version. +% +% This library is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +% Lesser General Public License for more details. +% +% You should have received a copy of the GNU Lesser General Public +% License along with this library; if not, write to the Free Software +% Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 +% USA +% +% Permission is hereby granted to use or copy this program under the +% terms of the GNU LGPL, provided that the Copyright, this License, +% and the Availability of the original version is retained on all copies. +% User documentation of any code that uses this code or any modified +% version of this code must cite the Copyright, this License, the +% Availability note, and "Used by permission." Permission to modify +% the code and to distribute modified code is granted, provided the +% Copyright, this License, and the Availability note are retained, +% and a notice that the code was modified is included. % % Availability: http://www.cise.ufl.edu/research/sparse/umfpack % -% See also umfpack, umfpack_make, umfpack_report, +% See also umfpack, umfpack2, umfpack_make, umfpack_report, % umfpack_demo, and umfpack_simple. more on diff --git a/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_install.m b/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_install.m new file mode 100644 index 0000000000..921f2c56da --- /dev/null +++ b/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_install.m @@ -0,0 +1,37 @@ +function umfpack_install +%UMFPACK_INSTALL to compile and install umfpack2 and amd2 for use in MATLAB +% Your current directory must be UMFPACK/MATLAB for this function to work. +% +% Example: +% umfpack_install +% +% See also umfpack2, amd2. + +% Copyright 1995-2007 by Timothy A. Davis. + +% compile and install UMFPACK +umfpack_path = pwd ; +addpath (umfpack_path) ; +try + umfpack_make +catch + fprintf ('Trying to install with lcc_lib/libmwlapack.lib instead\n') ; + umfpack_make ('lcc_lib/libmwlapack.lib') ; +end + +% compile and install AMD +cd ../../AMD/MATLAB +amd_path = pwd ; +addpath (amd_path) ; +amd_make ; + +cd (umfpack_path) + +fprintf ('Now trying the umfpack_simple demo.\n'); +umfpack_simple + +fprintf ('Added the following directories to the path. You may wish to add\n'); +fprintf ('these permanently with the MATLAB pathtool command:\n') ; +fprintf ('%s\n', umfpack_path) ; +fprintf ('%s\n', amd_path) ; + diff --git a/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_make.m b/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_make.m index efc34d5858..3576175651 100644 --- a/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_make.m +++ b/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_make.m @@ -1,115 +1,54 @@ -function umfpack_make -% UMFPACK_MAKE +function umfpack_make (lapack) +%UMFPACK_MAKE to compile umfpack2 for use in MATLAB % -% Compiles the UMFPACK mexFunction and then runs a simple demo. +% Compiles the umfpack2 mexFunction and then runs a simple demo. % -% See also: umfpack, umfpack_details, umfpack_report, umfpack_demo, and -% umfpack_simple. +% Example: +% umfpack_make % use default LAPACK and BLAS +% umfpack_make ('lcc_lib/libmwlapack.lib') % try this if umfpack_make fails % -% UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. -% All Rights Reserved. Type umfpack_details for License. +% See also: umfpack, umfpack2, umfpack_details, umfpack_report, umfpack_demo, +% and umfpack_simple. -help umfpack_make +% Copyright 1995-2007 by Timothy A. Davis. -fprintf ('\n--------------------------------------------------------------\n') ; -fprintf ('Now compiling the UMFPACK and AMD mexFunctions.\n') ; -fprintf ('--------------------------------------------------------------\n') ; +details = 0 ; -try - % ispc does not appear in MATLAB 5.3 - pc = ispc ; -catch - % if ispc fails, assume we aren't on a Windows PC. - pc = 0 ; +d = '' ; +if (~isempty (strfind (computer, '64'))) + d = ' -largeArrayDims' ; end -obj = 'o' ; -blas_lib = '' ; +[v,pc] = getversion ; +fprintf ('Compiling UMFPACK for MATLAB Version %g\n', v) ; + if (pc) obj = 'obj' ; +else + obj = 'o' ; end +kk = 0 ; + %------------------------------------------------------------------------------- % BLAS option %------------------------------------------------------------------------------- -msg = [ ... - '\nUsing the BLAS is faster, but might not compile correctly.\n', ... - 'If you get an error stating that dgemm, dgemv, dger, zgemm,\n', ... - 'zgemv, and/or zger are not defined, then recompile without the\n', ... - 'BLAS. You can ignore warnings that these routines are implicitly\n', ... - 'declared.\n\nPlease select one of the following options: \n', ... - ' 1: attempt to compile with the BLAS (default)\n', ... - ' 2: do not use the BLAS\n'] ; -fprintf (msg) ; -blas = input (': ') ; -if (isempty (blas)) - blas = 1 ; -end -if (blas == 1) - % try to link to MATLAB's built-in BLAS - blas = '' ; +if (nargin < 1) if (pc) - % the default lcc compiler needs this library to access the BLAS - blas_lib = ' libmwlapack.lib' ; - msg = [ ... - '\nCheck to see if you have a file called libmwlapack.lib in the\n', ... - '\\extern\\lib\\win32\\lcc\\ directory, where is ', ... - 'the\ndirectory where MATLAB is installed. If a file of that ', ... - 'name is already\nthere, then you don''t have to do anything. ', ... - 'Otherwise, you must first\ncopy the libmwlapack.lib file from ', ... - 'the umfpack\\lcc_lib\\ directory to the\n', ... - '\\extern\\lib\\win32\\lcc\\ directory. Next, type\n\n', ... - ' mex -setup\n\n', ... - 'at the MATLAB prompt, and ask MATLAB to select the lcc compiler. ',... - 'You can skip\nall of this if you have already done it, or have ', ... - 'configured mex to use\na different compiler. If you are using ', ... - 'Norton anti-virus software on Windows\n98SE, then you need to ', ... - 'exit MATLAB, turn off virus checking, and restart MATLAB\n', ... - 'before you can use the mex command or compile UMFPACK.\n', ... - 'You may also need to turn off virus checking in other cases.\n', ... - '\nHit enter to continue, or type control-C if you do not wish to '] ; - fprintf (msg) ; - input ('proceed: ') ; - end - fprintf ('\nUsing the BLAS (recommended).\n') ; -else - % No BLAS - fprintf ('\nNot using the BLAS. UMFPACK will be slow.\n') ; - blas = ' -DNBLAS' ; -end - -%------------------------------------------------------------------------------- -% -DNUTIL option (using utMalloc or mxMalloc) -%------------------------------------------------------------------------------- - -utils = '' ; - -if (~pc) - msg = [ ... - '--------------------------------------------------------------\n', ... - '\nUMFPACK uses MATLAB''s memory allocation routines. The internal', ... - '\nutMalloc, utFree, and utRealloc allow for better use of memory,', ... - '\nbut they are internal utility routines that are not documented.\n', ... - 'Thus, they might not always work. Using mxMalloc, mxFree, and\n', ... - 'mxRealloc works, but UMFPACK might run out of memory when solving\n', ... - 'problems that it could otherwise solve. Try using the default.\n', ... - 'If you get an error stating that utMalloc, utFree, and/or\n', ... - 'utRealloc are not defined, then recompile with the mx* routines.\n', ... - '\nPlease select one of the following options:\n', ... - ' 1: attempt to use the ut* routines (default)\n', ... - ' 2: use the standard mx* routines\n'] ; - fprintf (msg) ; - utils = input (': ') ; - if (isempty (utils)) - utils = 1 ; - end - if (utils == 2) - fprintf ('\nNot using utMalloc, utFree, or utRealloc\n') ; - utils = ' -DNUTIL' ; + if (v < 6.5) + % MATLAB 6.1 and earlier: use the version supplied here + lapack = 'lcc_lib/libmwlapack.lib' ; + fprintf ('Using %s. If this fails with dgemm and others\n',lapack); + fprintf ('undefined, then edit umfpack_make.m and modify the') ; + fprintf (' statement:\nlapack = ''%s'' ;\n', lapack) ; + else + lapack = 'libmwlapack.lib' ; + end else - fprintf ('\nUsing utMalloc, utFree, and utRealloc\n') ; - utils = '' ; + % For other systems, mex should find lapack on its own, but this has + % been broken in MATLAB R2007a; the following is now required. + lapack = '-lmwlapack' ; end end @@ -119,49 +58,41 @@ end posix = '' ; -if (~pc) - msg = [ ... - '--------------------------------------------------------------\n', ... - '\nUMFPACK can use the POSIX routines sysconf () and times ()\n', ... - 'to provide CPU time and wallclock time statistics. If you do not\n', ... - 'have a POSIX-compliant operating system, then UMFPACK won''t\n', ... - 'compile. If you don''t know which option to pick, try the\n', ... - 'default. If you get an error saying that sysconf and/or times\n', ... - 'are not defined, then recompile with the non-POSIX option.\n', ... - '\nPlease select one of the following options:\n', ... - ' 1: use POSIX sysconf and times routines (default)\n', ... - ' 2: do not use POSIX routines\n'] ; - fprintf (msg) ; - posix = input (': ') ; - if (isempty (posix)) - posix = 1 ; - end - if (posix == 2) - fprintf ('\nNot using POSIX sysconf and times routines.\n') ; - posix = ' -DNPOSIX' ; - else - fprintf ('\nUsing POSIX sysconf and times routines.\n') ; - posix = '' ; - end -end +% if (~pc) +% msg = [ ... +% '--------------------------------------------------------------\n', ... +% '\nUMFPACK can use the POSIX routines sysconf () and times ()\n', ... +% 'to provide CPU time and wallclock time statistics. If you do not\n', ... +% 'have a POSIX-compliant operating system, then UMFPACK won''t\n', ... +% 'compile. If you don''t know which option to pick, try the\n', ... +% 'default. If you get an error saying that sysconf and/or times\n', ... +% 'are not defined, then recompile with the non-POSIX option.\n', ... +% '\nPlease select one of the following options:\n', ... +% ' 1: use POSIX sysconf and times routines (default)\n', ... +% ' 2: do not use POSIX routines\n'] ; +% fprintf (msg) ; +% posix = str2num (input (': ', 's')) ; +% if (isempty (posix)) +% posix = 1 ; +% end +% if (posix == 2) +% fprintf ('\nNot using POSIX sysconf and times routines.\n') ; +% posix = ' -DNPOSIX' ; +% else +% fprintf ('\nUsing POSIX sysconf and times routines.\n') ; +% posix = '' ; +% end +% end %------------------------------------------------------------------------------- % mex command %------------------------------------------------------------------------------- -umfdir = sprintf ('..%sSource%s', filesep, filesep) ; -amddir = sprintf ('..%s..%sAMD%sSource%s', filesep, filesep, filesep, filesep) ; -incdir = sprintf ( ... -' -I..%sInclude -I..%sSource -I..%s..%sAMD%sInclude -I..%s..%sAMD%sSource', ... -filesep,filesep, filesep, filesep, filesep, filesep, filesep, filesep) ; - -mx = sprintf ('mex -inline -O%s%s%s%s', blas, utils, posix, incdir) ; -msg = [ ... - '--------------------------------------------------------------\n', ... - '\nCompile options:\n%s\nNow compiling. Please wait.\n'] ; -fprintf (msg, mx) ; - -% The following is adapted from GNUmakefile +umfdir = '../Source/' ; +amddir = '../../AMD/Source/' ; +incdir = ' -I../Include -I../Source -I../../AMD/Include -I../../UFconfig' ; +mx = sprintf ('mex -O%s%s%s ', posix, incdir, d) ; +% fprintf ('compile options:\n%s\n', mx) ; %------------------------------------------------------------------------------- % source files @@ -189,8 +120,8 @@ umfint = { 'analyze', 'apply_order', 'colamd', 'free', 'fsize', ... 'singletons' } ; % 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', 'preprocess' } ; +amdsrc = { 'aat', '1', '2', 'dump', 'postorder', 'post_tree', 'defaults', ... + 'order', 'control', 'info', 'valid', 'preprocess', 'global' } ; % user-callable umfpack_*.[ch] files (real/complex): user = { 'col_to_triplet', 'defaults', 'free_numeric', ... @@ -204,20 +135,21 @@ user = { 'col_to_triplet', 'defaults', 'free_numeric', ... 'load_numeric', 'save_numeric', 'load_symbolic', 'save_symbolic' } ; % user-callable umfpack_*.[ch], only one version -generic = { 'timer', 'tictoc' } ; +generic = { 'timer', 'tictoc', 'global' } ; M = cell (0) ; %------------------------------------------------------------------------------- -% Create the umfpack and amd mexFunctions for MATLAB (int versions only) +% Create the umfpack2 and amd2 mexFunctions for MATLAB (int versions only) %------------------------------------------------------------------------------- for k = 1:length(umfint) - M = make (M, '%s -DDINT -c %sumf_%s.c', 'umf_%s.%s', 'umf_%s_%s.%s', ... - mx, umfint {k}, umfint {k}, 'm', obj, umfdir) ; + [M, kk] = make (M, '%s -DDLONG -c %sumf_%s.c', 'umf_%s.%s', ... + 'umf_%s_%s.%s', mx, umfint {k}, umfint {k}, 'm', obj, umfdir, ... + kk, details) ; end -rules = { [mx ' -DDINT'] , [mx ' -DZINT'] } ; +rules = { [mx ' -DDLONG'] , [mx ' -DZLONG'] } ; kinds = { 'md', 'mz' } ; for what = 1:2 @@ -225,69 +157,80 @@ for what = 1:2 rule = rules {what} ; kind = kinds {what} ; - M = make (M, '%s -DCONJUGATE_SOLVE -c %sumf_%s.c', 'umf_%s.%s', ... - 'umf_%s_%s.%s', rule, 'ltsolve', 'lhsolve', kind, obj, umfdir) ; + [M, kk] = make (M, '%s -DCONJUGATE_SOLVE -c %sumf_%s.c', 'umf_%s.%s', ... + 'umf_%s_%s.%s', rule, 'ltsolve', 'lhsolve', kind, obj, umfdir, ... + kk, details) ; - M = make (M, '%s -DCONJUGATE_SOLVE -c %sumf_%s.c', 'umf_%s.%s', ... - 'umf_%s_%s.%s', rule, 'utsolve', 'uhsolve', kind, obj, umfdir) ; + [M, kk] = make (M, '%s -DCONJUGATE_SOLVE -c %sumf_%s.c', 'umf_%s.%s', ... + 'umf_%s_%s.%s', rule, 'utsolve', 'uhsolve', kind, obj, umfdir, ... + kk, details) ; - M = make (M, '%s -DDO_MAP -c %sumf_%s.c', 'umf_%s.%s', ... - 'umf_%s_%s_map_nox.%s', rule, 'triplet', 'triplet', kind, obj, umfdir) ; + [M, kk] = make (M, '%s -DDO_MAP -c %sumf_%s.c', 'umf_%s.%s', ... + 'umf_%s_%s_map_nox.%s', rule, 'triplet', 'triplet', kind, obj, ... + umfdir, kk, details) ; - M = make (M, '%s -DDO_VALUES -c %sumf_%s.c', 'umf_%s.%s', ... - 'umf_%s_%s_nomap_x.%s', rule, 'triplet', 'triplet', kind, obj, umfdir) ; + [M, kk] = make (M, '%s -DDO_VALUES -c %sumf_%s.c', 'umf_%s.%s', ... + 'umf_%s_%s_nomap_x.%s', rule, 'triplet', 'triplet', kind, obj, ... + umfdir, kk, details) ; - M = make (M, '%s -c %sumf_%s.c', 'umf_%s.%s', ... + [M, kk] = make (M, '%s -c %sumf_%s.c', 'umf_%s.%s', ... 'umf_%s_%s_nomap_nox.%s', rule, 'triplet', 'triplet', kind, obj, ... - umfdir) ; + umfdir, kk, details) ; - M = make (M, '%s -DDO_MAP -DDO_VALUES -c %sumf_%s.c', 'umf_%s.%s', ... - 'umf_%s_%s_map_x.%s', rule, 'triplet', 'triplet', kind, obj, umfdir) ; + [M, kk] = make (M, '%s -DDO_MAP -DDO_VALUES -c %sumf_%s.c', 'umf_%s.%s', ... + 'umf_%s_%s_map_x.%s', rule, 'triplet', 'triplet', kind, obj, ... + umfdir, kk, details) ; - M = make (M, '%s -DFIXQ -c %sumf_%s.c', 'umf_%s.%s', ... - 'umf_%s_%s_fixq.%s', rule, 'assemble', 'assemble', kind, obj, umfdir) ; + [M, kk] = make (M, '%s -DFIXQ -c %sumf_%s.c', 'umf_%s.%s', ... + 'umf_%s_%s_fixq.%s', rule, 'assemble', 'assemble', kind, obj, ... + umfdir, kk, details) ; - M = make (M, '%s -DDROP -c %sumf_%s.c', 'umf_%s.%s', ... - 'umf_%s_%s_drop.%s', rule, 'store_lu', 'store_lu', kind, obj, umfdir) ; + [M, kk] = make (M, '%s -DDROP -c %sumf_%s.c', 'umf_%s.%s', ... + 'umf_%s_%s_drop.%s', rule, 'store_lu', 'store_lu', kind, obj, ... + umfdir, kk, details) ; for k = 1:length(umfch) - M = make (M, '%s -c %sumf_%s.c', 'umf_%s.%s', 'umf_%s_%s.%s', ... - rule, umfch {k}, umfch {k}, kind, obj, umfdir) ; + [M, kk] = make (M, '%s -c %sumf_%s.c', 'umf_%s.%s', 'umf_%s_%s.%s', ... + rule, umfch {k}, umfch {k}, kind, obj, umfdir, kk, details) ; end - M = make (M, '%s -DWSOLVE -c %sumfpack_%s.c', 'umfpack_%s.%s', ... - 'umfpack_%s_w%s.%s', rule, 'solve', 'solve', kind, obj, umfdir) ; + [M, kk] = make (M, '%s -DWSOLVE -c %sumfpack_%s.c', 'umfpack_%s.%s', ... + 'umfpack_%s_w%s.%s', rule, 'solve', 'solve', kind, obj, umfdir, ... + kk, details) ; for k = 1:length(user) - M = make (M, '%s -c %sumfpack_%s.c', 'umfpack_%s.%s', ... - 'umfpack_%s_%s.%s', rule, user {k}, user {k}, kind, obj, umfdir) ; + [M, kk] = make (M, '%s -c %sumfpack_%s.c', 'umfpack_%s.%s', ... + 'umfpack_%s_%s.%s', rule, user {k}, user {k}, kind, obj, ... + umfdir, kk, details) ; end end for k = 1:length(generic) - M = make (M, '%s -c %sumfpack_%s.c', 'umfpack_%s.%s', ... - 'umfpack_%s_%s.%s', mx, generic {k}, generic {k}, 'm', obj, umfdir) ; + [M, kk] = make (M, '%s -c %sumfpack_%s.c', 'umfpack_%s.%s', ... + 'umfpack_%s_%s.%s', mx, generic {k}, generic {k}, 'm', obj, ... + umfdir, kk, details) ; end %---------------------------------------- % AMD routines (int only) %---------------------------------------- -for k = 1:length(amd) - M = make (M, '%s -DDINT -c %samd_%s.c', 'amd_%s.%s', 'amd_%s_%s.%s', ... - mx, amd {k}, amd {k}, 'm', obj, amddir) ; +for k = 1:length(amdsrc) + [M, kk] = make (M, '%s -DDLONG -c %samd_%s.c', 'amd_%s.%s', ... + 'amd_%s_%s.%s', mx, amdsrc {k}, amdsrc {k}, 'm', obj, amddir, ... + kk, details) ; end %---------------------------------------- -% compile the umfpack mexFunction +% compile the umfpack2 mexFunction %---------------------------------------- -C = sprintf ('%s -output umfpack umfpackmex.c', mx) ; +C = sprintf ('%s -output umfpack2 umfpackmex.c', mx) ; for i = 1:length (M) - C = [C ' ' (M {i})] ; + C = [C ' ' (M {i})] ; %#ok end -C = [C ' ' blas_lib] ; -cmd (C) ; +C = [C ' ' lapack] ; +kk = cmd (C, kk, details) ; %---------------------------------------- % delete the object files @@ -301,56 +244,83 @@ end % compile the luflop mexFunction %---------------------------------------- -cmd (sprintf ('%s -output luflop luflopmex.c', mx)) ; +cmd (sprintf ('%s -output luflop luflopmex.c', mx), kk, details) ; + +fprintf ('\nUMFPACK successfully compiled\n') ; + +%=============================================================================== +% end of umfpack_make +%=============================================================================== -fprintf ('\n\nCompilation has completed. Now trying the umfpack_simple demo.\n'); -umfpack_simple -%------------------------------------------------------------------------------- -% rmfile: delete a file, but only if it exists %------------------------------------------------------------------------------- function rmfile (file) -if (length (dir (file)) > 0) +% rmfile: delete a file, but only if it exists +if (length (dir (file)) > 0) %#ok delete (file) ; end -%------------------------------------------------------------------------------- -% cpfile: copy the src file to the filename dst, overwriting dst if it exists %------------------------------------------------------------------------------- function cpfile (src, dst) +% cpfile: copy the src file to the filename dst, overwriting dst if it exists rmfile (dst) -if (length (dir (src)) == 0) - help umfpack_make - error (sprintf ('File does not exist: %s\n', src)) ; +if (length (dir (src)) == 0) %#ok + fprintf ('File does not exist: %s\n', src) ; + error ('File does not exist') ; end copyfile (src, dst) ; -%------------------------------------------------------------------------------- -% mvfile: move the src file to the filename dst, overwriting dst if it exists %------------------------------------------------------------------------------- function mvfile (src, dst) +% mvfile: move the src file to the filename dst, overwriting dst if it exists cpfile (src, dst) ; rmfile (src) ; -%------------------------------------------------------------------------------- -% cmd: display and execute a command %------------------------------------------------------------------------------- -function cmd (s) -fprintf ('.') ; +function kk = cmd (s, kk, details) +%CMD: evaluate a command, and either print it or print a "." +if (details) + fprintf ('%s\n', s) ; +else + if (mod (kk, 60) == 0) + fprintf ('\n') ; + end + kk = kk + 1 ; + fprintf ('.') ; +end eval (s) ; -%------------------------------------------------------------------------------- -% make: execute a "make" command for a source file %------------------------------------------------------------------------------- -function M = make (M, s, src, dst, rule, file1, file2, kind, obj, srcdir) -cmd (sprintf (s, rule, srcdir, file1)) ; +function [M, kk] = make (M, s, src, dst, rule, file1, file2, kind, obj, ... + srcdir, kk, details) +% make: execute a "make" command for a source file +kk = cmd (sprintf (s, rule, srcdir, file1), kk, details) ; src = sprintf (src, file1, obj) ; dst = sprintf (dst, kind, file2, obj) ; mvfile (src, dst) ; M {end + 1} = dst ; + +%------------------------------------------------------------------------------- +function [v,pc] = getversion +% determine the MATLAB version, and return it as a double. +% only the primary and secondary version numbers are kept. +% MATLAB 7.0.4 becomes 7.0, version 6.5.2 becomes 6.5, etc. +v = version ; +t = find (v == '.') ; +if (length (t) > 1) + v = v (1:(t(2)-1)) ; +end +v = str2double (v) ; +try + % ispc does not appear in MATLAB 5.3 + pc = ispc ; +catch + % if ispc fails, assume we are on a Windows PC if it's not unix + pc = ~isunix ; +end diff --git a/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_report.m b/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_report.m index 16a85d9437..627b394698 100644 --- a/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_report.m +++ b/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_report.m @@ -1,10 +1,11 @@ function umfpack_report (Control, Info) -% UMFPACK_REPORT +%UMFPACK_REPORT prints optional control settings and statistics % +% Example: % umfpack_report (Control, Info) ; % -% Prints the current Control settings for umfpack, and the statistical -% information returned by umfpack in the Info array. If Control is +% Prints the current Control settings for umfpack2, and the statistical +% information returned by umfpack2 in the Info array. If Control is % an empty matrix, then the default control settings are printed. % % Control is 20-by-1, and Info is 90-by-1. Not all entries are used. @@ -17,11 +18,10 @@ function umfpack_report (Control, Info) % umfpack_report ; print the default control parameters % and an empty Info array. % -% See also umfpack, umfpack_make, umfpack_details, +% See also umfpack, umfpack2, umfpack_make, umfpack_details, % umfpack_demo, and umfpack_simple. -% UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. -% All Rights Reserved. Type umfpack_details for License. +% Copyright 1995-2007 by Timothy A. Davis. %------------------------------------------------------------------------------- % get inputs, use defaults if input arguments not present @@ -35,7 +35,7 @@ if (nargin < 2) Info = [] ; end if (isempty (Control)) - Control = umfpack ; + Control = umfpack2 ; end if (isempty (Info)) Info = [ 0 (-ones (1, 89)) ] ; @@ -45,7 +45,7 @@ end % control settings %------------------------------------------------------------------------------- -fprintf ('\nUMFPACK Version 4.4: Control settings:\n\n') ; +fprintf ('\nUMFPACK: 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)) ; @@ -102,12 +102,8 @@ if (Control (10) == 1) fprintf (' Control (10): compiled for MATLAB\n') ; elseif (Control (10) == 2) fprintf (' Control (10): compiled for MATLAB\n') ; - fprintf (' Uses internal utMalloc, utFree, utRealloc, utPrintf\n') ; - fprintf (' utDivideComplex, and utFdlibm_hypot routines.\n') ; else fprintf (' Control (10): not compiled for MATLAB\n') ; - fprintf (' Uses ANSI C malloc, free, realloc, and printf\n') ; - fprintf (' instead of mxMalloc, mxFree, mxRealloc, and mexPrintf.\n') ; fprintf (' Printing will be in terms of 0-based matrix indexing,\n') ; fprintf (' not 1-based as is expected in MATLAB. Diary output may\n') ; fprintf (' not be properly recorded.\n') ; @@ -127,13 +123,6 @@ if (Control (12) == 1) fprintf (' ###########################################\n') ; fprintf (' ### This will be exceedingly slow! ########\n') ; fprintf (' ###########################################\n') ; - if (Control (10) == 1) - fprintf (' Uses mxAssert.\n') ; - elseif (Control (10) == 2) - fprintf (' Uses utAssert.\n') ; - else - fprintf (' Uses ANSI C assert instead of mxAssert.\n') ; - end else fprintf (' Control (12): compiled for normal operation (no debugging)\n') ; end @@ -163,7 +152,7 @@ elseif (status == -5) fprintf ('ERROR required argument is missing\n') ; elseif (status == -6) fprintf ('ERROR n <= 0\n') ; -elseif (status <= -7 & status >= -12 | status == -14) +elseif (status <= -7 & status >= -12 | status == -14) %#ok fprintf ('ERROR matrix A is corrupted\n') ; elseif (status == -13) fprintf ('ERROR invalid system\n') ; @@ -184,7 +173,7 @@ fprintf (' Info (17): %d, # of columns of A\n', Info (17)) ; fprintf (' Info (3): %d, nnz (A)\n', Info (3)) ; fprintf (' Info (4): %d, Unit size, in bytes, for memory usage reported below\n', Info (4)) ; fprintf (' Info (5): %d, size of int (in bytes)\n', Info (5)) ; -fprintf (' Info (6): %d, size of long (in bytes)\n', Info (6)) ; +fprintf (' Info (6): %d, size of UF_long (in bytes)\n', Info (6)) ; fprintf (' Info (7): %d, size of pointer (in bytes)\n', Info (7)) ; fprintf (' Info (8): %d, size of numerical entry (in bytes)\n', Info (8)) ; @@ -192,7 +181,7 @@ fprintf ('\n Pivots with zero Markowitz cost removed to obtain submatrix S:\n') fprintf (' Info (57): %d, # of pivots with one entry in pivot column\n', Info (57)) ; fprintf (' Info (58): %d, # of pivots with one entry in pivot row\n', Info (58)) ; fprintf (' Info (59): %d, # of rows/columns in submatrix S (if square)\n', Info (59)) ; -fprintf (' Info (60): %d ') ; +fprintf (' Info (60): ') ; if (Info (60) > 0) fprintf ('submatrix S square and diagonal preserved\n') ; elseif (Info (60) == 0) @@ -279,7 +268,7 @@ fprintf (' Info (64): %d, integer indices in compressed pattern of L and U\n' fprintf (' Info (65): %d, numerical values stored in L and U\n', Info (65)) ; fprintf (' Info (66): %.2f, numeric factorization CPU time (seconds)\n', Info (66)) ; fprintf (' Info (76): %.2f, numeric factorization wall clock time (seconds)\n', Info (76)) ; -if (Info (66) > 0.05 & Info (43) > 0) +if (Info (66) > 0.05 & Info (43) > 0) %#ok fprintf (' mflops in numeric factorization phase: %.2f\n', 1e-6 * Info (43) / Info (66)) ; end fprintf (' Info (67): %d, nnz (diag (U))\n', Info (67)) ; @@ -317,6 +306,7 @@ fprintf ('\n Info (88:90): unused\n\n') ; %------------------------------------------------------------------------------- function prstrat (fmt, strategy) +% prstrat print the ordering strategy fprintf (fmt, strategy) ; if (strategy == 1) fprintf ('(unsymmetric)\n') ; @@ -332,13 +322,14 @@ elseif (strategy == 3) fprintf (' Q = AMD (A+A''), Q not refined during numeric factorization,\n') ; fprintf (' and diagonal pivoting (P=Q'') attempted.\n') ; else - strategy = 0 ; + % strategy = 0 ; fprintf ('(auto)\n') ; end %------------------------------------------------------------------------------- function yes_no (s) +% yes_no print yes or no if (s == 0) fprintf ('(no)\n') ; else diff --git a/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_simple.m b/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_simple.m index 83a636aabe..b9a5dbc2e6 100644 --- a/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_simple.m +++ b/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_simple.m @@ -1,36 +1,24 @@ -% umfpack_simple: a simple demo of UMFPACK +%UMFPACK_SIMPLE a simple demo % -% UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. -% All Rights Reserved. Type umfpack_details for License. +% Example: +% umfpack_simple +% +% Copyright 1995-2007 by Timothy A. Davis. % % 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 -% uses UMFPACK or any modified version of UMFPACK code must cite the -% Copyright, this License, the Availability note, and "Used by permission." -% Permission to modify the code and to distribute modified code is granted, -% provided the Copyright, this License, and the Availability note are -% 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. -% +% UMFPACK implies that you agree to this License. UMFPACK is +% is free software; you can redistribute it and/or +% modify it under the terms of the GNU Lesser General Public +% License as published by the Free Software Foundation; either +% version 2.1 of the License, or (at your option) any later version. + % Availability: http://www.cise.ufl.edu/research/sparse/umfpack % -% See also: umfpack, umfpack_details +% See also: umfpack, umfpack2, umfpack_details help umfpack_simple -i = input ('Hit enter to agree to the above License: ', 's') ; -if (~isempty (i)) - error ('terminating') ; -end format short @@ -40,21 +28,25 @@ A = [ 0 -1 -3 2 0 0 0 1 0 0 0 4 2 0 1 -] +] ; +fprintf ('A = \n') ; disp (A) ; A = sparse (A) ; -b = [8 45 -3 3 19]' +b = [8 45 -3 3 19]' ; +fprintf ('b = \n') ; disp (b) ; fprintf ('Solution to Ax=b via UMFPACK:\n') ; -fprintf ('x1 = umfpack (A, ''\\'', b)\n') ; +fprintf ('x1 = umfpack2 (A, ''\\'', b)\n') ; -x1 = umfpack (A, '\', b) +x1 = umfpack2 (A, '\', b) ; +fprintf ('x1 = \n') ; disp (x1) ; fprintf ('Solution to Ax=b via MATLAB:\n') ; fprintf ('x2 = A\\b\n') ; -x2 = A\b +x2 = A\b ; +fprintf ('x2 = \n') ; disp (x2) ; fprintf ('norm (x1-x2) should be small: %g\n', norm (x1-x2)) ; 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 90349e61b9..11d5639776 100644 --- a/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_simple.m.out +++ b/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_simple.m.out @@ -1,75 +1,48 @@ ->> umfpack_simple - umfpack_simple: a simple demo of UMFPACK +umfpack_simple + UMFPACK_SIMPLE a simple demo - UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. - All Rights Reserved. Type umfpack_details for License. + Example: + umfpack_simple + + Copyright 1995-2007 by Timothy A. Davis. 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 - uses UMFPACK or any modified version of UMFPACK code must cite the - Copyright, this License, the Availability note, and "Used by permission." - Permission to modify the code and to distribute modified code is granted, - provided the Copyright, this License, and the Availability note are - 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 = + UMFPACK implies that you agree to this License. UMFPACK is + is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. +A = 2 3 0 0 0 3 0 4 0 6 0 -1 -3 2 0 0 0 1 0 0 0 4 2 0 1 - - -b = - +b = 8 45 -3 3 19 - Solution to Ax=b via UMFPACK: -x1 = umfpack (A, '\', b) - -x1 = - +x1 = umfpack2 (A, '\', b) +x1 = 1.0000 2.0000 3.0000 4.0000 5.0000 - Solution to Ax=b via MATLAB: x2 = A\b - -x2 = - +x2 = 1.0000 2.0000 3.0000 4.0000 5.0000 - norm (x1-x2) should be small: 1.28037e-15 Type 'umfpack_demo' for a full demo of UMFPACK ->> diary off +diary off diff --git a/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_solve.m b/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_solve.m index 56bf6c4fde..c30ae58028 100644 --- a/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_solve.m +++ b/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_solve.m @@ -1,17 +1,17 @@ function x = umfpack_solve (arg1, op, arg2, Control) -% UMFPACK_SOLVE +%UMFPACK_SOLVE x = A\b or x = b/A % -% x = umfpack_solve (A, '\', b, Control) -% x = umfpack_solve (b, '/', A, Control) +% Example: +% x = umfpack_solve (A, '\', b, Control) +% x = umfpack_solve (b, '/', A, Control) % % Computes x = A\b, or b/A, where A is square. Uses UMFPACK if A is sparse. % The Control argument is optional. % -% See also umfpack, umfpack_make, umfpack_details, umfpack_report, +% See also umfpack, umfpack2, umfpack_make, umfpack_details, umfpack_report, % and umfpack_simple. -% UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. -% All Rights Reserved. Type umfpack_details for License. +% Copyright 1995-2007 by Timothy A. Davis. %------------------------------------------------------------------------------- % check inputs and get default control parameters @@ -35,13 +35,13 @@ if (m ~= n) end [m1 n1] = size (b) ; -if ((op == '\' & n ~= m1) | (op == '/' & n1 ~= m)) +if ((op == '\' & n ~= m1) | (op == '/' & n1 ~= m)) %#ok help umfpack_solve error ('umfpack_solve: b has the wrong dimensions') ; end if (nargin < 4) - Control = umfpack ; + Control = umfpack2 ; end %------------------------------------------------------------------------------- @@ -55,15 +55,15 @@ if (op == '\') % A is not sparse, so just use MATLAB x = A\b ; - elseif (n1 == 1 & ~issparse (b)) + elseif (n1 == 1 & ~issparse (b)) %#ok % the UMFPACK '\' requires b to be a dense column vector - x = umfpack (A, '\', b, Control) ; + x = umfpack2 (A, '\', b, Control) ; else % factorize with UMFPACK and do the forward/back solves in MATLAB - [L, U, P, Q, R] = umfpack (A, Control) ; + [L, U, P, Q, R] = umfpack2 (A, Control) ; x = Q * (U \ (L \ (P * (R \ b)))) ; end @@ -75,20 +75,20 @@ else % A is not sparse, so just use MATLAB x = b/A ; - elseif (m1 == 1 & ~issparse (b)) + elseif (m1 == 1 & ~issparse (b)) %#ok % the UMFPACK '\' requires b to be a dense column vector - x = umfpack (b, '/', A, Control) ; + x = umfpack2 (b, '/', A, Control) ; else % factorize with UMFPACK and do the forward/back solves in MATLAB % this mimics the behavior of x = b/A, except for the row scaling - [L, U, P, Q, R] = umfpack (A.', Control) ; + [L, U, P, Q, R] = umfpack2 (A.', Control) ; x = (Q * (U \ (L \ (P * (R \ (b.')))))).' ; % an alternative method: - % [L, U, P, Q, r] = umfpack (A, Control) ; + % [L, U, P, Q, r] = umfpack2 (A, Control) ; % x = (R \ (P' * (L.' \ (U.' \ (Q' * b.'))))).' ; end diff --git a/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_test.m b/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_test.m index 3805a63ab8..94c5516520 100644 --- a/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_test.m +++ b/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpack_test.m @@ -1,9 +1,10 @@ -% 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_TEST for testing umfpack2 (requires UFget) % -% UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. -% All Rights Reserved. Type umfpack_details for License. +% Example: +% umfpack_test +% See also umfpack2 + +% Copyright 1995-2007 by Timothy A. Davis. index = UFget ; @@ -11,10 +12,9 @@ f = find (index.nrows == index.ncols) ; [ignore, i] = sort (index.nrows (f)) ; f = f (i) ; -Control = umfpack ; +Control = umfpack2 ; Control (1) = 0 ; -warning ('off', 'all') ; figure (1) clf @@ -36,7 +36,7 @@ for i = f % symbolic factorization %----------------------------------------------------------------------- - [P1, Q1, Fr, Ch, Info] = umfpack (A, 'symbolic') ; + [P1, Q1, Fr, Ch, Info] = umfpack2 (A, 'symbolic') ; subplot (2,2,1) spy (A) title ('A') @@ -49,7 +49,7 @@ for i = f % P(R\A)Q = LU %----------------------------------------------------------------------- - [L,U,P,Q,R,Info] = umfpack (A) ; + [L,U,P,Q,R,Info] = umfpack2 (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)) ; @@ -79,7 +79,7 @@ for i = f % PAQ = LU %----------------------------------------------------------------------- - [L,U,P,Q] = umfpack (A) ; + [L,U,P,Q] = umfpack2 (A) ; err = lu_normest (P*A*Q, L, U) ; fprintf ('norm est PAQ-LU: %g relative: %g\n', ... err, err / norm (A,1)) ; @@ -95,7 +95,7 @@ for i = f % factor the transpose Control (8) = 2 ; - [x, info] = umfpack (A', '\', c, Control) ; + [x, info] = umfpack2 (A', '\', c, Control) ; lunz0 = info (44) + info (45) - info (67) ; r = norm (A'*x-c) ; @@ -104,7 +104,7 @@ for i = f % factor the original matrix and solve xA=b for ir = 0:4 Control (8) = ir ; - [x, info] = umfpack (b, '/', A, Control) ; + [x, info] = umfpack2 (b, '/', A, Control) ; r = norm (b-x*A) ; if (ir == 0) lunz1 = info (44) + info (45) - info (67) ; @@ -115,12 +115,13 @@ for i = f % factor the original matrix and solve Ax=b for ir = 0:4 Control (8) = ir ; - [x, info] = umfpack (A, '\', c, Control) ; + [x, info] = umfpack2 (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', ... + fprintf (... + 'lunz trans %12d no trans: %12d trans/notrans: %10.4f\n', ... lunz0, lunz1, lunz0 / lunz1) ; %----------------------------------------------------------------------- @@ -128,8 +129,8 @@ for i = f %----------------------------------------------------------------------- det1 = det (A) ; - det2 = umfpack (A, 'det') ; - [det3 dexp3] = umfpack (A, 'det') ; + det2 = umfpack2 (A, 'det') ; + [det3 dexp3] = umfpack2 (A, 'det') ; err = abs (det1-det2) ; err3 = abs (det1 - (det3 * 10^dexp3)) ; denom = det1 ; @@ -138,15 +139,15 @@ for i = f 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 ('det: %20.12e + (%20.12e)i MATLAB\n', ... + real(det1), imag(det1)) ; + fprintf ('det: %20.12e + (%20.12e)i umfpack2\n', ... + real(det2), imag(det2)) ; + fprintf ('det: (%20.12e + (%20.12e)i) * 10^(%g) umfpack2\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 23dad00431..13f2e66d69 100644 --- a/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpackmex.c +++ b/deal.II/contrib/umfpack/UMFPACK/MATLAB/umfpackmex.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -61,9 +61,13 @@ 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. + + v5.1: port to 64-bit MATLAB */ + #define NO_TRANSPOSE_FORWARD_SLASH /* default has changed for v4.3.1 */ +#include "UFconfig.h" #include "umfpack.h" #include "mex.h" #include "matrix.h" @@ -90,35 +94,35 @@ static void error ( char *s, - int A_is_complex, + UF_long A_is_complex, int nargout, mxArray *pargout [ ], double Control [UMFPACK_CONTROL], double Info [UMFPACK_INFO], - int status, - int do_info + UF_long status, + UF_long do_info ) { - int i ; - double *OutInfo ; + UF_long i ; + double *Out_Info ; if (A_is_complex) { - umfpack_zi_report_status (Control, status) ; - umfpack_zi_report_info (Control, Info) ; + umfpack_zl_report_status (Control, status) ; + umfpack_zl_report_info (Control, Info) ; } else { - umfpack_di_report_status (Control, status) ; - umfpack_di_report_info (Control, Info) ; + umfpack_dl_report_status (Control, status) ; + umfpack_dl_report_info (Control, Info) ; } if (do_info > 0) { /* return Info */ pargout [do_info] = mxCreateDoubleMatrix (1, UMFPACK_INFO, mxREAL) ; - OutInfo = mxGetPr (pargout [do_info]) ; + Out_Info = mxGetPr (pargout [do_info]) ; for (i = 0 ; i < UMFPACK_INFO ; i++) { - OutInfo [i] = Info [i] ; + Out_Info [i] = Info [i] ; } } mexErrMsgTxt (s) ; @@ -144,9 +148,9 @@ void mexFunction 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 ; + *p, *q, *Out_Info, *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, + UF_long *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, *Front_parent, *Chain_start, *Chain_maxrows, *Chain_maxcols, nz, status, nfronts, nchains, *Ltp, *Ltj, *Qinit, print_level, status2, no_scale, @@ -159,10 +163,28 @@ void mexFunction char warning [200] ; #ifndef NO_TRANSPOSE_FORWARD_SLASH - int *Cp, *Ci ; + UF_long *Cp, *Ci ; double *Cx, *Cz ; #endif + /* ---------------------------------------------------------------------- */ + /* define the memory manager and printf functions for UMFPACK and AMD */ + /* ---------------------------------------------------------------------- */ + + /* with these settings, the UMFPACK mexFunction can use ../Lib/libumfpack.a + * and ../Lib/libamd.a, instead compiling UMFPACK and AMD specifically for + * the MATLAB mexFunction. */ + amd_malloc = mxMalloc ; + amd_free = mxFree ; + amd_calloc = mxCalloc ; + amd_realloc = mxRealloc ; + amd_printf = mexPrintf ; + + /* The default values for these function pointers are fine. + umfpack_hypot = umf_hypot ; + umfpack_divcomplex = umf_divcomplex ; + */ + /* ---------------------------------------------------------------------- */ /* get inputs A, b, and the operation to perform */ /* ---------------------------------------------------------------------- */ @@ -414,7 +436,7 @@ void mexFunction pargout [0] = mxCreateDoubleMatrix (UMFPACK_CONTROL, 1, mxREAL) ; User_Control = mxGetPr (pargout [0]) ; - umfpack_di_defaults (User_Control) ; + umfpack_dl_defaults (User_Control) ; return ; } @@ -445,11 +467,11 @@ void mexFunction } /* The real/complex status of A determines which version to use, */ - /* (umfpack_di_* or umfpack_zi_*). */ + /* (umfpack_dl_* or umfpack_zl_*). */ A_is_complex = mxIsComplex (Amatrix) ; Atype = A_is_complex ? mxCOMPLEX : mxREAL ; - Ap = mxGetJc (Amatrix) ; - Ai = mxGetIr (Amatrix) ; + Ap = (UF_long *) mxGetJc (Amatrix) ; + Ai = (UF_long *) mxGetIr (Amatrix) ; Ax = mxGetPr (Amatrix) ; Az = mxGetPi (Amatrix) ; @@ -501,11 +523,11 @@ void mexFunction if (A_is_complex) { - umfpack_zi_defaults (Control) ; + umfpack_zl_defaults (Control) ; } else { - umfpack_di_defaults (Control) ; + umfpack_dl_defaults (Control) ; } if (User_Control_matrix) { @@ -537,7 +559,7 @@ void mexFunction } else { - print_level = (int) Control [UMFPACK_PRL] ; + print_level = (UF_long) Control [UMFPACK_PRL] ; } Control [UMFPACK_PRL] = print_level ; @@ -568,12 +590,12 @@ void mexFunction { mexErrMsgTxt ("input Qinit must be dense") ; } - Qinit = (int *) mxMalloc (n_col * sizeof (int)) ; + Qinit = (UF_long *) mxMalloc (n_col * sizeof (UF_long)) ; p = mxGetPr (User_Qinit) ; for (k = 0 ; k < n_col ; k++) { /* convert from 1-based to 0-based indexing */ - Qinit [k] = ((int) (p [k])) - 1 ; + Qinit [k] = ((UF_long) (p [k])) - 1 ; } } @@ -581,7 +603,7 @@ void mexFunction { /* umfpack_*_qsymbolic will call colamd to get Qinit. This is the */ /* same as calling umfpack_*_symbolic with Qinit set to NULL*/ - Qinit = (int *) NULL ; + Qinit = (UF_long *) NULL ; } /* ---------------------------------------------------------------------- */ @@ -596,26 +618,26 @@ void mexFunction if (A_is_complex) { - umfpack_zi_report_control (Control) ; + umfpack_zl_report_control (Control) ; if (print_level >= 3) mexPrintf ("\nA: ") ; - (void) umfpack_zi_report_matrix (n_row, n_col, Ap, Ai, Ax, Az, + (void) umfpack_zl_report_matrix (n_row, n_col, Ap, Ai, Ax, Az, 1, Control) ; if (Qinit) { if (print_level >= 3) mexPrintf ("\nQinit: ") ; - (void) umfpack_zi_report_perm (n_col, Qinit, Control) ; + (void) umfpack_zl_report_perm (n_col, Qinit, Control) ; } } else { - umfpack_di_report_control (Control) ; + umfpack_dl_report_control (Control) ; if (print_level >= 3) mexPrintf ("\nA: ") ; - (void) umfpack_di_report_matrix (n_row, n_col, Ap, Ai, Ax, + (void) umfpack_dl_report_matrix (n_row, n_col, Ap, Ai, Ax, 1, Control) ; if (Qinit) { if (print_level >= 3) mexPrintf ("\nQinit: ") ; - (void) umfpack_di_report_perm (n_col, Qinit, Control) ; + (void) umfpack_dl_report_perm (n_col, Qinit, Control) ; } } @@ -632,19 +654,19 @@ void mexFunction /* make sure Ci and Cx exist, avoid malloc of zero-sized arrays. */ nz = MAX (Ap [nn], 1) ; - Cp = (int *) mxMalloc ((nn+1) * sizeof (int)) ; - Ci = (int *) mxMalloc (nz * sizeof (int)) ; + Cp = (UF_long *) mxMalloc ((nn+1) * sizeof (UF_long)) ; + Ci = (UF_long *) mxMalloc (nz * sizeof (UF_long)) ; Cx = (double *) mxMalloc (nz * sizeof (double)) ; if (A_is_complex) { Cz = (double *) mxMalloc (nz * sizeof (double)) ; - status = umfpack_zi_transpose (nn, nn, Ap, Ai, Ax, Az, - (int *) NULL, (int *) NULL, Cp, Ci, Cx, Cz, FALSE) ; + status = umfpack_zl_transpose (nn, nn, Ap, Ai, Ax, Az, + (UF_long *) NULL, (UF_long *) NULL, Cp, Ci, Cx, Cz, FALSE) ; } else { - status = umfpack_di_transpose (nn, nn, Ap, Ai, Ax, - (int *) NULL, (int *) NULL, Cp, Ci, Cx) ; + status = umfpack_dl_transpose (nn, nn, Ap, Ai, Ax, + (UF_long *) NULL, (UF_long *) NULL, Cp, Ci, Cx) ; } if (status != UMFPACK_OK) @@ -671,12 +693,12 @@ void mexFunction if (A_is_complex) { - status = umfpack_zi_qsymbolic (n_row, n_col, Ap, Ai, Ax, Az, + status = umfpack_zl_qsymbolic (n_row, n_col, Ap, Ai, Ax, Az, Qinit, &Symbolic, Control, Info) ; } else { - status = umfpack_di_qsymbolic (n_row, n_col, Ap, Ai, Ax, + status = umfpack_dl_qsymbolic (n_row, n_col, Ap, Ai, Ax, Qinit, &Symbolic, Control, Info) ; } @@ -698,11 +720,11 @@ void mexFunction if (A_is_complex) { - (void) umfpack_zi_report_symbolic (Symbolic, Control) ; + (void) umfpack_zl_report_symbolic (Symbolic, Control) ; } else { - (void) umfpack_di_report_symbolic (Symbolic, Control) ; + (void) umfpack_dl_report_symbolic (Symbolic, Control) ; } /* ---------------------------------------------------------------------- */ @@ -718,12 +740,12 @@ void mexFunction if (A_is_complex) { - status = umfpack_zi_numeric (Ap, Ai, Ax, Az, Symbolic, &Numeric, + status = umfpack_zl_numeric (Ap, Ai, Ax, Az, Symbolic, &Numeric, Control, Info) ; } else { - status = umfpack_di_numeric (Ap, Ai, Ax, Symbolic, &Numeric, + status = umfpack_dl_numeric (Ap, Ai, Ax, Symbolic, &Numeric, Control, Info) ; } @@ -733,11 +755,11 @@ void mexFunction if (A_is_complex) { - umfpack_zi_free_symbolic (&Symbolic) ; + umfpack_zl_free_symbolic (&Symbolic) ; } else { - umfpack_di_free_symbolic (&Symbolic) ; + umfpack_dl_free_symbolic (&Symbolic) ; } /* ------------------------------------------------------------------ */ @@ -753,11 +775,11 @@ void mexFunction if (A_is_complex) { - (void) umfpack_zi_report_numeric (Numeric, Control) ; + (void) umfpack_zl_report_numeric (Numeric, Control) ; } else { - (void) umfpack_di_report_numeric (Numeric, Control) ; + (void) umfpack_dl_report_numeric (Numeric, Control) ; } /* ------------------------------------------------------------------ */ @@ -813,11 +835,11 @@ void mexFunction if (print_level >= 3) mexPrintf ("\nright-hand side, b: ") ; if (B_is_complex) { - (void) umfpack_zi_report_vector (nn, Bx, Bz, Control) ; + (void) umfpack_zl_report_vector (nn, Bx, Bz, Control) ; } else { - (void) umfpack_di_report_vector (nn, Bx, Control) ; + (void) umfpack_dl_report_vector (nn, Bx, Control) ; } /* -------------------------------------------------------------- */ @@ -832,10 +854,10 @@ void mexFunction { if (!B_is_complex) { - /* umfpack_zi_solve expects a complex B */ + /* umfpack_zl_solve expects a complex B */ Bz = (double *) mxCalloc (nn, sizeof (double)) ; } - status = umfpack_zi_solve (sys, Ap, Ai, Ax, Az, Xx, Xz, Bx, Bz, + status = umfpack_zl_solve (sys, Ap, Ai, Ax, Az, Xx, Xz, Bx, Bz, Numeric, Control, Info) ; if (!B_is_complex) { @@ -849,10 +871,10 @@ void mexFunction /* Ax=b when b is complex and A is sparse can be split */ /* into two systems, A*xr=br and A*xi=bi, where r denotes */ /* the real part and i the imaginary part of x and b. */ - status2 = umfpack_di_solve (sys, Ap, Ai, Ax, Xz, Bz, + status2 = umfpack_dl_solve (sys, Ap, Ai, Ax, Xz, Bz, Numeric, Control, Info) ; } - status = umfpack_di_solve (sys, Ap, Ai, Ax, Xx, Bx, + status = umfpack_dl_solve (sys, Ap, Ai, Ax, Xx, Bx, Numeric, Control, Info) ; } @@ -879,11 +901,11 @@ void mexFunction if (A_is_complex) { - umfpack_zi_free_numeric (&Numeric) ; + umfpack_zl_free_numeric (&Numeric) ; } else { - umfpack_di_free_numeric (&Numeric) ; + umfpack_dl_free_numeric (&Numeric) ; } /* -------------------------------------------------------------- */ @@ -905,11 +927,11 @@ void mexFunction if (print_level >= 3) mexPrintf ("\nsolution, x: ") ; if (X_is_complex) { - (void) umfpack_zi_report_vector (nn, Xx, Xz, Control) ; + (void) umfpack_zl_report_vector (nn, Xx, Xz, Control) ; } else { - (void) umfpack_di_report_vector (nn, Xx, Control) ; + (void) umfpack_dl_report_vector (nn, Xx, Control) ; } /* -------------------------------------------------------------- */ @@ -966,15 +988,15 @@ void mexFunction } if (A_is_complex) { - status = umfpack_zi_get_determinant (&dx, &dz, p, + status = umfpack_zl_get_determinant (&dx, &dz, p, Numeric, Info) ; - umfpack_zi_free_numeric (&Numeric) ; + umfpack_zl_free_numeric (&Numeric) ; } else { - status = umfpack_di_get_determinant (&dx, p, + status = umfpack_dl_get_determinant (&dx, p, Numeric, Info) ; - umfpack_di_free_numeric (&Numeric) ; + umfpack_dl_free_numeric (&Numeric) ; dz = 0 ; } if (status < 0) @@ -1013,12 +1035,12 @@ void mexFunction if (A_is_complex) { - status = umfpack_zi_get_lunz (&lnz, &unz, &ignore1, &ignore2, + status = umfpack_zl_get_lunz (&lnz, &unz, &ignore1, &ignore2, &ignore3, Numeric) ; } else { - status = umfpack_di_get_lunz (&lnz, &unz, &ignore1, &ignore2, + status = umfpack_dl_get_lunz (&lnz, &unz, &ignore1, &ignore2, &ignore3, Numeric) ; } @@ -1026,11 +1048,11 @@ void mexFunction { if (A_is_complex) { - umfpack_zi_free_numeric (&Numeric) ; + umfpack_zl_free_numeric (&Numeric) ; } else { - umfpack_di_free_numeric (&Numeric) ; + umfpack_dl_free_numeric (&Numeric) ; } error ("extracting LU factors failed", A_is_complex, nargout, pargout, Control, Info, status, do_info) ; @@ -1042,8 +1064,8 @@ void mexFunction unz = MAX (unz, 1) ; /* get temporary space, for the *** ROW *** form of L */ - Ltp = (int *) mxMalloc ((n_row+1) * sizeof (int)) ; - Ltj = (int *) mxMalloc (lnz * sizeof (int)) ; + Ltp = (UF_long *) mxMalloc ((n_row+1) * sizeof (UF_long)) ; + Ltj = (UF_long *) mxMalloc (lnz * sizeof (UF_long)) ; Ltx = (double *) mxMalloc (lnz * sizeof (double)) ; if (A_is_complex) { @@ -1056,14 +1078,14 @@ void mexFunction /* create permanent copy of the output matrix U */ pargout [1] = mxCreateSparse (n_inner, n_col, unz, Atype) ; - Up = mxGetJc (pargout [1]) ; - Ui = mxGetIr (pargout [1]) ; + Up = (UF_long *) mxGetJc (pargout [1]) ; + Ui = (UF_long *) mxGetIr (pargout [1]) ; Ux = mxGetPr (pargout [1]) ; Uz = mxGetPi (pargout [1]) ; /* temporary space for the integer permutation vectors */ - P = (int *) mxMalloc (n_row * sizeof (int)) ; - Q = (int *) mxMalloc (n_col * sizeof (int)) ; + P = (UF_long *) mxMalloc (n_row * sizeof (UF_long)) ; + Q = (UF_long *) mxMalloc (n_col * sizeof (UF_long)) ; /* get scale factors, if requested */ status2 = UMFPACK_OK ; @@ -1071,8 +1093,8 @@ void mexFunction { /* create a diagonal sparse matrix for the scale factors */ pargout [4] = mxCreateSparse (n_row, n_row, n_row, mxREAL) ; - Rp = mxGetJc (pargout [4]) ; - Ri = mxGetIr (pargout [4]) ; + Rp = (UF_long *) mxGetJc (pargout [4]) ; + Ri = (UF_long *) mxGetIr (pargout [4]) ; for (i = 0 ; i < n_row ; i++) { Rp [i] = i ; @@ -1089,17 +1111,17 @@ void mexFunction /* get Lt, U, P, Q, and Rs from the numeric object */ if (A_is_complex) { - status = umfpack_zi_get_numeric (Ltp, Ltj, Ltx, Ltz, Up, Ui, Ux, + status = umfpack_zl_get_numeric (Ltp, Ltj, Ltx, Ltz, Up, Ui, Ux, Uz, P, Q, (double *) NULL, (double *) NULL, &do_recip, Rs, Numeric) ; - umfpack_zi_free_numeric (&Numeric) ; + umfpack_zl_free_numeric (&Numeric) ; } else { - status = umfpack_di_get_numeric (Ltp, Ltj, Ltx, Up, Ui, + status = umfpack_dl_get_numeric (Ltp, Ltj, Ltx, Up, Ui, Ux, P, Q, (double *) NULL, &do_recip, Rs, Numeric) ; - umfpack_di_free_numeric (&Numeric) ; + umfpack_dl_free_numeric (&Numeric) ; } /* for the mexFunction, -DNRECIPROCAL must be set, @@ -1121,8 +1143,8 @@ void mexFunction /* create sparse permutation matrix for P */ pargout [2] = mxCreateSparse (n_row, n_row, n_row, mxREAL) ; - Pp = mxGetJc (pargout [2]) ; - Pi = mxGetIr (pargout [2]) ; + Pp = (UF_long *) mxGetJc (pargout [2]) ; + Pi = (UF_long *) mxGetIr (pargout [2]) ; Px = mxGetPr (pargout [2]) ; for (k = 0 ; k < n_row ; k++) { @@ -1134,8 +1156,8 @@ void mexFunction /* create sparse permutation matrix for Q */ pargout [3] = mxCreateSparse (n_col, n_col, n_col, mxREAL) ; - Qp = mxGetJc (pargout [3]) ; - Qi = mxGetIr (pargout [3]) ; + Qp = (UF_long *) mxGetJc (pargout [3]) ; + Qi = (UF_long *) mxGetIr (pargout [3]) ; Qx = mxGetPr (pargout [3]) ; for (k = 0 ; k < n_col ; k++) { @@ -1147,8 +1169,8 @@ void mexFunction /* permanent copy of L */ pargout [0] = mxCreateSparse (n_row, n_inner, lnz, Atype) ; - Lp = mxGetJc (pargout [0]) ; - Li = mxGetIr (pargout [0]) ; + Lp = (UF_long *) mxGetJc (pargout [0]) ; + Li = (UF_long *) mxGetIr (pargout [0]) ; Lx = mxGetPr (pargout [0]) ; Lz = mxGetPi (pargout [0]) ; @@ -1156,13 +1178,14 @@ void mexFunction if (A_is_complex) { /* non-conjugate array transpose */ - status = umfpack_zi_transpose (n_inner, n_row, Ltp, Ltj, Ltx, - Ltz, (int *) NULL, (int *) NULL, Lp, Li, Lx, Lz, FALSE) ; + status = umfpack_zl_transpose (n_inner, n_row, Ltp, Ltj, Ltx, + Ltz, (UF_long *) NULL, (UF_long *) NULL, Lp, Li, Lx, Lz, + FALSE) ; } else { - status = umfpack_di_transpose (n_inner, n_row, Ltp, Ltj, Ltx, - (int *) NULL, (int *) NULL, Lp, Li, Lx) ; + status = umfpack_dl_transpose (n_inner, n_row, Ltp, Ltj, Ltx, + (UF_long *) NULL, (UF_long *) NULL, Lp, Li, Lx) ; } mxFree (Ltp) ; @@ -1190,28 +1213,28 @@ void mexFunction if (A_is_complex) { if (print_level >= 3) mexPrintf ("\nL: ") ; - (void) umfpack_zi_report_matrix (n_row, n_inner, Lp, Li, + (void) umfpack_zl_report_matrix (n_row, n_inner, Lp, Li, Lx, Lz, 1, Control) ; if (print_level >= 3) mexPrintf ("\nU: ") ; - (void) umfpack_zi_report_matrix (n_inner, n_col, Up, Ui, + (void) umfpack_zl_report_matrix (n_inner, n_col, Up, Ui, Ux, Uz, 1, Control) ; if (print_level >= 3) mexPrintf ("\nP: ") ; - (void) umfpack_zi_report_perm (n_row, P, Control) ; + (void) umfpack_zl_report_perm (n_row, P, Control) ; if (print_level >= 3) mexPrintf ("\nQ: ") ; - (void) umfpack_zi_report_perm (n_col, Q, Control) ; + (void) umfpack_zl_report_perm (n_col, Q, Control) ; } else { if (print_level >= 3) mexPrintf ("\nL: ") ; - (void) umfpack_di_report_matrix (n_row, n_inner, Lp, Li, + (void) umfpack_dl_report_matrix (n_row, n_inner, Lp, Li, Lx, 1, Control) ; if (print_level >= 3) mexPrintf ("\nU: ") ; - (void) umfpack_di_report_matrix (n_inner, n_col, Up, Ui, + (void) umfpack_dl_report_matrix (n_inner, n_col, Up, Ui, Ux, 1, Control) ; if (print_level >= 3) mexPrintf ("\nP: ") ; - (void) umfpack_di_report_perm (n_row, P, Control) ; + (void) umfpack_dl_report_perm (n_row, P, Control) ; if (print_level >= 3) mexPrintf ("\nQ: ") ; - (void) umfpack_di_report_perm (n_col, Q, Control) ; + (void) umfpack_dl_report_perm (n_col, Q, Control) ; } mxFree (P) ; @@ -1227,31 +1250,31 @@ void mexFunction /* return the symbolic factorization */ /* ------------------------------------------------------------------ */ - Q = (int *) mxMalloc (n_col * sizeof (int)) ; - P = (int *) mxMalloc (n_row * sizeof (int)) ; - Front_npivcol = (int *) mxMalloc ((nn+1) * sizeof (int)) ; - Front_parent = (int *) mxMalloc ((nn+1) * sizeof (int)) ; - Front_1strow = (int *) mxMalloc ((nn+1) * sizeof (int)) ; - Front_leftmostdesc = (int *) mxMalloc ((nn+1) * sizeof (int)) ; - Chain_start = (int *) mxMalloc ((nn+1) * sizeof (int)) ; - Chain_maxrows = (int *) mxMalloc ((nn+1) * sizeof (int)) ; - Chain_maxcols = (int *) mxMalloc ((nn+1) * sizeof (int)) ; + Q = (UF_long *) mxMalloc (n_col * sizeof (UF_long)) ; + P = (UF_long *) mxMalloc (n_row * sizeof (UF_long)) ; + Front_npivcol = (UF_long *) mxMalloc ((nn+1) * sizeof (UF_long)) ; + Front_parent = (UF_long *) mxMalloc ((nn+1) * sizeof (UF_long)) ; + Front_1strow = (UF_long *) mxMalloc ((nn+1) * sizeof (UF_long)) ; + Front_leftmostdesc = (UF_long *) mxMalloc ((nn+1) * sizeof (UF_long)) ; + Chain_start = (UF_long *) mxMalloc ((nn+1) * sizeof (UF_long)) ; + Chain_maxrows = (UF_long *) mxMalloc ((nn+1) * sizeof (UF_long)) ; + Chain_maxcols = (UF_long *) mxMalloc ((nn+1) * sizeof (UF_long)) ; if (A_is_complex) { - status = umfpack_zi_get_symbolic (&ignore1, &ignore2, &ignore3, + status = umfpack_zl_get_symbolic (&ignore1, &ignore2, &ignore3, &nz, &nfronts, &nchains, P, Q, Front_npivcol, Front_parent, Front_1strow, Front_leftmostdesc, Chain_start, Chain_maxrows, Chain_maxcols, Symbolic) ; - umfpack_zi_free_symbolic (&Symbolic) ; + umfpack_zl_free_symbolic (&Symbolic) ; } else { - status = umfpack_di_get_symbolic (&ignore1, &ignore2, &ignore3, + status = umfpack_dl_get_symbolic (&ignore1, &ignore2, &ignore3, &nz, &nfronts, &nchains, P, Q, Front_npivcol, Front_parent, Front_1strow, Front_leftmostdesc, Chain_start, Chain_maxrows, Chain_maxcols, Symbolic) ; - umfpack_di_free_symbolic (&Symbolic) ; + umfpack_dl_free_symbolic (&Symbolic) ; } if (status < 0) @@ -1272,8 +1295,8 @@ void mexFunction /* create sparse permutation matrix for P */ pargout [0] = mxCreateSparse (n_row, n_row, n_row, mxREAL) ; - Pp = mxGetJc (pargout [0]) ; - Pi = mxGetIr (pargout [0]) ; + Pp = (UF_long *) mxGetJc (pargout [0]) ; + Pi = (UF_long *) mxGetIr (pargout [0]) ; Px = mxGetPr (pargout [0]) ; for (k = 0 ; k < n_row ; k++) { @@ -1285,8 +1308,8 @@ void mexFunction /* create sparse permutation matrix for Q */ pargout [1] = mxCreateSparse (n_col, n_col, n_col, mxREAL) ; - Qp = mxGetJc (pargout [1]) ; - Qi = mxGetIr (pargout [1]) ; + Qp = (UF_long *) mxGetJc (pargout [1]) ; + Qi = (UF_long *) mxGetIr (pargout [1]) ; Qx = mxGetPr (pargout [1]) ; for (k = 0 ; k < n_col ; k++) { @@ -1344,21 +1367,21 @@ void mexFunction if (A_is_complex) { - umfpack_zi_report_info (Control, Info) ; + umfpack_zl_report_info (Control, Info) ; } else { - umfpack_di_report_info (Control, Info) ; + umfpack_dl_report_info (Control, Info) ; } if (do_info > 0) { /* return Info */ pargout [do_info] = mxCreateDoubleMatrix (1, UMFPACK_INFO, mxREAL) ; - OutInfo = mxGetPr (pargout [do_info]) ; + Out_Info = mxGetPr (pargout [do_info]) ; for (i = 0 ; i < UMFPACK_INFO ; i++) { - OutInfo [i] = Info [i] ; + Out_Info [i] = Info [i] ; } } } diff --git a/deal.II/contrib/umfpack/UMFPACK/MATLAB/west.mat b/deal.II/contrib/umfpack/UMFPACK/MATLAB/west.mat new file mode 100644 index 0000000000..9110c2b309 Binary files /dev/null and b/deal.II/contrib/umfpack/UMFPACK/MATLAB/west.mat differ diff --git a/deal.II/contrib/umfpack/UMFPACK/MATLAB/west0067 b/deal.II/contrib/umfpack/UMFPACK/MATLAB/west0067 new file mode 100644 index 0000000000..572e5b3ad4 --- /dev/null +++ b/deal.II/contrib/umfpack/UMFPACK/MATLAB/west0067 @@ -0,0 +1,294 @@ + 5 1 -0.278842 + 6 1 -0.268019 + 7 1 -0.232372 + 8 1 -0.157508 + 9 1 -0.0632598 +25 1 0.139421 +26 1 0.134009 +27 1 0.116186 +28 1 0.0787541 +29 1 0.0316299 + 5 2 -0.8 +21 2 -0.915953 +25 2 0.4 +61 2 1 + 6 3 -0.8 +22 3 -0.915953 +26 3 0.4 +61 3 1 + 7 4 -0.8 +23 4 -0.915953 +27 4 0.4 +61 4 1 + 8 5 -0.8 +24 5 -0.915953 +28 5 0.4 +61 5 1 + 9 6 -0.8 +29 6 0.4 +61 6 1 + 5 7 0.134462 + 6 7 0.117568 + 7 7 0.0885926 + 8 7 0.0475944 + 9 7 0.0117829 + 1 8 -0.834182 + 5 8 0.4 +57 8 1 + 2 9 -0.834182 + 6 9 0.4 +57 9 1 + 3 10 -0.834182 + 7 10 0.4 +57 10 1 + 4 11 -0.834182 + 8 11 0.4 +57 11 1 + 9 12 0.4 +57 12 1 + 1 13 1.26582 + 5 13 0.4 +10 13 -1.26582 +11 13 0.333333 +58 13 1 + 2 14 1.01266 + 6 14 0.4 +10 14 -1.01266 +12 14 0.333333 +58 14 1 + 3 15 0.759494 + 7 15 0.4 +10 15 -0.759494 +13 15 0.333333 +58 15 1 + 4 16 0.506329 + 8 16 0.4 +10 16 -0.506329 +14 16 0.333333 +58 16 1 + 9 17 0.4 +10 17 -0.253165 +15 17 0.333333 +58 17 1 + 1 18 -0.336156 + 2 18 -0.29392 + 3 18 -0.221481 + 4 18 -0.118986 +10 18 1 +15 19 0.666667 +56 19 1 +11 20 -0.207176 +12 20 -0.214039 +13 20 -0.214421 +14 20 -0.198677 +15 20 -0.165687 +16 20 0.124305 +17 20 0.128423 +18 20 0.128652 +19 20 0.119206 +20 20 0.0994125 +11 21 -1 +16 21 0.6 +59 21 1 +12 22 -1 +17 22 0.6 +59 22 1 +13 23 -1 +18 23 0.6 +59 23 1 +14 24 -1 +19 24 0.6 +59 24 1 +15 25 -1 +20 25 0.6 +59 25 1 +16 26 0.45 +36 26 -0.958319 +40 26 0.5 +64 26 1 +17 27 0.45 +37 27 -0.958319 +41 27 0.5 +64 27 1 +18 28 0.45 +38 28 -0.958319 +42 28 0.5 +64 28 1 +19 29 0.45 +39 29 -0.958319 +43 29 0.5 +64 29 1 +20 30 0.45 +44 30 0.5 +64 30 1 +16 31 -0.207099 +17 31 -0.2233 +18 31 -0.228626 +19 31 -0.202453 +20 31 -0.138523 +25 31 -0.207099 +26 31 -0.2233 +27 31 -0.228626 +28 31 -0.202453 +29 31 -0.138523 +16 32 -1.05 +25 32 -1.05 +60 32 1 +17 33 -1.05 +26 33 -1.05 +60 33 1 +18 34 -1.05 +27 34 -1.05 +60 34 1 +19 35 -1.05 +28 35 -1.05 +60 35 1 +20 36 -1.05 +29 36 -1.05 +60 36 1 +25 37 0.0814745 +26 37 0.0978901 +27 37 0.113161 +28 37 0.115056 +29 37 0.0924191 +31 37 0.0905272 +32 37 0.108767 +33 37 0.125734 +34 37 0.127839 +35 37 0.102688 +21 38 1.5674 +25 38 0.65 +30 38 -1.5674 +31 38 0.722222 +62 38 1 +22 39 1.25392 +26 39 0.65 +30 39 -1.25392 +32 39 0.722222 +62 39 1 +23 40 0.940439 +27 40 0.65 +30 40 -0.940439 +33 40 0.722222 +62 40 1 +24 41 0.626959 +28 41 0.65 +30 41 -0.626959 +34 41 0.722222 +62 41 1 +29 42 0.65 +30 42 -0.31348 +35 42 0.722222 +62 42 1 +21 43 -0.278842 +22 43 -0.268019 +23 43 -0.232372 +24 43 -0.157508 +30 43 1 +31 44 0.25 +46 44 -0.824225 +50 44 0.5 +66 44 1 +32 45 0.25 +47 45 -0.824225 +51 45 0.5 +66 45 1 +33 46 0.25 +48 46 -0.824225 +52 46 0.5 +66 46 1 +34 47 0.25 +49 47 -0.824225 +53 47 0.5 +66 47 1 +35 48 0.25 +54 48 0.5 +66 48 1 +31 49 -0.158163 +32 49 -0.194771 +33 49 -0.230392 +34 49 -0.236285 +35 49 -0.18039 +40 49 -0.158163 +41 49 -0.194771 +42 49 -0.230392 +43 49 -0.236285 +44 49 -0.18039 +31 50 -0.972222 +40 50 -0.972222 +63 50 1 +32 51 -0.972222 +41 51 -0.972222 +63 51 1 +33 52 -0.972222 +42 52 -0.972222 +63 52 1 +34 53 -0.972222 +43 53 -0.972222 +63 53 1 +35 54 -0.972222 +44 54 -0.972222 +63 54 1 +40 55 0.0532286 +41 55 0.0757454 +42 55 0.106103 +43 55 0.133388 +44 55 0.131535 +50 55 -0.106457 +51 55 -0.151491 +52 55 -0.212206 +53 55 -0.266776 +54 55 -0.263071 +36 56 1.86335 +40 56 0.472222 +45 56 -1.86335 +50 56 -0.944444 +65 56 1 +37 57 1.49068 +41 57 0.472222 +45 57 -1.49068 +51 57 -0.944444 +65 57 1 +38 58 1.11801 +42 58 0.472222 +45 58 -1.11801 +52 58 -0.944444 +65 58 1 +39 59 0.745342 +43 59 0.472222 +45 59 -0.745342 +53 59 -0.944444 +65 59 1 +44 60 0.472222 +45 60 -0.372671 +54 60 -0.944444 +65 60 1 +36 61 -0.206995 +37 61 -0.235647 +38 61 -0.247567 +39 61 -0.207487 +45 61 1 +46 62 1.86335 +50 62 0.444444 +55 62 -1.86335 +67 62 1 +47 63 1.49068 +51 63 0.444444 +55 63 -1.49068 +67 63 1 +48 64 1.11801 +52 64 0.444444 +55 64 -1.11801 +67 64 1 +49 65 0.745342 +53 65 0.444444 +55 65 -0.745342 +67 65 1 +54 66 0.444444 +55 66 -0.372671 +67 66 1 +46 67 -0.144335 +47 67 -0.191856 +48 67 -0.24215 +49 67 -0.254119 +55 67 1 diff --git a/deal.II/contrib/umfpack/UMFPACK/MATLAB/west0067.mat b/deal.II/contrib/umfpack/UMFPACK/MATLAB/west0067.mat deleted file mode 100644 index 6cd8c88e60..0000000000 Binary files a/deal.II/contrib/umfpack/UMFPACK/MATLAB/west0067.mat and /dev/null differ diff --git a/deal.II/contrib/umfpack/UMFPACK/README.txt b/deal.II/contrib/umfpack/UMFPACK/README.txt index e601f38e5f..eec0f743ca 100644 --- a/deal.II/contrib/umfpack/UMFPACK/README.txt +++ b/deal.II/contrib/umfpack/UMFPACK/README.txt @@ -1,58 +1,76 @@ -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 - a subset of the C-callable routines. +UMFPACK Version 5.0.2: a set of routines solving sparse linear systems via LU + factorization. Requires three other packages: the BLAS (dense matrix + operations), AMD (sparse matrix minimum degree ordering), and UFconfig. + Includes a C-callable and MATLAB interface, and a basic FORTRAN 77 + interface to a subset of the C-callable routines. Requires AMD Version + 2.0 or later. + +The AMD, UFconfig, and UMFPACK directories must all reside in the same parent +directory. Quick start (Unix, or Windows with Cygwin): To compile, test, and install both UMFPACK and AMD, the UMFPACK and AMD directories must be in the same parent directory. To configure, edit - UMFPACK/Make/Make.include and AMD/Make/Make.include (otherwise the BLAS - will not be used, and UMFPACK will be slow). cd to this directory (UMFPACK) - and type "make" (or "make lib" if you do not have MATLAB). To compile and - run a demo program for Harwell/Boeing matrices, type "make hb". To compile - a FORTRAN main program that calls the 32-bit C-callable UMFPACK library, - type "make fortran". When done, type "make clean" to remove unused *.o - files (keeps the compiled libraries and demo programs). See the User Guide - (Doc/UserGuide.pdf), or UMFPACK/Make/Make.include, for more details - (including options for compiling 64-bit mode). + the UFconfig/UFconfig.mk file (otherwise, you may get warnings that the + BLAS (dgemm, etc) are not found). You may use UMFPACK_CONFIG = -DNBLAS in + the UFconfig/UFconfig.mk file, to avoid using the BLAS, but UMFPACK will be + slow. Next, cd to this directory (UMFPACK) and type "make". To compile + and run a FORTRAN demo program for Harwell/Boeing matrices, type "make hb". + To compile a FORTRAN main program that calls the 32-bit C-callable UMFPACK + library, type "make fortran". When done, type "make clean" to remove + unused *.o files (keeps the compiled libraries and demo programs). See + the User Guide (Doc/UserGuide.pdf), or ../UFconfig/UFconfig.mk for more + details (including options for compiling in 64-bit mode). Quick start (for MATLAB users): To compile, test, and install the UMFPACK mexFunction, cd to the UMFPACK/MATLAB directory and type umfpack_make at the MATLAB prompt. - This works on any system supported by MATLAB. + + NOTE: DO NOT ATTEMPT TO USE THIS CODE IN 64-BIT MATLAB (v7.3). + It is not yet ported to that version of MATLAB. -------------------------------------------------------------------------------- -UMFPACK Version 4.4 (Jan. 28, 2005), Copyright (c) 2005 by Timothy A. -Davis. All Rights Reserved. +UMFPACK, Copyright (c) 1995-2006 by Timothy A. Davis. All Rights Reserved. +UMFPACK is available under alternate licences; contact T. Davis for details. 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 - uses UMFPACK or any modified version of UMFPACK code must cite the - Copyright, this License, the Availability note, and "Used by permission." - Permission to modify the code and to distribute modified code is granted, - provided the Copyright, this License, and the Availability note are - 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. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + USA + + Permission is hereby granted to use or copy this program under the + terms of the GNU LGPL, provided that the Copyright, this License, + and the Availability of the original version is retained on all copies. + User documentation of any code that uses this code or any modified + version of this code must cite the Copyright, this License, the + Availability note, and "Used by permission." Permission to modify + the code and to distribute modified code is granted, provided the + Copyright, this License, and the Availability note are retained, + and a notice that the code was modified is included. Availability: http://www.cise.ufl.edu/research/sparse/umfpack - UMFPACK (including versions 2.2.1 and earlier, in Fortran) is available at + UMFPACK (including versions 2.2.1 and earlier, in FORTRAN) is available at http://www.cise.ufl.edu/research/sparse. MA38 is available in the Harwell Subroutine Library. This version of UMFPACK includes a modified form of COLAMD Version 2.0, originally released on Jan. 31, 2000, also available at @@ -67,7 +85,8 @@ Availability: 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.4 can use either AMD v1.0 or v1.1. +UMFPACK v4.5 cannot use AMD v1.1 or earlier. UMFPACK 5.0 +requires AMD v2.0 or later. -------------------------------------------------------------------------------- @@ -82,8 +101,7 @@ Description: with a MATLAB (Version 6.0 or later) interface. For best performance, UMFPACK requires an optimized BLAS library. It can - also be compiled without any BLAS at all. UMFPACK requires AMD Version 1.0 - or Version 1.1 + also be compiled without any BLAS at all. UMFPACK requires AMD Version 2.0. Authors: @@ -137,7 +155,6 @@ Files and directories in the UMFPACK distribution: ---------------------------------------------------------------------------- Doc documentation - Make for compiling UMFPACK (a symbolic link to ../AMD/Make) Source primary source code Include include files for use in your code that calls UMFPACK Demo demo programs. also serves as test of the UMFPACK installation. @@ -168,19 +185,11 @@ Files and directories in the UMFPACK distribution: UserGuide.stex User Guide (LaTeX) UserGuide.pdf User Guide (PDF) - ---------------------------------------------------------------------------- - Make directory: for compiling the UMFPACK library (Lib/libumfpack.a) - ---------------------------------------------------------------------------- - - This is a symbolic link to the ../AMD/Make directory. Refer to the - ../AMD/README file for a list of its contents. - ---------------------------------------------------------------------------- Source directory: ---------------------------------------------------------------------------- - GNUmakefile a nice Makefile, for GNU make - Makefile an ugly Unix Makefile (for older make's) + cholmod_blas.h an exact copy of CHOLMOD/Include/cholmod_blas.h umfpack_col_to_triplet.c convert col form to triplet umfpack_defaults.c set Control defaults @@ -215,7 +224,7 @@ Files and directories in the UMFPACK distribution: umf_config.h configuration file (BLAS, memory, timer) umf_internal.h definitions internal to UMFPACK - umf_version.h version definitions (int/long, real/complex) + umf_version.h version definitions (int/UF_long, real/complex) umf_2by2.[ch] umf_analyze.[ch] symbolic factorization of A'*A @@ -325,17 +334,17 @@ Files and directories in the UMFPACK distribution: umfpack_zl_demo.sed for creating umfpack_zl_demo.c umfpack_di_demo.c a full demo (real/int version) - umfpack_dl_demo.c a full demo (real/long version) + umfpack_dl_demo.c a full demo (real/UF_long version) umfpack_zi_demo.c a full demo (complex/int version) - umfpack_zl_demo.c a full demo (complex/long version) + umfpack_zl_demo.c a full demo (complex/UF_long version) - umfpack_di_demo.out umfpack_di_demo output, unmodified Make.include - umfpack_dl_demo.out umfpack_dl_demo output, unmodified Make.include - umfpack_zi_demo.out umfpack_zi_demo output, unmodified Make.include - umfpack_zl_demo.out umfpack_zl_demo output, unmodified Make.include + umfpack_di_demo.out umfpack_di_demo output + umfpack_dl_demo.out umfpack_dl_demo output + umfpack_zi_demo.out umfpack_zi_demo output + umfpack_zl_demo.out umfpack_zl_demo output umf4.c a demo (real/int) for Harwell/Boeing matrices - umf4.out output of "make hb", unmodified Make.include + umf4.out output of "make hb" HB directory of sample Harwell/Boeing matrices readhb.f reads HB matrices, keeps zero entries readhb_nozeros.f reads HB matrices, removes zero entries @@ -391,4 +400,6 @@ Files and directories in the UMFPACK distribution: Lib directory: libumfpack.a library placed here ---------------------------------------------------------------------------- + GNUmakefile a nice Makefile, for GNU make + Makefile an ugly Unix Makefile (for older make's) libumfpack.def UMPFACK definitions for Windows diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/Makefile b/deal.II/contrib/umfpack/UMFPACK/Source/Makefile index 67451d81c7..8cb88397f4 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/Makefile +++ b/deal.II/contrib/umfpack/UMFPACK/Source/Makefile @@ -66,7 +66,7 @@ INC = ../Include/umfpack.h \ $(addsuffix .h,$(UMFINT)) \ $(addprefix ../Include/, $(addsuffix .h,$(USER))) \ $(addprefix ../Include/, $(addsuffix .h,$(GENERIC))) \ - ../../AMD/Source/amd_internal.h ../../AMD/Include/amd.h + ../../AMD/Include/amd_internal.h ../../AMD/Include/amd.h #------------------------------------------------------------------------------- # object files for each version diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/cholmod_blas.h b/deal.II/contrib/umfpack/UMFPACK/Source/cholmod_blas.h new file mode 100644 index 0000000000..709f2d0132 --- /dev/null +++ b/deal.II/contrib/umfpack/UMFPACK/Source/cholmod_blas.h @@ -0,0 +1,451 @@ +/* ========================================================================== */ +/* === Include/cholmod_blas.h =============================================== */ +/* ========================================================================== */ + +/* ----------------------------------------------------------------------------- + * CHOLMOD/Include/cholmod_blas.h. + * Copyright (C) Univ. of Florida. Author: Timothy A. Davis + * CHOLMOD/Include/cholmod_blas.h is licensed under Version 2.1 of the GNU + * Lesser General Public License. See lesser.txt for a text of the license. + * CHOLMOD is also available under other licenses; contact authors for details. + * http://www.cise.ufl.edu/research/sparse + * -------------------------------------------------------------------------- */ + +/* This does not need to be included in the user's program. */ + +#ifndef CHOLMOD_BLAS_H +#define CHOLMOD_BLAS_H + +/* ========================================================================== */ +/* === Architecture ========================================================= */ +/* ========================================================================== */ + +#if defined (__sun) || defined (MSOL2) || defined (ARCH_SOL2) +#define CHOLMOD_SOL2 +#define CHOLMOD_ARCHITECTURE "Sun Solaris" + +#elif defined (__sgi) || defined (MSGI) || defined (ARCH_SGI) +#define CHOLMOD_SGI +#define CHOLMOD_ARCHITECTURE "SGI Irix" + +#elif defined (__linux) || defined (MGLNX86) || defined (ARCH_GLNX86) +#define CHOLMOD_LINUX +#define CHOLMOD_ARCHITECTURE "Linux" + +#elif defined (_AIX) || defined (MIBM_RS) || defined (ARCH_IBM_RS) +#define CHOLMOD_AIX +#define CHOLMOD_ARCHITECTURE "IBM AIX" +#define BLAS_NO_UNDERSCORE + +#elif defined (__alpha) || defined (MALPHA) || defined (ARCH_ALPHA) +#define CHOLMOD_ALPHA +#define CHOLMOD_ARCHITECTURE "Compaq Alpha" + +#elif defined (_WIN32) || defined (WIN32) || defined (_WIN64) || defined (WIN64) +#if defined (__MINGW32__) || defined (__MINGW32__) +#define CHOLMOD_MINGW +#elif defined (__CYGWIN32__) || defined (__CYGWIN32__) +#define CHOLMOD_CYGWIN +#else +#define CHOLMOD_WINDOWS +#define BLAS_NO_UNDERSCORE +#endif +#define CHOLMOD_ARCHITECTURE "Microsoft Windows" + +#elif defined (__hppa) || defined (__hpux) || defined (MHPUX) || defined (ARCH_HPUX) +#define CHOLMOD_HP +#define CHOLMOD_ARCHITECTURE "HP Unix" +#define BLAS_NO_UNDERSCORE + +#elif defined (__hp700) || defined (MHP700) || defined (ARCH_HP700) +#define CHOLMOD_HP +#define CHOLMOD_ARCHITECTURE "HP 700 Unix" +#define BLAS_NO_UNDERSCORE + +#else +/* If the architecture is unknown, and you call the BLAS, you may need to */ +/* define BLAS_BY_VALUE, BLAS_NO_UNDERSCORE, and/or BLAS_CHAR_ARG yourself. */ +#define CHOLMOD_ARCHITECTURE "unknown" +#endif + + +/* ========================================================================== */ +/* === BLAS and LAPACK names ================================================ */ +/* ========================================================================== */ + +/* Prototypes for the various versions of the BLAS. */ + +/* Determine if the 64-bit Sun Performance BLAS is to be used */ +#if defined(CHOLMOD_SOL2) && !defined(NSUNPERF) && defined(LONG) && defined(LONGBLAS) +#define SUN64 +#endif + +#ifdef SUN64 + +#define BLAS_DTRSV dtrsv_64_ +#define BLAS_DGEMV dgemv_64_ +#define BLAS_DTRSM dtrsm_64_ +#define BLAS_DGEMM dgemm_64_ +#define BLAS_DSYRK dsyrk_64_ +#define BLAS_DGER dger_64_ +#define BLAS_DSCAL dscal_64_ +#define LAPACK_DPOTRF dpotrf_64_ + +#define BLAS_ZTRSV ztrsv_64_ +#define BLAS_ZGEMV zgemv_64_ +#define BLAS_ZTRSM ztrsm_64_ +#define BLAS_ZGEMM zgemm_64_ +#define BLAS_ZHERK zherk_64_ +#define BLAS_ZGER zgeru_64_ +#define BLAS_ZSCAL zscal_64_ +#define LAPACK_ZPOTRF zpotrf_64_ + +#elif defined (BLAS_NO_UNDERSCORE) + +#define BLAS_DTRSV dtrsv +#define BLAS_DGEMV dgemv +#define BLAS_DTRSM dtrsm +#define BLAS_DGEMM dgemm +#define BLAS_DSYRK dsyrk +#define BLAS_DGER dger +#define BLAS_DSCAL dscal +#define LAPACK_DPOTRF dpotrf + +#define BLAS_ZTRSV ztrsv +#define BLAS_ZGEMV zgemv +#define BLAS_ZTRSM ztrsm +#define BLAS_ZGEMM zgemm +#define BLAS_ZHERK zherk +#define BLAS_ZGER zgeru +#define BLAS_ZSCAL zscal +#define LAPACK_ZPOTRF zpotrf + +#else + +#define BLAS_DTRSV dtrsv_ +#define BLAS_DGEMV dgemv_ +#define BLAS_DTRSM dtrsm_ +#define BLAS_DGEMM dgemm_ +#define BLAS_DSYRK dsyrk_ +#define BLAS_DGER dger_ +#define BLAS_DSCAL dscal_ +#define LAPACK_DPOTRF dpotrf_ + +#define BLAS_ZTRSV ztrsv_ +#define BLAS_ZGEMV zgemv_ +#define BLAS_ZTRSM ztrsm_ +#define BLAS_ZGEMM zgemm_ +#define BLAS_ZHERK zherk_ +#define BLAS_ZGER zgeru_ +#define BLAS_ZSCAL zscal_ +#define LAPACK_ZPOTRF zpotrf_ + +#endif + +/* ========================================================================== */ +/* === BLAS and LAPACK integer arguments ==================================== */ +/* ========================================================================== */ + +/* CHOLMOD can be compiled with -D'LONGBLAS=long' for the Sun Performance + * Library, or -D'LONGBLAS=long long' for SGI's SCSL BLAS. This defines the + * integer used in the BLAS for the cholmod_l_* routines. + * + * The "int" version of CHOLMOD always uses the "int" version of the BLAS. + */ + +#if defined (LONGBLAS) && defined (LONG) +#define BLAS_INT LONGBLAS +#else +#define BLAS_INT int +#endif + +/* If the BLAS integer is smaller than the basic CHOLMOD integer, then we need + * to check for integer overflow when converting from one to the other. If + * any integer overflows, the externally-defined blas_ok variable is set to + * FALSE. blas_ok should be set to TRUE before calling any BLAS_* macro. + */ + +#define CHECK_BLAS_INT (sizeof (BLAS_INT) < sizeof (Int)) +#define EQ(K,k) (((BLAS_INT) K) == ((Int) k)) + +/* ========================================================================== */ +/* === BLAS and LAPACK prototypes and macros ================================ */ +/* ========================================================================== */ + +void BLAS_DGEMV (char *trans, BLAS_INT *m, BLAS_INT *n, double *alpha, + double *A, BLAS_INT *lda, double *X, BLAS_INT *incx, double *beta, + double *Y, BLAS_INT *incy) ; + +#define BLAS_dgemv(trans,m,n,alpha,A,lda,X,incx,beta,Y,incy) \ +{ \ + BLAS_INT M = m, N = n, LDA = lda, INCX = incx, INCY = incy ; \ + if (CHECK_BLAS_INT) \ + { \ + blas_ok &= EQ (M,m) && EQ (N,n) && EQ (LDA,lda) && EQ (INCX,incx) \ + && EQ (INCY,incy) ; \ + } \ + if (blas_ok) \ + { \ + BLAS_DGEMV (trans, &M, &N, alpha, A, &LDA, X, &INCX, beta, Y, &INCY) ; \ + } \ +} + +void BLAS_ZGEMV (char *trans, BLAS_INT *m, BLAS_INT *n, double *alpha, + double *A, BLAS_INT *lda, double *X, BLAS_INT *incx, double *beta, + double *Y, BLAS_INT *incy) ; + +#define BLAS_zgemv(trans,m,n,alpha,A,lda,X,incx,beta,Y,incy) \ +{ \ + BLAS_INT M = m, N = n, LDA = lda, INCX = incx, INCY = incy ; \ + if (CHECK_BLAS_INT) \ + { \ + blas_ok &= EQ (M,m) && EQ (N,n) && EQ (LDA,lda) && EQ (INCX,incx) \ + && EQ (INCY,incy) ; \ + } \ + if (blas_ok) \ + { \ + BLAS_ZGEMV (trans, &M, &N, alpha, A, &LDA, X, &INCX, beta, Y, &INCY) ; \ + } \ +} + +void BLAS_DTRSV (char *uplo, char *trans, char *diag, BLAS_INT *n, double *A, + BLAS_INT *lda, double *X, BLAS_INT *incx) ; + +#define BLAS_dtrsv(uplo,trans,diag,n,A,lda,X,incx) \ +{ \ + BLAS_INT N = n, LDA = lda, INCX = incx ; \ + if (CHECK_BLAS_INT) \ + { \ + blas_ok &= EQ (N,n) && EQ (LDA,lda) && EQ (INCX,incx) ; \ + } \ + if (blas_ok) \ + { \ + BLAS_DTRSV (uplo, trans, diag, &N, A, &LDA, X, &INCX) ; \ + } \ +} + +void BLAS_ZTRSV (char *uplo, char *trans, char *diag, BLAS_INT *n, double *A, + BLAS_INT *lda, double *X, BLAS_INT *incx) ; + +#define BLAS_ztrsv(uplo,trans,diag,n,A,lda,X,incx) \ +{ \ + BLAS_INT N = n, LDA = lda, INCX = incx ; \ + if (CHECK_BLAS_INT) \ + { \ + blas_ok &= EQ (N,n) && EQ (LDA,lda) && EQ (INCX,incx) ; \ + } \ + if (blas_ok) \ + { \ + BLAS_ZTRSV (uplo, trans, diag, &N, A, &LDA, X, &INCX) ; \ + } \ +} + +void BLAS_DTRSM (char *side, char *uplo, char *transa, char *diag, BLAS_INT *m, + BLAS_INT *n, double *alpha, double *A, BLAS_INT *lda, double *B, + BLAS_INT *ldb) ; + +#define BLAS_dtrsm(side,uplo,transa,diag,m,n,alpha,A,lda,B,ldb) \ +{ \ + BLAS_INT M = m, N = n, LDA = lda, LDB = ldb ; \ + if (CHECK_BLAS_INT) \ + { \ + blas_ok &= EQ (M,m) && EQ (N,n) && EQ (LDA,lda) && EQ (LDB,ldb) ; \ + } \ + if (blas_ok) \ + { \ + BLAS_DTRSM (side, uplo, transa, diag, &M, &N, alpha, A, &LDA, B, &LDB);\ + } \ +} + +void BLAS_ZTRSM (char *side, char *uplo, char *transa, char *diag, BLAS_INT *m, + BLAS_INT *n, double *alpha, double *A, BLAS_INT *lda, double *B, + BLAS_INT *ldb) ; + +#define BLAS_ztrsm(side,uplo,transa,diag,m,n,alpha,A,lda,B,ldb) \ +{ \ + BLAS_INT M = m, N = n, LDA = lda, LDB = ldb ; \ + if (CHECK_BLAS_INT) \ + { \ + blas_ok &= EQ (M,m) && EQ (N,n) && EQ (LDA,lda) && EQ (LDB,ldb) ; \ + } \ + if (blas_ok) \ + { \ + BLAS_ZTRSM (side, uplo, transa, diag, &M, &N, alpha, A, &LDA, B, &LDB);\ + } \ +} + +void BLAS_DGEMM (char *transa, char *transb, BLAS_INT *m, BLAS_INT *n, + BLAS_INT *k, double *alpha, double *A, BLAS_INT *lda, double *B, + BLAS_INT *ldb, double *beta, double *C, BLAS_INT *ldc) ; + +#define BLAS_dgemm(transa,transb,m,n,k,alpha,A,lda,B,ldb,beta,C,ldc) \ +{ \ + BLAS_INT M = m, N = n, K = k, LDA = lda, LDB = ldb, LDC = ldc ; \ + if (CHECK_BLAS_INT) \ + { \ + blas_ok &= EQ (M,m) && EQ (N,n) && EQ (K,k) && EQ (LDA,lda) \ + && EQ (LDB,ldb) && EQ (LDC,ldc) ; \ + } \ + if (blas_ok) \ + { \ + BLAS_DGEMM (transa, transb, &M, &N, &K, alpha, A, &LDA, B, &LDB, beta, \ + C, &LDC) ; \ + } \ +} + +void BLAS_ZGEMM (char *transa, char *transb, BLAS_INT *m, BLAS_INT *n, + BLAS_INT *k, double *alpha, double *A, BLAS_INT *lda, double *B, + BLAS_INT *ldb, double *beta, double *C, BLAS_INT *ldc) ; + +#define BLAS_zgemm(transa,transb,m,n,k,alpha,A,lda,B,ldb,beta,C,ldc) \ +{ \ + BLAS_INT M = m, N = n, K = k, LDA = lda, LDB = ldb, LDC = ldc ; \ + if (CHECK_BLAS_INT) \ + { \ + blas_ok &= EQ (M,m) && EQ (N,n) && EQ (K,k) && EQ (LDA,lda) \ + && EQ (LDB,ldb) && EQ (LDC,ldc) ; \ + } \ + if (blas_ok) \ + { \ + BLAS_ZGEMM (transa, transb, &M, &N, &K, alpha, A, &LDA, B, &LDB, beta, \ + C, &LDC) ; \ + } \ +} + +void BLAS_DSYRK (char *uplo, char *trans, BLAS_INT *n, BLAS_INT *k, + double *alpha, double *A, BLAS_INT *lda, double *beta, double *C, + BLAS_INT *ldc) ; + +#define BLAS_dsyrk(uplo,trans,n,k,alpha,A,lda,beta,C,ldc) \ +{ \ + BLAS_INT N = n, K = k, LDA = lda, LDC = ldc ; \ + if (CHECK_BLAS_INT) \ + { \ + blas_ok &= EQ (N,n) && EQ (K,k) && EQ (LDA,lda) && EQ (LDC,ldc) ; \ + } \ + if (blas_ok) \ + { \ + BLAS_DSYRK (uplo, trans, &N, &K, alpha, A, &LDA, beta, C, &LDC) ; \ + } \ +} \ + +void BLAS_ZHERK (char *uplo, char *trans, BLAS_INT *n, BLAS_INT *k, + double *alpha, double *A, BLAS_INT *lda, double *beta, double *C, + BLAS_INT *ldc) ; + +#define BLAS_zherk(uplo,trans,n,k,alpha,A,lda,beta,C,ldc) \ +{ \ + BLAS_INT N = n, K = k, LDA = lda, LDC = ldc ; \ + if (CHECK_BLAS_INT) \ + { \ + blas_ok &= EQ (N,n) && EQ (K,k) && EQ (LDA,lda) && EQ (LDC,ldc) ; \ + } \ + if (blas_ok) \ + { \ + BLAS_ZHERK (uplo, trans, &N, &K, alpha, A, &LDA, beta, C, &LDC) ; \ + } \ +} \ + +void LAPACK_DPOTRF (char *uplo, BLAS_INT *n, double *A, BLAS_INT *lda, + BLAS_INT *info) ; + +#define LAPACK_dpotrf(uplo,n,A,lda,info) \ +{ \ + BLAS_INT N = n, LDA = lda, INFO = 1 ; \ + if (CHECK_BLAS_INT) \ + { \ + blas_ok &= EQ (N,n) && EQ (LDA,lda) ; \ + } \ + if (blas_ok) \ + { \ + LAPACK_DPOTRF (uplo, &N, A, &LDA, &INFO) ; \ + } \ + info = INFO ; \ +} + +void LAPACK_ZPOTRF (char *uplo, BLAS_INT *n, double *A, BLAS_INT *lda, + BLAS_INT *info) ; + +#define LAPACK_zpotrf(uplo,n,A,lda,info) \ +{ \ + BLAS_INT N = n, LDA = lda, INFO = 1 ; \ + if (CHECK_BLAS_INT) \ + { \ + blas_ok &= EQ (N,n) && EQ (LDA,lda) ; \ + } \ + if (blas_ok) \ + { \ + LAPACK_ZPOTRF (uplo, &N, A, &LDA, &INFO) ; \ + } \ + info = INFO ; \ +} + +/* ========================================================================== */ + +void BLAS_DSCAL (BLAS_INT *n, double *alpha, double *Y, BLAS_INT *incy) ; + +#define BLAS_dscal(n,alpha,Y,incy) \ +{ \ + BLAS_INT N = n, INCY = incy ; \ + if (CHECK_BLAS_INT) \ + { \ + blas_ok &= EQ (N,n) && EQ (INCY,incy) ; \ + } \ + if (blas_ok) \ + { \ + BLAS_DSCAL (&N, alpha, Y, &INCY) ; \ + } \ +} + +void BLAS_ZSCAL (BLAS_INT *n, double *alpha, double *Y, BLAS_INT *incy) ; + +#define BLAS_zscal(n,alpha,Y,incy) \ +{ \ + BLAS_INT N = n, INCY = incy ; \ + if (CHECK_BLAS_INT) \ + { \ + blas_ok &= EQ (N,n) && EQ (INCY,incy) ; \ + } \ + if (blas_ok) \ + { \ + BLAS_ZSCAL (&N, alpha, Y, &INCY) ; \ + } \ +} + +void BLAS_DGER (BLAS_INT *m, BLAS_INT *n, double *alpha, + double *X, BLAS_INT *incx, double *Y, BLAS_INT *incy, + double *A, BLAS_INT *lda) ; + +#define BLAS_dger(m,n,alpha,X,incx,Y,incy,A,lda) \ +{ \ + BLAS_INT M = m, N = n, LDA = lda, INCX = incx, INCY = incy ; \ + if (CHECK_BLAS_INT) \ + { \ + blas_ok &= EQ (M,m) && EQ (N,n) && EQ (LDA,lda) && EQ (INCX,incx) \ + && EQ (INCY,incy) ; \ + } \ + if (blas_ok) \ + { \ + BLAS_DGER (&M, &N, alpha, X, &INCX, Y, &INCY, A, &LDA) ; \ + } \ +} + +void BLAS_ZGERU (BLAS_INT *m, BLAS_INT *n, double *alpha, + double *X, BLAS_INT *incx, double *Y, BLAS_INT *incy, + double *A, BLAS_INT *lda) ; + +#define BLAS_zgeru(m,n,alpha,X,incx,Y,incy,A,lda) \ +{ \ + BLAS_INT M = m, N = n, LDA = lda, INCX = incx, INCY = incy ; \ + if (CHECK_BLAS_INT) \ + { \ + blas_ok &= EQ (M,m) && EQ (N,n) && EQ (LDA,lda) && EQ (INCX,incx) \ + && EQ (INCY,incy) ; \ + } \ + if (blas_ok) \ + { \ + BLAS_ZGER (&M, &N, alpha, X, &INCX, Y, &INCY, A, &LDA) ; \ + } \ +} + +#endif diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_2by2.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_2by2.c index 0e0b8a311d..42616dcf4a 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_2by2.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_2by2.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -162,7 +162,7 @@ PRIVATE Int two_by_two /* returns # unmatched weak diagonals */ #endif Ri, Rp, n2, n2, Rp [n2]) ; #endif - ASSERT (AMD_valid (n2, n2, Rp, Ri)) ; + ASSERT (AMD_valid (n2, n2, Rp, Ri) == AMD_OK) ; /* ---------------------------------------------------------------------- */ /* for each weak diagonal, find a pair of strong off-diagonal entries */ @@ -435,7 +435,7 @@ GLOBAL void UMF_2by2 #ifndef NDEBUG /* UMF_debug += 99 ; */ DEBUGm3 (("\n ==================================UMF_2by2: tol %g\n", tol)) ; - ASSERT (AMD_valid (n, n, Ap, Ai)) ; + ASSERT (AMD_valid (n, n, Ap, Ai) == AMD_OK) ; for (k = n1 ; k < n - nempty ; k++) { ASSERT (Cperm1 [k] == Rperm1 [k]) ; @@ -806,7 +806,7 @@ GLOBAL void UMF_2by2 } } Cp [n2] = pp ; - ASSERT (AMD_valid (n2, n2, Cp, Ci)) ; + ASSERT (AMD_valid (n2, n2, Cp, Ci) == AMD_OK) ; if (nweak == 0) { diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_2by2.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_2by2.h index 4e88d1dced..3cb8b4541c 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_2by2.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_2by2.h @@ -1,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 34d6b80129..7744635bf6 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_analyze.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_analyze.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_analyze.h index a1e0540082..733ba03e1c 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_analyze.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_analyze.h @@ -1,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 10b6c4b8c8..8e90d3a532 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_apply_order.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_apply_order.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 b8e2ca4921..dd7e682e58 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_apply_order.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_apply_order.h @@ -1,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 335c89048a..8618be41f1 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_assemble.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_assemble.c @@ -3,13 +3,13 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ /* Degree update and numerical assembly. This is compiled twice (with and - * without FIXQ) for each real/complex int/long version, for a total of 8 + * without FIXQ) for each real/complex int/UF_long version, for a total of 8 * versions.*/ #include "umf_internal.h" diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_assemble.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_assemble.h index 860194aedf..e976b48541 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_assemble.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_assemble.h @@ -1,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 5aab565e2d..8ff3bc4faf 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_blas3_update.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_blas3_update.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -20,7 +20,13 @@ GLOBAL void UMF_blas3_update /* ---------------------------------------------------------------------- */ Entry *L, *U, *C, *LU ; - Int k, m, n, d, nb, dc ; + Int i, j, s, k, m, n, d, nb, dc ; + +#ifndef NBLAS + Int blas_ok = TRUE ; +#else +#define blas_ok FALSE +#endif DEBUG5 (("In UMF_blas3_update "ID" "ID" "ID"\n", Work->fnpiv, Work->fnrows, Work->fncols)) ; @@ -56,63 +62,65 @@ GLOBAL void UMF_blas3_update if (k == 1) { -#ifdef USE_NO_BLAS - - /* no BLAS available - use plain C code instead */ - Int i, j ; +#ifndef NBLAS + BLAS_GER (m, n, L, U, C, d) ; +#endif - /* rank-1 outer product to update the C block */ - for (j = 0 ; j < n ; j++) + if (!blas_ok) { - Entry u_j = U [j] ; - if (IS_NONZERO (u_j)) + /* rank-1 outer product to update the C block */ + for (j = 0 ; j < n ; j++) { - Entry *c_ij, *l_is ; - c_ij = & C [j*d] ; - l_is = & L [0] ; -#pragma ivdep - for (i = 0 ; i < m ; i++) + Entry u_j = U [j] ; + if (IS_NONZERO (u_j)) { - /* C [i+j*d]-= L [i] * U [j] */ - MULT_SUB (*c_ij, *l_is, u_j) ; - c_ij++ ; - l_is++ ; + Entry *c_ij, *l_is ; + c_ij = & C [j*d] ; + l_is = & L [0] ; +#pragma ivdep + for (i = 0 ; i < m ; i++) + { + /* C [i+j*d]-= L [i] * U [j] */ + MULT_SUB (*c_ij, *l_is, u_j) ; + c_ij++ ; + l_is++ ; + } } } } -#else - BLAS_GER (m, n, L, U, C, d) ; - -#endif /* USE_NO_BLAS */ - } else { -#ifdef USE_NO_BLAS + /* triangular solve to update the U block */ - /* no BLAS available - use plain C code instead */ - Int i, j, s ; +#ifndef NBLAS + BLAS_TRSM_RIGHT (n, k, LU, nb, U, dc) ; +#endif - /* triangular solve to update the U block */ - for (s = 0 ; s < k ; s++) + if (!blas_ok) { - for (i = s+1 ; i < k ; i++) + /* use plain C code if no BLAS at compile time, or if integer + * overflow has occurred */ + for (s = 0 ; s < k ; s++) { - Entry l_is = LU [i+s*nb] ; - if (IS_NONZERO (l_is)) + for (i = s+1 ; i < k ; i++) { - Entry *u_ij, *u_sj ; - u_ij = & U [i*dc] ; - u_sj = & U [s*dc] ; -#pragma ivdep - for (j = 0 ; j < n ; j++) + Entry l_is = LU [i+s*nb] ; + if (IS_NONZERO (l_is)) { - /* U [i*dc+j] -= LU [i+s*nb] * U [s*dc+j] ; */ - MULT_SUB (*u_ij, l_is, *u_sj) ; - u_ij++ ; - u_sj++ ; + Entry *u_ij, *u_sj ; + u_ij = & U [i*dc] ; + u_sj = & U [s*dc] ; +#pragma ivdep + for (j = 0 ; j < n ; j++) + { + /* U [i*dc+j] -= LU [i+s*nb] * U [s*dc+j] ; */ + MULT_SUB (*u_ij, l_is, *u_sj) ; + u_ij++ ; + u_sj++ ; + } } } } @@ -120,35 +128,38 @@ GLOBAL void UMF_blas3_update /* rank-k outer product to update the C block */ /* C = C - L*U' (U is stored by rows, not columns) */ - for (s = 0 ; s < k ; s++) + +#ifndef NBLAS + BLAS_GEMM (m, n, k, L, U, dc, C, d) ; +#endif + + if (!blas_ok) { - for (j = 0 ; j < n ; j++) + /* use plain C code if no BLAS at compile time, or if integer + * overflow has occurred */ + + for (s = 0 ; s < k ; s++) { - Entry u_sj = U [j+s*dc] ; - if (IS_NONZERO (u_sj)) + for (j = 0 ; j < n ; j++) { - Entry *c_ij, *l_is ; - c_ij = & C [j*d] ; - l_is = & L [s*d] ; -#pragma ivdep - for (i = 0 ; i < m ; i++) + Entry u_sj = U [j+s*dc] ; + if (IS_NONZERO (u_sj)) { - /* C [i+j*d]-= L [i+s*d] * U [s*dc+j] */ - MULT_SUB (*c_ij, *l_is, u_sj) ; - c_ij++ ; - l_is++ ; + Entry *c_ij, *l_is ; + c_ij = & C [j*d] ; + l_is = & L [s*d] ; +#pragma ivdep + for (i = 0 ; i < m ; i++) + { + /* C [i+j*d]-= L [i+s*d] * U [s*dc+j] */ + MULT_SUB (*c_ij, *l_is, u_sj) ; + c_ij++ ; + l_is++ ; + } } } } } - -#else - - BLAS_TRSM_RIGHT (n, k, LU, nb, U, dc) ; - BLAS_GEMM (m, n, k, L, U, dc, C, d) ; - -#endif /* USE_NO_BLAS */ - } #ifndef NDEBUG 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 86bb8102a2..c77b9ac622 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_blas3_update.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_blas3_update.h @@ -1,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 a570da1065..36feed66ea 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_build_tuples.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_build_tuples.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 f17e601b30..0b0410c9ee 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_build_tuples.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_build_tuples.h @@ -1,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 252fbfb23f..5a9b168406 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_colamd.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_colamd.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 e40f9c2e8a..51675a572d 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_colamd.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_colamd.h @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 d73762c434..79e9f5d923 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_config.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_config.h @@ -3,63 +3,20 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ /* This file controls the compile-time configuration of UMFPACK. Modify the - Makefile, the architecture-dependent Make.* file, and this file if - necessary, to control these options. The following flags may be given - as options to your C compiler (as in "cc -DNBLAS", for example). These - flags are normally placed in your CONFIG string, defined in your Make.*. + UFconfig/UFconfig.mk file and this file if necessary, to control these + options. The following flags may be given as options to your C compiler + (as in "cc -DNSUNPERF", for example). These flags are normally placed in + your UMFPACK_CONFIG string, defined in the UFconfig/UFconfig.mk file. All of these options, except for the timer, are for accessing the BLAS. - -DNBLAS - - BLAS mode. If -DNBLAS is set, then no BLAS will be used. Vanilla - C code will be used instead. This is portable, and easier to - install, but you won't get the best performance. - - If -DNBLAS is not set, then externally-available BLAS routines - (dgemm, dger, and dgemv or the equivalent C-BLAS routines) will be - used. This will give you the best performance, but perhaps at the - expense of portability. - - The default is to use the BLAS, for both the C-callable libumfpack.a - library and the MATLAB mexFunction. If you have trouble installing - UMFPACK, set -DNBLAS (but then UMFPACK will be slow). - - -DCBLAS - - If -DCBLAS is set, then the C-BLAS interface to the BLAS is - used. If your vendor-supplied BLAS library does not have a C-BLAS - interface, you can obtain the ATLAS BLAS, available at - http://www.netlib.org/atlas. - - This flag is ignored if -DNBLAS is set. - - -DLP64 - - This should be defined if you are compiling in the LP64 model - (32 bit int's, 64 bit long's, and 64 bit pointers). In Solaris, - this is obtained with the flags -xtarget=ultra -xarch=v9 for - the cc compiler (for example). - - -DLONGBLAS - - If not defined, then the BLAS are not called in the long integer - version of UMFPACK (the umfpack_*l_* routines). The most common - definitions of the BLAS, unfortunately, use int arguments, and - are thus not suitable for use in the LP64 model. Only the Sun - Performance Library, as far as I can tell, has a version of the - BLAS that allows long integer (64-bit) input arguments. This - flag is set automatically in Sun Solaris if you are using the - Sun Performance BLAS. You can set it yourself, too, if your BLAS - routines can take long integer input arguments. - -DNSUNPERF Applies only to Sun Solaris. If -DNSUNPERF is set, then the Sun @@ -68,17 +25,7 @@ The Sun Performance Library BLAS is used by default when compiling the C-callable libumfpack.a library on Sun Solaris. - This flag is ignored if -DNBLAS is set. - - -DNSCSL - - Applies only to SGI IRIX. If -DSCSL is set, then the SGI SCSL - Scientific Library BLAS will not be used. - - The SGI SCSL Scientific Library BLAS is used by default when - compiling the C-callable libumfpack.a library on SGI IRIX. - - This flag is ignored if -DNBLAS is set. + -DLONGBLAS -DNPOSIX @@ -103,15 +50,6 @@ If -DNO_TIMER is set, then no timing routines are used at all. - -DNUTIL - - If -DNUTIL is set, then the internal MATLAB utMalloc, utFree, and - utRealloc routines are not used in the UMFPACK mexFunction. The - regular mxMalloc, mxFree, and mxRealloc routines are used instead. - These routines are not documented, but are available for use. For - Windows, -DNUTIL is defined below, because access to the ut* - routines is not available by default. - -DNRECIPROCAL This option controls a tradeoff between speed and accuracy. Using @@ -152,43 +90,19 @@ If the pivot is zero, and this flag is set, then no divide-by-zero occurs. - You should normally not set these flags yourself: - - -DBLAS_BY_VALUE if scalars are passed by value, not reference - -DBLAS_NO_UNDERSCORE if no underscore should be appended - -DBLAS_CHAR_ARG if BLAS options are single char's, not strings - - The BLAS options are normally set automatically. If your - architecture cannot be determined (see UMFPACK_ARCHITECTURE, below) - then you may need to set these flags yourself. - The following options are controlled by amd_internal.h: -DMATLAB_MEX_FILE This flag is turned on when compiling the umfpack mexFunction for - use in MATLAB. When compiling the MATLAB mexFunction, the MATLAB - BLAS are used (unless -DNBLAS is set). The -DCBLAS, -DNSCSL, and - -DNSUNPERF flags are all ignored. The -DNRECIPROCAL flag is - forced on. Otherwise, [L,U,P,Q,R] = umfpack (A) would return - either L*U = P*(R\A)*Q or L*U = P*R*A*Q. Rather than returning a - flag stating how the scale factors R are to be applied, the umfpack - mexFunction always takes the more accurate route and returns + use in MATLAB. The -DNRECIPROCAL flag is forced on (more accurate, + slightly slower). The umfpack mexFunction always returns L*U = P*(R\A)*Q. -DMATHWORKS This flag is turned on when compiling umfpack as a built-in routine - in MATLAB. The MATLAB BLAS are used for all architectures (-DNBLAS, - -DCBLAS, -DNSCSL, and -DNSUNPERF flags are all ignored). Internal - routines utMalloc, utFree, utRealloc, utPrintf, utDivideComplex, - and utFdlibm_hypot are used, and the "util.h" file is included. - This avoids the problem discussed in the User Guide regarding memory - allocation in MATLAB. utMalloc returns NULL on failure, instead of - terminating the mexFunction (which is what mxMalloc does). However, - the ut* routines are not documented by The MathWorks, Inc., so I - cannot guarantee that you will always be able to use them. - The -DNRECIPROCAL flag is turned on. + in MATLAB. The -DNRECIPROCAL flag is forced on. -DNDEBUG @@ -222,9 +136,8 @@ /* === Microsoft Windows configuration ====================================== */ /* ========================================================================== */ -#ifdef UMF_WINDOWS -/* Windows can't access the ut* routines, and it isn't Unix. */ -#define NUTIL +#if defined (UMF_WINDOWS) || defined (UMF_MINGW) +/* Windows isn't Unix. Profound. */ #define NPOSIX #endif @@ -263,7 +176,7 @@ /* Sun Solaris, SGI Irix, Linux, Compaq Alpha, and IBM RS 6000 all have */ /* getrusage. It's in BSD unix, so perhaps all unix systems have it. */ #if defined (UMF_SOL2) || defined (UMF_SGI) || defined (UMF_LINUX) \ -|| defined (UMF_ALPHA) || defined (UMF_AIX) +|| defined (UMF_ALPHA) || defined (UMF_AIX) || defined (UMF_CYGWIN) #define GETRUSAGE #endif @@ -272,648 +185,140 @@ /* === BLAS ================================================================= */ /* ========================================================================== */ -/* - The adventure begins. Figure out how to call the BLAS ... - - This works, but it is incredibly ugly. The C-BLAS was supposed to solve - this problem, and make it easier to interface a C program to the BLAS. - Unfortunately, the C-BLAS does not have a "long" integer (64 bit) version. - Various vendors have done their own 64-bit BLAS. Sun has dgemm_64 routines - with "long" integers, SGI has a 64-bit dgemm in their scsl_blas_i8 library - with "long long" integers, and so on. - - Different vendors also have different ways of defining a complex number, - some using struct's. That's a bad idea. See umf_version.h for the better - way to do it (the method that was also chosen for the complex C-BLAS, - which is compatible and guaranteed to be portable with ANSI C). - - To make matters worse, SGI's SCSL BLAS has a C-BLAS interface which - differs from the ATLAS C-BLAS interface (see immediately below); - although a more recent version of SGI's C-BLAS interface is correct - if SCSL_VOID_ARGS is defined. -*/ - - -/* -------------------------------------------------------------------------- */ -/* Determine which BLAS to use. */ -/* -------------------------------------------------------------------------- */ - -#if defined (MATHWORKS) -#define USE_MATLAB_BLAS - -#elif defined (NBLAS) -#define USE_NO_BLAS - -#elif defined (MATLAB_MEX_FILE) -#define USE_MATLAB_BLAS - -#elif defined (CBLAS) -#define USE_C_BLAS - -#elif defined (UMF_SOL2) && !defined (NSUNPERF) -#define USE_SUNPERF_BLAS - -#elif defined (UMF_SGI) && !defined (NSCSL) -#define USE_SCSL_BLAS - -#else -#define USE_FORTRAN_BLAS -#endif - -/* -------------------------------------------------------------------------- */ -/* int vs. long integer arguments */ -/* -------------------------------------------------------------------------- */ - -/* - Determine if the BLAS exists for the long integer version. It exists if - LONGBLAS is defined in the Makefile, or if using the BLAS from the - Sun Performance Library, or SGI's SCSL Scientific Library. -*/ - -#if defined (USE_SUNPERF_BLAS) || defined (USE_SCSL_BLAS) -#ifndef LONGBLAS -#define LONGBLAS -#endif -#endif - -/* do not use the BLAS if Int's are long and LONGBLAS is not defined */ -#if defined (LONG_INTEGER) && !defined (LONGBLAS) && !defined (USE_NO_BLAS) -#define USE_NO_BLAS -#endif +#include "cholmod_blas.h" /* -------------------------------------------------------------------------- */ -/* Use (void *) arguments for the SGI */ +/* DGEMM */ /* -------------------------------------------------------------------------- */ -#if defined (UMF_SGI) -/* - Use (void *) pointers for complex types in SCSL. - The ATLAS C-BLAS, and the SGI C-BLAS differ. The former uses (void *) - arguments, the latter uses SCSL_ZOMPLEX_T, which are either scsl_zomplex - or (void *). Using (void *) is simpler, and is selected by defining - SCSL_VOID_ARGS, below. The cc compiler doesn't complain, but gcc is - more picky, and generates a warning without this next statement. - With gcc and the 07/09/98 version of SGI's cblas.h, spurious warnings - about complex BLAS arguments will be reported anyway. This is because this - older version of SGI's cblas.h does not make use of the SCSL_VOID_ARGS - parameter, which is present in the 12/6/01 version of SGI's cblas.h. You - can safely ignore these warnings. -*/ -#define SCSL_VOID_ARGS -#endif - - -/* -------------------------------------------------------------------------- */ -/* The BLAS exists, construct appropriate macros */ -/* -------------------------------------------------------------------------- */ - -#if !defined (USE_NO_BLAS) /* { */ - -/* - If the compile-time flag -DNBLAS is defined, then the BLAS are not used, - portable vanilla C code is used instead, and the remainder of this file - is ignored. - - Using the BLAS is much faster, but how C calls the Fortran BLAS is - machine-dependent and thus can cause portability problems. Thus, use - -DNBLAS to ensure portability (at the expense of speed). - - Preferences: - - *** The best interface to use, regardless of the option you select - below, is the standard C-BLAS interface. Not all BLAS libraries - use this interface. The only problem with this interface is that - it does not extend to the LP64 model. The C-BLAS does not provide - for a 64-bit integer. In addition, SGI's older cblas.h can cause - spurious warnings when using the C-BLAS interface. - - 1) often the most preferred (but see option (3)): use the - optimized vendor-supplied library (such as the Sun Performance - Library, or IBM's ESSL). This is often the fastest, but might not - be portable and might not always be available. When compiling a - MATLAB mexFunction it might be difficult get the mex compiler - script to recognize the vendor- supplied BLAS. Note that the - freely-available BLAS (option 3) can be faster than the vendor- - specific BLAS. You are encourage to try both option (1) and (3). - - 2) When compiling the UMFPACK mexFunction to use UMFPACK in MATLAB, use - the BLAS provided by The Mathworks, Inc. This assumes you are using - MATLAB V6 or higher, since the BLAS are not incorporated in V5 or - earlier versions. On my Sun workstation, the MATLAB BLAS gave - slightly worse performance than the Sun Perf. BLAS. The advantage - of using the MATLAB BLAS is that it's available on any computer that - has MATLAB V6 or higher. I have not tried using MATLAB BLAS outside - of a mexFunction in a stand-alone C code, but MATLAB (V6) allows for - this. This is well worth trying if you have MATLAB and don't want - to bother installing the ATLAS BLAS (option 3a, below). The only - glitch to this is that MATLAB does not provide a portable interface - to the BLAS (an underscore is required for some but not all - architectures). For Windows and MATLAB 6.0 or 6.1, you also need - to copy the libmwlapack.dll file into your MATLAB installation - directory; see the User Guide for details. - - In the current distribution, the only BLAS that the UMFPACK - mexFunction will use is the internal MATLAB BLAS. It's possible to - use other BLAS, but handling the porting of using the mex compiler - with different BLAS libraries is not trivial. - - As of MATLAB 6.5, the BLAS used internally in MATLAB is the ATLAS - BLAS. - - 3) Use a freely-available high-performance BLAS library: - - (a) The BLAS by Kazashige Goto and Robert van de Geijn, at - http://www.cs.utexas.edu/users/flame/goto. This BLAS increased - the performance of UMFPACK by almost 50% as compared to the - ATLAS BLAS (v3.2). - - (b) The ATLAS BLAS, available at http://www.netlib.org/atlas, - by R. Clint Whaley, Antoine Petitet, and Jack Dongarra. - This has a standard C interface, and thus the interface to it is - fully portable. Its performance rivals, and sometimes exceeds, - the vendor-supplied BLAS on many computers. - - (b) The Fortran RISC BLAS by Michel Dayde', Iain Duff, Antoine - Petitet, and Abderrahim Qrichi Aniba, available via anonymous - ftp to ftp.enseeiht.fr in the pub/numerique/BLAS/RISC directory, - See M. J. Dayde' and I. S. Duff, "The RISC BLAS: A blocked - implementation of level 3 BLAS for RISC processors, ACM Trans. - Math. Software, vol. 25, no. 3., Sept. 1999. This will give - you good performance, but with the same C-to-Fortran portability - problems as option (1). - - 4) Use UMFPACK's built-in vanilla C code by setting -DNBLAS at compile - time. The key advantage is portability, which is guaranteed if you - have an ANSI C compliant compiler. You also don't need to download - any other package - UMFPACK is stand-alone. No Fortran is used - anywhere in UMFPACK. UMFPACK will be much slower than when using - options (1) through (3), however. - - 5) least preferred: use the standard Fortran implementation of the - BLAS, also available at Netlib (http://www.netlib.org/blas). This - will be no faster than option (4), and not portable because of - C-to-Fortran calling conventions. Don't bother trying option (5). - - The mechanics of how C calls the BLAS on various computers are as follows: - - * C-BLAS (from the ATLAS library, for example): - The same interface is used on all computers. - - * Defaults for calling the Fortran BLAS: - add underscore, pass scalars by reference, use string arguments. - - * The Fortran BLAS on Sun Solaris (when compiling the MATLAB mexFunction - or when using the Fortran RISC BLAS), SGI IRIX, Linux, and Compaq - Alpha: use defaults. - - * Sun Solaris (when using the C-callable Sun Performance library): - no underscore, pass scalars by value, use character arguments. - - * The Fortran BLAS (ESSL Library) on the IBM RS 6000, and HP Unix: - no underscore, pass scalars by reference, use string arguments. - - * The Fortran BLAS on Windows: - no underscore, pass scalars by reference, use string arguments. - If you compile the umfpack mexFunction using umfpack_make, and are - using the lcc compiler bundled with MATLAB, then you must first - copy the umfpack\lcc_lib\libmwlapack.lib file into the - \extern\lib\win32\lcc\ directory, where is the - directory in which MATLAB is installed. Next, type mex -setup - at the MATLAB prompt, and ask MATLAB to select the lcc compiler. - MATLAB has built-in BLAS, but it cannot be accessed by a program - compiled by lcc without first copying this file. -*/ - - - -/* -------------------------------------------------------------------------- */ -#ifdef USE_C_BLAS /* { */ -/* -------------------------------------------------------------------------- */ - - -/* -------------------------------------------------------------------------- */ -/* use the C-BLAS (any computer) */ -/* -------------------------------------------------------------------------- */ - -/* - C-BLAS is the default interface, with the following exceptions. Solaris - uses the Sun Performance BLAS for libumfpack.a (the C-callable library). - SGI IRIX uses the SCSL BLAS for libumfpack.a. All architectures use - MATLAB's internal BLAS for the mexFunction on any architecture. These - options are set in the Make.* files. The Make.generic file uses no BLAS - at all. - - If you use the ATLAS C-BLAS, then be sure to set the -I flag to - -I/path/ATLAS/include, where /path/ATLAS is the ATLAS installation - directory. See Make.solaris for an example. You do not need to do this - for the SGI, which has a /usr/include/cblas.h. -*/ - -#include "cblas.h" - -#ifdef COMPLEX -#define BLAS_GEMM_ROUTINE cblas_zgemm -#define BLAS_TRSM_ROUTINE cblas_ztrsm -#define BLAS_TRSV_ROUTINE cblas_ztrsv -#define BLAS_GEMV_ROUTINE cblas_zgemv -#define BLAS_GER_ROUTINE cblas_zgeru -#define BLAS_SCAL_ROUTINE cblas_zscal -#define BLAS_COPY_ROUTINE cblas_zcopy -#define BLAS_DECLARE_SCALAR(x) double x [2] -#define BLAS_ASSIGN(x,xr,xi) { x [0] = xr ; x [1] = xi ; } -#else -#define BLAS_GEMM_ROUTINE cblas_dgemm -#define BLAS_TRSM_ROUTINE cblas_dtrsm -#define BLAS_TRSV_ROUTINE cblas_dtrsv -#define BLAS_GEMV_ROUTINE cblas_dgemv -#define BLAS_GER_ROUTINE cblas_dger -#define BLAS_SCAL_ROUTINE cblas_dscal -#define BLAS_COPY_ROUTINE cblas_dcopy -#define BLAS_DECLARE_SCALAR(x) double x -#define BLAS_ASSIGN(x,xr,xi) { x = xr ; } -#endif - -#define BLAS_LOWER CblasLower -#define BLAS_UNIT_DIAGONAL CblasUnit -#define BLAS_RIGHT CblasRight -#define BLAS_NO_TRANSPOSE CblasNoTrans -#define BLAS_TRANSPOSE CblasTrans -#define BLAS_COLUMN_MAJOR_ORDER CblasColMajor, -#define BLAS_SCALAR(x) x -#define BLAS_INT_SCALAR(n) n -#define BLAS_ARRAY(a) a - - - -/* -------------------------------------------------------------------------- */ -#else /* } USE_C_BLAS { */ -/* -------------------------------------------------------------------------- */ - -/* -------------------------------------------------------------------------- */ -/* use Fortran (or other architecture-specific) BLAS */ -/* -------------------------------------------------------------------------- */ - -/* No such argument when not using the C-BLAS */ -#define BLAS_COLUMN_MAJOR_ORDER - -/* Determine which architecture we're on and set options accordingly. */ -/* The default, if nothing is defined is to add an underscore, */ -/* pass scalars by reference, and use string arguments. */ - -/* ---------------------------------- */ -/* Sun Performance BLAS */ -/* ---------------------------------- */ - -#ifdef USE_SUNPERF_BLAS -#ifdef _SUNPERF_H -/* has been included somehow anyway, outside of umf_config.h */ -#error "sunperf.h must NOT be #include'd. See umf_config.h for details." -#endif -#define BLAS_BY_VALUE -#define BLAS_NO_UNDERSCORE -#define BLAS_CHAR_ARG -#endif /* USE_SUNPERF_BLAS */ - -/* ---------------------------------- */ -/* SGI SCSL BLAS */ -/* ---------------------------------- */ - -#ifdef USE_SCSL_BLAS -#if defined (LP64) -#include -#else -#include -#endif -#define BLAS_BY_VALUE -#define BLAS_NO_UNDERSCORE -#endif /* USE_SCSL_BLAS */ - -/* ---------------------------------- */ -/* IBM AIX, Windows, and HP Fortran BLAS */ -/* ---------------------------------- */ - -#if defined (UMF_AIX) || defined (UMF_WINDOWS) || defined (UMF_HP) -#define BLAS_NO_UNDERSCORE -#endif - - -/* -------------------------------------------------------------------------- */ -/* BLAS names */ -/* -------------------------------------------------------------------------- */ - -#if defined (LP64) && defined (USE_SUNPERF_BLAS) && defined (LONG_INTEGER) - -/* 64-bit sunperf BLAS, for Sun Solaris only */ -#ifdef COMPLEX -#define BLAS_GEMM_ROUTINE zgemm_64 -#define BLAS_TRSM_ROUTINE ztrsm_64 -#define BLAS_TRSV_ROUTINE ztrsv_64 -#define BLAS_GEMV_ROUTINE zgemv_64 -#define BLAS_GER_ROUTINE zgeru_64 -#define BLAS_SCAL_ROUTINE zscal_64 -#define BLAS_COPY_ROUTINE zcopy_64 -#else -#define BLAS_GEMM_ROUTINE dgemm_64 -#define BLAS_TRSM_ROUTINE dtrsm_64 -#define BLAS_TRSV_ROUTINE dtrsv_64 -#define BLAS_GEMV_ROUTINE dgemv_64 -#define BLAS_GER_ROUTINE dger_64 -#define BLAS_SCAL_ROUTINE dscal_64 -#define BLAS_COPY_ROUTINE dcopy_64 -#endif /* COMPLEX */ - -#else - +/* C = C - A*B', where: + * A is m-by-k with leading dimension ldac + * B is k-by-n with leading dimension ldb + * C is m-by-n with leading dimension ldac */ #ifdef COMPLEX - -/* naming convention (use underscore, or not) */ -#ifdef BLAS_NO_UNDERSCORE -#define BLAS_GEMM_ROUTINE zgemm -#define BLAS_TRSM_ROUTINE ztrsm -#define BLAS_TRSV_ROUTINE ztrsv -#define BLAS_GEMV_ROUTINE zgemv -#define BLAS_GER_ROUTINE zgeru -#define BLAS_SCAL_ROUTINE zscal -#define BLAS_COPY_ROUTINE zcopy -#else -/* default: add underscore */ -#define BLAS_GEMM_ROUTINE zgemm_ -#define BLAS_TRSM_ROUTINE ztrsm_ -#define BLAS_TRSV_ROUTINE ztrsv_ -#define BLAS_GEMV_ROUTINE zgemv_ -#define BLAS_GER_ROUTINE zgeru_ -#define BLAS_SCAL_ROUTINE zscal_ -#define BLAS_COPY_ROUTINE zcopy_ -#endif - -#else - -/* naming convention (use underscore, or not) */ -#ifdef BLAS_NO_UNDERSCORE -#define BLAS_GEMM_ROUTINE dgemm -#define BLAS_TRSM_ROUTINE dtrsm -#define BLAS_TRSV_ROUTINE dtrsv -#define BLAS_GEMV_ROUTINE dgemv -#define BLAS_GER_ROUTINE dger -#define BLAS_SCAL_ROUTINE dscal -#define BLAS_COPY_ROUTINE dcopy +#define BLAS_GEMM(m,n,k,A,B,ldb,C,ldac) \ +{ \ + double alpha [2] = {-1,0}, beta [2] = {1,0} ; \ + BLAS_zgemm ("N", "T", m, n, k, alpha, (double *) A, ldac, \ + (double *) B, ldb, beta, (double *) C, ldac) ; \ +} #else -/* default: add underscore */ -#define BLAS_GEMM_ROUTINE dgemm_ -#define BLAS_TRSM_ROUTINE dtrsm_ -#define BLAS_TRSV_ROUTINE dtrsv_ -#define BLAS_GEMV_ROUTINE dgemv_ -#define BLAS_GER_ROUTINE dger_ -#define BLAS_SCAL_ROUTINE dscal_ -#define BLAS_COPY_ROUTINE dcopy_ +#define BLAS_GEMM(m,n,k,A,B,ldb,C,ldac) \ +{ \ + double alpha = -1, beta = 1 ; \ + BLAS_dgemm ("N", "T", m, n, k, &alpha, A, ldac, B, ldb, &beta, C, ldac) ; \ +} #endif -#endif /* COMPLEX */ - -#endif /* LP64 && USE_SUNPERF_BLAS */ - /* -------------------------------------------------------------------------- */ -/* BLAS real or complex floating-point scalars */ +/* GER */ /* -------------------------------------------------------------------------- */ +/* A = A - x*y', where: + * A is m-by-n with leading dimension d + x is a column vector with stride 1 + y is a column vector with stride 1 */ #ifdef COMPLEX - -/* - The SunPerf BLAS expects to see a doublecomplex scalar, but it - also will accept an array of size 2. See the manual, normally at - file:///opt/SUNWspro/WS6U1/lib/locale/C/html/manuals/perflib/user_guide - /plug_using_perflib.html . This manual is inconsistent with the man pages - for zgemm, zgemv, and zgeru and also inconsistent with the - include file. Use this instead, for SunPerf (only works if you do NOT - include sunperf.h). Fortunately, this file (umf_config.h) is not included - in any user code that calls UMFPACK. Thus, the caller may include - sunperf.h in his or her own code, and that is safely ignored here. - SGI's SCSL BLAS has yet a different kind of struct, but we can use a - double array of size 2 instead (since SCSL_VOID_ARGS is defined). - Most BLAS expect complex scalars as pointers to double arrays of size 2. -*/ - -#define BLAS_DECLARE_SCALAR(x) double x [2] -#define BLAS_ASSIGN(x,xr,xi) { x [0] = xr ; x [1] = xi ; } -#define BLAS_SCALAR(x) x - -#else - -#define BLAS_DECLARE_SCALAR(x) double x -#define BLAS_ASSIGN(x,xr,xi) { x = xr ; } -#ifdef BLAS_BY_VALUE -#define BLAS_SCALAR(x) x -#else -#define BLAS_SCALAR(x) &(x) -#endif - -#endif /* COMPLEX */ - - -/* -------------------------------------------------------------------------- */ -/* BLAS integer scalars */ -/* -------------------------------------------------------------------------- */ - -/* - Fortran requires integers to be passed by reference. - The SCSL BLAS requires long long arguments in LP64 mode. -*/ - -#if defined (USE_SCSL_BLAS) && defined (LP64) -#define BLAS_INT_SCALAR(n) ((long long) n) -#else -#ifdef BLAS_BY_VALUE -#define BLAS_INT_SCALAR(n) n -#else -#define BLAS_INT_SCALAR(n) &(n) -#endif -#endif - - -/* -------------------------------------------------------------------------- */ -/* BLAS strings */ -/* -------------------------------------------------------------------------- */ - -/* - The Sun Performance BLAS wants a character instead of a string. -*/ - -#ifdef BLAS_CHAR_ARG -#define BLAS_NO_TRANSPOSE 'N' -#define BLAS_TRANSPOSE 'T' -#define BLAS_LEFT 'L' -#define BLAS_RIGHT 'R' -#define BLAS_LOWER 'L' -#define BLAS_UNIT_DIAGONAL 'U' +#define BLAS_GER(m,n,x,y,A,d) \ +{ \ + double alpha [2] = {-1,0} ; \ + BLAS_zgeru (m, n, alpha, (double *) x, 1, (double *) y, 1, \ + (double *) A, d) ; \ +} #else -#define BLAS_NO_TRANSPOSE "N" -#define BLAS_TRANSPOSE "T" -#define BLAS_LEFT "L" -#define BLAS_RIGHT "R" -#define BLAS_LOWER "L" -#define BLAS_UNIT_DIAGONAL "U" +#define BLAS_GER(m,n,x,y,A,d) \ +{ \ + double alpha = -1 ; \ + BLAS_dger (m, n, &alpha, x, 1, y, 1, A, d) ; \ +} #endif /* -------------------------------------------------------------------------- */ -/* BLAS arrays */ +/* GEMV */ /* -------------------------------------------------------------------------- */ -/* - The complex SunPerf BLAS expects to see a doublecomplex array of size s. - This is broken (see above, regarding complex scalars in sunperf.h). - For SunPerf BLAS, just pass a pointer to the array, and ignore sunperf.h. - With sunperf.h, you would need: - - #define BLAS_ARRAY(a) ((doublecomplex *)(a)) - - SGI's SCSL BLAS has yet a different kind of struct, but we can use a - double array of size 2 instead (since SCSL_VOID_ARGS is defined). - - The real versions all use just a (double *) pointer. - - In all cases, no typecast is required. This will break if is - included. - - If you have read this far, I hope you see now why (void *) a much better - choice for complex BLAS prototypes, and why double x [2] is better than - an architecture dependent struct { double real ; double imag ; } - type definition. - -*/ - -#define BLAS_ARRAY(a) (a) - - -/* -------------------------------------------------------------------------- */ -#endif /* USE_C_BLAS } */ -/* -------------------------------------------------------------------------- */ - - - - - -/* -------------------------------------------------------------------------- */ -/* BLAS macros, for all interfaces */ -/* -------------------------------------------------------------------------- */ - -/* - All architecture dependent issues have now been taken into consideration, - and folded into the macros BLAS_DECLARE_SCALAR, BLAS_ASSIGN, BLAS_*_ROUTINE, - BLAS_COLUMN_MAJOR_ORDER, BLAS_NO_TRANSPOSE, BLAS_TRANSPOSE, BLAS_SCALAR, - BLAS_INT_SCALAR, BLAS_ARRAY, and Int. - - You will note that there is not a *** single *** name, declaration, or - argument to the BLAS which is not somehow different in one or more versions - of the BLAS! -*/ - - -/* C = C - A*B', where: - * A is m-by-k with leading dimension ldac - * B is k-by-n with leading dimension ldb - * C is m-by-n with leading dimension ldac */ -#define BLAS_GEMM(m,n,k,A,B,ldb,C,ldac) \ -{ \ - BLAS_DECLARE_SCALAR (alpha) ; \ - BLAS_DECLARE_SCALAR (beta) ; \ - BLAS_ASSIGN (alpha, -1.0, 0.0) ; \ - BLAS_ASSIGN (beta, 1.0, 0.0) ; \ - (void) BLAS_GEMM_ROUTINE (BLAS_COLUMN_MAJOR_ORDER \ - BLAS_NO_TRANSPOSE, BLAS_TRANSPOSE, \ - BLAS_INT_SCALAR (m), BLAS_INT_SCALAR (n), BLAS_INT_SCALAR (k), \ - BLAS_SCALAR (alpha), \ - BLAS_ARRAY (A), BLAS_INT_SCALAR (ldac), \ - BLAS_ARRAY (B), BLAS_INT_SCALAR (ldb), BLAS_SCALAR (beta), \ - BLAS_ARRAY (C), BLAS_INT_SCALAR (ldac)) ; \ -} - -/* A = A - x*y', where: - * A is m-by-n with leading dimension d +/* y = y - A*x, where A is m-by-n with leading dimension d, x is a column vector with stride 1 y is a column vector with stride 1 */ -#define BLAS_GER(m,n,x,y,A,d) \ +#ifdef COMPLEX +#define BLAS_GEMV(m,n,A,x,y,d) \ { \ - Int one = 1 ; \ - BLAS_DECLARE_SCALAR (alpha) ; \ - BLAS_ASSIGN (alpha, -1.0, 0.0) ; \ - (void) BLAS_GER_ROUTINE (BLAS_COLUMN_MAJOR_ORDER \ - BLAS_INT_SCALAR (m), BLAS_INT_SCALAR (n), \ - BLAS_SCALAR (alpha), \ - BLAS_ARRAY (x), BLAS_INT_SCALAR (one), \ - BLAS_ARRAY (y), BLAS_INT_SCALAR (one), \ - BLAS_ARRAY (A), BLAS_INT_SCALAR (d)) ; \ + double alpha [2] = {-1,0}, beta [2] = {1,0} ; \ + BLAS_zgemv ("N", m, n, alpha, (double *) A, d, (double *) x, 1, beta, \ + (double *) y, 1) ; \ } - -/* y = y - A*x, where A is m-by-n with leading dimension d, - x is a column vector with stride 1 - y is a column vector with stride 1 */ +#else #define BLAS_GEMV(m,n,A,x,y,d) \ { \ - Int one = 1 ; \ - BLAS_DECLARE_SCALAR (alpha) ; \ - BLAS_DECLARE_SCALAR (beta) ; \ - BLAS_ASSIGN (alpha, -1.0, 0.0) ; \ - BLAS_ASSIGN (beta, 1.0, 0.0) ; \ - (void) BLAS_GEMV_ROUTINE (BLAS_COLUMN_MAJOR_ORDER \ - BLAS_NO_TRANSPOSE, \ - BLAS_INT_SCALAR (m), BLAS_INT_SCALAR (n), \ - BLAS_SCALAR (alpha), \ - BLAS_ARRAY (A), BLAS_INT_SCALAR (d), \ - BLAS_ARRAY (x), BLAS_INT_SCALAR (one), BLAS_SCALAR (beta), \ - BLAS_ARRAY (y), BLAS_INT_SCALAR (one)) ; \ + double alpha = -1, beta = 1 ; \ + BLAS_dgemv ("N", m, n, &alpha, A, d, x, 1, &beta, y, 1) ; \ } +#endif +/* -------------------------------------------------------------------------- */ +/* TRSV */ +/* -------------------------------------------------------------------------- */ + /* solve Lx=b, where: * B is a column vector (m-by-1) with leading dimension d * A is m-by-m with leading dimension d */ +#ifdef COMPLEX +#define BLAS_TRSV(m,A,b,d) \ +{ \ + BLAS_ztrsv ("L", "N", "U", m, (double *) A, d, (double *) b, 1) ; \ +} +#else #define BLAS_TRSV(m,A,b,d) \ { \ - Int one = 1 ; \ - (void) BLAS_TRSV_ROUTINE (BLAS_COLUMN_MAJOR_ORDER \ - BLAS_LOWER, BLAS_NO_TRANSPOSE, BLAS_UNIT_DIAGONAL, \ - BLAS_INT_SCALAR (m), \ - BLAS_ARRAY (A), BLAS_INT_SCALAR (d), \ - BLAS_ARRAY (b), BLAS_INT_SCALAR (one)) ; \ + BLAS_dtrsv ("L", "N", "U", m, A, d, b, 1) ; \ } +#endif + + +/* -------------------------------------------------------------------------- */ +/* TRSM */ +/* -------------------------------------------------------------------------- */ /* solve XL'=B where: * B is m-by-n with leading dimension ldb * A is n-by-n with leading dimension lda */ +#ifdef COMPLEX #define BLAS_TRSM_RIGHT(m,n,A,lda,B,ldb) \ { \ - BLAS_DECLARE_SCALAR (alpha) ; \ - BLAS_ASSIGN (alpha, 1.0, 0.0) ; \ - (void) BLAS_TRSM_ROUTINE (BLAS_COLUMN_MAJOR_ORDER \ - BLAS_RIGHT, BLAS_LOWER, BLAS_TRANSPOSE, BLAS_UNIT_DIAGONAL, \ - BLAS_INT_SCALAR (m), BLAS_INT_SCALAR (n), \ - BLAS_SCALAR (alpha), \ - BLAS_ARRAY (A), BLAS_INT_SCALAR (lda), \ - BLAS_ARRAY (B), BLAS_INT_SCALAR (ldb)) ; \ + double alpha [2] = {1,0} ; \ + BLAS_ztrsm ("R", "L", "T", "U", m, n, alpha, (double *) A, lda, \ + (double *) B, ldb) ; \ } +#else +#define BLAS_TRSM_RIGHT(m,n,A,lda,B,ldb) \ +{ \ + double alpha = 1 ; \ + BLAS_dtrsm ("R", "L", "T", "U", m, n, &alpha, A, lda, B, ldb) ; \ +} +#endif + + +/* -------------------------------------------------------------------------- */ +/* SCAL */ +/* -------------------------------------------------------------------------- */ /* x = s*x, where x is a stride-1 vector of length n */ +#ifdef COMPLEX #define BLAS_SCAL(n,s,x) \ { \ - Int one = 1 ; \ - BLAS_DECLARE_SCALAR (alpha) ; \ - BLAS_ASSIGN (alpha, REAL_COMPONENT (s), IMAG_COMPONENT (s)) ; \ - (void) BLAS_SCAL_ROUTINE ( \ - BLAS_INT_SCALAR (n), BLAS_SCALAR (alpha), \ - BLAS_ARRAY (x), BLAS_INT_SCALAR (one)) ; \ + double alpha [2] ; \ + alpha [0] = REAL_COMPONENT (s) ; \ + alpha [1] = IMAG_COMPONENT (s) ; \ + BLAS_zscal (n, alpha, (double *) x, 1) ; \ } - -/* x = y, where x and y are a stride-1 vectors of length n */ -#define BLAS_COPY(n,x,y) \ +#else +#define BLAS_SCAL(n,s,x) \ { \ - Int one = 1 ; \ - (void) BLAS_COPY_ROUTINE ( \ - BLAS_INT_SCALAR (n), \ - BLAS_ARRAY (x), BLAS_INT_SCALAR (one), \ - BLAS_ARRAY (y), BLAS_INT_SCALAR (one)) ; \ + double alpha = REAL_COMPONENT (s) ; \ + BLAS_dscal (n, &alpha, (double *) x, 1) ; \ } - -#endif /* !defined (USE_NO_BLAS) } */ +#endif 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 d6eb1157c8..581ba62d9b 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_create_element.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_create_element.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -300,18 +300,6 @@ GLOBAL Int UMF_create_element for (j = 0 ; j < fncols ; j++) { copy_column (fnrows, Fcol, C) ; -#if 0 -#ifdef USE_NO_BLAS - copy_column (fnrows, Fcol, C) ; -#else - could also use BLAS-COPY (fnrows, Fcol, C) here, but it is typically - not as fast as the inlined copy_column subroutine, above. -#endif - for (i = 0 ; i < fnrows ; i++) - { - C [i] = Fcol [i] ; - } -#endif Fcol += fnr_curr ; C += fnrows ; } 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 c407f1c067..b6025bb02c 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_create_element.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_create_element.h @@ -1,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 4f197b9bbd..888a31661d 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_dump.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_dump.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -1061,28 +1061,12 @@ GLOBAL void UMF_dump_start DEBUG0 (("umfpack: debug version (SLOW!) ")) ; - DEBUG0 ((" BLAS: ")) ; - -#if defined (USE_NO_BLAS) - DEBUG0 (("none.")) ; -#elif defined (USE_C_BLAS) - DEBUG0 (("C-BLAS.")) ; -#elif defined (USE_MATLAB_BLAS) - DEBUG0 (("built-in MATLAB BLAS.")) ; -#elif defined (USE_SUNPERF_BLAS) - DEBUG0 (("Sun Performance Library BLAS.")) ; -#elif defined (USE_SCSL_BLAS) - DEBUG0 (("SGI SCSL BLAS.")) ; -#elif defined (USE_FORTRAN_BLAS) - DEBUG0 (("Fortran BLAS.")) ; -#endif - DEBUG0 ((" MATLAB: ")) ; #ifdef MATLAB_MEX_FILE DEBUG0 (("mexFunction.\n")) ; #else #ifdef MATHWORKS - DEBUG0 (("yes (uses MathWorks internal ut* routines).\n")) ; + DEBUG0 (("yes.\n")) ; #else DEBUG0 (("no.\n")) ; #endif @@ -1107,8 +1091,8 @@ GLOBAL void UMF_dump_start sizeof (int), sizeof (int) / sizeof (int), UNITS (int, 1) )) ; DEBUG2 (("sizeof (size_t) %u %u %u\n", sizeof (size_t), sizeof (size_t) / sizeof (size_t), UNITS (size_t, 1) )) ; - DEBUG2 (("sizeof (long) %u %u %u\n", - sizeof (long), sizeof (long) / sizeof (long), UNITS (long, 1) )) ; + DEBUG2 (("sizeof (UF_long) %u %u %u\n", + sizeof (UF_long), sizeof (UF_long) / sizeof (UF_long), UNITS (UF_long, 1))); DEBUG2 (("sizeof (double) %u %u %u\n", sizeof (double), sizeof (double) / sizeof (int), UNITS (double, 1) )) ; DEBUG2 (("sizeof (Unit) %u %u %u\n", diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_dump.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_dump.h index 71f11128fe..71ec7450fa 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_dump.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_dump.h @@ -1,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -109,9 +109,14 @@ GLOBAL void UMF_dump_diagonal_map ) ; #define UMF_DBMAX 50000 -GLOBAL extern Int UMF_debug ; -GLOBAL extern Int UMF_allocfail ; -GLOBAL extern double UMF_gprob ; + +#ifndef EXTERN +#define EXTERN extern +#endif + +GLOBAL EXTERN Int UMF_debug ; +GLOBAL EXTERN Int UMF_allocfail ; +GLOBAL EXTERN double UMF_gprob ; #define DEBUGk(k,params) { if (UMF_debug >= (k)) { PRINTF (params) ; } } 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 9a61fcc324..08cdc38906 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_extend_front.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_extend_front.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_extend_front.h index afccb8444f..6c51986cb8 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_extend_front.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_extend_front.h @@ -1,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 c1e02beca4..b5321f7281 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_free.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_free.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -29,8 +29,8 @@ GLOBAL void *UMF_free if (p) { - /* see umf_config.h for the memory allocator selection */ - FREE (p) ; + /* see AMD/Source/amd_global.c for the memory allocator selection */ + amd_free (p) ; #if defined (UMF_MALLOC_COUNT) || !defined (NDEBUG) /* One more object has been free'd. Keep track of the count. */ diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_free.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_free.h index f5987312f7..cacf3317ab 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_free.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_free.h @@ -1,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 c7f6056f65..d464071b72 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_fsize.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_fsize.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 757cbf38db..1bd83d42fb 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_fsize.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_fsize.h @@ -1,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 b4188823ea..73c40f1064 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_garbage_collection.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_garbage_collection.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 6445bfdd8c..9d2d8b7bf7 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_garbage_collection.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_garbage_collection.h @@ -1,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 abe201613c..01bc940d78 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_get_memory.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_get_memory.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_get_memory.h index 4b5bb3e710..317d97aa68 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_get_memory.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_get_memory.h @@ -1,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 8a7a01e777..566b2b748a 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_grow_front.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_grow_front.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_grow_front.h index b95be62e1e..8078897915 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_grow_front.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_grow_front.h @@ -1,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 e9fab62236..c8344db53f 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_init_front.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_init_front.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_init_front.h index 67039cb2de..9801b7280c 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_init_front.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_init_front.h @@ -1,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 5a0e3014d9..cd46b03298 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_internal.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_internal.h @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -54,8 +54,14 @@ #define UMF_ALPHA #define UMFPACK_ARCHITECTURE "Compaq Alpha" -#elif defined (__WIN32) || defined (_WIN32) || defined (_win32) || defined (__win32) || defined (WIN32) +#elif defined (_WIN32) || defined (WIN32) +#if defined (__MINGW32__) +#define UMF_MINGW +#elif defined (__CYGWIN32__) +#define UMF_CYGWIN +#else #define UMF_WINDOWS +#endif #define UMFPACK_ARCHITECTURE "Microsoft Windows" #elif defined (__hppa) || defined (__hpux) || defined (MHPUX) || defined (ARCH_HPUX) @@ -83,12 +89,21 @@ /* AMD include file */ /* -------------------------------------------------------------------------- */ -/* stdio.h, stdlib.h, limits.h, and math.h, NDEBUG definition, - * assert.h, and MATLAB include files */ +/* stdio.h, stdlib.h, limits.h, and math.h, NDEBUG definition, assert.h */ #include "amd_internal.h" /* -------------------------------------------------------------------------- */ -/* Real/complex and int/long definitions, double relops */ +/* MATLAB include files */ +/* -------------------------------------------------------------------------- */ + +/* only used when compiling the UMFPACK mexFunction */ +#ifdef MATLAB_MEX_FILE +#include "matrix.h" +#include "mex.h" +#endif + +/* -------------------------------------------------------------------------- */ +/* Real/complex and int/UF_long definitions, double relops */ /* -------------------------------------------------------------------------- */ #include "umf_version.h" @@ -185,61 +200,15 @@ /* Memory allocator */ /* -------------------------------------------------------------------------- */ -/* The MATLAB mexFunction uses MATLAB's memory manager, while the C-callable - * AMD library uses the ANSI C malloc, free, and realloc routines. To use - * the mx* memory allocation routines, use -DNUTIL when compiling. - */ - -#undef ALLOCATE -#undef FREE -#undef REALLOC - -#ifdef MATLAB_MEX_FILE - -#ifdef NUTIL - -/* These functions simply terminate the mexFunction if they fail to allocate - * memory. That's too restrictive for UMFPACK. */ -#define ALLOCATE mxMalloc -#define FREE mxFree -#define REALLOCATE mxRealloc - -#else - -/* Use internal MATLAB memory allocation routines, used by built-in MATLAB - * functions. These are not documented, but are available for use. Their - * prototypes are in util.h, but that file is not provided to the MATLAB user. - * The advantage of using these routines is that they return NULL if out of - * memory, instead of terminating the mexFunction. UMFPACK attempts to allocate - * extra space for "elbow room", and then reduces its request if the memory is - * not available. That strategy doesn't work with the mx* routines. +/* See AMD/Source/amd_global.c and AMD/Source/amd.h for the + * definition of the memory allocator used by UMFPACK. Versions 4.4 and + * earlier had their memory allocator definitions here. Other global + * function pointers for UMFPACK are located in umf_global.c. + * + * The MATLAB mexFunction uses MATLAB's memory manager and mexPrintf, while the + * C-callable AMD library uses the ANSI C malloc, free, realloc, and printf + * routines. */ -void *utMalloc (size_t size) ; -void utFree (void *p) ; -void *utRealloc (void *p, size_t size) ; -#define ALLOCATE utMalloc -#define FREE utFree -#define REALLOCATE utRealloc - -#endif -#else -#ifdef MATHWORKS - -/* Compiling as a built-in routine. Since out-of-memory conditions are checked - * after every allocation, we can use ut* routines here. */ -#define ALLOCATE utMalloc -#define FREE utFree -#define REALLOCATE utRealloc - -#else - -/* use the ANSI C memory allocation routines */ -#define ALLOCATE malloc -#define FREE free -#define REALLOCATE realloc - -#endif -#endif /* -------------------------------------------------------------------------- */ /* Memory space definitions */ @@ -749,8 +718,13 @@ 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 ; + +#ifndef EXTERN +#define EXTERN extern +#endif + +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 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 77ae6ccbe5..71207366b3 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_is_permutation.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_is_permutation.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 a9ed1dc58a..2468545eee 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_is_permutation.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_is_permutation.h @@ -1,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 cd1fa5bdad..54e756fd90 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_kernel.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_kernel.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 912e7f3567..0f5d70d617 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_kernel.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_kernel.h @@ -1,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 fec1650d6d..7ec3ed6476 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_kernel_init.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_kernel_init.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -448,7 +448,7 @@ GLOBAL Int UMF_kernel_init do_recip = FALSE ; #endif /* check the input matrix */ - if (!AMD_valid (n_row, n_col, Ap, Ai)) + if (AMD_valid (n_row, n_col, Ap, Ai) != AMD_OK) { /* matrix is invalid */ return (FALSE) ; @@ -702,8 +702,8 @@ GLOBAL Int UMF_kernel_init k, newrow)) ; if (--(Wp [newrow]) < 0) { - /* :: pattern change (singleton row too long) :: */ - DEBUGm4 (("bad U singleton row (too long)\n")) ; + /* :: pattern change (singleton row too lengthy) :: */ + DEBUGm4 (("bad U singleton row (too lengthy)\n")) ; return (FALSE) ; /* pattern changed */ } *(Rpi [newrow]++) = k ; @@ -716,7 +716,7 @@ GLOBAL Int UMF_kernel_init k, newrow)) ; if (llen >= lilen) { - DEBUGm4 (("bad L singleton col (too long)\n")) ; + DEBUGm4 (("bad L singleton col (too lengthy)\n")) ; return (FALSE) ; /* pattern changed */ } Li [llen] = newrow ; @@ -727,7 +727,7 @@ GLOBAL Int UMF_kernel_init if (llen != lilen) { - /* :: pattern change (singleton column too long) :: */ + /* :: pattern change (singleton column too lengthy) :: */ DEBUGm4 (("bad L singleton col (too short)\n")) ; return (FALSE) ; /* pattern changed */ } @@ -820,7 +820,7 @@ GLOBAL Int UMF_kernel_init k, newrow)) ; if (--(Wp [newrow]) < 0) { - DEBUGm4 (("bad row of U or A (too long)\n")) ; + DEBUGm4 (("bad row of U or A (too lengthy)\n")) ; return (FALSE) ; /* pattern changed */ } *(Rpi [newrow]++) = k ; @@ -833,7 +833,7 @@ GLOBAL Int UMF_kernel_init k, e, newrow)) ; if (clen >= esize) { - DEBUGm4 (("bad A column (too long)\n")) ; + DEBUGm4 (("bad A column (too lengthy)\n")) ; return (FALSE) ; /* pattern changed */ } ASSERT (E [e]) ; 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 e3d22cf99b..dc86d0477f 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_kernel_init.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_kernel_init.h @@ -1,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 91b00204d4..1609c2cf7a 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_kernel_wrapup.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_kernel_wrapup.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_kernel_wrapup.h index 2a62d99079..e3e8fbdfb5 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_kernel_wrapup.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_kernel_wrapup.h @@ -1,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 b8a444c536..d81491bd62 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_local_search.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_local_search.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -133,6 +133,12 @@ GLOBAL Int UMF_local_search Tuple *tp, *tpend, *tp1, *tp2 ; Element *ep ; +#ifndef NBLAS + Int blas_ok = TRUE ; +#else +#define blas_ok FALSE +#endif + #ifndef NDEBUG Int debug_ok, n_row, n_col, *Row_degree ; Row_degree = Numeric->Rperm ; /* for NON_PIVOTAL_ROW macro only */ @@ -468,26 +474,25 @@ GLOBAL Int UMF_local_search { /* solve Lx=b, where b = U (:,k), stored in the LU block */ -#ifdef USE_NO_BLAS - - /* no BLAS available - use plain C code instead */ - Entry *Flub = Flublock ; - for (j = 0 ; j < fnpiv ; j++) +#ifndef NBLAS + BLAS_TRSV (fnpiv, Flublock, Flu, nb) ; +#endif + if (!blas_ok) { - Entry Fuj = Flu [j] ; -#pragma ivdep - for (i = j+1 ; i < fnpiv ; i++) + /* use plain C code if no BLAS, or on integer overflow */ + Entry *Flub = Flublock ; + for (j = 0 ; j < fnpiv ; j++) { - /* Flu [i] -= Flublock [i + j*nb] * Flu [j] ; */ - MULT_SUB (Flu [i], Flub [i], Fuj) ; + Entry Fuj = Flu [j] ; +#pragma ivdep + for (i = j+1 ; i < fnpiv ; i++) + { + /* Flu [i] -= Flublock [i + j*nb] * Flu [j] ; */ + MULT_SUB (Flu [i], Flub [i], Fuj) ; + } + Flub += nb ; } - Flub += nb ; } - -#else - BLAS_TRSV (fnpiv, Flublock, Flu, nb) ; -#endif - } /* ------------------------------------------------------------------ */ @@ -505,7 +510,7 @@ GLOBAL Int UMF_local_search /* this work will be discarded if the pivcol [OUT] is chosen instead */ -#ifdef USE_NO_BLAS +#ifdef NBLAS /* no BLAS available - use plain C code instead */ for (j = 0 ; j < fnpiv ; j++) { 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 f5fe61f99e..434d66f7fa 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_local_search.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_local_search.h @@ -1,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 8c58c388de..cf3bf9f759 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_lsolve.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_lsolve.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_lsolve.h index 05d630fd73..211adffe9c 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_lsolve.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_lsolve.h @@ -1,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 a4b44c9429..b259d27a1f 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_ltsolve.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_ltsolve.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_ltsolve.h index 22f4352757..02f77340ed 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_ltsolve.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_ltsolve.h @@ -1,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 411e08d282..09ef770f6c 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_malloc.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_malloc.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -72,8 +72,8 @@ GLOBAL void *UMF_malloc } size *= size_of_object ; - /* see umf_config.h for the memory allocator selection */ - p = ALLOCATE (size) ; + /* see AMD/Source/amd_global.c for the memory allocator selection */ + p = amd_malloc (size) ; DEBUG0 ((ID"\n", (Int) p)) ; diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_malloc.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_malloc.h index edd44ed013..8ee993407d 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_malloc.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_malloc.h @@ -1,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -8,7 +8,12 @@ #define _UMF_MALLOC #if defined (UMF_MALLOC_COUNT) || !defined (NDEBUG) -GLOBAL extern Int UMF_malloc_count ; + +#ifndef EXTERN +#define EXTERN extern +#endif + +GLOBAL EXTERN Int UMF_malloc_count ; #endif GLOBAL void *UMF_malloc 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 74d6ba03ec..cef3ba7178 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,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 5482f0b1bf..e0b259f5df 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,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 6db2caaf23..26001822fa 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,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 be882b5c7a..510a6fa036 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,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 56473675c8..8499644026 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,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 1062d2404f..d072a73ac9 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,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 5fac99129f..05a631338e 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,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 43d136ed21..14c7324de8 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,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 37fcc455ff..8981dd2f50 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,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 1095fdddb6..45d552fb81 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,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 index f1f3d64edf..06035609cf 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_multicompile.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_multicompile.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_realloc.c index dc3d33c5d4..ee0f70d695 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_realloc.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_realloc.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -56,8 +56,8 @@ GLOBAL void *UMF_realloc DEBUG0 (("UMF_realloc: "ID" n_objects "ID" size_of_object "ID"\n", (Int) p, n_objects, (Int) size_of_object)) ; - /* see umf_config.h for the memory allocator selection */ - p2 = REALLOCATE (p, size) ; + /* see AMD/Source/amd_global.c for the memory allocator selection */ + p2 = amd_realloc (p, size) ; #if defined (UMF_MALLOC_COUNT) || !defined (NDEBUG) /* If p didn't exist on input, and p2 exists, then a new object has been diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_realloc.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_realloc.h index 88cd8a69f1..5b2f1c2576 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_realloc.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_realloc.h @@ -1,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 659f8bedd5..c97052cc45 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_report_perm.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_report_perm.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 b513301fbd..6b18d85b7b 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_report_perm.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_report_perm.h @@ -1,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 38475b5fc5..4b602d1626 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_report_vector.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_report_vector.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_report_vector.h index 8d0cba1c1d..6a758d7355 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_report_vector.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_report_vector.h @@ -1,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 14757fb2b7..f20ca0ca51 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_row_search.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_row_search.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 61b64d252e..e0171ee893 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_row_search.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_row_search.h @@ -1,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 42966db7dd..98fb3baaaf 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_scale.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_scale.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -63,65 +63,19 @@ GLOBAL void UMF_scale { /* ------------------------------------------------------------------ */ - /* normal case. select the x/pivot or x * (1/pivot) method */ + /* normal case */ /* ------------------------------------------------------------------ */ /* The pivot is not tiny, and is not NaN. Don't bother to check for - * zeros in the pivot column, X. */ - -#if !defined (NRECIPROCAL) && !(defined (__GNUC__) && defined (COMPLEX)) - - /* -------------------------------------------------------------- */ - /* multiply x by (1/pivot) */ - /* -------------------------------------------------------------- */ - - /* Slightly less accurate, but faster. It allows the use of - * the level-1 BLAS dscal or zscal routine. This not used when - * UMFPACK is used in MATLAB (either as a built-in routine, or as - * a mexFunction). - * - * Using gcc version 3.2 can cause the following code to fail for - * some complex matrices (not all), with or without the BLAS. This - * was found in Red Hat Linux 7.3 on a Dell Latitude C840 with a - * Pentium 4M. Thus, this code is not used when gcc is used, for - * the complex case. - * - * It works just fine with Intel's icc compiler, version 7.0. - */ - - /* pivot = 1 / pivot */ - RECIPROCAL (pivot) ; - -#if defined (USE_NO_BLAS) - for (i = 0 ; i < n ; i++) - { - /* X [i] *= pivot ; */ - x = X [i] ; - MULT (X [i], x, pivot) ; - } -#else - BLAS_SCAL (n, pivot, X) ; -#endif - -#else - - /* -------------------------------------------------------------- */ - /* divide x by the pivot */ - /* -------------------------------------------------------------- */ - - /* This is slightly more accurate, particularly if the pivot column - * consists of only IEEE subnormals. Always do this if UMFPACK is - * being compiled as a built-in routine or mexFunction in MATLAB, - * or if gcc is being used with complex matrices. */ - - for (i = 0 ; i < n ; i++) - { - /* X [i] /= pivot ; */ - x = X [i] ; - DIV (X [i], x, pivot) ; - } - -#endif + * zeros in the pivot column, X. This is slightly more accurate than + * multiplying by 1/pivot (but slightly slower), particularly if the + * pivot column consists of only IEEE subnormals. */ + for (i = 0 ; i < n ; i++) + { + /* X [i] /= pivot ; */ + x = X [i] ; + DIV (X [i], x, pivot) ; + } } } diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_scale.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_scale.h index 1ffd45beec..99799f52ae 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_scale.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_scale.h @@ -1,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 8404f3126f..782b716161 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_scale_column.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_scale_column.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_scale_column.h index c949ec9f1b..2306787832 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_scale_column.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_scale_column.h @@ -1,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 eb0d2dc518..8dfe2ca2eb 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_set_stats.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_set_stats.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 7fadbcb61e..f4342ce58a 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_set_stats.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_set_stats.h @@ -1,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 b63a560768..9d1617dc62 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_singletons.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_singletons.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -13,27 +13,28 @@ * that the matrix is in the following form: * * x x x x x x x x x - * 0 x x x x x x x x - * 0 0 x x x x x x x - * 0 0 0 x 0 0 0 0 0 - * 0 0 0 x x 0 0 0 0 - * 0 0 0 x x s s s s - * 0 0 0 x x s s s s - * 0 0 0 x x s s s s - * 0 0 0 x x s s s s + * . x x x x x x x x + * . . x x x x x x x + * . . . x . . . . . + * . . . x x . . . . + * . . . x x s s s s + * . . . x x s s s s + * . . . x x s s s s + * . . . x x s s s s * * The above example has 3 column singletons (the first three columns and * their corresponding pivot rows) and 2 row singletons. The singletons are * ordered first, because they have zero Markowitz cost. The LU factorization * for these first five rows and columns is free - there is no work to do * (except to scale the pivot columns for the 2 row singletons), and no - * fill-in occurs. * The remaining * submatrix (4-by-4 in the above example) + * fill-in occurs. The remaining submatrix (4-by-4 in the above example) * has no rows or columns with degree one. It may have empty rows or columns. * * This algorithm does not perform a full permutation to block triangular * form. If there are one or more singletons, then the matrix can be * permuted to block triangular form, but UMFPACK does not perform the full - * BTF permutation (see also "dmperm" in MATLAB). + * BTF permutation (see also "dmperm" in MATLAB, CSparse cs_dmperm, + * and SuiteSparse/BTF). */ #include "umf_internal.h" diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_singletons.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_singletons.h index d2d420cc4f..5b2e49837d 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_singletons.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_singletons.h @@ -1,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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_solve.c b/deal.II/contrib/umfpack/UMFPACK/Source/umf_solve.c index f670f0ca64..fc785865e6 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_solve.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_solve.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -21,6 +21,9 @@ Uses the sparse backward error method of Arioli, Demmel, and Duff (Solving sparse linear systems with sparse backward error, SIAM J. Matrix Analysis and Applic., vol 10, pp. 165-190). + + Added on option that allows the complex A and X to be split differently + than B, Oct 10, 2005. Contributed by David Bateman. */ #include "umf_internal.h" @@ -79,7 +82,8 @@ GLOBAL Int UMF_solve double *Z2, *Y, *B2, *Rs ; Int *Rperm, *Cperm, i, n, p, step, j, nz, status, p2, do_scale ; #ifdef COMPLEX - Int split ; + Int AXsplit ; + Int Bsplit ; #endif #ifndef NRECIPROCAL Int do_recip = Numeric->do_recip ; @@ -141,7 +145,7 @@ GLOBAL Int UMF_solve 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) ; + AXsplit = SPLIT (Az) || 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] */ @@ -150,10 +154,12 @@ GLOBAL Int UMF_solve } else { - /* A is ignored, only look at X and B for split/packed cases */ - split = SPLIT (Bz) && SPLIT (Xz) ; + /* A is ignored, only look at X for split/packed cases */ + AXsplit = SPLIT(Xz); } - if (split) + Bsplit = SPLIT (Bz); + + if (AXsplit) { X = (Entry *) (SolveWork + 2*n) ; /* Entry X [0..n-1] */ } @@ -209,7 +215,7 @@ GLOBAL Int UMF_solve for (p = 0 ; p < p2 ; p++) { /* Y [Ai [p]] += ABS (Ax [p]) ; */ - ASSIGN (aij, Ax, Az, p, split) ; + ASSIGN (aij, Ax, Az, p, AXsplit) ; ABS (d, aij) ; Y [Ai [p]] += d ; } @@ -219,7 +225,7 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* B2 [i] = ABS (B [i]) ; */ - ASSIGN (bi, Bx, Bz, i, split) ; + ASSIGN (bi, Bx, Bz, i, Bsplit) ; ABS (B2 [i], bi) ; } @@ -276,7 +282,7 @@ GLOBAL Int UMF_solve /* multiply by the scale factors */ for (i = 0 ; i < n ; i++) { - ASSIGN (X [i], Bx, Bz, i, split) ; + ASSIGN (X [i], Bx, Bz, i, Bsplit) ; SCALE (X [i], Rs [i]) ; } } @@ -286,7 +292,7 @@ GLOBAL Int UMF_solve /* divide by the scale factors */ for (i = 0 ; i < n ; i++) { - ASSIGN (X [i], Bx, Bz, i, split) ; + ASSIGN (X [i], Bx, Bz, i, Bsplit) ; SCALE_DIV (X [i], Rs [i]) ; } } @@ -302,7 +308,7 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* W [i] = B [Rperm [i]] ; */ - ASSIGN (W [i], Bx, Bz, Rperm [i], split) ; + ASSIGN (W [i], Bx, Bz, Rperm [i], Bsplit) ; } } } @@ -311,7 +317,7 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* Z [i] = B [i] ; */ - ASSIGN (Z [i], Bx, Bz, i, split) ; + ASSIGN (Z [i], Bx, Bz, i, Bsplit) ; } flops += MULTSUB_FLOPS * nz ; for (i = 0 ; i < n ; i++) @@ -321,7 +327,7 @@ GLOBAL Int UMF_solve for (p = Ap [i] ; p < p2 ; p++) { /* Z [Ai [p]] -= Ax [p] * xi ; */ - ASSIGN (aij, Ax, Az, p, split) ; + ASSIGN (aij, Ax, Az, p, AXsplit) ; MULT_SUB (Z [Ai [p]], aij, xi) ; } } @@ -390,7 +396,7 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* W [i] = B [i] ; */ - ASSIGN (W [i], Bx, Bz, i, split) ; + ASSIGN (W [i], Bx, Bz, i, Bsplit) ; Z2 [i] = 0. ; } flops += (MULT_FLOPS + DECREMENT_FLOPS + ABS_FLOPS + 1) * nz ; @@ -403,7 +409,7 @@ GLOBAL Int UMF_solve i = Ai [p] ; /* axx = Ax [p] * xj ; */ - ASSIGN (aij, Ax, Az, p, split) ; + ASSIGN (aij, Ax, Az, p, AXsplit) ; MULT (axx, aij, xj) ; /* W [i] -= axx ; */ @@ -493,7 +499,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, Az, p, split) ; + ASSIGN (aij, Ax, Az, p, AXsplit) ; ABS (d, aij) ; yi += (d * Rs [Ai [p]]) ; } @@ -513,7 +519,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, Az, p, split) ; + ASSIGN (aij, Ax, Az, p, AXsplit) ; ABS (d, aij) ; yi += (d / Rs [Ai [p]]) ; } @@ -534,7 +540,7 @@ GLOBAL Int UMF_solve /* yi += ABS (Ax [p]) ; */ /* note that abs (aij) is the same as * abs (conj (aij)) */ - ASSIGN (aij, Ax, Az, p, split) ; + ASSIGN (aij, Ax, Az, p, AXsplit) ; ABS (d, aij) ; yi += d ; } @@ -546,7 +552,7 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* B2 [i] = ABS (B [i]) ; */ - ASSIGN (bi, Bx, Bz, i, split) ; + ASSIGN (bi, Bx, Bz, i, Bsplit) ; ABS (B2 [i], bi) ; } @@ -568,7 +574,7 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* W [i] = B [Cperm [i]] ; */ - ASSIGN (W [i], Bx, Bz, Cperm [i], split) ; + ASSIGN (W [i], Bx, Bz, Cperm [i], Bsplit) ; } } else @@ -577,7 +583,7 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* Z [i] = B [i] ; */ - ASSIGN (Z [i], Bx, Bz, i, split) ; + ASSIGN (Z [i], Bx, Bz, i, Bsplit) ; } flops += MULTSUB_FLOPS * nz ; for (i = 0 ; i < n ; i++) @@ -587,7 +593,7 @@ GLOBAL Int UMF_solve for (p = Ap [i] ; p < p2 ; p++) { /* zi -= conjugate (Ax [p]) * X [Ai [p]] ; */ - ASSIGN (aij, Ax, Az, p, split) ; + ASSIGN (aij, Ax, Az, p, Bsplit) ; MULT_SUB_CONJ (zi, X [Ai [p]], aij) ; } Z [i] = zi ; @@ -696,13 +702,13 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* wi = B [i] ; */ - ASSIGN (wi, Bx, Bz, i, split) ; + ASSIGN (wi, Bx, Bz, i, Bsplit) ; z2i = 0. ; p2 = Ap [i+1] ; for (p = Ap [i] ; p < p2 ; p++) { /* axx = conjugate (Ax [p]) * X [Ai [p]] ; */ - ASSIGN (aij, Ax, Az, p, split) ; + ASSIGN (aij, Ax, Az, p, AXsplit) ; MULT_CONJ (axx, X [Ai [p]], aij) ; /* wi -= axx ; */ @@ -766,7 +772,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, Az, p, split) ; + ASSIGN (aij, Ax, Az, p, AXsplit) ; ABS (d, aij) ; yi += (d * Rs [Ai [p]]) ; } @@ -786,7 +792,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, Az, p, split) ; + ASSIGN (aij, Ax, Az, p, AXsplit) ; ABS (d, aij) ; yi += (d / Rs [Ai [p]]) ; } @@ -807,7 +813,7 @@ GLOBAL Int UMF_solve /* yi += ABS (Ax [p]) */ /* note that A.' is the array transpose, * so no conjugate */ - ASSIGN (aij, Ax, Az, p, split) ; + ASSIGN (aij, Ax, Az, p, AXsplit) ; ABS (d, aij) ; yi += d ; } @@ -819,7 +825,7 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* B2 [i] = ABS (B [i]) ; */ - ASSIGN (bi, Bx, Bz, i, split) ; + ASSIGN (bi, Bx, Bz, i, Bsplit) ; ABS (B2 [i], bi) ; } @@ -841,7 +847,7 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* W [i] = B [Cperm [i]] ; */ - ASSIGN (W [i], Bx, Bz, Cperm [i], split) ; + ASSIGN (W [i], Bx, Bz, Cperm [i], Bsplit) ; } } else @@ -850,7 +856,7 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* Z [i] = B [i] ; */ - ASSIGN (Z [i], Bx, Bz, i, split) ; + ASSIGN (Z [i], Bx, Bz, i, Bsplit) ; } flops += MULTSUB_FLOPS * nz ; for (i = 0 ; i < n ; i++) @@ -860,7 +866,7 @@ GLOBAL Int UMF_solve for (p = Ap [i] ; p < p2 ; p++) { /* zi -= Ax [p] * X [Ai [p]] ; */ - ASSIGN (aij, Ax, Az, p, split) ; + ASSIGN (aij, Ax, Az, p, AXsplit) ; MULT_SUB (zi, aij, X [Ai [p]]) ; } Z [i] = zi ; @@ -969,13 +975,13 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* wi = B [i] ; */ - ASSIGN (wi, Bx, Bz, i, split) ; + ASSIGN (wi, Bx, Bz, i, Bsplit) ; z2i = 0. ; p2 = Ap [i+1] ; for (p = Ap [i] ; p < p2 ; p++) { /* axx = Ax [p] * X [Ai [p]] ; */ - ASSIGN (aij, Ax, Az, p, split) ; + ASSIGN (aij, Ax, Az, p, AXsplit) ; MULT (axx, aij, X [Ai [p]]) ; /* wi -= axx ; */ @@ -1011,7 +1017,7 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* X [i] = B [Rperm [i]] ; */ - ASSIGN (X [i], Bx, Bz, Rperm [i], split) ; + ASSIGN (X [i], Bx, Bz, Rperm [i], Bsplit) ; } flops = UMF_lsolve (Numeric, X, Pattern) ; status = UMFPACK_OK ; @@ -1027,7 +1033,7 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* X [i] = B [i] ; */ - ASSIGN (X [i], Bx, Bz, i, split) ; + ASSIGN (X [i], Bx, Bz, i, Bsplit) ; } flops = UMF_lsolve (Numeric, X, Pattern) ; status = UMFPACK_OK ; @@ -1043,7 +1049,7 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* W [i] = B [i] ; */ - ASSIGN (W [i], Bx, Bz, i, split) ; + ASSIGN (W [i], Bx, Bz, i, Bsplit) ; } flops = UMF_lhsolve (Numeric, W, Pattern) ; for (i = 0 ; i < n ; i++) @@ -1063,7 +1069,7 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* W [i] = B [i] ; */ - ASSIGN (W [i], Bx, Bz, i, split) ; + ASSIGN (W [i], Bx, Bz, i, Bsplit) ; } flops = UMF_ltsolve (Numeric, W, Pattern) ; for (i = 0 ; i < n ; i++) @@ -1083,7 +1089,7 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* X [i] = B [i] ; */ - ASSIGN (X [i], Bx, Bz, i, split) ; + ASSIGN (X [i], Bx, Bz, i, Bsplit) ; } flops = UMF_lhsolve (Numeric, X, Pattern) ; status = UMFPACK_OK ; @@ -1099,7 +1105,7 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* X [i] = B [i] ; */ - ASSIGN (X [i], Bx, Bz, i, split) ; + ASSIGN (X [i], Bx, Bz, i, Bsplit) ; } flops = UMF_ltsolve (Numeric, X, Pattern) ; status = UMFPACK_OK ; @@ -1115,7 +1121,7 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* W [i] = B [i] ; */ - ASSIGN (W [i], Bx, Bz, i, split) ; + ASSIGN (W [i], Bx, Bz, i, Bsplit) ; } flops = UMF_usolve (Numeric, W, Pattern) ; for (i = 0 ; i < n ; i++) @@ -1134,7 +1140,7 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* X [i] = B [i] ; */ - ASSIGN (X [i], Bx, Bz, i, split) ; + ASSIGN (X [i], Bx, Bz, i, Bsplit) ; } flops = UMF_usolve (Numeric, X, Pattern) ; @@ -1149,7 +1155,7 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* X [i] = B [Cperm [i]] ; */ - ASSIGN (X [i], Bx, Bz, Cperm [i], split) ; + ASSIGN (X [i], Bx, Bz, Cperm [i], Bsplit) ; } flops = UMF_uhsolve (Numeric, X, Pattern) ; @@ -1164,7 +1170,7 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* X [i] = B [Cperm [i]] ; */ - ASSIGN (X [i], Bx, Bz, Cperm [i], split) ; + ASSIGN (X [i], Bx, Bz, Cperm [i], Bsplit) ; } flops = UMF_utsolve (Numeric, X, Pattern) ; @@ -1179,7 +1185,7 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* X [i] = B [i] ; */ - ASSIGN (X [i], Bx, Bz, i, split) ; + ASSIGN (X [i], Bx, Bz, i, Bsplit) ; } flops = UMF_uhsolve (Numeric, X, Pattern) ; @@ -1194,7 +1200,7 @@ GLOBAL Int UMF_solve for (i = 0 ; i < n ; i++) { /* X [i] = B [i] ; */ - ASSIGN (X [i], Bx, Bz, i, split) ; + ASSIGN (X [i], Bx, Bz, i, Bsplit) ; } flops = UMF_utsolve (Numeric, X, Pattern) ; @@ -1206,7 +1212,7 @@ GLOBAL Int UMF_solve #ifdef COMPLEX /* copy the solution back, from Entry X [ ] to double Xx [ ] and Xz [ ] */ - if (split) + if (AXsplit) { for (i = 0 ; i < n ; i++) { diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_solve.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_solve.h index d818eb266f..80a796ca2c 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_solve.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_solve.h @@ -1,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 a994fb605f..aa581d4607 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_start_front.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_start_front.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_start_front.h index fa4b7f188f..1a1c4f224c 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_start_front.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_start_front.h @@ -1,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 fcc6c7ec79..0d0ea092c8 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_store_lu.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_store_lu.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_store_lu.h index 2541b83c2c..82627ada6d 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_store_lu.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_store_lu.h @@ -1,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 cce83651da..8c417cd1d3 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_symbolic_usage.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_symbolic_usage.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 ab8bbe1680..3fad24a53b 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_symbolic_usage.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_symbolic_usage.h @@ -1,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 47331e9c21..061c97b9a7 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_transpose.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_transpose.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -92,7 +92,7 @@ GLOBAL Int UMF_transpose { return (UMFPACK_ERROR_invalid_permutation) ; } - if (!AMD_valid (n_row, n_col, Ap, Ai)) + if (AMD_valid (n_row, n_col, Ap, Ai) != AMD_OK) { return (UMFPACK_ERROR_invalid_matrix) ; } @@ -393,7 +393,7 @@ GLOBAL Int UMF_transpose Rz, #endif Ri, Rp, n_col, n_row, Rp [n_row]) ; - ASSERT (AMD_valid (n_col, n_row, Rp, Ri)) ; + ASSERT (AMD_valid (n_col, n_row, Rp, Ri) == AMD_OK) ; #endif return (UMFPACK_OK) ; diff --git a/deal.II/contrib/umfpack/UMFPACK/Source/umf_transpose.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_transpose.h index 354e678283..4c4dee911c 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_transpose.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_transpose.h @@ -1,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 8e74bff23f..b1f0b306f6 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_triplet.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_triplet.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_triplet.h index 18947d39db..62f9729994 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_triplet.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_triplet.h @@ -1,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 e31e04cf24..c0680de185 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_tuple_lengths.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_tuple_lengths.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_tuple_lengths.h index 8931c47f37..a31ccb94ad 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_tuple_lengths.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_tuple_lengths.h @@ -1,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 b536d4e93d..ca2e4ad6da 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_usolve.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_usolve.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_usolve.h index d1854b9b72..3b950d33c6 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_usolve.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_usolve.h @@ -1,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 8672084a8e..ba7836430c 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_utsolve.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_utsolve.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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.h b/deal.II/contrib/umfpack/UMFPACK/Source/umf_utsolve.h index 4dfdd4a863..dae3143182 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_utsolve.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_utsolve.h @@ -1,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 a0dc93329f..ea3bb07b22 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_valid_numeric.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_valid_numeric.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 dd71f633ea..0b258e4fe1 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_valid_numeric.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_valid_numeric.h @@ -1,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 7115175468..2f65a0c98f 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_valid_symbolic.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_valid_symbolic.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 0653491515..741a799446 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_valid_symbolic.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_valid_symbolic.h @@ -1,5 +1,5 @@ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 7eb6d6a31b..98d765f0ca 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umf_version.h +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umf_version.h @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -12,8 +12,8 @@ Define routine names, depending on version being compiled. DINT: double precision, int's as integers - DLONG: double precision, long's as integers - ZLONG: complex double precision, long's as integers + DLONG: double precision, UF_long's as integers + ZLONG: complex double precision, UF_long's as integers ZINT: complex double precision, int's as integers */ @@ -28,7 +28,7 @@ #endif /* -------------------------------------------------------------------------- */ -/* integer type (Int is int or long) now defined in amd_internal.h */ +/* integer type (Int is int or UF_long) now defined in amd_internal.h */ /* -------------------------------------------------------------------------- */ #if defined (DLONG) || defined (ZLONG) @@ -60,15 +60,7 @@ SCALAR_IS_LTZERO(x): This is (x < 0) if the compiler is IEEE 754 compliant. */ -#if defined (MATHWORKS) - -/* The MathWorks has their own macros in util.h that handle NaN's properly. */ -#define SCALAR_IS_NAN(x) (utIsNaN (x)) -#define SCALAR_IS_ZERO(x) (utEQZero (x)) -#define SCALAR_IS_NONZERO(x) (utNEZero (x)) -#define SCALAR_IS_LTZERO(x) (utLTZero (x)) - -#elif defined (UMF_WINDOWS) +#if defined (UMF_WINDOWS) && !defined (MATHWORKS) /* Yes, this is exceedingly ugly. Blame Microsoft, which hopelessly */ /* violates the IEEE 754 floating-point standard in a bizarre way. */ @@ -138,7 +130,6 @@ SCALAR_IS_LTZERO(x): #define MULT_SUB(c,a,b) { (c) -= (a) * (b) ; } #define MULT_SUB_CONJ(c,a,b) { (c) -= (a) * (b) ; } #define DIV(c,a,b) { (c) = (a) / (b) ; } -#define RECIPROCAL(c) { (c) = 1.0 / (c) ; } #define DIV_CONJ(c,a,b) { (c) = (a) / (b) ; } #define APPROX_ABS(s,a) { (s) = SCALAR_ABS (a) ; } #define ABS(s,a) { (s) = SCALAR_ABS (a) ; } @@ -359,105 +350,21 @@ typedef struct /* -------------------------------------------------------------------------- */ -/* c = a/b, be careful to avoid underflow and overflow */ -#ifdef MATHWORKS +/* c = a/b, using function pointer */ #define DIV(c,a,b) \ { \ - (void) utDivideComplex ((a).Real, (a).Imag, (b).Real, (b).Imag, \ + (void) umfpack_divcomplex ((a).Real, (a).Imag, (b).Real, (b).Imag, \ &((c).Real), &((c).Imag)) ; \ } -#else -/* This uses ACM Algo 116, by R. L. Smith, 1962. */ -/* c can be the same variable as a or b. */ -/* Ignore NaN case for double relop br>=bi. */ -#define DIV(c,a,b) \ -{ \ - double r, den, ar, ai, br, bi ; \ - br = (b).Real ; \ - bi = (b).Imag ; \ - ar = (a).Real ; \ - ai = (a).Imag ; \ - if (SCALAR_ABS (br) >= SCALAR_ABS (bi)) \ - { \ - r = bi / br ; \ - den = br + r * bi ; \ - (c).Real = (ar + ai * r) / den ; \ - (c).Imag = (ai - ar * r) / den ; \ - } \ - else \ - { \ - r = br / bi ; \ - den = r * br + bi ; \ - (c).Real = (ar * r + ai) / den ; \ - (c).Imag = (ai * r - ar) / den ; \ - } \ -} -#endif /* -------------------------------------------------------------------------- */ -/* c = 1/c, be careful to avoid underflow and overflow */ -/* Not used if MATHWORKS is defined. */ -/* This uses ACM Algo 116, by R. L. Smith, 1962. */ -/* Ignore NaN case for double relop cr>=ci. */ -#define RECIPROCAL(c) \ -{ \ - double r, den, cr, ci ; \ - cr = (c).Real ; \ - ci = (c).Imag ; \ - if (SCALAR_ABS (cr) >= SCALAR_ABS (ci)) \ - { \ - r = ci / cr ; \ - den = cr + r * ci ; \ - (c).Real = 1.0 / den ; \ - (c).Imag = - r / den ; \ - } \ - else \ - { \ - r = cr / ci ; \ - den = r * cr + ci ; \ - (c).Real = r / den ; \ - (c).Imag = - 1.0 / den ; \ - } \ -} - - -/* -------------------------------------------------------------------------- */ - -/* c = a/conjugate(b), be careful to avoid underflow and overflow */ -#ifdef MATHWORKS +/* c = a/conjugate(b), using function pointer */ #define DIV_CONJ(c,a,b) \ { \ - (void) utDivideComplex ((a).Real, (a).Imag, (b).Real, (-(b).Imag), \ + (void) umfpack_divcomplex ((a).Real, (a).Imag, (b).Real, (-(b).Imag), \ &((c).Real), &((c).Imag)) ; \ } -#else -/* This uses ACM Algo 116, by R. L. Smith, 1962. */ -/* c can be the same variable as a or b. */ -/* Ignore NaN case for double relop br>=bi. */ -#define DIV_CONJ(c,a,b) \ -{ \ - double r, den, ar, ai, br, bi ; \ - br = (b).Real ; \ - bi = (b).Imag ; \ - ar = (a).Real ; \ - ai = (a).Imag ; \ - if (SCALAR_ABS (br) >= SCALAR_ABS (bi)) \ - { \ - r = (-bi) / br ; \ - den = br - r * bi ; \ - (c).Real = (ar + ai * r) / den ; \ - (c).Imag = (ai - ar * r) / den ; \ - } \ - else \ - { \ - r = br / (-bi) ; \ - den = r * br - bi; \ - (c).Real = (ar * r + ai) / den ; \ - (c).Imag = (ai * r - ar) / den ; \ - } \ -} -#endif /* -------------------------------------------------------------------------- */ @@ -469,45 +376,11 @@ typedef struct /* -------------------------------------------------------------------------- */ -/* exact absolute value, s = sqrt (a.real^2 + amag^2) */ -#ifdef MATHWORKS +/* exact absolute value, s = sqrt (a.real^2 + a.imag^2) */ #define ABS(s,a) \ { \ - (s) = utFdlibm_hypot ((a).Real, (a).Imag) ; \ + (s) = umfpack_hypot ((a).Real, (a).Imag) ; \ } -#else -/* Ignore NaN case for the double relops ar>=ai and ar+ai==ar. */ -#define ABS(s,a) \ -{ \ - double r, ar, ai ; \ - ar = SCALAR_ABS ((a).Real) ; \ - ai = SCALAR_ABS ((a).Imag) ; \ - if (ar >= ai) \ - { \ - if (ar + ai == ar) \ - { \ - (s) = ar ; \ - } \ - else \ - { \ - r = ai / ar ; \ - (s) = ar * sqrt (1.0 + r*r) ; \ - } \ - } \ - else \ - { \ - if (ai + ar == ai) \ - { \ - (s) = ai ; \ - } \ - else \ - { \ - r = ar / ai ; \ - (s) = ai * sqrt (1.0 + r*r) ; \ - } \ - } \ -} -#endif /* -------------------------------------------------------------------------- */ @@ -656,7 +529,7 @@ typedef struct #endif /* -------------------------------------------------------------------------- */ -/* Double precision, with long's as integers */ +/* Double precision, with UF_long's as integers */ /* -------------------------------------------------------------------------- */ #ifdef DLONG @@ -886,7 +759,7 @@ typedef struct #endif /* -------------------------------------------------------------------------- */ -/* Complex double precision, with long's as integers */ +/* Complex double precision, with UF_long's as integers */ /* -------------------------------------------------------------------------- */ #ifdef ZLONG 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 44d3a3e1bc..f49a13d790 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,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 36cf91a819..761ecd1e37 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_defaults.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_defaults.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -63,7 +63,7 @@ GLOBAL void UMFPACK_defaults /* compile-time settings: cannot be modified at run-time */ /* ---------------------------------------------------------------------- */ -#ifdef USE_NO_BLAS +#ifdef NBLAS /* do not use the BLAS - use in-line C code instead */ Control [UMFPACK_COMPILED_WITH_BLAS] = 0 ; #else @@ -72,18 +72,14 @@ GLOBAL void UMFPACK_defaults #endif #ifdef MATLAB_MEX_FILE - /* use mxMalloc, mxFree, mxRealloc, and mexPrintf */ - /* use mxAssert if debugging is enabled */ + /* compiled as a MATLAB mexFunction */ Control [UMFPACK_COMPILED_FOR_MATLAB] = 1 ; #else #ifdef MATHWORKS - /* use internal utMalloc, utFree, utRealloc, and utPrintf routines. */ - /* use utDivideComplex and utFdlibm_hypot for complex version. */ - /* use utAssert if debugging is enabled. */ + /* compiled for internal use in MATLAB */ Control [UMFPACK_COMPILED_FOR_MATLAB] = 2 ; #else - /* use ANSI C malloc, free, realloc, and print */ - /* use ANSI C assert if debugging is enabled */ + /* use ANSI C malloc, free, realloc, and printf */ Control [UMFPACK_COMPILED_FOR_MATLAB] = 0 ; #endif #endif 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 76f4eb5bcb..7e4e531823 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_free_numeric.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_free_numeric.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 618ec49178..b865c43441 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_free_symbolic.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_free_symbolic.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 index bdfd751fef..bfeacaadad 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_get_determinant.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_get_determinant.c @@ -3,9 +3,10 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ +/* UMFPACK_get_determinant contributed by David Bateman, Motorola, Paris. */ /* -------------------------------------------------------------------------- */ /* 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 d1d2d3108a..21752d3af1 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_get_lunz.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_get_lunz.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 d429c97567..9dd22080c3 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_get_numeric.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_get_numeric.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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_symbolic.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_get_symbolic.c index 5d69579d22..560d38c526 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_get_symbolic.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_get_symbolic.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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_global.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_global.c new file mode 100644 index 0000000000..b227573ba1 --- /dev/null +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_global.c @@ -0,0 +1,130 @@ +/* ========================================================================== */ +/* === UMFPACK_global ======================================================= */ +/* ========================================================================== */ + +/* -------------------------------------------------------------------------- */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ +/* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ +/* web: http://www.cise.ufl.edu/research/sparse/umfpack */ +/* -------------------------------------------------------------------------- */ + +/* + Global variables. UMFPACK uses these function pointers for several + user-redefinable functions. The amd_* functions are defined in + AMD/Source/amd_global.c. + + Function pointer default for mexFunction + (see MATLAB/umfpackmex.c) + ---------------- ------- --------------- + amd_malloc malloc mxMalloc + amd_free free mxFree + amd_realloc realloc mxRealloc + amd_calloc calloc mxCalloc + amd_printf printf mexPrintf + + umfpack_hypot umf_hypot umf_hypot + umfpack_divcomplex umf_divcomplex umf_divcomplex + + This routine is compiled just once for all four versions of UMFPACK + (int/UF_long, double/complex). +*/ + +#include "umf_internal.h" + +double (*umfpack_hypot) (double, double) = umf_hypot ; +int (*umfpack_divcomplex) (double, double, double, double, double *, double *) + = umf_divcomplex ; + + +/* ========================================================================== */ +/* === umf_hypot ============================================================ */ +/* ========================================================================== */ + +/* There is an equivalent routine called hypot in , which conforms + * to ANSI C99. However, UMFPACK does not assume that ANSI C99 is available. + * You can use the ANSI C99 hypot routine with: + * + * #include + * umfpack_hypot = hypot ; + * + * prior to calling any UMFPACK routine. + * + * s = hypot (x,y) computes s = sqrt (x*x + y*y) but does so more accurately. + * + * The NaN case for the double relops x >= y and x+y == x is safely ignored. + */ + +double umf_hypot (double x, double y) +{ + double s, r ; + x = SCALAR_ABS (x) ; + y = SCALAR_ABS (y) ; + if (x >= y) + { + if (x + y == x) + { + s = x ; + } + else + { + r = y / x ; + s = x * sqrt (1.0 + r*r) ; + } + } + else + { + if (y + x == y) + { + s = y ; + } + else + { + r = x / y ; + s = y * sqrt (1.0 + r*r) ; + } + } + return (s) ; +} + + +/* ========================================================================== */ +/* === umf_divcomplex ======================================================= */ +/* ========================================================================== */ + +/* c = a/b where c, a, and b are complex. The real and imaginary parts are + * passed as separate arguments to this routine. The NaN case is ignored + * for the double relop br >= bi. Returns TRUE (1) if the denominator is + * zero, FALSE (0) otherwise. + * + * This uses ACM Algo 116, by R. L. Smith, 1962, which tries to avoid + * underflow and overflow. + * + * c can be the same variable as a or b. + */ + +int umf_divcomplex +( + double ar, double ai, /* real and imaginary parts of a */ + double br, double bi, /* real and imaginary parts of b */ + double *cr, double *ci /* real and imaginary parts of c */ +) +{ + double tr, ti, r, den ; + if (SCALAR_ABS (br) >= SCALAR_ABS (bi)) + { + r = bi / br ; + den = br + r * bi ; + tr = (ar + ai * r) / den ; + ti = (ai - ar * r) / den ; + } + else + { + r = br / bi ; + den = r * br + bi ; + tr = (ar * r + ai) / den ; + ti = (ai * r - ar) / den ; + } + *cr = tr ; + *ci = ti ; + return (SCALAR_IS_ZERO (den)) ; +} 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 f8fbd1fcbe..ddd644755e 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_load_numeric.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_load_numeric.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 4fc21884cf..ac3076db66 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_load_symbolic.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_load_symbolic.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 61444cc80c..a96a9fd53e 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_numeric.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_numeric.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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_qsymbolic.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_qsymbolic.c index 0aba148fa3..3e2674f083 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_qsymbolic.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_qsymbolic.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -408,7 +408,7 @@ GLOBAL Int UMFPACK_qsymbolic Info [UMFPACK_NCOL] = n_col ; Info [UMFPACK_SIZE_OF_UNIT] = (double) (sizeof (Unit)) ; Info [UMFPACK_SIZE_OF_INT] = (double) (sizeof (int)) ; - Info [UMFPACK_SIZE_OF_LONG] = (double) (sizeof (long)) ; + Info [UMFPACK_SIZE_OF_LONG] = (double) (sizeof (UF_long)) ; Info [UMFPACK_SIZE_OF_POINTER] = (double) (sizeof (void *)) ; Info [UMFPACK_SIZE_OF_ENTRY] = (double) (sizeof (Entry)) ; Info [UMFPACK_SYMBOLIC_DEFRAG] = 0 ; @@ -508,7 +508,7 @@ GLOBAL Int UMFPACK_qsymbolic /* :: int overflow, Clen too large :: */ /* Problem is too large for array indexing (Ci [i]) with an Int i. */ /* Cannot even analyze the problem to determine upper bounds on */ - /* memory usage. Need to use the long integer version, umfpack_*l_*. */ + /* memory usage. Need to use the UF_long version, umfpack_*l_*. */ DEBUGm4 (("out of memory: symbolic int overflow\n")) ; Info [UMFPACK_STATUS] = UMFPACK_ERROR_out_of_memory ; return (UMFPACK_ERROR_out_of_memory) ; @@ -710,7 +710,7 @@ GLOBAL Int UMFPACK_qsymbolic Symbolic->nempty_col = nempty_col ; /* UMF_singletons has verified that the user's input matrix is valid */ - ASSERT (AMD_valid (n_row, n_col, Ap, Ai)) ; + ASSERT (AMD_valid (n_row, n_col, Ap, Ai) == AMD_OK) ; Symbolic->n1 = n1 ; Symbolic->nempty = nempty ; @@ -791,7 +791,7 @@ GLOBAL Int UMFPACK_qsymbolic Rp = Sp ; Ri = Si ; } - ASSERT (AMD_valid (n2, n2, Rp, Ri)) ; + ASSERT (AMD_valid (n2, n2, Rp, Ri) == AMD_OK) ; nzaat = AMD_aat (n2, Rp, Ri, Sdeg, Wq, amd_Info) ; sym = amd_Info [AMD_SYMMETRY] ; @@ -942,7 +942,7 @@ GLOBAL Int UMFPACK_qsymbolic , (double *) NULL, (double *) NULL, FALSE #endif ) ; - ASSERT (AMD_valid (n2, n2, Rp, Ri)) ; + ASSERT (AMD_valid (n2, n2, Rp, Ri) == AMD_OK) ; /* contents of Si and Sp no longer needed, but the space is * still needed */ @@ -1705,11 +1705,6 @@ GLOBAL Int UMFPACK_qsymbolic DEBUG1 ((" Row "ID" in Front "ID"\n", row, nfr)) ; } } - for (i = 0 ; i <= nfr ; i++) - { - DEBUG1 (("Front "ID" has 1strows: "ID" pivcols "ID"\n", - i, f1rows, fpivcol)) ; - } #endif /* ---------------------------------------------------------------------- */ @@ -1859,6 +1854,7 @@ GLOBAL Int UMFPACK_qsymbolic for (p = Ap [oldcol] ; p < Ap [oldcol+1] ; p++) { Entry aij ; + CLEAR (aij) ; oldrow = Ai [p] ; newrow = Ci [oldrow] ; if (Ax != (double *) NULL) 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 94b12e07ce..30a51b97f4 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_control.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_control.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -32,7 +32,8 @@ GLOBAL void UMFPACK_report_control return ; } - PRINTF (("\n%s, Control:\n\n", UMFPACK_VERSION)) ; + PRINTF (("UMFPACK V%d.%d.%d (%s), Control:\n", UMFPACK_MAIN_VERSION, + UMFPACK_SUB_VERSION, UMFPACK_SUBSUB_VERSION, UMFPACK_DATE)) ; /* ---------------------------------------------------------------------- */ /* run-time options */ @@ -47,7 +48,7 @@ GLOBAL void UMFPACK_report_control #endif #ifdef DLONG PRINTF ((" Matrix entry defined as: double\n")) ; - PRINTF ((" Int (generic integer) defined as: long\n")) ; + PRINTF ((" Int (generic integer) defined as: UF_long\n")) ; #endif #ifdef ZINT PRINTF ((" Matrix entry defined as: double complex\n")) ; @@ -55,7 +56,7 @@ GLOBAL void UMFPACK_report_control #endif #ifdef ZLONG PRINTF ((" Matrix entry defined as: double complex\n")) ; - PRINTF ((" Int (generic integer) defined as: long\n")) ; + PRINTF ((" Int (generic integer) defined as: UF_long\n")) ; #endif /* ---------------------------------------------------------------------- */ @@ -303,39 +304,22 @@ GLOBAL void UMFPACK_report_control PRINTF ((" "ID": BLAS library used: ", (Int) INDEX (UMFPACK_COMPILED_WITH_BLAS))) ; -#if defined (USE_NO_BLAS) +#ifdef NBLAS PRINTF (("none. UMFPACK will be slow.\n")) ; -#elif defined (USE_C_BLAS) - PRINTF (("C-BLAS.\n")) ; -#elif defined (USE_MATLAB_BLAS) - PRINTF (("built-in MATLAB BLAS (ATLAS).\n")) ; -#elif defined (USE_SUNPERF_BLAS) - PRINTF (("Sun Performance Library BLAS.\n")) ; -#elif defined (USE_SCSL_BLAS) - PRINTF (("SGI SCSL BLAS.\n")) ; -#elif defined (USE_FORTRAN_BLAS) - PRINTF (("Fortran BLAS.\n")) ; +#else + PRINTF (("Fortran BLAS. size of BLAS integer: "ID"\n", + (Int) (sizeof (BLAS_INT)))) ; #endif #ifdef MATLAB_MEX_FILE -#ifdef NUTIL - PRINTF ((" "ID": compiled for MATLAB" - " (uses mxMalloc, mxFree, mxRealloc, and mexPrintf)\n", + PRINTF ((" "ID": compiled for MATLAB\n", (Int) INDEX (UMFPACK_COMPILED_FOR_MATLAB))) ; -#else - PRINTF ((" "ID": compiled for MATLAB" - " (uses utMalloc, utFree, utRealloc, and mexPrintf)\n", - (Int) INDEX (UMFPACK_COMPILED_FOR_MATLAB))) ; -#endif #else #ifdef MATHWORKS - PRINTF ((" "ID": compiled for MATLAB, using internal utility routines\n" - " (uses utMalloc, utFree, utRealloc, and utPrintf)\n", + PRINTF ((" "ID": compiled for MATLAB\n", (Int) INDEX (UMFPACK_COMPILED_FOR_MATLAB))) ; - PRINTF ((" (complex version uses utDivideComplex, utFdlibm_hypot)\n")) ; #else - PRINTF ((" "ID": compiled for ANSI C" - " (uses malloc, free, realloc, and printf)\n", + PRINTF ((" "ID": compiled for ANSI C\n", (Int) INDEX (UMFPACK_COMPILED_FOR_MATLAB))) ; #endif #endif @@ -363,24 +347,15 @@ GLOBAL void UMFPACK_report_control "**** Debugging enabled (UMFPACK will be exceedingly slow!) *****************\n" " "ID": compiled with debugging enabled. ", (Int) INDEX (UMFPACK_COMPILED_IN_DEBUG_MODE))) ; -#ifdef MATLAB_MEX_FILE - PRINTF (("Uses mxAssert.\n")) ; -#else -#ifdef MATHWORKS - PRINTF (("Uses utAssert.\n")) ; -#else - PRINTF (("Uses ANSI C assert.\n")) ; -#endif -#endif #else PRINTF ((" "ID": compiled for normal operation (debugging disabled)\n", (Int) INDEX (UMFPACK_COMPILED_IN_DEBUG_MODE))) ; #endif PRINTF ((" computer/operating system: %s\n", UMFPACK_ARCHITECTURE)) ; - PRINTF ((" size of int: %g long: %g Int: %g pointer: %g" + PRINTF ((" size of int: %g UF_long: %g Int: %g pointer: %g" " double: %g Entry: %g (in bytes)\n\n", (double) sizeof (int), - (double) sizeof (long), (double) sizeof (Int), + (double) sizeof (UF_long), (double) sizeof (Int), (double) sizeof (void *), (double) sizeof (double), (double) sizeof (Entry))) ; } 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 800b1e1953..ac55466574 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_info.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_info.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -101,7 +101,8 @@ GLOBAL void UMFPACK_report_info /* print umfpack version */ /* ---------------------------------------------------------------------- */ - PRINTF (("\n%s, Info:\n", UMFPACK_VERSION)) ; + PRINTF (("UMFPACK V%d.%d.%d (%s), Info:\n", UMFPACK_MAIN_VERSION, + UMFPACK_SUB_VERSION, UMFPACK_SUBSUB_VERSION, UMFPACK_DATE)) ; #ifndef NDEBUG PRINTF (( @@ -119,7 +120,7 @@ GLOBAL void UMFPACK_report_info #endif #ifdef DLONG PRINTF ((" matrix entry defined as: double\n")) ; - PRINTF ((" Int (generic integer) defined as: long\n")) ; + PRINTF ((" Int (generic integer) defined as: UF_long\n")) ; #endif #ifdef ZINT PRINTF ((" matrix entry defined as: double complex\n")) ; @@ -127,27 +128,20 @@ GLOBAL void UMFPACK_report_info #endif #ifdef ZLONG PRINTF ((" matrix entry defined as: double complex\n")) ; - PRINTF ((" Int (generic integer) defined as: long\n")) ; + PRINTF ((" Int (generic integer) defined as: UF_long\n")) ; #endif /* ---------------------------------------------------------------------- */ /* print compile-time options */ /* ---------------------------------------------------------------------- */ - PRINTF ((" BLAS library used: ")) ; + PRINTF ((" BLAS library used: ")) ; -#if defined (USE_NO_BLAS) +#ifdef NBLAS PRINTF (("none. UMFPACK will be slow.\n")) ; -#elif defined (USE_C_BLAS) - PRINTF (("C-BLAS.\n")) ; -#elif defined (USE_MATLAB_BLAS) - PRINTF (("built-in MATLAB BLAS.\n")) ; -#elif defined (USE_SUNPERF_BLAS) - PRINTF (("Sun Performance Library BLAS.\n")) ; -#elif defined (USE_SCSL_BLAS) - PRINTF (("SGI SCSL BLAS.\n")) ; -#elif defined (USE_FORTRAN_BLAS) - PRINTF (("Fortran BLAS.\n")) ; +#else + PRINTF (("Fortran BLAS. size of BLAS integer: "ID"\n", + (Int) (sizeof (BLAS_INT)))) ; #endif PRINTF ((" MATLAB: ")) ; @@ -155,7 +149,7 @@ GLOBAL void UMFPACK_report_info PRINTF (("yes.\n")) ; #else #ifdef MATHWORKS - PRINTF (("yes (using internal ut* routines).\n")) ; + PRINTF (("yes.\n")) ; #else PRINTF (("no.\n")) ; #endif @@ -193,7 +187,7 @@ GLOBAL void UMFPACK_report_info PRINT_INFO (" size of int: "ID" bytes\n", (Int) Info [UMFPACK_SIZE_OF_INT]) ; - PRINT_INFO (" size of long: "ID" bytes\n", + PRINT_INFO (" size of UF_long: "ID" bytes\n", (Int) Info [UMFPACK_SIZE_OF_LONG]) ; PRINT_INFO (" size of pointer: "ID" bytes\n", (Int) Info [UMFPACK_SIZE_OF_POINTER]) ; @@ -494,13 +488,15 @@ GLOBAL void UMFPACK_report_info PRINT_INFO (" numeric factorization wallclock time (sec): %.2f\n", twnum) ; - if (tnum > 0 && fnum > 0) +#define TMIN 0.001 + + if (tnum > TMIN && fnum > 0) { PRINT_INFO ( " numeric factorization mflops (CPU time): %.2f\n", 1e-6 * fnum / tnum) ; } - if (twnum > 0 && fnum > 0) + if (twnum > TMIN && fnum > 0) { PRINT_INFO ( " numeric factorization mflops (wallclock): %.2f\n", @@ -509,12 +505,12 @@ GLOBAL void UMFPACK_report_info ttot = EMPTY ; ftot = fnum ; - if (tsym >= 0 && tnum >= 0) + if (tsym >= TMIN && tnum >= 0) { ttot = tsym + tnum ; PRINT_INFO (" symbolic + numeric CPU time (sec): %.2f\n", ttot) ; - if (ftot > 0 && ttot > 0) + if (ftot > 0 && ttot > TMIN) { PRINT_INFO ( " symbolic + numeric mflops (CPU time): %.2f\n", @@ -523,12 +519,12 @@ GLOBAL void UMFPACK_report_info } twtot = EMPTY ; - if (twsym >= 0 && twnum >= 0) + if (twsym >= TMIN && twnum >= TMIN) { twtot = twsym + twnum ; PRINT_INFO (" symbolic + numeric wall clock time (sec): %.2f\n", twtot) ; - if (ftot > 0 && twtot > 0) + if (ftot > 0 && twtot > TMIN) { PRINT_INFO ( " symbolic + numeric mflops (wall clock): %.2f\n", @@ -558,13 +554,13 @@ GLOBAL void UMFPACK_report_info tsolve) ; PRINT_INFO (" solve wall clock time (sec): %.2f\n", twsolve) ; - if (fsolve > 0 && tsolve > 0) + if (fsolve > 0 && tsolve > TMIN) { PRINT_INFO ( " solve mflops (CPU time): %.2f\n", 1e-6 * fsolve / tsolve) ; } - if (fsolve > 0 && twsolve > 0) + if (fsolve > 0 && twsolve > TMIN) { PRINT_INFO ( " solve mflops (wall clock time): %.2f\n", @@ -578,15 +574,15 @@ GLOBAL void UMFPACK_report_info "\n total symbolic + numeric + solve flops: %.5e\n", ftot) ; } - if (tsolve >= 0) + if (tsolve >= TMIN) { - if (ttot >= 0 && ftot >= 0) + if (ttot >= TMIN && ftot >= 0) { ttot += tsolve ; PRINT_INFO ( " total symbolic + numeric + solve CPU time: %.2f\n", ttot) ; - if (ftot > 0 && ttot > 0) + if (ftot > 0 && ttot > TMIN) { PRINT_INFO ( " total symbolic + numeric + solve mflops (CPU): %.2f\n", @@ -595,15 +591,15 @@ GLOBAL void UMFPACK_report_info } } - if (twsolve >= 0) + if (twsolve >= TMIN) { - if (twtot >= 0 && ftot >= 0) + if (twtot >= TMIN && ftot >= 0) { twtot += tsolve ; PRINT_INFO ( " total symbolic+numeric+solve wall clock time: %.2f\n", twtot) ; - if (ftot > 0 && twtot > 0) + if (ftot > 0 && twtot > TMIN) { PRINT_INFO ( " total symbolic+numeric+solve mflops(wallclock) %.2f\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 1c2914ed25..6074ea4938 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_matrix.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_matrix.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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_report_numeric.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_numeric.c index 670f79e60f..f70555fdea 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_numeric.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_numeric.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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_report_perm.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_perm.c index f6f78bf07f..5f3baab2eb 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_perm.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_perm.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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_report_status.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_status.c index 7be57b91f4..5e4e142322 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_status.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_status.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ /* -------------------------------------------------------------------------- */ @@ -51,7 +51,8 @@ GLOBAL void UMFPACK_report_status PRINTF6 (("%s", UMFPACK_LICENSE_PART1)) ; PRINTF6 (("%s", UMFPACK_LICENSE_PART2)) ; PRINTF6 (("%s", UMFPACK_LICENSE_PART3)) ; - PRINTF (("%s: ", UMFPACK_VERSION)) ; + PRINTF (("UMFPACK V%d.%d.%d (%s): ", UMFPACK_MAIN_VERSION, + UMFPACK_SUB_VERSION, UMFPACK_SUBSUB_VERSION, UMFPACK_DATE)) ; switch (status) { 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 ad43478dfb..57e134e01f 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_symbolic.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_symbolic.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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_report_triplet.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_triplet.c index c7212ff404..ba11a69d6b 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_triplet.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_triplet.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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_report_vector.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_vector.c index 204801b6e4..a88804c642 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_vector.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_report_vector.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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_numeric.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_save_numeric.c index a912a6f65b..dc2ae32a79 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_save_numeric.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_save_numeric.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 e3144d83ac..7469e04ce4 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_save_symbolic.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_save_symbolic.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 a2f8b78a07..49467a5a7e 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_scale.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_scale.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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_solve.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_solve.c index 1db93566e7..c4e826386f 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_solve.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_solve.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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_symbolic.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_symbolic.c index 20b9a26da5..41be72ba5a 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_symbolic.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_symbolic.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 96d34d1c51..7fc5fba04c 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_tictoc.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_tictoc.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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_timer.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_timer.c index 2307fedd02..f4f245c9cc 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_timer.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_timer.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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_transpose.c b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_transpose.c index 3717fdf978..25ea2110ff 100644 --- a/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_transpose.c +++ b/deal.II/contrib/umfpack/UMFPACK/Source/umfpack_transpose.c @@ -3,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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 d72e069bb1..97750d1eff 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,7 +3,7 @@ /* ========================================================================== */ /* -------------------------------------------------------------------------- */ -/* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ +/* UMFPACK Copyright (c) Timothy A. Davis, CISE, */ /* 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/doc/news/changes.html b/deal.II/doc/news/changes.html index bc1c19cef7..3c183dd4dc 100644 --- a/deal.II/doc/news/changes.html +++ b/deal.II/doc/news/changes.html @@ -230,6 +230,12 @@ inconvenience this causes.

General

    +
  1. Updated: The version of UMFPACK bundled with deal.II has been updated + to release 5.1.0. +
    + (WB 2007/08/15) +

    +
  2. New: The step-27 tutorial program has been added. It solves a Laplace equation with hp finite elements and shows how to set finite element degrees, assemble matrices on