16#ifndef dealii_sparse_direct_h
17#define dealii_sparse_direct_h
30#ifdef DEAL_II_WITH_UMFPACK
42#ifdef SuiteSparse_long
145 template <
class Matrix>
152 template <
class Matrix>
256 solve(
Vector<std::complex<double>> &rhs_and_solution,
279 template <
class Matrix>
288 template <
class Matrix>
291 Vector<std::complex<double>> &rhs_and_solution,
297 template <
class Matrix>
306 template <
class Matrix>
309 BlockVector<std::complex<double>> &rhs_and_solution,
325 <<
"UMFPACK routine " << arg1 <<
" returned error status " << arg2 <<
"."
327 << (
"A complete list of error codes can be found in the file "
328 "<bundled/umfpack/UMFPACK/Include/umfpack.h>."
330 "That said, the two most common errors that can happen are "
331 "that your matrix cannot be factorized because it is "
332 "rank deficient, and that UMFPACK runs out of memory "
333 "because your problem is too large."
335 "The first of these cases most often happens if you "
336 "forget terms in your bilinear form necessary to ensure "
337 "that the matrix has full rank, or if your equation has a "
338 "spatially variable coefficient (or nonlinearity) that is "
339 "supposed to be strictly positive but, for whatever "
340 "reasons, is negative or zero. In either case, you probably "
341 "want to check your assembly procedure. Similarly, a "
342 "matrix can be rank deficient if you forgot to apply the "
343 "appropriate boundary conditions. For example, the "
344 "Laplace equation for a problem where only Neumann boundary "
345 "conditions are posed (or where you forget to apply Dirichlet "
346 "boundary conditions) has exactly one eigenvalue equal to zero "
347 "and its rank is therefore deficient by one. Finally, the matrix "
348 "may be rank deficient because you are using a quadrature "
349 "formula with too few quadrature points."
351 "The other common situation is that you run out of memory. "
352 "On a typical laptop or desktop, it should easily be possible "
353 "to solve problems with 100,000 unknowns in 2d. If you are "
354 "solving problems with many more unknowns than that, in "
355 "particular if you are in 3d, then you may be running out "
356 "of memory and you will need to consider iterative "
357 "solvers instead of the direct solver employed by "
392 template <
typename number>
396 template <
typename number>
400 template <
typename number>
415 std::vector<types::suitesparse_index>
Ap;
416 std::vector<types::suitesparse_index>
Ai;
417 std::vector<double>
Ax;
418 std::vector<double>
Az;
void * numeric_decomposition
~SparseDirectUMFPACK() override
void initialize(const SparsityPattern &sparsity_pattern)
void Tvmult(Vector< double > &dst, const Vector< double > &src) const
void * symbolic_decomposition
void solve(Vector< double > &rhs_and_solution, const bool transpose=false) const
void sort_arrays(const SparseMatrixEZ< number > &)
void factorize(const Matrix &matrix)
std::vector< double > control
void vmult(Vector< double > &dst, const Vector< double > &src) const
std::vector< types::suitesparse_index > Ap
std::vector< types::suitesparse_index > Ai
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcUMFPACKError(std::string arg1, int arg2)
#define DeclException2(Exception2, type1, type2, outsequence)
@ matrix
Contents is actually a matrix.
unsigned int global_dof_index
long int suitesparse_index