![]() |
Reference documentation for deal.II version 8.4.2
|
#include <deal.II/lac/arpack_solver.h>
Classes | |
| struct | AdditionalData |
Public Types | |
| enum | WhichEigenvalues |
| typedef types::global_dof_index | size_type |
Public Member Functions | |
| SolverControl & | control () const |
| ArpackSolver (SolverControl &control, const AdditionalData &data=AdditionalData()) | |
| template<typename VectorType , typename MatrixType1 , typename MatrixType2 , typename INVERSE > | |
| void | solve (const MatrixType1 &A, const MatrixType2 &B, const INVERSE &inverse, std::vector< std::complex< double > > &eigenvalues, std::vector< VectorType > &eigenvectors, const unsigned int n_eigenvalues=0) |
Public Member Functions inherited from Subscriptor | |
| Subscriptor () | |
| Subscriptor (const Subscriptor &) | |
| virtual | ~Subscriptor () |
| Subscriptor & | operator= (const Subscriptor &) |
| void | subscribe (const char *identifier=0) const |
| void | unsubscribe (const char *identifier=0) const |
| unsigned int | n_subscriptions () const |
| void | list_subscribers () const |
| DeclException3 (ExcInUse, int, char *, std::string &,<< "Object of class "<< arg2<< " is still used by "<< arg1<< " other objects."<< "\"<< "(Additional information: "<< arg3<< ")\"<< "See the entry in the Frequently Asked Questions of "<< "deal.II (linked to from http://www.dealii.org/) for "<< "a lot more information on what this error means and "<< "how to fix programs in which it happens.") | |
| DeclException2 (ExcNoSubscriber, char *, char *,<< "No subscriber with identifier <"<< arg2<< "> subscribes to this object of class "<< arg1<< ". Consequently, it cannot be unsubscribed.") | |
| template<class Archive > | |
| void | serialize (Archive &ar, const unsigned int version) |
Protected Attributes | |
| SolverControl & | solver_control |
| const AdditionalData | additional_data |
Private Member Functions | |
| DeclException2 (ExcInvalidNumberofEigenvalues, int, int,<< "Number of wanted eigenvalues "<< arg1<< " is larger that the size of the matrix "<< arg2) | |
Interface for using ARPACK. ARPACK is a collection of Fortran77 subroutines designed to solve large scale eigenvalue problems. Here we interface to the routines dneupd and dnaupd of ARPACK. The package is designed to compute a few eigenvalues and corresponding eigenvectors of a general n by n matrix A. It is most appropriate for large sparse matrices A.
In this class we make use of the method applied to the generalized eigenspectrum problem
, for
; where
is a system matrix,
is a mass matrix, and
are a set of eigenvalues and eigenvectors respectively.
The ArpackSolver can be used in application codes with serial objects in the following way:
for the generalized eigenvalue problem
, where the variable size_of_spectrum tells ARPACK the number of eigenvector/eigenvalue pairs to solve for. Here, lambda is a vector that will contain the eigenvalues computed, x a vector that will contain the eigenvectors computed, and OP is an inverse operation for the matrix A. Shift and invert transformation around zero is applied.
Through the AdditionalData the user can specify some of the parameters to be set.
For further information on how the ARPACK routines dneupd and dnaupd work and also how to set the parameters appropriately please take a look into the ARPACK manual.
Definition at line 90 of file arpack_solver.h.
Declare the type for container size.
Definition at line 96 of file arpack_solver.h.
An enum that lists the possible choices for which eigenvalues to compute in the solve() function.
Definition at line 103 of file arpack_solver.h.
|
inline |
Constructor.
Definition at line 251 of file arpack_solver.h.
|
inline |
Access to the object that controls convergence.
Definition at line 544 of file arpack_solver.h.
|
inline |
Solve the generalized eigensprectrum problem
by calling the dneupd and dnaupd functions of ARPACK.
The function returns a vector of eigenvalues of length n and a vector of eigenvectors, where the latter should be twice the size of the eigenvalue vector. The first n vectors in eigenvectors will be the real parts of the eigenvectors, the second n the imaginary parts.
| A | The operator for which we want to compute eigenvalues. Actually, this parameter is entirely unused. |
| B | The inner product of the underlying space, typically the mass matrix. For constrained problems, it can be a partial mass matrix, like for instance the velocity mass matrix of a Stokes problem. Only its function vmult() is used. |
| inverse | This is the possibly shifted inverse that is actually used instead of A. Only its function vmult() is used. |
| eigenvalues | is a vector of complex numbers in which the eigenvalues are returned. |
| eigenvectors | is a real vector of eigenvectors, containing alternatingly the real parts and the imaginary parts of the eigenvectors. Therefore, its length should be twice the number of eigenvalues. The vectors have to be initialized to match the matrices. |
| n_eigenvalues | The purpose of this parameter is not clear, but it is safe to set it to the size of eigenvalues or greater. Leave it at its default zero, which will be reset to the size of eigenvalues internally. |
'G' generalized eigenvalue problem 'I' standard eigenvalue problem
Specify the eigenvalues of interest, possible parameters "LA" algebraically largest "SA" algebraically smallest "LM" largest magnitude "SM" smallest magnitude "LR" largest real part "SR" smallest real part "LI" largest imaginary part "SI" smallest imaginary part "BE" both ends of spectrum simultaneous
Sets the mode of dsaupd. 1 is exact shifting, 2 is user-supplied shifts, 3 is shift-invert mode, 4 is buckling mode, 5 is Cayley mode.
1 - compute eigenvectors, 0 - only eigenvalues
Definition at line 263 of file arpack_solver.h.
|
private |
Exceptions.
|
protected |
Reference to the object that controls convergence of the iterative solver.
Definition at line 190 of file arpack_solver.h.
|
protected |
Store a copy of the flags for this particular solver.
Definition at line 195 of file arpack_solver.h.
1.8.12