Reference documentation for deal.II version 8.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Classes | Public Types | Public Member Functions | Protected Attributes | Private Member Functions | List of all members
ArpackSolver Class Reference

#include <arpack_solver.h>

Inheritance diagram for ArpackSolver:
[legend]

Classes

struct  AdditionalData
 

Public Types

enum  WhichEigenvalues {
  algebraically_largest, algebraically_smallest, largest_magnitude, smallest_magnitude,
  largest_real_part, smallest_real_part, largest_imaginary_part, smallest_imaginary_part,
  both_ends
}
 
typedef types::global_dof_index size_type
 

Public Member Functions

SolverControlcontrol () const
 
 ArpackSolver (SolverControl &control, const AdditionalData &data=AdditionalData())
 
template<typename VECTOR , typename MATRIX1 , typename MATRIX2 , typename INVERSE >
void solve (const MATRIX1 &A, const MATRIX2 &B, const INVERSE &inverse, std::vector< std::complex< double > > &eigenvalues, std::vector< VECTOR > &eigenvectors, const unsigned int n_eigenvalues)
 
- Public Member Functions inherited from Subscriptor
 Subscriptor ()
 
 Subscriptor (const Subscriptor &)
 
virtual ~Subscriptor ()
 
Subscriptoroperator= (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.\n"<< "(Additional information: "<< arg3<< ")\n"<< "Note the entry in the Frequently Asked Questions of "<< "deal.II (linked to from http://www.dealii.org/) for "<< "more information on what this error means.")
 
 DeclException2 (ExcNoSubscriber, char *, char *,<< "No subscriber with identifier \""<< arg2<< "\" did subscribe to this object of class "<< arg1)
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Protected Attributes

SolverControlsolver_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)
 
 DeclException2 (ExcInvalidNumberofArnoldiVectors, int, int,<< "Number of Arnoldi vectors "<< arg1<< " is larger that the size of the matrix "<< arg2)
 
 DeclException2 (ExcSmallNumberofArnoldiVectors, int, int,<< "Number of Arnoldi vectors "<< arg1<< " is too small to obtain "<< arg2<< " eigenvalues")
 
 DeclException1 (ExcArpackIdo, int,<< "This ido "<< arg1<< " is not supported. Check documentation of ARPACK")
 
 DeclException1 (ExcArpackMode, int,<< "This mode "<< arg1<< " is not supported. Check documentation of ARPACK")
 
 DeclException1 (ExcArpackInfodsaupd, int,<< "Error with dsaupd, info "<< arg1<< ". Check documentation of ARPACK")
 
 DeclException1 (ExcArpackInfodneupd, int,<< "Error with dneupd, info "<< arg1<< ". Check documentation of ARPACK")
 
 DeclException1 (ExcArpackInfoMaxIt, int,<< "Maximum number "<< arg1<< " of iterations reached.")
 
 DeclException1 (ExcArpackNoShifts, int,<< "No shifts could be applied during implicit"<< " Arnoldi update, try increasing the number of"<< " Arnoldi vectors.")
 

Detailed Description

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 $(A-\lambda B)x=0$, for $x\neq0$; where $A$ is a system matrix, $B$ is a mass matrix, and $\lambda, x$ are a set of eigenvalues and eigenvectors respectively.

The ArpackSolver can be used in application codes in the following way:

system.solve (A, B, P, lambda, x, size_of_spectrum);

for the generalized eigenvalue problem $Ax=B\lambda x$, 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 P is a preconditioner for the matrix A.

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.

Author
Baerbel Janssen, Agnieszka Miedlar, 2010.

Definition at line 83 of file arpack_solver.h.

Member Typedef Documentation

Declare the type for container size.

Definition at line 89 of file arpack_solver.h.

Member Enumeration Documentation

An enum that lists the possible choices for which eigenvalues to compute in the solve() function.

Definition at line 97 of file arpack_solver.h.

Constructor & Destructor Documentation

ArpackSolver::ArpackSolver ( SolverControl control,
const AdditionalData data = AdditionalData() 
)
inline

Constructor.

Definition at line 221 of file arpack_solver.h.

Member Function Documentation

SolverControl & ArpackSolver::control ( ) const
inline

Access to the object that controls convergence.

Definition at line 520 of file arpack_solver.h.

template<typename VECTOR , typename MATRIX1 , typename MATRIX2 , typename INVERSE >
void ArpackSolver::solve ( const MATRIX1 &  A,
const MATRIX2 &  B,
const INVERSE &  inverse,
std::vector< std::complex< double > > &  eigenvalues,
std::vector< VECTOR > &  eigenvectors,
const unsigned int  n_eigenvalues 
)
inline

Solve the generalized eigensprectrum problem $A x=\lambda B x$ by calling the dneupd and dnaupd functions of ARPACK.

'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 233 of file arpack_solver.h.

ArpackSolver::DeclException2 ( ExcInvalidNumberofEigenvalues  ,
int  ,
int  ,
<< "Number of wanted eigenvalues "<< arg1<< " is larger that the size of the matrix "<<  arg2 
)
private

Exceptions.

Member Data Documentation

SolverControl& ArpackSolver::solver_control
protected

Reference to the object that controls convergence of the iterative solver.

Definition at line 159 of file arpack_solver.h.

const AdditionalData ArpackSolver::additional_data
protected

Store a copy of the flags for this particular solver.

Definition at line 165 of file arpack_solver.h.


The documentation for this class was generated from the following file: