ergo
mat::PuriInfo< Treal, Tvector, TdebugPolicy > Class Template Reference

Contains information about a purification process. More...

#include <PuriInfo.h>

Inheritance diagram for mat::PuriInfo< Treal, Tvector, TdebugPolicy >:

Public Member Functions

 PuriInfo (int nn, int noc, Interval< Treal > eigFInt, Interval< Treal > hoF, Interval< Treal > luF, Treal toleratedEigenvalError, Treal toleratedSubspaceError, normType normForTruncation_, int maxS=100)
 
virtual ~PuriInfo ()
 
void forceCorrectOccupation ()
 Set the correctOccupation flag in the current step to 1. More...
 
void improveCorrectOccupation ()
 Improves the correct occupation indicator Call AFTER convergence and ONLY if it is known that the occupation is correct at convergence. More...
 
void improveInfo ()
 Improve homo / lumo values in each step. More...
 
Interval< Treal > getEigFInterval () const
 
PuriStepInfo< Treal, Tvector, TdebugPolicy > & getNext ()
 
PuriStepInfo< Treal, Tvector, TdebugPolicy > & operator() (int const ind)
 
Treal subspaceError () const
 Returns the subspace error introduced so far. More...
 
void estimateStepsLeft (int &stepsLeft, Treal &thresh) const
 Estimates the number of steps (upper bound) needed for convergence based on homo/lumo information and desired accuracy in subspace and eigenvalues. More...
 
Treal getOptimalThresh () const
 
Treal getThreshIncreasingGap (Interval< Treal > const &middleGap) const
 
bool ShouldComputeXmX2EuclNormAccurately (Treal &howAccurate) const
 
Interval< Treal > getHomoF () const
 Returns the best interval containing the homo eigenvalue (not transformed to [0, 1]) More...
 
Interval< Treal > getLumoF () const
 Returns the best interval containing the lumo eigenvalue (not transformed to [0, 1]) More...
 
int getMaxSteps () const
 
int getNSteps () const
 
void getPolys (std::vector< int > &resultVector)
 
void getThreshValues (std::vector< Treal > &resultVector)
 
bool correct_occupation_was_forced () const
 
void improveHomoLumoF ()
 
bool converged ()
 
double getAccumulatedTimeSquare () const
 
double getAccumulatedTimeThresh () const
 
double getAccumulatedTimeXmX2Norm () const
 
double getAccumulatedTimeTotal () const
 
void mTimings (std::ostream &file) const
 
void mInfo (std::ostream &file) const
 
void mMemUsage (std::ostream &file) const
 
bool homoIsAccuratelyKnown () const
 HOMO estimation is considered to be accurate if the error is smaller than tolSubspaceError / 100 in some purification step. More...
 
bool lumoIsAccuratelyKnown () const
 LUMO estimation is considered to be accurate if the error is smaller than tolSubspaceError / 100 in some purification step. More...
 
normType getNormForTruncation () const
 
void getHOMOandLUMOeigVecs (Tvector &eigVecLUMO, Tvector &eigVecHOMO) const
 

Protected Member Functions

Treal subspaceError (int end) const
 Returns the subspace error introduced until step end. More...
 

Protected Attributes

int n
 System size. More...
 
int nocc
 Number of occupied orbitals. More...
 
PuriStepInfo< Treal, Tvector, TdebugPolicy > * step
 
int maxSteps
 Capacity of step array. More...
 
int nSteps
 Number of taken steps. More...
 
bool correct_occupation_was_forced_flag
 Correct occupation was assumed, not guaranteed. More...
 
Interval< Treal > const eigFInterval
 Interval containing all eigenvalues before transformation to the [0, 1] interval. More...
 
Interval< Treal > homoF
 Interval containing the HOMO eigenvalue before transformation to [0, 1]. More...
 
Interval< Treal > lumoF
 Interval containing the LUMO eigenvalue before transformation to [0, 1]. More...
 
Treal const tolSubspaceError
 Tolerated error in angle between correct and computed subspace. More...
 
Treal const tolEigenvalError
 Tolerated error in eigenvalues at convergence. More...
 
normType const normForTruncation
 Norm used for truncation of small matrix elements. More...
 

Detailed Description

template<typename Treal, typename Tvector, typename TdebugPolicy>
class mat::PuriInfo< Treal, Tvector, TdebugPolicy >

Contains information about a purification process.

Constructor & Destructor Documentation

template<typename Treal, typename Tvector, typename TdebugPolicy>
mat::PuriInfo< Treal, Tvector, TdebugPolicy >::PuriInfo ( int  nn,
int  noc,
Interval< Treal >  eigFInt,
Interval< Treal >  hoF,
Interval< Treal >  luF,
Treal  toleratedEigenvalError,
Treal  toleratedSubspaceError,
normType  normForTruncation_,
int  maxS = 100 
)
inline
template<typename Treal, typename Tvector, typename TdebugPolicy>
virtual mat::PuriInfo< Treal, Tvector, TdebugPolicy >::~PuriInfo ( )
inlinevirtual

Member Function Documentation

template<typename Treal, typename Tvector, typename TdebugPolicy>
bool mat::PuriInfo< Treal, Tvector, TdebugPolicy >::converged ( )
inline
template<typename Treal, typename Tvector, typename TdebugPolicy>
bool mat::PuriInfo< Treal, Tvector, TdebugPolicy >::correct_occupation_was_forced ( ) const
inline
template<typename Treal , typename Tvector , typename TdebugPolicy >
void mat::PuriInfo< Treal, Tvector, TdebugPolicy >::forceCorrectOccupation ( )
template<typename Treal , typename Tvector , typename TdebugPolicy >
double mat::PuriInfo< Treal, Tvector, TdebugPolicy >::getAccumulatedTimeSquare ( ) const
template<typename Treal , typename Tvector , typename TdebugPolicy >
double mat::PuriInfo< Treal, Tvector, TdebugPolicy >::getAccumulatedTimeThresh ( ) const
template<typename Treal , typename Tvector , typename TdebugPolicy >
double mat::PuriInfo< Treal, Tvector, TdebugPolicy >::getAccumulatedTimeTotal ( ) const
template<typename Treal , typename Tvector , typename TdebugPolicy >
double mat::PuriInfo< Treal, Tvector, TdebugPolicy >::getAccumulatedTimeXmX2Norm ( ) const
template<typename Treal, typename Tvector, typename TdebugPolicy>
Interval<Treal> mat::PuriInfo< Treal, Tvector, TdebugPolicy >::getEigFInterval ( ) const
inline
template<typename Treal , typename Tvector, typename TdebugPolicy >
void mat::PuriInfo< Treal, Tvector, TdebugPolicy >::getHOMOandLUMOeigVecs ( Tvector &  eigVecLUMO,
Tvector &  eigVecHOMO 
) const
template<typename Treal, typename Tvector, typename TdebugPolicy>
Interval<Treal> mat::PuriInfo< Treal, Tvector, TdebugPolicy >::getHomoF ( ) const
inline

Returns the best interval containing the homo eigenvalue (not transformed to [0, 1])

Referenced by get_dens_from_fock_sparse(), and mat::Purification< Treal, Tmatrix, TdebugPolicy >::Purification().

template<typename Treal, typename Tvector, typename TdebugPolicy>
Interval<Treal> mat::PuriInfo< Treal, Tvector, TdebugPolicy >::getLumoF ( ) const
inline

Returns the best interval containing the lumo eigenvalue (not transformed to [0, 1])

Referenced by get_dens_from_fock_sparse(), and mat::Purification< Treal, Tmatrix, TdebugPolicy >::Purification().

template<typename Treal, typename Tvector, typename TdebugPolicy>
int mat::PuriInfo< Treal, Tvector, TdebugPolicy >::getMaxSteps ( ) const
inline
template<typename Treal, typename Tvector, typename TdebugPolicy>
PuriStepInfo<Treal, Tvector, TdebugPolicy>& mat::PuriInfo< Treal, Tvector, TdebugPolicy >::getNext ( )
inline
template<typename Treal, typename Tvector, typename TdebugPolicy>
normType mat::PuriInfo< Treal, Tvector, TdebugPolicy >::getNormForTruncation ( ) const
inline
template<typename Treal, typename Tvector, typename TdebugPolicy>
int mat::PuriInfo< Treal, Tvector, TdebugPolicy >::getNSteps ( ) const
inline
template<typename Treal, typename Tvector, typename TdebugPolicy>
void mat::PuriInfo< Treal, Tvector, TdebugPolicy >::getPolys ( std::vector< int > &  resultVector)
inline
template<typename Treal, typename Tvector, typename TdebugPolicy>
void mat::PuriInfo< Treal, Tvector, TdebugPolicy >::getThreshValues ( std::vector< Treal > &  resultVector)
inline
template<typename Treal, typename Tvector, typename TdebugPolicy>
bool mat::PuriInfo< Treal, Tvector, TdebugPolicy >::homoIsAccuratelyKnown ( ) const
inline

HOMO estimation is considered to be accurate if the error is smaller than tolSubspaceError / 100 in some purification step.

Referenced by mat::PuriInfo< Treal, VectorType, TdebugPolicy >::homoIsAccuratelyKnown(), and mat::PuriInfo< Treal, Tvector, TdebugPolicy >::ShouldComputeXmX2EuclNormAccurately().

template<typename Treal , typename Tvector , typename TdebugPolicy >
void mat::PuriInfo< Treal, Tvector, TdebugPolicy >::improveCorrectOccupation ( )
template<typename Treal , typename Tvector , typename TdebugPolicy >
void mat::PuriInfo< Treal, Tvector, TdebugPolicy >::improveInfo ( )
template<typename Treal, typename Tvector, typename TdebugPolicy>
bool mat::PuriInfo< Treal, Tvector, TdebugPolicy >::lumoIsAccuratelyKnown ( ) const
inline

LUMO estimation is considered to be accurate if the error is smaller than tolSubspaceError / 100 in some purification step.

Referenced by mat::PuriInfo< Treal, VectorType, TdebugPolicy >::lumoIsAccuratelyKnown(), and mat::PuriInfo< Treal, Tvector, TdebugPolicy >::ShouldComputeXmX2EuclNormAccurately().

template<typename Treal, typename Tvector, typename TdebugPolicy>
PuriStepInfo<Treal, Tvector, TdebugPolicy>& mat::PuriInfo< Treal, Tvector, TdebugPolicy >::operator() ( int const  ind)
inline
template<typename Treal, typename Tvector, typename TdebugPolicy>
Treal mat::PuriInfo< Treal, Tvector, TdebugPolicy >::subspaceError ( ) const
inline
template<typename Treal , typename Tvector , typename TdebugPolicy >
Treal mat::PuriInfo< Treal, Tvector, TdebugPolicy >::subspaceError ( int  end) const
protected

Member Data Documentation

template<typename Treal, typename Tvector, typename TdebugPolicy>
bool mat::PuriInfo< Treal, Tvector, TdebugPolicy >::correct_occupation_was_forced_flag
protected
template<typename Treal, typename Tvector, typename TdebugPolicy>
Interval<Treal> const mat::PuriInfo< Treal, Tvector, TdebugPolicy >::eigFInterval
protected

Interval containing all eigenvalues before transformation to the [0, 1] interval.

Also, these bounds will be used for the initial transformation.

Referenced by mat::PuriInfo< Treal, Tvector, TdebugPolicy >::estimateStepsLeft(), mat::PuriInfo< Treal, VectorType, TdebugPolicy >::getEigFInterval(), and mat::PuriInfo< Treal, Tvector, TdebugPolicy >::improveHomoLumoF().

template<typename Treal, typename Tvector, typename TdebugPolicy>
Interval<Treal> mat::PuriInfo< Treal, Tvector, TdebugPolicy >::homoF
protected
template<typename Treal, typename Tvector, typename TdebugPolicy>
Interval<Treal> mat::PuriInfo< Treal, Tvector, TdebugPolicy >::lumoF
protected
template<typename Treal, typename Tvector, typename TdebugPolicy>
int mat::PuriInfo< Treal, Tvector, TdebugPolicy >::maxSteps
protected
template<typename Treal, typename Tvector, typename TdebugPolicy>
int mat::PuriInfo< Treal, Tvector, TdebugPolicy >::n
protected
template<typename Treal, typename Tvector, typename TdebugPolicy>
int mat::PuriInfo< Treal, Tvector, TdebugPolicy >::nocc
protected
template<typename Treal, typename Tvector, typename TdebugPolicy>
normType const mat::PuriInfo< Treal, Tvector, TdebugPolicy >::normForTruncation
protected
template<typename Treal, typename Tvector, typename TdebugPolicy>
int mat::PuriInfo< Treal, Tvector, TdebugPolicy >::nSteps
protected

Number of taken steps.

Number of used elements in step array.

Referenced by mat::PuriInfo< Treal, VectorType, TdebugPolicy >::converged(), mat::PuriInfo< Treal, Tvector, TdebugPolicy >::estimateStepsLeft(), mat::PuriInfo< Treal, Tvector, TdebugPolicy >::forceCorrectOccupation(), mat::PuriInfo< Treal, Tvector, TdebugPolicy >::getAccumulatedTimeSquare(), mat::PuriInfo< Treal, Tvector, TdebugPolicy >::getAccumulatedTimeThresh(), mat::PuriInfo< Treal, Tvector, TdebugPolicy >::getAccumulatedTimeTotal(), mat::PuriInfo< Treal, Tvector, TdebugPolicy >::getAccumulatedTimeXmX2Norm(), mat::PuriInfo< Treal, Tvector, TdebugPolicy >::getHOMOandLUMOeigVecs(), mat::PuriInfo< Treal, VectorType, TdebugPolicy >::getNext(), mat::PuriInfo< Treal, VectorType, TdebugPolicy >::getNSteps(), mat::PuriInfo< Treal, Tvector, TdebugPolicy >::getOptimalThresh(), mat::PuriInfo< Treal, VectorType, TdebugPolicy >::getPolys(), mat::PuriInfo< Treal, VectorType, TdebugPolicy >::getThreshValues(), mat::PuriInfo< Treal, VectorType, TdebugPolicy >::homoIsAccuratelyKnown(), mat::PuriInfo< Treal, Tvector, TdebugPolicy >::improveCorrectOccupation(), mat::PuriInfo< Treal, Tvector, TdebugPolicy >::improveInfo(), mat::PuriInfo< Treal, VectorType, TdebugPolicy >::lumoIsAccuratelyKnown(), mat::PuriInfo< Treal, Tvector, TdebugPolicy >::mInfo(), mat::PuriInfo< Treal, Tvector, TdebugPolicy >::mMemUsage(), mat::PuriInfo< Treal, Tvector, TdebugPolicy >::mTimings(), mat::PuriInfo< Treal, VectorType, TdebugPolicy >::operator()(), mat::PuriInfo< Treal, Tvector, TdebugPolicy >::ShouldComputeXmX2EuclNormAccurately(), and mat::PuriInfo< Treal, VectorType, TdebugPolicy >::subspaceError().

template<typename Treal, typename Tvector, typename TdebugPolicy>
PuriStepInfo<Treal, Tvector, TdebugPolicy>* mat::PuriInfo< Treal, Tvector, TdebugPolicy >::step
protected

Referenced by mat::PuriInfo< Treal, VectorType, TdebugPolicy >::converged(), mat::PuriInfo< Treal, Tvector, TdebugPolicy >::estimateStepsLeft(), mat::PuriInfo< Treal, Tvector, TdebugPolicy >::forceCorrectOccupation(), mat::PuriInfo< Treal, Tvector, TdebugPolicy >::getAccumulatedTimeSquare(), mat::PuriInfo< Treal, Tvector, TdebugPolicy >::getAccumulatedTimeThresh(), mat::PuriInfo< Treal, Tvector, TdebugPolicy >::getAccumulatedTimeTotal(), mat::PuriInfo< Treal, Tvector, TdebugPolicy >::getAccumulatedTimeXmX2Norm(), mat::PuriInfo< Treal, Tvector, TdebugPolicy >::getHOMOandLUMOeigVecs(), mat::PuriInfo< Treal, VectorType, TdebugPolicy >::getNext(), mat::PuriInfo< Treal, Tvector, TdebugPolicy >::getOptimalThresh(), mat::PuriInfo< Treal, VectorType, TdebugPolicy >::getPolys(), mat::PuriInfo< Treal, VectorType, TdebugPolicy >::getThreshValues(), mat::PuriInfo< Treal, VectorType, TdebugPolicy >::homoIsAccuratelyKnown(), mat::PuriInfo< Treal, Tvector, TdebugPolicy >::improveCorrectOccupation(), mat::PuriInfo< Treal, Tvector, TdebugPolicy >::improveHomoLumoF(), mat::PuriInfo< Treal, Tvector, TdebugPolicy >::improveInfo(), mat::PuriInfo< Treal, VectorType, TdebugPolicy >::lumoIsAccuratelyKnown(), mat::PuriInfo< Treal, Tvector, TdebugPolicy >::mInfo(), mat::PuriInfo< Treal, Tvector, TdebugPolicy >::mMemUsage(), mat::PuriInfo< Treal, Tvector, TdebugPolicy >::mTimings(), mat::PuriInfo< Treal, VectorType, TdebugPolicy >::operator()(), mat::PuriInfo< Treal, VectorType, TdebugPolicy >::PuriInfo(), mat::PuriInfo< Treal, Tvector, TdebugPolicy >::ShouldComputeXmX2EuclNormAccurately(), mat::PuriInfo< Treal, Tvector, TdebugPolicy >::subspaceError(), and mat::PuriInfo< Treal, VectorType, TdebugPolicy >::~PuriInfo().

template<typename Treal, typename Tvector, typename TdebugPolicy>
Treal const mat::PuriInfo< Treal, Tvector, TdebugPolicy >::tolEigenvalError
protected
template<typename Treal, typename Tvector, typename TdebugPolicy>
Treal const mat::PuriInfo< Treal, Tvector, TdebugPolicy >::tolSubspaceError
protected

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