#include <solvereigen.hpp>
base class for eigen solvers
Public Types | |
Typedefs | |
typedef T | value_type |
typedef type_traits< T >::real_type | real_type |
typedef SolverEigen< value_type > | solvereigen_type |
typedef boost::shared_ptr < solvereigen_type > | solvereigen_ptrtype |
typedef boost::tuple < size_type, size_type, std::vector< double > > | solve_return_type |
typedef Vector< value_type > | vector_type |
typedef boost::shared_ptr < vector_type > | vector_ptrtype |
typedef MatrixSparse< value_type > | sparse_matrix_type |
typedef boost::shared_ptr < sparse_matrix_type > | sparse_matrix_ptrtype |
typedef boost::tuple < real_type, real_type, vector_ptrtype > | eigenpair_type |
typedef std::map< real_type, eigenpair_type > | eigenmodes_type |
Public Member Functions | |
Accessors | |
std::string const & | prefix () const |
EigenSolverType | eigenSolverType () const |
EigenProblemType | eigenProblemType () const |
PositionOfSpectrum | postitionOfSpectrum () const |
SpectralTransformType | spectralTransform () const |
size_type | numberOfEigenvalues () const |
size_type | numberOfEigenvaluesConverged () const |
value_type | tolerance () const |
size_type | maxIterations () const |
Mutators | |
void | setEigenSolverType (const EigenSolverType est) |
void | setEigenProblemType (EigenProblemType ept) |
void | setPositionOfSpectrum (PositionOfSpectrum pos) |
void | setSpectralTransform (SpectralTransformType st) |
void | setTolerance (value_type tol) |
void | setMaxIterations (size_type maxiter) |
void | setNumberOfEigenValues (size_type nev) |
void | setNumberOfEigenValuesConverged (size_type ncv) |
Methods | |
bool | initialized () const |
virtual void | clear () |
virtual void | init ()=0 |
virtual solve_return_type | solve (MatrixSparse< value_type > &matrix_A, int nev, int ncv, const double tol, const unsigned int m_its)=0 |
solve_return_type | solve (boost::shared_ptr< MatrixSparse< value_type > > &matrix_A, int nev, int ncv, const double tol, const unsigned int m_its) |
virtual solve_return_type | solve (MatrixSparse< value_type > &matrix_A, MatrixSparse< value_type > &matrix_B, int nev, int ncv, const double tol, const unsigned int m_its)=0 |
solve_return_type | solve (boost::shared_ptr< MatrixSparse< value_type > > &matrix_A, boost::shared_ptr< MatrixSparse< value_type > > &matrix_B, int nev, int ncv, const double tol, const unsigned int m_its) |
Protected Attributes | |
EigenProblemType | M_eigen_problem_type |
EigenSolverType | M_eigen_solver_type |
bool | M_is_initialized |
size_type | M_maxit |
max number of iterations | |
size_type | M_ncv |
number of eigenvalues | |
size_type | M_nev |
number of eigenvalues | |
PositionOfSpectrum | M_position_of_spectrum |
std::string | M_prefix |
SpectralTransformType | M_spectral_transform |
value_type | M_tolerance |
tolerance | |
Constructors, destructor | |
SolverEigen () | |
SolverEigen (po::variables_map const &vm, std::string const &prefix="") | |
SolverEigen (SolverEigen const &) | |
virtual | ~SolverEigen () |
virtual eigenpair_type | eigenPair (unsigned int i)=0 |
virtual eigenmodes_type | eigenModes ()=0 |
static boost::shared_ptr < SolverEigen< value_type > > | build (const SolverPackage solver_package=SOLVERS_SLEPC) |
static boost::shared_ptr < SolverEigen< value_type > > | build (po::variables_map const &vm, std::string const &prefix=std::string()) |
Feel::SolverEigen< T >::SolverEigen | ( | ) |
Constructor. Initializes Solver data structures
Feel::SolverEigen< T >::SolverEigen | ( | po::variables_map const & | vm, |
std::string const & | prefix = "" |
||
) |
Constructor. Initializes Solver data structures
The prefix
parameter allows to set different eigensolver options for different eigensolver. It allows to distinguish between these options
vm | variables map |
prefix | string that allows for various options of the same type |
Feel::SolverEigen< T >::SolverEigen | ( | SolverEigen< T > const & | eis | ) |
copy constructor
|
virtual |
Destructor.
|
static |
Builds a SolverEigen
using the linear solver package specified by solver_package
|
static |
Builds a SolverEigen
using the linear solver package specified by vm
vm | variables_map that contains the command line options and their defaults |
prefix | string that allows for various options of the same type |
|
inlinevirtual |
Release all memory and clear data structures.
|
pure virtual |
Returns the ith
eigenvalue (real and imaginary part), and copies the \ ith eigen vector to the solution vector.
|
inline |
Returns the type of the eigen problem.
References Feel::SolverEigen< T >::M_eigen_problem_type.
|
inline |
Returns the type of eigensolver to use.
References Feel::SolverEigen< T >::M_eigen_solver_type.
|
pure virtual |
Initialize data structures if not done so already.
|
inline |
References Feel::SolverEigen< T >::M_is_initialized.
|
inline |
Returns the maximum number of iterations
References Feel::SolverEigen< T >::M_maxit.
|
inline |
Returns the number of eigenvalues to compute
References Feel::SolverEigen< T >::M_nev.
|
inline |
Returns the number of eigenvalues to compute
References Feel::SolverEigen< T >::M_ncv.
|
inline |
Returns the position of the spectrum to compute.
References Feel::SolverEigen< T >::M_position_of_spectrum.
|
inline |
References Feel::SolverEigen< T >::M_prefix.
|
inline |
Sets the type of the eigenproblem.
References Feel::SolverEigen< T >::M_eigen_problem_type.
|
inline |
Sets the type of eigensolver to use.
References Feel::SolverEigen< T >::M_eigen_solver_type.
|
inline |
set the max number of iterations
maxiter | maximum number of iterations |
References Feel::SolverEigen< T >::M_maxit.
|
inline |
set the number of eigenvalues to compute
References Feel::SolverEigen< T >::M_nev.
|
inline |
set the number of eigenvalues to have converged
References Feel::SolverEigen< T >::M_ncv.
|
inline |
Sets the position of the spectrum.
References Feel::SolverEigen< T >::M_position_of_spectrum.
|
inline |
set the spectral transform
References Feel::SolverEigen< T >::M_spectral_transform.
|
inline |
|
pure virtual |
Solves the standard eigen problem and returns the number of converged eigenpairs and the number of iterations.
|
inline |
Solves the standard eigen problem and returns the number of converged eigenpairs and the number of iterations.
References Feel::SolverEigen< T >::solve().
|
pure virtual |
Solves the generalized eigen value problem and returns the number of converged eigenpairs and the number of iterations.
|
inline |
Solves the generalized eigen value problem and returns the number of converged eigenpairs and the number of iterations.
References Feel::SolverEigen< T >::solve().
|
inline |
Returns the spectral transforms
References Feel::SolverEigen< T >::M_spectral_transform.
|
inline |
Returns the tolerance to be reached by eigenvalue solver
References Feel::SolverEigen< T >::M_tolerance.
|
protected |
Enum stating which type of eigen problem we deal with.
|
protected |
Enum stating which type of eigensolver to use.
|
protected |
Flag indicating if the data structures have been initialized.
|
protected |
Enum stating where to evaluate the spectrum.
|
protected |
prefix to differentiate eigen solvers
|
protected |
spectral transformation type