From: allmaras Date: Thu, 16 Oct 2008 18:28:08 +0000 (+0000) Subject: Changed SparseDirectUMFPACK to use umfpack_dl_* routines X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd92a850d93c011a9c81c5fa16218b0d98c36c4c;p=dealii-svn.git Changed SparseDirectUMFPACK to use umfpack_dl_* routines git-svn-id: https://svn.dealii.org/trunk@17243 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h index 313d6ee4d7..00a7296b5f 100644 --- a/deal.II/doc/news/changes.h +++ b/deal.II/doc/news/changes.h @@ -299,6 +299,15 @@ inconvenience this causes.

lac

    +
  1. +

    + Changed: The SparseDirectUMFPACK class now calls the umfpack_dl_* routines + instead of umfpack_di_*. On machines with 64-bit longs this allows the + UMFPACK solver to allocate more than 2GB of memory for large problems. +
    + (Moritz Allmaras 2008/10/16) +

    +
  2. Improved: The SparseILU::initialize function, for some reason, required diff --git a/deal.II/lac/include/lac/sparse_direct.h b/deal.II/lac/include/lac/sparse_direct.h index 10b58e7331..8ad51e6e31 100644 --- a/deal.II/lac/include/lac/sparse_direct.h +++ b/deal.II/lac/include/lac/sparse_direct.h @@ -1248,8 +1248,8 @@ class SparseDirectUMFPACK : public Subscriptor * The arrays in which we store the data * for the solver. */ - std::vector Ap; - std::vector Ai; + std::vector Ap; + std::vector Ai; std::vector Ax; /** diff --git a/deal.II/lac/source/sparse_direct.cc b/deal.II/lac/source/sparse_direct.cc index f700dfa9e3..808bb138a1 100644 --- a/deal.II/lac/source/sparse_direct.cc +++ b/deal.II/lac/source/sparse_direct.cc @@ -1499,7 +1499,7 @@ SparseDirectUMFPACK::SparseDirectUMFPACK () numeric_decomposition (0), control (UMFPACK_CONTROL) { - umfpack_di_defaults (&control[0]); + umfpack_dl_defaults (&control[0]); } @@ -1511,23 +1511,23 @@ SparseDirectUMFPACK::clear () // yet if (symbolic_decomposition != 0) { - umfpack_di_free_symbolic (&symbolic_decomposition); + umfpack_dl_free_symbolic (&symbolic_decomposition); symbolic_decomposition = 0; } if (numeric_decomposition != 0) { - umfpack_di_free_numeric (&numeric_decomposition); + umfpack_dl_free_numeric (&numeric_decomposition); numeric_decomposition = 0; } { - std::vector tmp; + std::vector tmp; tmp.swap (Ap); } { - std::vector tmp; + std::vector tmp; tmp.swap (Ai); } @@ -1536,7 +1536,7 @@ SparseDirectUMFPACK::clear () tmp.swap (Ax); } - umfpack_di_defaults (&control[0]); + umfpack_dl_defaults (&control[0]); } @@ -1578,7 +1578,7 @@ sort_arrays (const SparseMatrix &matrix) // that the row has at least two // entries and that the diagonal // entry is really in the wrong place - int cursor = Ap[row]; + long int cursor = Ap[row]; while ((cursor < Ap[row+1]-1) && (Ai[cursor] > Ai[cursor+1])) { @@ -1609,7 +1609,7 @@ sort_arrays (const BlockSparseMatrix &matrix) // do it multiple times for (unsigned int row=0; row &matrix) // otherwise swap this entry // with successive ones as // long as necessary - int element = cursor; + long int element = cursor; while ((element < Ap[row+1]-1) && (Ai[element] > Ai[element+1])) { @@ -1660,7 +1660,7 @@ factorize (const Matrix &matrix) // work around this by, rather than // shuffling things around, copy over the // data we have, but then call the - // umfpack_di_solve function with the + // umfpack_dl_solve function with the // UMFPACK_At argument, meaning that we // want to solve for the transpose system // @@ -1705,7 +1705,7 @@ factorize (const Matrix &matrix) // have an array that for each // row points to the first entry // not yet written to - std::vector row_pointers = Ap; + std::vector row_pointers = Ap; for (typename Matrix::const_iterator p=matrix.begin(); p!=matrix.end(); ++p) @@ -1733,21 +1733,21 @@ factorize (const Matrix &matrix) sort_arrays (matrix); int status; - status = umfpack_di_symbolic (N, N, + status = umfpack_dl_symbolic (N, N, &Ap[0], &Ai[0], &Ax[0], &symbolic_decomposition, &control[0], 0); AssertThrow (status == UMFPACK_OK, - ExcUMFPACKError("umfpack_di_symbolic", status)); + ExcUMFPACKError("umfpack_dl_symbolic", status)); - status = umfpack_di_numeric (&Ap[0], &Ai[0], &Ax[0], + status = umfpack_dl_numeric (&Ap[0], &Ai[0], &Ax[0], symbolic_decomposition, &numeric_decomposition, &control[0], 0); AssertThrow (status == UMFPACK_OK, - ExcUMFPACKError("umfpack_di_numeric", status)); + ExcUMFPACKError("umfpack_dl_numeric", status)); - umfpack_di_free_symbolic (&symbolic_decomposition) ; + umfpack_dl_free_symbolic (&symbolic_decomposition) ; } @@ -1771,12 +1771,12 @@ SparseDirectUMFPACK::solve (Vector &rhs_and_solution) const // SparsityPattern classes, we solve for // UMFPACK's A^T instead const int status - = umfpack_di_solve (UMFPACK_At, + = umfpack_dl_solve (UMFPACK_At, &Ap[0], &Ai[0], &Ax[0], rhs_and_solution.begin(), rhs.begin(), numeric_decomposition, &control[0], 0); - AssertThrow (status == UMFPACK_OK, ExcUMFPACKError("umfpack_di_solve", status)); + AssertThrow (status == UMFPACK_OK, ExcUMFPACKError("umfpack_dl_solve", status)); }