16 #ifndef dealii_sparse_direct_h 17 #define dealii_sparse_direct_h 30 #ifdef DEAL_II_WITH_UMFPACK 42 #ifdef SuiteSparse_long 45 using suitesparse_index =
long int;
145 template <
class Matrix>
147 factorize(
const Matrix &
matrix);
152 template <
class Matrix>
154 initialize(
const Matrix & matrix,
178 vmult(Vector<double> &dst,
const Vector<double> &src)
const;
191 Tvmult(Vector<double> &dst,
const Vector<double> &src)
const;
242 solve(Vector<double> &rhs_and_solution,
const bool transpose =
false)
const;
256 solve(
Vector<std::complex<double>> &rhs_and_solution,
270 solve(
BlockVector<std::complex<double>> &rhs_and_solution,
279 template <
class Matrix>
281 solve(
const Matrix & matrix,
282 Vector<double> &rhs_and_solution,
288 template <
class Matrix>
290 solve(
const Matrix & matrix,
291 Vector<std::complex<double>> &rhs_and_solution,
297 template <
class Matrix>
299 solve(
const Matrix & matrix,
306 template <
class Matrix>
308 solve(
const Matrix & 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;
428 #endif // dealii_sparse_direct_h
void * symbolic_decomposition
#define DeclException2(Exception2, type1, type2, outsequence)
long int suitesparse_index
Contents is actually a matrix.
std::vector< types::suitesparse_index > Ai
#define DEAL_II_NAMESPACE_CLOSE
void * numeric_decomposition
std::vector< double > control
unsigned int global_dof_index
#define DEAL_II_NAMESPACE_OPEN
std::vector< types::suitesparse_index > Ap