16 #ifndef dealii__sparse_direct_h 17 #define dealii__sparse_direct_h 20 #include <deal.II/base/config.h> 21 #include <deal.II/base/exceptions.h> 22 #include <deal.II/base/subscriptor.h> 23 #include <deal.II/base/thread_management.h> 24 #include <deal.II/lac/vector.h> 25 #include <deal.II/lac/sparse_matrix.h> 26 #include <deal.II/lac/sparse_matrix_ez.h> 27 #include <deal.II/lac/block_sparse_matrix.h> 29 #ifdef DEAL_II_WITH_UMFPACK 32 #ifndef SuiteSparse_long 33 # define SuiteSparse_long long int 36 DEAL_II_NAMESPACE_OPEN
137 template <
class Matrix>
143 template <
class Matrix>
193 size_type
m ()
const;
199 size_type
n ()
const;
240 template <
class Matrix>
241 void solve (
const Matrix &matrix,
243 bool transpose =
false);
248 template <
class Matrix>
249 void solve (
const Matrix &matrix,
251 bool transpose =
false);
263 <<
"UMFPACK routine " << arg1
264 <<
" returned error status " << arg2 <<
"." 266 << (
"A complete list of error codes can be found in the file " 267 "<bundled/umfpack/UMFPACK/Include/umfpack.h>." 269 "That said, the two most common errors that can happen are " 270 "that your matrix cannot be factorized because it is " 271 "rank deficient, and that UMFPACK runs out of memory " 272 "because your problem is too large." 274 "The first of these cases most often happens if you " 275 "forget terms in your bilinear form necessary to ensure " 276 "that the matrix has full rank, or if your equation has a " 277 "spatially variable coefficient (or nonlinearity) that is " 278 "supposed to be strictly positive but, for whatever " 279 "reasons, is negative or zero. In either case, you probably " 280 "want to check your assembly procedure. Similarly, a " 281 "matrix can be rank deficient if you forgot to apply the " 282 "appropriate boundary conditions. For example, the " 283 "Laplace equation without boundary conditions has a " 284 "single zero eigenvalue and its rank is therefore " 287 "The other common situation is that you run out of memory." 288 "On a typical laptop or desktop, it should easily be possible " 289 "to solve problems with 100,000 unknowns in 2d. If you are " 290 "solving problems with many more unknowns than that, in " 291 "particular if you are in 3d, then you may be running out " 292 "of memory and you will need to consider iterative " 293 "solvers instead of the direct solver employed by " 313 void *numeric_decomposition;
326 template <
typename number>
329 template <
typename number>
332 template <
typename number>
340 std::vector<SuiteSparse_long>
Ap;
341 std::vector<SuiteSparse_long> Ai;
342 std::vector<double> Ax;
350 DEAL_II_NAMESPACE_CLOSE
352 #endif // dealii__sparse_direct_h void * symbolic_decomposition
types::global_dof_index size_type
void factorize(const Matrix &matrix)
void vmult(Vector< double > &dst, const Vector< double > &src) const
void solve(Vector< double > &rhs_and_solution, bool transpose=false) const
unsigned int global_dof_index
std::vector< SuiteSparse_long > Ap
std::vector< double > control
void initialize(const SparsityPattern &sparsity_pattern)
void Tvmult(Vector< double > &dst, const Vector< double > &src) const
void sort_arrays(const SparseMatrixEZ< number > &)
DeclException2(ExcUMFPACKError, char *, int,<< "UMFPACK routine "<< arg1<< " returned error status "<< arg2<< "."<< "\"<<("A complete list of error codes can be found in the file " "<bundled/umfpack/UMFPACK/Include/umfpack.h>." "\" "That said, the two most common errors that can happen are " "that your matrix cannot be factorized because it is " "rank deficient, and that UMFPACK runs out of memory " "because your problem is too large." "\" "The first of these cases most often happens if you " "forget terms in your bilinear form necessary to ensure " "that the matrix has full rank, or if your equation has a " "spatially variable coefficient (or nonlinearity) that is " "supposed to be strictly positive but, for whatever " "reasons, is negative or zero. In either case, you probably " "want to check your assembly procedure. Similarly, a " "matrix can be rank deficient if you forgot to apply the " "appropriate boundary conditions. For example, the " "Laplace equation without boundary conditions has a " "single zero eigenvalue and its rank is therefore " "deficient by one." "\" "The other common situation is that you run out of memory." "On a typical laptop or desktop, it should easily be possible " "to solve problems with 100,000 unknowns in 2d. If you are " "solving problems with many more unknowns than that, in " "particular if you are in 3d, then you may be running out " "of memory and you will need to consider iterative " "solvers instead of the direct solver employed by " "UMFPACK."))