ergo
|
Contains information about a purification process. More...
#include <PuriInfo.h>
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 |
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... | |
Contains information about a purification process.
|
inline |
|
inlinevirtual |
|
inline |
Referenced by get_dens_from_fock_sparse().
|
inline |
void mat::PuriInfo< Treal, Tvector, TdebugPolicy >::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.
Also computes optimal thresh-value for the current step.
References mat::Interval< Treal >::decrease(), mat::Interval< Treal >::empty(), mat::Interval< Treal >::length(), mat::Interval< Treal >::low(), mat::Interval< Treal >::puriStep(), and mat::Interval< Treal >::upp().
void mat::PuriInfo< Treal, Tvector, TdebugPolicy >::forceCorrectOccupation | ( | ) |
Set the correctOccupation flag in the current step to 1.
double mat::PuriInfo< Treal, Tvector, TdebugPolicy >::getAccumulatedTimeSquare | ( | ) | const |
Referenced by get_dens_from_fock_sparse().
double mat::PuriInfo< Treal, Tvector, TdebugPolicy >::getAccumulatedTimeThresh | ( | ) | const |
Referenced by get_dens_from_fock_sparse().
double mat::PuriInfo< Treal, Tvector, TdebugPolicy >::getAccumulatedTimeTotal | ( | ) | const |
Referenced by get_dens_from_fock_sparse().
double mat::PuriInfo< Treal, Tvector, TdebugPolicy >::getAccumulatedTimeXmX2Norm | ( | ) | const |
Referenced by get_dens_from_fock_sparse().
|
inline |
void mat::PuriInfo< Treal, Tvector, TdebugPolicy >::getHOMOandLUMOeigVecs | ( | Tvector & | eigVecLUMO, |
Tvector & | eigVecHOMO | ||
) | const |
Referenced by get_dens_from_fock_sparse().
|
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().
|
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().
|
inline |
|
inline |
|
inline |
|
inline |
Referenced by get_dens_from_fock_sparse().
Treal mat::PuriInfo< Treal, Tvector, TdebugPolicy >::getOptimalThresh | ( | ) | const |
Treal mat::PuriInfo< Treal, Tvector, TdebugPolicy >::getThreshIncreasingGap | ( | Interval< Treal > const & | middleGap | ) | 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().
void mat::PuriInfo< Treal, Tvector, TdebugPolicy >::improveCorrectOccupation | ( | ) |
Improves the correct occupation indicator Call AFTER convergence and ONLY if it is known that the occupation is correct at convergence.
References mat::Interval< Treal >::cover(), mat::Interval< Treal >::decrease(), distance(), mat::Interval< Treal >::empty(), mat::Interval< Treal >::intersect(), mat::Interval< Treal >::puriStep(), and template_blas_sqrt().
void mat::PuriInfo< Treal, Tvector, TdebugPolicy >::improveHomoLumoF | ( | ) |
void mat::PuriInfo< Treal, Tvector, TdebugPolicy >::improveInfo | ( | ) |
Improve homo / lumo values in each step.
Call after call to improveCorrectOccupation()
|
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().
void mat::PuriInfo< Treal, Tvector, TdebugPolicy >::mInfo | ( | std::ostream & | file | ) | const |
References mat::getNormTypeString().
Referenced by get_dens_from_fock_sparse().
void mat::PuriInfo< Treal, Tvector, TdebugPolicy >::mMemUsage | ( | std::ostream & | file | ) | const |
References mat::MemUsage::Values::peak, mat::MemUsage::Values::res, and mat::MemUsage::Values::virt.
Referenced by get_dens_from_fock_sparse().
void mat::PuriInfo< Treal, Tvector, TdebugPolicy >::mTimings | ( | std::ostream & | file | ) | const |
Referenced by get_dens_from_fock_sparse().
|
inline |
bool mat::PuriInfo< Treal, Tvector, TdebugPolicy >::ShouldComputeXmX2EuclNormAccurately | ( | Treal & | howAccurate | ) | const |
|
inline |
Returns the subspace error introduced so far.
Referenced by get_dens_from_fock_sparse(), and mat::PuriInfo< Treal, VectorType, TdebugPolicy >::subspaceError().
|
protected |
Returns the subspace error introduced until step end.
|
protected |
Correct occupation was
assumed, not guaranteed.
Referenced by mat::PuriInfo< Treal, VectorType, TdebugPolicy >::correct_occupation_was_forced().
|
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, VectorType, TdebugPolicy >::getEigFInterval().
|
protected |
Interval containing the HOMO eigenvalue before transformation to [0, 1].
Hopefully improved after purification.
Referenced by mat::PuriInfo< Treal, VectorType, TdebugPolicy >::getHomoF().
|
protected |
Interval containing the LUMO eigenvalue before transformation to [0, 1].
Hopefully improved after purification.
Referenced by mat::PuriInfo< Treal, VectorType, TdebugPolicy >::getLumoF().
|
protected |
Capacity of step array.
Referenced by mat::PuriInfo< Treal, VectorType, TdebugPolicy >::getMaxSteps(), mat::PuriInfo< Treal, VectorType, TdebugPolicy >::getNext(), and mat::PuriInfo< Treal, VectorType, TdebugPolicy >::PuriInfo().
|
protected |
System size.
Referenced by mat::PuriInfo< Treal, VectorType, TdebugPolicy >::PuriInfo().
|
protected |
Number of occupied orbitals.
Referenced by mat::PuriInfo< Treal, VectorType, TdebugPolicy >::PuriInfo().
|
protected |
Norm used for truncation of small matrix elements.
Referenced by mat::PuriInfo< Treal, VectorType, TdebugPolicy >::getNormForTruncation().
|
protected |
Number of taken steps.
Number of used elements in step array.
Referenced by mat::PuriInfo< Treal, VectorType, TdebugPolicy >::converged(), mat::PuriInfo< Treal, VectorType, TdebugPolicy >::getNext(), mat::PuriInfo< Treal, VectorType, TdebugPolicy >::getNSteps(), mat::PuriInfo< Treal, VectorType, TdebugPolicy >::homoIsAccuratelyKnown(), mat::PuriInfo< Treal, VectorType, TdebugPolicy >::lumoIsAccuratelyKnown(), mat::PuriInfo< Treal, VectorType, TdebugPolicy >::operator()(), and mat::PuriInfo< Treal, VectorType, TdebugPolicy >::subspaceError().
|
protected |
Referenced by mat::PuriInfo< Treal, VectorType, TdebugPolicy >::converged(), mat::PuriInfo< Treal, VectorType, TdebugPolicy >::getNext(), mat::PuriInfo< Treal, VectorType, TdebugPolicy >::homoIsAccuratelyKnown(), mat::PuriInfo< Treal, VectorType, TdebugPolicy >::lumoIsAccuratelyKnown(), mat::PuriInfo< Treal, VectorType, TdebugPolicy >::operator()(), mat::PuriInfo< Treal, VectorType, TdebugPolicy >::PuriInfo(), and mat::PuriInfo< Treal, VectorType, TdebugPolicy >::~PuriInfo().
|
protected |
Tolerated error in eigenvalues at convergence.
Referenced by mat::PuriInfo< Treal, VectorType, TdebugPolicy >::PuriInfo().
|
protected |
Tolerated error in angle between correct and computed subspace.
Referenced by mat::PuriInfo< Treal, VectorType, TdebugPolicy >::homoIsAccuratelyKnown(), and mat::PuriInfo< Treal, VectorType, TdebugPolicy >::lumoIsAccuratelyKnown().