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. | |
void | improveCorrectOccupation () |
Improves the correct occupation indicator Call AFTER convergence and ONLY if it is known that the occupation is correct at convergence. | |
void | improveInfo () |
Improve homo / lumo values in each step. | |
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. | |
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. | |
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]) | |
Interval< Treal > | getLumoF () const |
Returns the best interval containing the lumo eigenvalue (not transformed to [0, 1]) | |
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. | |
bool | lumoIsAccuratelyKnown () const |
LUMO estimation is considered to be accurate if the error is smaller than tolSubspaceError / 100 in some purification step. | |
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. | |
Protected Attributes | |
int | n |
System size. | |
int | nocc |
Number of occupied orbitals. | |
PuriStepInfo< Treal, Tvector, TdebugPolicy > * | step |
int | maxSteps |
Capacity of step array. | |
int | nSteps |
Number of taken steps. | |
bool | correct_occupation_was_forced_flag |
Correct occupation was assumed, not guaranteed. | |
Interval< Treal > const | eigFInterval |
Interval containing all eigenvalues before transformation to the [0, 1] interval. | |
Interval< Treal > | homoF |
Interval containing the HOMO eigenvalue before transformation to [0, 1]. | |
Interval< Treal > | lumoF |
Interval containing the LUMO eigenvalue before transformation to [0, 1]. | |
Treal const | tolSubspaceError |
Tolerated error in angle between correct and computed subspace. | |
Treal const | tolEigenvalError |
Tolerated error in eigenvalues at convergence. | |
normType const | normForTruncation |
Norm used for truncation of small matrix elements. |
Contains information about a purification process.
mat::PuriInfo::PuriInfo | ( | int | nn, |
int | noc, | ||
Interval< Treal > | eigFInt, | ||
Interval< Treal > | hoF, | ||
Interval< Treal > | luF, | ||
Treal | toleratedEigenvalError, | ||
Treal | toleratedSubspaceError, | ||
normType | normForTruncation_, | ||
int | maxS = 100 |
||
) | [inline] |
virtual mat::PuriInfo::~PuriInfo | ( | ) | [inline, virtual] |
bool mat::PuriInfo::converged | ( | ) | [inline] |
Referenced by get_dens_from_fock_sparse().
bool mat::PuriInfo::correct_occupation_was_forced | ( | ) | const [inline] |
void mat::PuriInfo::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::puriStep(), mat::Interval::empty(), mat::Interval::upp(), mat::Interval::low(), mat::Interval::length(), and mat::Interval::decrease().
void mat::PuriInfo::forceCorrectOccupation | ( | ) |
Set the correctOccupation flag in the current step to 1.
double mat::PuriInfo::getAccumulatedTimeSquare | ( | ) | const |
Referenced by get_dens_from_fock_sparse().
double mat::PuriInfo::getAccumulatedTimeThresh | ( | ) | const |
Referenced by get_dens_from_fock_sparse().
double mat::PuriInfo::getAccumulatedTimeTotal | ( | ) | const |
Referenced by get_dens_from_fock_sparse().
double mat::PuriInfo::getAccumulatedTimeXmX2Norm | ( | ) | const |
Referenced by get_dens_from_fock_sparse().
Interval<Treal> mat::PuriInfo::getEigFInterval | ( | ) | const [inline] |
Referenced by mat::Purification::Purification().
void mat::PuriInfo::getHOMOandLUMOeigVecs | ( | Tvector & | eigVecLUMO, |
Tvector & | eigVecHOMO | ||
) | const |
Referenced by get_dens_from_fock_sparse().
Interval<Treal> mat::PuriInfo::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::Purification().
Interval<Treal> mat::PuriInfo::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::Purification().
int mat::PuriInfo::getMaxSteps | ( | ) | const [inline] |
PuriStepInfo<Treal, Tvector, TdebugPolicy>& mat::PuriInfo::getNext | ( | ) | [inline] |
Referenced by mat::Purification::Purification().
normType mat::PuriInfo::getNormForTruncation | ( | ) | const [inline] |
int mat::PuriInfo::getNSteps | ( | ) | const [inline] |
Referenced by get_dens_from_fock_sparse().
Treal mat::PuriInfo::getOptimalThresh | ( | ) | const |
References mat::Interval::empty(), mat::Interval::upp(), template_blas_sqrt(), and ASSERTALWAYS.
Referenced by mat::Purification::Purification().
Treal mat::PuriInfo::getThreshIncreasingGap | ( | Interval< Treal > const & | middleGap | ) | const |
References mat::Interval::midPoint(), mat::Interval::upp(), template_blas_fabs(), and ASSERTALWAYS.
bool mat::PuriInfo::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().
void mat::PuriInfo::improveCorrectOccupation | ( | ) |
Improves the correct occupation indicator Call AFTER convergence and ONLY if it is known that the occupation is correct at convergence.
References distance(), template_blas_sqrt(), mat::Interval::empty(), mat::Interval::puriStep(), mat::Interval::decrease(), mat::Interval::intersect(), and mat::Interval::cover().
void mat::PuriInfo::improveHomoLumoF | ( | ) |
void mat::PuriInfo::improveInfo | ( | ) |
Improve homo / lumo values in each step.
Call after call to improveCorrectOccupation()
bool mat::PuriInfo::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().
void mat::PuriInfo::mInfo | ( | std::ostream & | file | ) | const |
References mat::getNormTypeString().
Referenced by get_dens_from_fock_sparse().
void mat::PuriInfo::mMemUsage | ( | std::ostream & | file | ) | const |
References mat::MemUsage::Values::res, mat::MemUsage::Values::virt, and mat::MemUsage::Values::peak.
Referenced by get_dens_from_fock_sparse().
void mat::PuriInfo::mTimings | ( | std::ostream & | file | ) | const |
Referenced by get_dens_from_fock_sparse().
PuriStepInfo<Treal, Tvector, TdebugPolicy>& mat::PuriInfo::operator() | ( | int const | ind | ) | [inline] |
bool mat::PuriInfo::ShouldComputeXmX2EuclNormAccurately | ( | Treal & | howAccurate | ) | const |
Treal mat::PuriInfo::subspaceError | ( | ) | const [inline] |
Returns the subspace error introduced so far.
Referenced by get_dens_from_fock_sparse(), and mat::PuriInfo< Treal, VectorType, TdebugPolicy >::subspaceError().
Treal mat::PuriInfo::subspaceError | ( | int | end | ) | const [protected] |
Returns the subspace error introduced until step end.
bool mat::PuriInfo::correct_occupation_was_forced_flag [protected] |
Correct occupation was assumed, not guaranteed.
Referenced by mat::PuriInfo< Treal, VectorType, TdebugPolicy >::correct_occupation_was_forced().
Interval<Treal> const mat::PuriInfo::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, VectorType, TdebugPolicy >::getEigFInterval().
Interval<Treal> mat::PuriInfo::homoF [protected] |
Interval containing the HOMO eigenvalue before transformation to [0, 1].
Hopefully improved after purification.
Referenced by mat::PuriInfo< Treal, VectorType, TdebugPolicy >::getHomoF().
Interval<Treal> mat::PuriInfo::lumoF [protected] |
Interval containing the LUMO eigenvalue before transformation to [0, 1].
Hopefully improved after purification.
Referenced by mat::PuriInfo< Treal, VectorType, TdebugPolicy >::getLumoF().
int mat::PuriInfo::maxSteps [protected] |
Capacity of step array.
Referenced by mat::PuriInfo< Treal, VectorType, TdebugPolicy >::PuriInfo(), mat::PuriInfo< Treal, VectorType, TdebugPolicy >::getNext(), and mat::PuriInfo< Treal, VectorType, TdebugPolicy >::getMaxSteps().
int mat::PuriInfo::n [protected] |
System size.
Referenced by mat::PuriInfo< Treal, VectorType, TdebugPolicy >::PuriInfo().
int mat::PuriInfo::nocc [protected] |
Number of occupied orbitals.
Referenced by mat::PuriInfo< Treal, VectorType, TdebugPolicy >::PuriInfo().
normType const mat::PuriInfo::normForTruncation [protected] |
Norm used for truncation of small matrix elements.
Referenced by mat::PuriInfo< Treal, VectorType, TdebugPolicy >::getNormForTruncation().
int mat::PuriInfo::nSteps [protected] |
Number of taken steps.
Number of used elements in step array.
Referenced by mat::PuriInfo< Treal, VectorType, TdebugPolicy >::getNext(), mat::PuriInfo< Treal, VectorType, TdebugPolicy >::operator()(), mat::PuriInfo< Treal, VectorType, TdebugPolicy >::subspaceError(), mat::PuriInfo< Treal, VectorType, TdebugPolicy >::getNSteps(), mat::PuriInfo< Treal, VectorType, TdebugPolicy >::converged(), mat::PuriInfo< Treal, VectorType, TdebugPolicy >::homoIsAccuratelyKnown(), and mat::PuriInfo< Treal, VectorType, TdebugPolicy >::lumoIsAccuratelyKnown().
PuriStepInfo<Treal, Tvector, TdebugPolicy>* mat::PuriInfo::step [protected] |
Referenced by mat::PuriInfo< Treal, VectorType, TdebugPolicy >::PuriInfo(), mat::PuriInfo< Treal, VectorType, TdebugPolicy >::~PuriInfo(), mat::PuriInfo< Treal, VectorType, TdebugPolicy >::getNext(), mat::PuriInfo< Treal, VectorType, TdebugPolicy >::operator()(), mat::PuriInfo< Treal, VectorType, TdebugPolicy >::converged(), mat::PuriInfo< Treal, VectorType, TdebugPolicy >::homoIsAccuratelyKnown(), and mat::PuriInfo< Treal, VectorType, TdebugPolicy >::lumoIsAccuratelyKnown().
Treal const mat::PuriInfo::tolEigenvalError [protected] |
Tolerated error in eigenvalues at convergence.
Referenced by mat::PuriInfo< Treal, VectorType, TdebugPolicy >::PuriInfo().
Treal const mat::PuriInfo::tolSubspaceError [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().