EigSolver
This class is used to manage the Eigenvalue Solver. More…
#include "EigSolver.h"
Public Functions
Name | |
---|---|
virtual | ~EigSolver() =0 Deletes the object. |
virtual void | Set_Solver(MatrixProd &restrict MAT, MatrixProd *const restrict PREC =nullptr) =0 Sets the solver allocating scratches for computation and preparing matrices. |
virtual void | Solve(MatrixProd &restrict MAT, const DDMat &restrict V0, VEC< rExt > &restrict EigValues, DDMat &restrict EigVectors, MatrixProd *const restrict PREC =nullptr) =0 Solves the eigenvalue problem. |
void | set_maxITER(const iReg input_maxITER) Sets the maximum number of iterations. |
void | set_exitTOL(const rExt input_exitTOL) Sets the exit tolerance. |
void | set_nEigs(const iReg input_nEigs) Sets the number of eigenpairs seeked in the solve stage. |
bool | get_solAVAIL() const Returns the value of solAVAIL. |
iReg | get_maxITER() const Returns the value of maxITER. |
iReg | get_exitTOL() const Returns the value of exitTOL. |
iReg | get_nEigs() const Returns the number of eigenpairs seeked in the solve stage. |
iReg | get_ITER() const Returns the number of iterations performed in previous solution. |
const VEC< rExt > * | get_ptr_normRES_eigvals() const Returns an handle to the Euclidean norm of the final iterative residual for each eigenvalue. |
const VEC< rExt > * | get_ptr_normRES_eigvect() const Returns an handle to the Euclidean norm of the final iterative residual for each eigenvalue. |
Protected Functions
Name | |
---|---|
void | alloc_normRES() Allocates residual norms. |
void | delete_normRES() Deletes residual norms. |
Protected Attributes
Name | |
---|---|
bool | solAVAIL Flag denoting whether a solution is available or not. |
iReg | maxITER Maximum number of iterations (parameter to be set before solve). |
rExt | exitTOL Exit tolerance (parameter to be set before solve). |
iReg | nEigs Number of eigenpairs seeked in the solve stage. |
iReg | ITER Total number of iterations. |
VEC< rExt > | normRES_eigvals Euclidean norm of the final iterative residual for each eigenvalue. |
VEC< rExt > | normRES_eigvect Euclidean norm of the final iterative residual for each eigenvector. |
Detailed Description
class EigSolver;
This class is used to manage the Eigenvalue Solver.
class EigSolver.
Public Functions Documentation
function ~EigSolver
virtual ~EigSolver() =0
Deletes the object.
function Set_Solver
virtual void Set_Solver(
MatrixProd &__restrict__ MAT,
MatrixProd *const __restrict__ PREC =nullptr
) =0
Sets the solver allocating scratches for computation and preparing matrices.
Reimplemented by: PowMeth::Set_Solver, SRQCG::Set_Solver
function Solve
virtual void Solve(
MatrixProd &__restrict__ MAT,
const DDMat &__restrict__ V0,
VEC< rExt > &__restrict__ EigValues,
DDMat &__restrict__ EigVectors,
MatrixProd *const __restrict__ PREC =nullptr
) =0
Solves the eigenvalue problem.
Parameters:
- MAT system matrix.
- V0 input tentative eigenspace. If its size is smaller than the number of eigenpairs seeked, the tentative eigenspace is padded with random vectors.
Reimplemented by: PowMeth::Solve, SRQCG::Solve
function set_maxITER
void set_maxITER(
const iReg input_maxITER
)
Sets the maximum number of iterations.
function set_exitTOL
void set_exitTOL(
const rExt input_exitTOL
)
Sets the exit tolerance.
function set_nEigs
void set_nEigs(
const iReg input_nEigs
)
Sets the number of eigenpairs seeked in the solve stage.
function get_solAVAIL
inline bool get_solAVAIL() const
Returns the value of solAVAIL.
function get_maxITER
inline iReg get_maxITER() const
Returns the value of maxITER.
function get_exitTOL
inline iReg get_exitTOL() const
Returns the value of exitTOL.
function get_nEigs
inline iReg get_nEigs() const
Returns the number of eigenpairs seeked in the solve stage.
function get_ITER
inline iReg get_ITER() const
Returns the number of iterations performed in previous solution.
function get_ptr_normRES_eigvals
inline const VEC< rExt > * get_ptr_normRES_eigvals() const
Returns an handle to the Euclidean norm of the final iterative residual for each eigenvalue.
function get_ptr_normRES_eigvect
inline const VEC< rExt > * get_ptr_normRES_eigvect() const
Returns an handle to the Euclidean norm of the final iterative residual for each eigenvalue.
Protected Functions Documentation
function alloc_normRES
void alloc_normRES()
Allocates residual norms.
function delete_normRES
void delete_normRES()
Deletes residual norms.
Protected Attributes Documentation
variable solAVAIL
bool solAVAIL = false;
Flag denoting whether a solution is available or not.
variable maxITER
iReg maxITER;
Maximum number of iterations (parameter to be set before solve).
variable exitTOL
rExt exitTOL;
Exit tolerance (parameter to be set before solve).
variable nEigs
iReg nEigs;
Number of eigenpairs seeked in the solve stage.
variable ITER
iReg ITER = 0;
Total number of iterations.
variable normRES_eigvals
VEC< rExt > normRES_eigvals;
Euclidean norm of the final iterative residual for each eigenvalue.
variable normRES_eigvect
VEC< rExt > normRES_eigvect;
Euclidean norm of the final iterative residual for each eigenvector.
Updated on 12 February 2021 at 11:59:50 CET