DFT-EFE
 
Loading...
Searching...
No Matches
dftefe::linearAlgebra::LanczosExtremeEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace > Class Template Reference

A derived class of OperatorContext to encapsulate the action of a discrete operator on vectors, matrices, etc. More...

#include <LanczosExtremeEigenSolver.h>

Inheritance diagram for dftefe::linearAlgebra::LanczosExtremeEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >:
Collaboration diagram for dftefe::linearAlgebra::LanczosExtremeEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >:

Public Types

using ValueType = blasLapack::scalar_type< ValueTypeOperator, ValueTypeOperand >
 define ValueType as the superior (bigger set) of the ValueTypeOperator and ValueTypeOperand (e.g., between double and complex<double>, complex<double> is the bigger set) More...
 
using RealType = blasLapack::real_type< ValueType >
 
using OpContext = typename HermitianIterativeEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::OpContext
 

Public Member Functions

 LanczosExtremeEigenSolver (const size_type maxKrylovSubspaceSize, const size_type numLowerExtermeEigenValues, const size_type numUpperExtermeEigenValues, std::vector< double > &tolerance, double lanczosBetaTolerance, const Vector< ValueTypeOperand, memorySpace > &initialGuess)
 Constructor. More...
 
 LanczosExtremeEigenSolver (const size_type maxKrylovSubspaceSize, const size_type numLowerExtermeEigenValues, const size_type numUpperExtermeEigenValues, std::vector< double > &tolerance, double lanczosBetaTolerance, std::shared_ptr< const utils::mpi::MPIPatternP2P< memorySpace > > mpiPatternP2P, std::shared_ptr< LinAlgOpContext< memorySpace > > linAlgOpContext)
 
 ~LanczosExtremeEigenSolver ()=default
 Default Destructor. More...
 
void reinit (const size_type maxKrylovSubspaceSize, const size_type numLowerExtermeEigenValues, const size_type numUpperExtermeEigenValues, std::vector< double > &tolerance, double lanczosBetaTolerance, const Vector< ValueTypeOperand, memorySpace > &initialGuess)
 
void reinit (const size_type maxKrylovSubspaceSize, const size_type numLowerExtermeEigenValues, const size_type numUpperExtermeEigenValues, std::vector< double > &tolerance, double lanczosBetaTolerance, std::shared_ptr< const utils::mpi::MPIPatternP2P< memorySpace > > mpiPatternP2P, std::shared_ptr< LinAlgOpContext< memorySpace > > linAlgOpContext)
 
EigenSolverError solve (const OpContext &A, std::vector< RealType > &eigenValues, MultiVector< ValueType, memorySpace > &eigenVectors, bool computeEigenVectors=false, const OpContext &B=IdentityOperatorContext< ValueTypeOperator, ValueTypeOperand, memorySpace >(), const OpContext &BInv=IdentityOperatorContext< ValueTypeOperator, ValueTypeOperand, memorySpace >()) override
 
void getTridiagonalMatrix (std::vector< RealType > &diagonal, std::vector< RealType > &subDiagonal) const
 

Private Attributes

Vector< ValueTypeOperand, memorySpace > d_initialGuess
 
size_type d_maxKrylovSubspaceSize
 
size_type d_numLowerExtermeEigenValues
 
size_type d_numUpperExtermeEigenValues
 
std::vector< double > d_tolerance
 
double d_lanczosBetaTolerance
 
std::vector< RealTyped_diagonal
 
std::vector< RealTyped_subDiagonal
 
bool d_isSolved
 

Detailed Description

template<typename ValueTypeOperator, typename ValueTypeOperand, utils::MemorySpace memorySpace>
class dftefe::linearAlgebra::LanczosExtremeEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >

A derived class of OperatorContext to encapsulate the action of a discrete operator on vectors, matrices, etc.

Template Parameters
ValueTypeOperatorThe datatype (float, double, complex<double>, etc.) for the underlying operator
ValueTypeOperandThe datatype (float, double, complex<double>, etc.) of the vector, matrices, etc. on which the operator will act
memorySpaceThe meory sapce (HOST, DEVICE, HOST_PINNED, etc.) in which the data of the operator and its operands reside

Member Typedef Documentation

◆ OpContext

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
using dftefe::linearAlgebra::LanczosExtremeEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::OpContext = typename HermitianIterativeEigenSolver<ValueTypeOperator, ValueTypeOperand, memorySpace>::OpContext

◆ RealType

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
using dftefe::linearAlgebra::LanczosExtremeEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::RealType = blasLapack::real_type<ValueType>

◆ ValueType

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
using dftefe::linearAlgebra::LanczosExtremeEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::ValueType = blasLapack::scalar_type<ValueTypeOperator, ValueTypeOperand>

define ValueType as the superior (bigger set) of the ValueTypeOperator and ValueTypeOperand (e.g., between double and complex<double>, complex<double> is the bigger set)

Constructor & Destructor Documentation

◆ LanczosExtremeEigenSolver() [1/2]

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
dftefe::linearAlgebra::LanczosExtremeEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::LanczosExtremeEigenSolver ( const size_type  maxKrylovSubspaceSize,
const size_type  numLowerExtermeEigenValues,
const size_type  numUpperExtermeEigenValues,
std::vector< double > &  tolerance,
double  lanczosBetaTolerance,
const Vector< ValueTypeOperand, memorySpace > &  initialGuess 
)

Constructor.

◆ LanczosExtremeEigenSolver() [2/2]

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
dftefe::linearAlgebra::LanczosExtremeEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::LanczosExtremeEigenSolver ( const size_type  maxKrylovSubspaceSize,
const size_type  numLowerExtermeEigenValues,
const size_type  numUpperExtermeEigenValues,
std::vector< double > &  tolerance,
double  lanczosBetaTolerance,
std::shared_ptr< const utils::mpi::MPIPatternP2P< memorySpace > >  mpiPatternP2P,
std::shared_ptr< LinAlgOpContext< memorySpace > >  linAlgOpContext 
)

◆ ~LanczosExtremeEigenSolver()

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
dftefe::linearAlgebra::LanczosExtremeEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::~LanczosExtremeEigenSolver ( )
default

Default Destructor.

Member Function Documentation

◆ getTridiagonalMatrix()

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
void dftefe::linearAlgebra::LanczosExtremeEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::getTridiagonalMatrix ( std::vector< RealType > &  diagonal,
std::vector< RealType > &  subDiagonal 
) const
Here is the call graph for this function:

◆ reinit() [1/2]

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
void dftefe::linearAlgebra::LanczosExtremeEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::reinit ( const size_type  maxKrylovSubspaceSize,
const size_type  numLowerExtermeEigenValues,
const size_type  numUpperExtermeEigenValues,
std::vector< double > &  tolerance,
double  lanczosBetaTolerance,
const Vector< ValueTypeOperand, memorySpace > &  initialGuess 
)

◆ reinit() [2/2]

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
void dftefe::linearAlgebra::LanczosExtremeEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::reinit ( const size_type  maxKrylovSubspaceSize,
const size_type  numLowerExtermeEigenValues,
const size_type  numUpperExtermeEigenValues,
std::vector< double > &  tolerance,
double  lanczosBetaTolerance,
std::shared_ptr< const utils::mpi::MPIPatternP2P< memorySpace > >  mpiPatternP2P,
std::shared_ptr< LinAlgOpContext< memorySpace > >  linAlgOpContext 
)
Here is the call graph for this function:

◆ solve()

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
EigenSolverError dftefe::linearAlgebra::LanczosExtremeEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::solve ( const OpContext A,
std::vector< RealType > &  eigenValues,
MultiVector< ValueType, memorySpace > &  eigenVectors,
bool  computeEigenVectors = false,
const OpContext B = IdentityOperatorContext<ValueTypeOperator, ValueTypeOperand, memorySpace>(),
const OpContext BInv = IdentityOperatorContext<ValueTypeOperator, ValueTypeOperand, memorySpace>() 
)
override
Here is the call graph for this function:

Member Data Documentation

◆ d_diagonal

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
std::vector<RealType> dftefe::linearAlgebra::LanczosExtremeEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::d_diagonal
private

◆ d_initialGuess

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
Vector<ValueTypeOperand, memorySpace> dftefe::linearAlgebra::LanczosExtremeEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::d_initialGuess
private

◆ d_isSolved

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
bool dftefe::linearAlgebra::LanczosExtremeEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::d_isSolved
private

◆ d_lanczosBetaTolerance

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
double dftefe::linearAlgebra::LanczosExtremeEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::d_lanczosBetaTolerance
private

◆ d_maxKrylovSubspaceSize

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
size_type dftefe::linearAlgebra::LanczosExtremeEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::d_maxKrylovSubspaceSize
private

◆ d_numLowerExtermeEigenValues

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
size_type dftefe::linearAlgebra::LanczosExtremeEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::d_numLowerExtermeEigenValues
private

◆ d_numUpperExtermeEigenValues

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
size_type dftefe::linearAlgebra::LanczosExtremeEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::d_numUpperExtermeEigenValues
private

◆ d_subDiagonal

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
std::vector<RealType> dftefe::linearAlgebra::LanczosExtremeEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::d_subDiagonal
private

◆ d_tolerance

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace>
std::vector<double> dftefe::linearAlgebra::LanczosExtremeEigenSolver< ValueTypeOperator, ValueTypeOperand, memorySpace >::d_tolerance
private

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